Update app.py
Browse files
app.py
CHANGED
|
@@ -972,6 +972,45 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
| 972 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = this.value;
|
| 973 |
this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure;
|
| 974 |
'/><span>1.0</span>""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 975 |
render = gr.Button("Render")
|
| 976 |
input_json.input(show_json, inputs=[input_json], outputs=[processed_video, processed_zip, output_frame, output_mask, output_depth, coords])
|
| 977 |
|
|
|
|
| 972 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = this.value;
|
| 973 |
this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure;
|
| 974 |
'/><span>1.0</span>""")
|
| 975 |
+
control = gr.HTML(value="""<select id='cnum' oninput='
|
| 976 |
+
editControl.switchTo(BABYLON.Engine.LastCreatedScene.meshes[parseInt(this.value)], true);
|
| 977 |
+
' onselect='
|
| 978 |
+
editControl.switchTo(BABYLON.Engine.LastCreatedScene.meshes[parseInt(this.value)], true);
|
| 979 |
+
'><option selected value='0'>0</option></select>
|
| 980 |
+
mode<select id='c_mode' oninput='
|
| 981 |
+
if (this.value == \'move\') {
|
| 982 |
+
editControl.show();
|
| 983 |
+
editControl.enableTranslation();
|
| 984 |
+
|
| 985 |
+
editControl.disableRotation();
|
| 986 |
+
editControl.disableScaling();
|
| 987 |
+
} else if (this.value == \'rotate\') {
|
| 988 |
+
editControl.show();
|
| 989 |
+
editControl.enableRotation();
|
| 990 |
+
editControl.setRotGuideFull(false) //This makes the rotation guides 360 degree(true) or 90 degree(false) .90 degree looks less cluttered.
|
| 991 |
+
editControl.returnEuler(true); // Optional. This will return rotation in euler instead of quaternion. Quaternion is the default.
|
| 992 |
+
|
| 993 |
+
editControl.disableTranslation();
|
| 994 |
+
editControl.disableScaling();
|
| 995 |
+
} else if (this.value == \'scale\') {
|
| 996 |
+
editControl.show();
|
| 997 |
+
editControl.enableScaling();
|
| 998 |
+
|
| 999 |
+
editControl.disableTranslation();
|
| 1000 |
+
editControl.disableRotation();
|
| 1001 |
+
} else {
|
| 1002 |
+
editControl.disableTranslation();
|
| 1003 |
+
editControl.disableRotation();
|
| 1004 |
+
editControl.disableScaling();
|
| 1005 |
+
editControl.hide();
|
| 1006 |
+
}
|
| 1007 |
+
' onselect='this.oninput'>
|
| 1008 |
+
<option selected value='move'>move</option>
|
| 1009 |
+
<option value='rotate'>rotate</option>
|
| 1010 |
+
<option value='scale'>scale</option>
|
| 1011 |
+
<option value='-'>-</option>
|
| 1012 |
+
</select>
|
| 1013 |
+
""")
|
| 1014 |
render = gr.Button("Render")
|
| 1015 |
input_json.input(show_json, inputs=[input_json], outputs=[processed_video, processed_zip, output_frame, output_mask, output_depth, coords])
|
| 1016 |
|