Capítulo 633 de 859
Similar to XRControllerModelFactory, this class allows to create hand models for WebXR controllers that can be added as a visual representation to your scene.
const handModelFactory = new XRHandModelFactory();
const hand = renderer.xr.getHand( 0 );
hand.add( handModelFactory.createHandModel( hand ) );
scene.add( hand );
Constructor
| Signature |
|---|
new XRHandModelFactory( gltfLoader : GLTFLoader, onLoad : function ) |
Properties
| Property | Description |
|---|---|
.gltfLoader : GLTFLoader | A glTF loader that is used to load hand models. |
.onLoad : function | A callback that is executed when a hand model has been loaded. |
.path : string | The path to the model repository. |
Methods
| Method | Description |
|---|---|
| `.createHandModel( controller : Group, profile : 'spheres' | 'boxes' |
.setPath( path : string ) : XRHandModelFactory | Sets the path to the hand model repository. |