Update app.py
Browse files
app.py
CHANGED
@@ -641,11 +641,9 @@ async(c, o, p, d, n, m)=>{
|
|
641 |
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);});
|
642 |
}
|
643 |
loadEditControl();
|
644 |
-
const editControl = new EditControl(BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-
|
645 |
editControl.enableTranslation();
|
646 |
-
|
647 |
-
alert(BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].name);
|
648 |
-
|
649 |
for (var j=0; j<o_.length; j++) {
|
650 |
const opt = document.createElement("option");
|
651 |
opt.value = j;
|
@@ -656,7 +654,7 @@ async(c, o, p, d, n, m)=>{
|
|
656 |
document.getElementById("cnum").appendChild(opt);
|
657 |
}
|
658 |
document.getElementById("cnum").onchange = function(e) {
|
659 |
-
editControl.switchTo(BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1-parseInt(e.target.value)], true);
|
660 |
}
|
661 |
|
662 |
if (document.getElementById("model")) {
|
|
|
641 |
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);});
|
642 |
}
|
643 |
loadEditControl();
|
644 |
+
const editControl = new EditControl(BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1], BABYLON.Engine.LastCreatedScene.activeCamera, document.getElementById("model3D").getElementsByTagName("canvas")[0], 1.0, true, 0.02);
|
645 |
editControl.enableTranslation();
|
646 |
+
|
|
|
|
|
647 |
for (var j=0; j<o_.length; j++) {
|
648 |
const opt = document.createElement("option");
|
649 |
opt.value = j;
|
|
|
654 |
document.getElementById("cnum").appendChild(opt);
|
655 |
}
|
656 |
document.getElementById("cnum").onchange = function(e) {
|
657 |
+
//editControl.switchTo(BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1-parseInt(e.target.value)], true);
|
658 |
}
|
659 |
|
660 |
if (document.getElementById("model")) {
|