freealise commited on
Commit
c882b54
·
verified ·
1 Parent(s): fd8eb9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -11
app.py CHANGED
@@ -623,7 +623,7 @@ async(c, o, p, d, n, m)=>{
623
  document.getElementById("model3D").getElementsByTagName("canvas")[0].ondrag = function(e){e.preventDefault();}
624
 
625
  document.getElementById("model3D").appendChild(document.getElementById("compass_box"));
626
- var coords = JSON.parse(document.getElementById("coords").getElementsByTagName("textarea")[0].value);
627
 
628
  if (o.indexOf(""+n) < 0) {
629
  if (o != "") { o += ","; }
@@ -687,11 +687,6 @@ async(c, o, p, d, n, m)=>{
687
  //BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.useAlphaFromEmissiveTexture = true;
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;
@@ -982,11 +977,11 @@ window.snapshot = snapshot;
982
 
983
  mesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, positions);
984
 
985
- /*mesh.rotationQuaternion = null;
986
- mesh.position.z = _Lat;
987
- mesh.position.x = _Lng;
988
- mesh.rotation.y = _Heading / 180 * Math.PI;
989
- mesh.rotation.z = _Pitch / 180 * Math.PI;*/
990
 
991
  return mesh;
992
  }
 
623
  document.getElementById("model3D").getElementsByTagName("canvas")[0].ondrag = function(e){e.preventDefault();}
624
 
625
  document.getElementById("model3D").appendChild(document.getElementById("compass_box"));
626
+ window.coords = JSON.parse(document.getElementById("coords").getElementsByTagName("textarea")[0].value);
627
 
628
  if (o.indexOf(""+n) < 0) {
629
  if (o != "") { o += ","; }
 
687
  //BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.useAlphaFromEmissiveTexture = true;
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.md = false;
692
  window.r_old = 1.0;
 
977
 
978
  mesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, positions);
979
 
980
+ mesh.rotationQuaternion = null;
981
+ mesh.position.z = coords[0].lat;
982
+ mesh.position.x = coords[0].lng;
983
+ mesh.rotation.y = coords[0].heading / 180 * Math.PI;
984
+ mesh.rotation.z = coords[0].pitch / 180 * Math.PI;
985
 
986
  return mesh;
987
  }