freealise commited on
Commit
1682873
1 Parent(s): 56bae12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -614,8 +614,8 @@ async(p, d, n)=>{
614
  }
615
  }
616
  BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.samples = 4;
617
- BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.contrast = 2.0;
618
- BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = 0.5;
619
 
620
  BABYLON.Engine.LastCreatedScene.activeCamera.fov = document.getElementById("zoom").value;
621
 
@@ -633,7 +633,10 @@ async(p, d, n)=>{
633
  alert(mesh.name);
634
  mesh.dispose(false, true);
635
  }
636
- 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);});
 
 
 
637
 
638
  clearInterval(intv);
639
  }
@@ -1067,7 +1070,7 @@ with gr.Blocks(css=css, js=js) as demo:
1067
  }
1068
  BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.attachToMesh(BABYLON.Engine.LastCreatedScene.getNodes()[parseInt(document.getElementById(\"fnum\").getElementsByTagName(\"input\")[0].value)+1]);
1069
  '>reset camera</a>""")
1070
- contrast = gr.HTML(value="""<label for='contrast'>Contrast</label><input id='contrast' type='range' style='width:256px;height:1em;' value='2.0' min='0' max='2' step='0.001' oninput='
1071
  if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
1072
  var evt = document.createEvent(\"Event\");
1073
  evt.initEvent(\"click\", true, false);
@@ -1075,8 +1078,8 @@ with gr.Blocks(css=css, js=js) as demo:
1075
  }
1076
  BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.contrast = this.value;
1077
  this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.contrast;
1078
- '/><span>2.0</span>""")
1079
- exposure = gr.HTML(value="""<label for='exposure'>Exposure</label><input id='exposure' type='range' style='width:256px;height:1em;' value='0.5' min='0' max='2' step='0.001' oninput='
1080
  if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
1081
  var evt = document.createEvent(\"Event\");
1082
  evt.initEvent(\"click\", true, false);
@@ -1084,7 +1087,7 @@ with gr.Blocks(css=css, js=js) as demo:
1084
  }
1085
  BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = this.value;
1086
  this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure;
1087
- '/><span>0.5</span>""")
1088
  canvas = gr.HTML(value="""<a href='#' onclick='
1089
  if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
1090
  var evt = document.createEvent(\"Event\");
 
614
  }
615
  }
616
  BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.samples = 4;
617
+ BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.contrast = 1.0;
618
+ BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = 1.0;
619
 
620
  BABYLON.Engine.LastCreatedScene.activeCamera.fov = document.getElementById("zoom").value;
621
 
 
633
  alert(mesh.name);
634
  mesh.dispose(false, true);
635
  }
636
+ BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh").scaling.x = -1;
637
+ BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh").scaling.y = -1;
638
+ BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh").scaling.z = -1;
639
+ 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);});
640
 
641
  clearInterval(intv);
642
  }
 
1070
  }
1071
  BABYLON.Engine.LastCreatedScene.activeCamera.metadata.gizmoManager.attachToMesh(BABYLON.Engine.LastCreatedScene.getNodes()[parseInt(document.getElementById(\"fnum\").getElementsByTagName(\"input\")[0].value)+1]);
1072
  '>reset camera</a>""")
1073
+ contrast = gr.HTML(value="""<label for='contrast'>Contrast</label><input id='contrast' type='range' style='width:256px;height:1em;' value='1.0' min='0' max='2' step='0.001' oninput='
1074
  if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
1075
  var evt = document.createEvent(\"Event\");
1076
  evt.initEvent(\"click\", true, false);
 
1078
  }
1079
  BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.contrast = this.value;
1080
  this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.contrast;
1081
+ '/><span>1.0</span>""")
1082
+ exposure = gr.HTML(value="""<label for='exposure'>Exposure</label><input id='exposure' type='range' style='width:256px;height:1em;' value='1.0' min='0' max='2' step='0.001' oninput='
1083
  if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
1084
  var evt = document.createEvent(\"Event\");
1085
  evt.initEvent(\"click\", true, false);
 
1087
  }
1088
  BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = this.value;
1089
  this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure;
1090
+ '/><span>1.0</span>""")
1091
  canvas = gr.HTML(value="""<a href='#' onclick='
1092
  if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
1093
  var evt = document.createEvent(\"Event\");