From 057dc5d7ea37b24fa29ee4e20154ee7c2b1fa098 Mon Sep 17 00:00:00 2001 From: Leon van Kammen Date: Wed, 12 Jun 2024 16:34:16 +0000 Subject: [PATCH] feat/model-viewer: work in progress [might break] --- example/model-viewer/index.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/example/model-viewer/index.html b/example/model-viewer/index.html index a5674e9..dde2266 100644 --- a/example/model-viewer/index.html +++ b/example/model-viewer/index.html @@ -18,8 +18,7 @@ < @@ -66,11 +65,13 @@ camera: mv[getSymbol("scene")].getCamera() } - opts.scene.add( opts.camera ) // not sure why is camera not in the scene? - setInterval( () => { - opts.camera.position.set( 0,0,0 ) - opts.camera.updateMatrix() - },1000) + opts.controls._options.minimumRadius = 1 + opts.controls._options.maximumRadius = 100000 + + let spherical = opts.controls.goalSpherical + spherical.setFromCartesianCoords(0,0,0) + opts.controls.moveCamera() + opts.control.update = (e) => e $url.value = mv.src window.opts = opts