feat/model-viewer: work in progress [might break]
This commit is contained in:
parent
7da6efaee8
commit
057dc5d7ea
1 changed files with 8 additions and 7 deletions
|
|
@ -18,8 +18,7 @@
|
||||||
<model-viewer
|
<model-viewer
|
||||||
src="https://xrfragment.org/index.glb"
|
src="https://xrfragment.org/index.glb"
|
||||||
environment-image="https://cdn.glitch.global/8e507517-31ff-4aa5-80c1-10ea6de9483d/white_furnace.hdr"
|
environment-image="https://cdn.glitch.global/8e507517-31ff-4aa5-80c1-10ea6de9483d/white_furnace.hdr"
|
||||||
disable-zoom
|
camera-controls interaction-prompt="none"
|
||||||
touch-action="non"
|
|
||||||
style="width:100%; height:99vh"
|
style="width:100%; height:99vh"
|
||||||
>
|
>
|
||||||
<b class="btn" id="back"><</b>
|
<b class="btn" id="back"><</b>
|
||||||
|
|
@ -66,11 +65,13 @@
|
||||||
camera: mv[getSymbol("scene")].getCamera()
|
camera: mv[getSymbol("scene")].getCamera()
|
||||||
}
|
}
|
||||||
|
|
||||||
opts.scene.add( opts.camera ) // not sure why is camera not in the scene?
|
opts.controls._options.minimumRadius = 1
|
||||||
setInterval( () => {
|
opts.controls._options.maximumRadius = 100000
|
||||||
opts.camera.position.set( 0,0,0 )
|
|
||||||
opts.camera.updateMatrix()
|
let spherical = opts.controls.goalSpherical
|
||||||
},1000)
|
spherical.setFromCartesianCoords(0,0,0)
|
||||||
|
opts.controls.moveCamera()
|
||||||
|
opts.control.update = (e) => e
|
||||||
|
|
||||||
$url.value = mv.src
|
$url.value = mv.src
|
||||||
window.opts = opts
|
window.opts = opts
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue