Spaces:
Starting
Starting
Update app.py
Browse files
app.py
CHANGED
@@ -561,7 +561,7 @@ with gr.Blocks(css=css) as demo:
|
|
561 |
W E T Y I O { }
|
562 |
A-`S´-D F-`G´-H J-`K´-L ; '
|
563 |
Z´ X̀ V´ B̀ M´ `, . /
|
564 |
-
move rotate scale
|
565 |
</pre>""")
|
566 |
selected = gr.Number(elem_id="fnum", value=0, minimum=0, maximum=256, interactive=False)
|
567 |
output_frame.select(fn=select_frame, inputs=None, outputs=[output_depth, selected], show_progress='hidden')
|
@@ -607,11 +607,26 @@ with gr.Blocks(css=css) as demo:
|
|
607 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager = new BABYLON.GizmoManager(BABYLON.Engine.LastCreatedScene, 8);
|
608 |
|
609 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.positionGizmoEnabled = true;
|
610 |
-
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.rotationGizmoEnabled =
|
611 |
-
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.scaleGizmoEnabled =
|
612 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.boundingBoxGizmoEnabled = false;
|
613 |
|
614 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.usePointerToAttachGizmos = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
615 |
}
|
616 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.attachToMesh(BABYLON.Engine.LastCreatedScene.getNodes()[parseInt(document.getElementById(\"fnum\").getElementsByTagName(\"input\")[0].value)+1]);
|
617 |
|
|
|
561 |
W E T Y I O { }
|
562 |
A-`S´-D F-`G´-H J-`K´-L ; '
|
563 |
Z´ X̀ V´ B̀ M´ `, . /
|
564 |
+
<a id='move' href='#'>move</a> <a id='rotate' href='#'>rotate</a> <a id='scale' href='#'>scale</a>
|
565 |
</pre>""")
|
566 |
selected = gr.Number(elem_id="fnum", value=0, minimum=0, maximum=256, interactive=False)
|
567 |
output_frame.select(fn=select_frame, inputs=None, outputs=[output_depth, selected], show_progress='hidden')
|
|
|
607 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager = new BABYLON.GizmoManager(BABYLON.Engine.LastCreatedScene, 8);
|
608 |
|
609 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.positionGizmoEnabled = true;
|
610 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.rotationGizmoEnabled = false;
|
611 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.scaleGizmoEnabled = false;
|
612 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.boundingBoxGizmoEnabled = false;
|
613 |
|
614 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.usePointerToAttachGizmos = false;
|
615 |
+
document.getElementById(\"move\").onclick = function(event) {
|
616 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.positionGizmoEnabled = true;
|
617 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.rotationGizmoEnabled = false;
|
618 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.scaleGizmoEnabled = false;
|
619 |
+
}
|
620 |
+
document.getElementById(\"rotate\").onclick = function(event) {
|
621 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.positionGizmoEnabled = false;
|
622 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.rotationGizmoEnabled = true;
|
623 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.scaleGizmoEnabled = false;
|
624 |
+
}
|
625 |
+
document.getElementById(\"scale\").onclick = function(event) {
|
626 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.positionGizmoEnabled = false;
|
627 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.rotationGizmoEnabled = false;
|
628 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.scaleGizmoEnabled = true;
|
629 |
+
}
|
630 |
}
|
631 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.attachToMesh(BABYLON.Engine.LastCreatedScene.getNodes()[parseInt(document.getElementById(\"fnum\").getElementsByTagName(\"input\")[0].value)+1]);
|
632 |
|