@@ -45,7 +45,7 @@ class TesseractViewer {
4545 this . _camera . setPosition ( new BABYLON . Vector3 ( 2.5 , 1.5 , - 1 ) ) ;
4646 // Add lights to the scene
4747 this . _light = new BABYLON . HemisphericLight ( "light1" , new BABYLON . Vector3 ( 0 , - 1 , 0 ) , this . _scene ) ;
48- this . _light . intensity = 0.5
48+ this . _light . intensity = 0.5 ;
4949 this . _root = new BABYLON . TransformNode ( "root0" ) ;
5050 this . _root . rotation . x = - 1.5707963267948966 ;
5151 yield this . updateScene ( ) ;
@@ -112,10 +112,12 @@ class TesseractViewer {
112112 // Enable VR
113113 var ground = BABYLON . MeshBuilder . CreateGround ( "ground" , { width : 10 , height : 10 } , this . _scene ) ;
114114 ground . material = new BABYLON . GridMaterial ( "mat" , this . _scene ) ;
115- const xrHelper = yield this . _scene . createDefaultXRExperienceAsync ( {
116- // define floor meshes
117- floorMeshes : [ ground ]
118- } ) ;
115+ if ( navigator . xr !== undefined ) {
116+ const xrHelper = yield this . _scene . createDefaultXRExperienceAsync ( {
117+ // define floor meshes
118+ floorMeshes : [ ground ]
119+ } ) ;
120+ }
119121 ground . visibility = 0.1 ;
120122 //vrHelper.enableTeleportation({floorMeshes: [environment.ground]});
121123 } ) ;
@@ -317,7 +319,7 @@ class JointTrajectoryAnimation {
317319 }
318320 this . _t0 = new Date ( ) . getTime ( ) / 1000 ;
319321 var _this = this ;
320- this . _timerid = setInterval ( ( ) => _this . intervalCallback ( ) , 100 ) ;
322+ this . _timerid = setInterval ( ( ) => _this . intervalCallback ( ) , 50 ) ;
321323 }
322324 stop ( ) {
323325 if ( this . _timerid == 0 ) {
0 commit comments