freealise commited on
Commit
60ed6b5
·
verified ·
1 Parent(s): b5211a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -665,14 +665,13 @@ async(c, o, p, d, n, m)=>{
665
  }*/
666
  alert(document.getElementById("output_video").getElementsByTagName("video")[0].src);
667
  alert(document.getElementById("depth_video").getElementsByTagName("video")[0].src);
668
- //alert(BABYLON.VideoDome);
669
 
670
  const videoDome = new BABYLON.VideoDome(
671
  "videoDome",
672
  [document.getElementById("output_video").getElementsByTagName("video")[0].src],
673
  {
674
  resolution: 16,
675
- size: 512
676
  }, BABYLON.Engine.LastCreatedScene
677
  );
678
  var q = BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-2]._children;
@@ -689,10 +688,10 @@ async(c, o, p, d, n, m)=>{
689
  BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].alphaIndex = 1;
690
  BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].visibility = 0.9999;
691
 
692
- window.lat = coords[0].lat;
693
- window.lng = coords[0].lng;
694
- window.heading = coords[0].heading;
695
- window.pitch = coords[0].pitch;
696
 
697
  window.md = false;
698
  window.r_old = 1.0;
@@ -987,10 +986,10 @@ window.snapshot = snapshot;
987
  mesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, positions);
988
 
989
  mesh.rotationQuaternion = null;
990
- mesh.position.z = lat;
991
- mesh.position.x = lng;
992
- mesh.rotation.y = heading / 180 * Math.PI;
993
- mesh.rotation.z = -pitch / 180 * Math.PI;
994
 
995
  return mesh;
996
  }
 
665
  }*/
666
  alert(document.getElementById("output_video").getElementsByTagName("video")[0].src);
667
  alert(document.getElementById("depth_video").getElementsByTagName("video")[0].src);
 
668
 
669
  const videoDome = new BABYLON.VideoDome(
670
  "videoDome",
671
  [document.getElementById("output_video").getElementsByTagName("video")[0].src],
672
  {
673
  resolution: 16,
674
+ size: 512,
675
  }, BABYLON.Engine.LastCreatedScene
676
  );
677
  var q = BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-2]._children;
 
688
  BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].alphaIndex = 1;
689
  BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].visibility = 0.9999;
690
 
691
+ window._Lat = coords[0].lat;
692
+ window._Lng = coords[0].lng;
693
+ window._Heading = coords[0].heading;
694
+ window._Pitch = coords[0].pitch;
695
 
696
  window.md = false;
697
  window.r_old = 1.0;
 
986
  mesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, positions);
987
 
988
  mesh.rotationQuaternion = null;
989
+ mesh.position.z = _Lat;
990
+ mesh.position.x = _Lng;
991
+ mesh.rotation.y = _Heading / 180 * Math.PI;
992
+ mesh.rotation.z = _Pitch / 180 * Math.PI;
993
 
994
  return mesh;
995
  }