Spaces:
Runtime error
Runtime error
Download static/public/js/GUIHelper.js from Intel/ldm3d: direct link, hf CLI and curl.
- Browser
- Download file 1.21 kB
-
https://huggingface.co/spaces/Intel/ldm3d/resolve/refs%2Fpr%2F2/static/public/js/GUIHelper.js
- Command line
-
hf download hf://spaces/Intel/ldm3d@refs/pr/2/static/public/js/GUIHelper.js
-
curl -L -o GUIHelper.js https://huggingface.co/spaces/Intel/ldm3d/resolve/refs%2Fpr%2F2/static/public/js/GUIHelper.js
1.21 kB
| THREE.GUI = { | |
| create: (viewer, scene) => { | |
| var gui = new dat.GUI(); | |
| // Set some GUI params | |
| var shaderParams = gui.addFolder('Shader'); | |
| shaderParams.add(sixDofViewer, 'displacement', 0, 7).name('Displacement'); | |
| shaderParams.add(sixDofViewer, 'opacity', 0, 1).name('Opacity'); | |
| shaderParams.add(sixDofViewer, 'pointSize', 0, 10).name('Point Size'); | |
| shaderParams.add({ 'debugDepth': false }, 'debugDepth') | |
| .name('Debug Depth') | |
| .onChange(val => { | |
| sixDofViewer.toggleDepthDebug(val); | |
| }); | |
| shaderParams.add({ | |
| 'changeStyle': () => { } | |
| }, 'changeStyle', { | |
| 'Mesh': SixDOF.Style[SixDOF.Style.MESH], | |
| 'Wireframe': SixDOF.Style[SixDOF.Style.WIRE], | |
| 'Pointcloud': SixDOF.Style[SixDOF.Style.POINTS] | |
| }) | |
| .name('Rendering Style') | |
| .onChange(val => { | |
| scene.remove(sixDofViewer); | |
| sixDofViewer = new SixDOF.Viewer(colorTexture, depthTexture, { | |
| 'style': SixDOF.Style[val] | |
| }); | |
| scene.add(sixDofViewer); | |
| }); | |
| return gui; | |
| } | |
| } |