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