Skip to content

Commit

Permalink
Only enable click to change scene for Cardboard B #13
Browse files Browse the repository at this point in the history
  • Loading branch information
Samir L. Boulema committed Dec 17, 2015
1 parent 5df5933 commit d85289e
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/AndroidPano/wwwroot/xml/krpano_vr.xml
Expand Up @@ -7,16 +7,15 @@
<!-- enable the FAKE VR support to allow testing also on desktop and tablets without VR support -->
<plugin
name="WebVR"
mobilevr_fake_support="true"
onentervr="setupVRDevice();" />
mobilevr_fake_support="true" />

<!-- use the dragging control by default -->
<control mousetype="drag2d" />

<!-- the intro pano -->
<view fovtype="VFOV" fov="90" fovmin="40" fovmax="150" />

<events name="change_scene" keep="true" onclick="nextscene_loop(+1);" />
<events name="change_scene" keep="true" onclick="click_nextscene_loop();" />

<!-- hotspots -->
<style
Expand All @@ -38,18 +37,14 @@
sub(lastsceneindex, scene.count, 1);
if(newsceneindex LT 0, copy(newsceneindex,lastsceneindex));
if(newsceneindex GT lastsceneindex, set(newsceneindex,0));
loadscene(get(scene[get(newsceneindex)].name), null, NOPREVIEW|MERGE|KEEPMOVING, BLEND(1));
loadscene(get(scene[get(newsceneindex)].name), null, NOPREVIEW|MERGE|KEEPMOVING, COLORBLEND(3.0, 0x000000, easeOutSine));
);
</action>

<action name="setupVRDevice">
webvr_onentervr();

jscall(console.log(krpano.get("webvr.devicename")));

jscall(alert(krpano.get("webvr.devicename")));

<!--if(devicename == "CardBoard B");-->
<action name="click_nextscene_loop">
<!--CardBoard B-->
jsget(headset, 'localStorage.getItem("krpano.webvr.1")');
if (headset == "63.5,0,96,0.6,100,3", nextscene_loop(+1));
</action>

<!-- TEMP PRE-RELEASE STUFF -->
Expand Down

0 comments on commit d85289e

Please sign in to comment.