Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -656,10 +656,11 @@ async(p, d, n)=>{
|
|
656 |
size: 512
|
657 |
}, BABYLON.Engine.LastCreatedScene);
|
658 |
for(i = 0; i < BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children.length; i++) {
|
659 |
-
let mesh = BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children[i];
|
|
|
660 |
mesh.dispose(false, true);
|
661 |
}
|
662 |
-
BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh").applyDisplacementMap(d.background.url, 0, 255, function(m){try{alert(BABYLON.Engine.Version);
|
663 |
|
664 |
clearInterval(intv);
|
665 |
}
|
@@ -786,7 +787,7 @@ with gr.Blocks(css=css, js=js) as demo:
|
|
786 |
model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
|
787 |
processed_video = gr.Video(label="Output Video", format="mp4")
|
788 |
processed_zip = gr.File(label="Output Archive")
|
789 |
-
result = gr.Model3D(label="3D Mesh",
|
790 |
svg_in = gr.HTML(value="""<svg id='svg_in' height='32' width='256' viewBox='0 0 256 32' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='touch-action:none;background-color:#808080;' onpointerdown='
|
791 |
try{
|
792 |
if (document.getElementById(\"pl\").getAttribute(\"points\").slice(0,5) == \"-1,0 \") {
|
|
|
656 |
size: 512
|
657 |
}, BABYLON.Engine.LastCreatedScene);
|
658 |
for(i = 0; i < BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children.length; i++) {
|
659 |
+
let mesh = BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children[i];
|
660 |
+
alert(mesh.name);
|
661 |
mesh.dispose(false, true);
|
662 |
}
|
663 |
+
BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh").applyDisplacementMap(d.background.url, 0, 255, function(m){try{alert(BABYLON.Engine.Version);}catch(e){alert(e);}}, null, null, true, function(e){alert(e);});
|
664 |
|
665 |
clearInterval(intv);
|
666 |
}
|
|
|
787 |
model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
|
788 |
processed_video = gr.Video(label="Output Video", format="mp4")
|
789 |
processed_zip = gr.File(label="Output Archive")
|
790 |
+
result = gr.Model3D(label="3D Mesh", clear_color=[0.5, 0.5, 0.5, 0.0], camera_position=[0, 90, 0], zoom_speed=2.0, pan_speed=2.0, interactive=True, elem_id="model3D") #, display_mode="point_cloud"
|
791 |
svg_in = gr.HTML(value="""<svg id='svg_in' height='32' width='256' viewBox='0 0 256 32' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='touch-action:none;background-color:#808080;' onpointerdown='
|
792 |
try{
|
793 |
if (document.getElementById(\"pl\").getAttribute(\"points\").slice(0,5) == \"-1,0 \") {
|