Update app.py
Browse files
app.py
CHANGED
@@ -591,7 +591,6 @@ async(c, o, p, d, n, m)=>{
|
|
591 |
}
|
592 |
}*/
|
593 |
BABYLON.Engine.LastCreatedScene.getAnimationRatio();
|
594 |
-
//BABYLON.Engine.LastCreatedScene.activeCamera.inertia = 0.0;
|
595 |
});
|
596 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
597 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata = {
|
@@ -603,11 +602,23 @@ async(c, o, p, d, n, m)=>{
|
|
603 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = 1.0;
|
604 |
|
605 |
BABYLON.Engine.LastCreatedScene.activeCamera.fov = document.getElementById("zoom").value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
606 |
|
607 |
document.getElementById("model3D").getElementsByTagName("canvas")[0].style.filter = "blur(" + Math.ceil(Math.log2(Math.PI/document.getElementById("zoom").value))/2.0*Math.sqrt(2.0) + "px)";
|
608 |
document.getElementById("model3D").getElementsByTagName("canvas")[0].oncontextmenu = function(e){e.preventDefault();}
|
609 |
document.getElementById("model3D").getElementsByTagName("canvas")[0].ondrag = function(e){e.preventDefault();}
|
610 |
|
|
|
|
|
611 |
if (o.indexOf(""+n) < 0) {
|
612 |
if (o != "") { o += ","; }
|
613 |
o += n;
|
@@ -640,6 +651,12 @@ async(c, o, p, d, n, m)=>{
|
|
640 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.diffuseTexture.hasAlpha = true;
|
641 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.useAlphaFromDiffuseTexture = true;
|
642 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].applyDisplacementMap(m[o_[j]].url, 0, 255, function(m){try{alert(BABYLON.Engine.Version);}catch(e){alert(e);}}, null, null, true, function(e){alert(e);});
|
|
|
|
|
|
|
|
|
|
|
|
|
643 |
}
|
644 |
|
645 |
window.md = false;
|
|
|
591 |
}
|
592 |
}*/
|
593 |
BABYLON.Engine.LastCreatedScene.getAnimationRatio();
|
|
|
594 |
});
|
595 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
596 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata = {
|
|
|
602 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = 1.0;
|
603 |
|
604 |
BABYLON.Engine.LastCreatedScene.activeCamera.fov = document.getElementById("zoom").value;
|
605 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.inertia = 0.0;
|
606 |
+
//pan
|
607 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.panningInertia = 0.0;
|
608 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.panningDistanceLimit = 16;
|
609 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.panningSensibility = 16;
|
610 |
+
//zoom
|
611 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.pinchDeltaPercentage = 1/256;
|
612 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.wheelDeltaPercentage = 1/256;
|
613 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.upperRadiusLimit = 1.57 / 0.8;
|
614 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.lowerRadiusLimit = 0.157 / 0.8;
|
615 |
|
616 |
document.getElementById("model3D").getElementsByTagName("canvas")[0].style.filter = "blur(" + Math.ceil(Math.log2(Math.PI/document.getElementById("zoom").value))/2.0*Math.sqrt(2.0) + "px)";
|
617 |
document.getElementById("model3D").getElementsByTagName("canvas")[0].oncontextmenu = function(e){e.preventDefault();}
|
618 |
document.getElementById("model3D").getElementsByTagName("canvas")[0].ondrag = function(e){e.preventDefault();}
|
619 |
|
620 |
+
var coords = JSON.parse(document.getElementById("coords").getElementsByTagName("textarea")[0].value);
|
621 |
+
|
622 |
if (o.indexOf(""+n) < 0) {
|
623 |
if (o != "") { o += ","; }
|
624 |
o += n;
|
|
|
651 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.diffuseTexture.hasAlpha = true;
|
652 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.useAlphaFromDiffuseTexture = true;
|
653 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].applyDisplacementMap(m[o_[j]].url, 0, 255, function(m){try{alert(BABYLON.Engine.Version);}catch(e){alert(e);}}, null, null, true, function(e){alert(e);});
|
654 |
+
|
655 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].rotationQuaternion = null;
|
656 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].position.z = coords[o_[j]].lat;
|
657 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].position.x = coords[o_[j]].lng;
|
658 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].rotation.y = coords[o_[j]].heading / 180 * Math.PI;
|
659 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].rotation.z = -coords[o_[j]].pitch / 180 * Math.PI;
|
660 |
}
|
661 |
|
662 |
window.md = false;
|