freealise commited on
Commit
e5ffaeb
1 Parent(s): 09ad095

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -634,16 +634,6 @@ async(p, d, n)=>{
634
  }
635
  BABYLON.Engine.LastCreatedScene.getAnimationRatio();
636
  //BABYLON.Engine.LastCreatedScene.activeCamera.inertia = 0.0;
637
- var dome = new BABYLON.PhotoDome("dome", p[n].image.url,
638
- {
639
- resolution: 16,
640
- size: 512
641
- }, BABYLON.Engine.LastCreatedScene);
642
- for(i = 0; i < BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children.length; i++) {
643
- let mesh = BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children[i];
644
- mesh.dispose(false, true);
645
- }
646
- BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh").applyDisplacementMap(d.background.url, 0, 255, function(m){try{alert(BABYLON.Engine.Version);BABYLON.Engine.LastCreatedScene.addMesh(m,false);BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh").dispose();}catch(e){alert(e);}}, null, null, true, function(e){alert(e);});
647
  });
648
  if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
649
  BABYLON.Engine.LastCreatedScene.activeCamera.metadata = {
@@ -660,6 +650,17 @@ async(p, d, n)=>{
660
  document.getElementById("model3D").getElementsByTagName("canvas")[0].oncontextmenu = function(e){e.preventDefault();}
661
  document.getElementById("model3D").getElementsByTagName("canvas")[0].ondrag = function(e){e.preventDefault();}
662
 
 
 
 
 
 
 
 
 
 
 
 
663
  clearInterval(intv);
664
  }
665
  } else if (BABYLON) {
 
634
  }
635
  BABYLON.Engine.LastCreatedScene.getAnimationRatio();
636
  //BABYLON.Engine.LastCreatedScene.activeCamera.inertia = 0.0;
 
 
 
 
 
 
 
 
 
 
637
  });
638
  if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
639
  BABYLON.Engine.LastCreatedScene.activeCamera.metadata = {
 
650
  document.getElementById("model3D").getElementsByTagName("canvas")[0].oncontextmenu = function(e){e.preventDefault();}
651
  document.getElementById("model3D").getElementsByTagName("canvas")[0].ondrag = function(e){e.preventDefault();}
652
 
653
+ var dome = new BABYLON.PhotoDome("dome", p[n].image.url,
654
+ {
655
+ resolution: 16,
656
+ size: 512
657
+ }, BABYLON.Engine.LastCreatedScene);
658
+ for(i = 0; i < BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children.length; i++) {
659
+ let mesh = BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children[i];
660
+ mesh.dispose(false, true);
661
+ }
662
+ BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh").applyDisplacementMap(d.background.url, 0, 255, function(m){try{alert(BABYLON.Engine.Version);BABYLON.Engine.LastCreatedScene.addMesh(m,false);BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh").dispose();}catch(e){alert(e);}}, null, null, true, function(e){alert(e);});
663
+
664
  clearInterval(intv);
665
  }
666
  } else if (BABYLON) {