diff --git a/example/three/sandbox/index.html b/example/three/sandbox/index.html index 89afd32..09de641 100644 --- a/example/three/sandbox/index.html +++ b/example/three/sandbox/index.html @@ -18,8 +18,8 @@ @@ -32,7 +32,6 @@ import { RGBELoader } from 'three/addons/loaders/RGBELoader.js'; import { Lensflare, LensflareElement } from 'three/addons/objects/Lensflare.js'; import { BoxLineGeometry } from 'three/addons/geometries/BoxLineGeometry.js'; - import { Reflector } from 'three/addons/objects/Reflector.js'; import { VRButton } from 'three/addons/webxr/VRButton.js'; import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'; import { FBXLoader } from 'three/addons/loaders/FBXLoader.js'; @@ -41,6 +40,7 @@ import { HTMLMesh } from 'three/addons/interactive/HTMLMesh.js'; import { InteractiveGroup } from 'three/addons/interactive/InteractiveGroup.js'; import { XRControllerModelFactory } from 'three/addons/webxr/XRControllerModelFactory.js'; + import { OculusHandModel } from 'three/addons/webxr/OculusHandModel.js'; import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; import { GUI } from 'three/addons/libs/lil-gui.module.min.js'; import Stats from 'three/addons/libs/stats.module.js'; @@ -160,10 +160,22 @@ controllerGrip1.add( controllerModelFactory.createControllerModel( controllerGrip1 ) ); cameraRig.add( controllerGrip1 ); + // hand1 + const hand1 = renderer.xr.getHand( 0 ); + const handModel1 = new OculusHandModel( hand1 ); + hand1.add( handModel1 ); + cameraRig.add( hand1 ); + const controllerGrip2 = renderer.xr.getControllerGrip( 1 ); controllerGrip2.add( controllerModelFactory.createControllerModel( controllerGrip2 ) ); cameraRig.add( controllerGrip2 ); + // hand2 + const hand2 = renderer.xr.getHand( 1 ); + const handModel2 = new OculusHandModel( hand2 ); + hand2.add( handModel2 ); + cameraRig.add( hand2 ); + // Add stats.js stats = new Stats(); stats.dom.style.width = '80px';