Import
XRHandModelFactory is an addon, and must be imported explicitly, see Installation#Addons.
import { XRHandModelFactory } from 'three/addons/webxr/XRHandModelFactory.js';
Constructor
new XRHandModelFactory( gltfLoader : GLTFLoader, onLoad : function )
Constructs a new XR hand model factory.
| gltfLoader |
A glTF loader that is used to load hand models. Default is |
| onLoad |
A callback that is executed when a hand model has been loaded. Default is |
Properties
.gltfLoader : GLTFLoader
A glTF loader that is used to load hand models.
Default is null.
.onLoad : function
A callback that is executed when a hand model has been loaded.
Default is null.
.path : string
The path to the model repository.
Default is null.
Methods
.createHandModel( controller : Group, profile : 'spheres' | 'boxes' | 'mesh' ) : XRHandModel
Creates a controller model for the given WebXR hand controller.
| controller |
The hand controller. |
| profile |
The model profile that defines the model type. |
- Returns: The XR hand model.
.setPath( path : string ) : XRHandModelFactory
Sets the path to the hand model repository.
| path |
The path to set. |
- Returns: A reference to this instance.