Capítulo 583 de 859
Represents an Oculus hand pointer model.
import { OculusHandPointerModel } from 'three/addons/webxr/OculusHandPointerModel.js';
Constructor
| Signature |
|---|
new OculusHandPointerModel( hand : Group, controller : Group ) |
Properties
| Property | Description |
|---|---|
.attached : boolean | Whether the model is attached or not. |
.controller : Group | The WebXR controller in target ray space. |
.cursorObject : Mesh | The cursor object. |
.hand : Group | The hand controller. |
.pinched : boolean | Whether the model is pinched or not. |
.pointerGeometry : BufferGeometry | The pointer geometry. |
.pointerMesh : Mesh | The pointer mesh. |
.pointerObject : Object3D | The pointer object that holds the pointer mesh. |
.raycaster : Raycaster | The internal raycaster used for detecting intersections. |
Methods
| Method | Description |
|---|---|
.checkIntersections( objects : Array.<Object3D>, recursive : boolean ) | Checks for intersections between the model's raycaster and the given objects. The method updates the cursor object to the intersection point. |
.createPointer() | Creates a pointer mesh and adds it to this model. |
.dispose() | Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app. |
.intersectObject( object : Object3D, recursive : boolean ) : Array.<Raycaster~Intersection> | Performs an intersection test with the model's raycaster and the given object. |
.intersectObjects( objects : Array.<Object3D>, recursive : boolean ) : Array.<Raycaster~Intersection> | Performs an intersection test with the model's raycaster and the given objects. |
.isAttached() : boolean | Returns true is the model is attached. |
.isPinched() : boolean | Returns true is the model is pinched. |
.setAttached( attached : boolean ) | Sets the attached state. |
.setCursor( distance : number ) | Sets the cursor to the given distance. |
.updateMatrixWorld( force : boolean ) | Overwritten with a custom implementation. Makes sure the internal pointer and raycaster are updated. |