Quoted from "augustommm"
Hello guys!
Sorry for being such a newbie!
Where exactly should I place this line of code for this to work?
You could put in the startup action, and pass the argument while sending the address like this: http://mytour/tour.html?enterinvr=true
Source code
1
2
3
4
5
6
7
delayedcall(0.5, if(get(enterinvr), webvr.toggleVR(); ););
trace('VR is active? ', get(enterinvr));
if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
loadscene(get(startscene),merge,blend(4));
if(startactions !== null, startactions() );
</action>
UPDATE:
It seems that on my mobile phone it won't start directly in vr mode, while on desktop under fake vr it does.
Is it required some kind of user interaction to enter in vr mode?
Can we bypass this?
I'm loading the pano inside the webview of an android app.
Namastè.
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 |
<krpano> <include url="plugins/webvr.xml" /> <plugin name="WebVR" mobilevr_fake_support="true" /><layer name="webvr_button" ondown="video_auto_start();" /> <action name="startup" autorun="onstart"> delayedcall(0.5, if(get(enterinvr), webvr.toggleVR(); ););</action> <control mousetype="drag2d" /> <events name="keybcontrol" keep="true" onkeyup="if(keycode == 33, nextscene_loop(-1)); if(keycode == 34, nextscene_loop(+1));" /> <view fovtype="VFOV" fov="90" fovmin="40" fovmax="150" /> <preview url="panos/intro/preview.jpg" /> <image> <cube url="panos/intro/pano_%s.jpg" /> <cube url="panos/intro/mobile_%s.jpg" devices="iOS" /> </image> ... |
@augustommm
Without proper source code, it's hard to say the reason of this conflicting behaviour.![]()
Where did you put the webvr.toggleVR() ?
By the way, have a look at this useful thread, too: [WebVR] How to 'autostart' WebVR with click event *SOLVED*
Namastè.
No, that's not possible cross-browser (only iOS has an API for getting the compass direction).Is there any way to sync a panorama's North orientation to my smartphone compass?
Yes, because it is necessary to switch to the fullscreen mode to use the WebVR API and due browser-security this is only possible as reaction to an user interaction like a click or touch.I've read that thread, and looks like there's no way to Enter VR automaticaly without any user interation.
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 |
<!-- overwrite some settings from the webvr.xml for the skin integration -->
<plugin name="WebVR" keep="true" devices="html5"
multireslock.desktop="true"
multireslock.mobile.or.tablet="false"
mobilevr_fake_support="true"
onavailable="removelayer(webvr_enterbutton); skin_arrange_buttons(); webvr_onavailable();"
onentervr="skin_showloading(false); webvr_onentervr(); webvr_setup();"
onexitvr="webvr_onexitvr(); webvr_setup();"
/>
|
|
|
Quellcode |
1 |
onavailable="removelayer(webvr_enterbutton); skin_arrange_buttons(); webvr_onavailable();" |
|
|
Quellcode |
1 |
onavailable="removelayer(webvr_enterbutton); skin_arrange_buttons(); webvr_onavailable(); enterVR();" |
Unfortunatelly I'm using a Galaxy Note 4.No, that's not possible cross-browser (only iOS has an API for getting the compass direction).
Actually this automatic enterVR option would be for an kiosk, using a desktop and Oculus Rift. In order to require no mouse input, just turn the system on and everything starts to run.If you don't care about Desktop or WebVR API support and want to use only the MobileVR support in special already-fullscreen Android apps, you could also directly call the enterVR() action.
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »augustommm« (16. Oktober 2015, 15:13)
I guess if you are in zoom mode then very little movements would change many degrees in the pano, so you would get sick very easily...
Another thing would be that the gyro plugin recognize that if you are in zoom mode then movements are scaled down so you can move your head a lot without moving a lot of degrees, the problem here is that if you turn 360 degrees in real then you would not be in the same place as in the begining...
I'm not sure but I guess somehow making a zoom will useful and nice in some future...
|
|
Quellcode |
1 2 |
<hotspot name="hsname" distorted="true" vr="true"/> <hotspot name="hs1" parent="hotspot[hsname]" distorted="true" vr="true" align="center" atv="20"/> |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »trek« (27. Oktober 2015, 11:18)
Having this zoom-mode in VR would be awesome for user experience !!!I guess if you are in zoom mode then very little movements would change many degrees in the pano, so you would get sick very easily...
Another thing would be that the gyro plugin recognize that if you are in zoom mode then movements are scaled down so you can move your head a lot without moving a lot of degrees, the problem here is that if you turn 360 degrees in real then you would not be in the same place as in the begining...
I'm not sure but I guess somehow making a zoom will useful and nice in some future...
I have the same expectations, this should work , and give a true experiential and qualitative benefits to the photograph 360 and its derivatives
When you already provide smaller non-multires images (just for iPhones by using the devices attribute), the simplest way to reduce memory usage would be to make them already as small as possible - then krpano doesn't need to downscale them to reduce the memory usage (via the hardwarelimit setting).I can recode the tour to not use multi-res for mobile (see Krpano iPhone Crashes) but is there a way of limiting how much memory get used in order to prevent the problem occurring?
No - there is a new expression parsing since pre-release 2 - see here:so my question is can '-' be used in variable names? </action>
Such would only work for Cardboard, in ever better headsets that would make dizzy.Having this zoom-mode in VR would be awesome for user experience !!!
Yes, get max-fov, min-fov, and interpolate between these slowly. Maybe not lineary so moving to min and max is slower.
I dunno if doable, Klaus ? If you need some betatest let me know ! Would rocks in cardboards on mobile phones !!
Persönlich finde die Autorotation furchtbar störend, aber eine entsprechende Option für das default VTOUR Skin ist aber geplant (mit default auf false natürlichKlaus, warum machst du eigentlich keine Autorotation Option z.B. bei der vtour dazu? Es könnte ja standard auf false stehen und bei true rotiert es und kann per Button gestoppt bzw. gestartet werden.
).|
|
Quellcode |
1 2 |
<autorotate enabled="true" /> <events name="skin_autorotate_events" keep="true" onmousedown="set(autorotate.enabled,false);" /> |
Benutzerinformationen überspringen
Wohnort: Vlaardingen, Netherlands
Beruf: 360º photography, panoramic photography and gigapixel photography
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »vrvprod« (10. November 2015, 17:35)
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.comDieser Beitrag wurde bereits 4 mal editiert, zuletzt von »vollmtbi« (1. November 2015, 14:46)