Readonly
handednessThe handedness of the controller. The value should be either 'left' or 'right'.
Readonly
inputThe XrInputSource
of the controller.
The locomotion type of the controller.
Readonly
modelThe entity of the XR controller model.
Unsubscribe from a specific event.
Event name.
Callback function.
Subscribe to a specific event.
Event name.
Callback function.
Set the controller model asset.
The controller model asset. The asset type can be either template
or container
.
Optional
options: { Optional parameters.
Optional
castDetermine whether the model casts shadows. Default is false
. Only applicable when the asset type is container
.
Optional
onCallback function triggered when the model entity is created.
Optional
receiveDetermine whether the model receives shadows. Default is false
. Only applicable when the asset type is container
.
Define the interface of XrController.