Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -439,7 +439,23 @@ on_click="""
|
|
439 |
async()=>{
|
440 |
var intv = setInterval(function(){
|
441 |
if (BABYLON && BABYLON.Engine.LastCreatedScene) {
|
442 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
443 |
clearInterval(intv);
|
444 |
}
|
445 |
}, 40);
|
|
|
439 |
async()=>{
|
440 |
var intv = setInterval(function(){
|
441 |
if (BABYLON && BABYLON.Engine.LastCreatedScene) {
|
442 |
+
for (var i=0; i<BABYLON.Engine.LastCreatedScene.getNodes().length; i++) {
|
443 |
+
if (BABYLON.Engine.LastCreatedScene.getNodes()[i].material) {
|
444 |
+
BABYLON.Engine.LastCreatedScene.getNodes()[i].material.pointSize = Math.ceil(Math.sqrt(2)*Math.log2(Math.PI/document.getElementById("zoom").value));
|
445 |
+
}
|
446 |
+
}
|
447 |
+
pipeline = new BABYLON.DefaultRenderingPipeline("default", true, BABYLON.Engine.LastCreatedScene, [BABYLON.Engine.LastCreatedScene.activeCamera]);
|
448 |
+
pipeline.samples = 4;
|
449 |
+
pipeline.imageProcessing.contrast = 2.0;
|
450 |
+
pipeline.imageProcessing.exposure = 0.5;
|
451 |
+
|
452 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.fov = document.getElementById("zoom").value;
|
453 |
+
|
454 |
+
if (!document.getElementById("model3D").getElementsByTagName("canvas")[0].oncontextmenu) {
|
455 |
+
document.getElementById("model3D").getElementsByTagName("canvas")[0].style.filter = "blur(" + BABYLON.Engine.LastCreatedScene.getNodes()[parseInt(document.getElementById("fnum").getElementsByTagName("input")[0].value)+1].material.pointSize/2.0*Math.sqrt(2.0) + "px)";
|
456 |
+
document.getElementById("model3D").getElementsByTagName("canvas")[0].oncontextmenu = function(e){e.preventDefault();}
|
457 |
+
document.getElementById("model3D").getElementsByTagName("canvas")[0].ondrag = function(e){e.preventDefault();}
|
458 |
+
}
|
459 |
clearInterval(intv);
|
460 |
}
|
461 |
}, 40);
|