Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / XRInteractorComponent

Class: XRInteractorComponent ​

Defined in: components/XRInteractor.ts:71

Configures what the user sees as their hands, and hosts custom hand content.

An interactor entity owns two children — a left and a right interactor — whose transforms are driven by the corresponding tracked hand. Anything an author parents under those children renders at that hand, which is how custom tools, gloves, or held props are built without any scripting.

Extends ​

Constructors ​

Constructor ​

ts
new XRInteractorComponent(options?): XRInteractorComponent;

Defined in: components/XRInteractor.ts:90

Parameters ​

ParameterType
options?XRInteractorOptions

Returns ​

XRInteractorComponent

Overrides ​

Component.constructor

Properties ​

PropertyTypeDescriptionDefined in
interactorTypeXrInteractorTypeWhat to render at the hands.components/XRInteractor.ts:73
handPresetXrHandPresetLook for tracked-hand meshes.components/XRInteractor.ts:75
handColorstringTint applied by the preset.components/XRInteractor.ts:77
handOpacitynumber0-1 opacity for translucent presets.components/XRInteractor.ts:79
handEmissiveIntensitynumberEmissive strength for glowing presets.components/XRInteractor.ts:81
rayVisibilityXrRayVisibilityWhen the pointer ray is drawn.components/XRInteractor.ts:84
rayColorstringPointer ray colour.components/XRInteractor.ts:86
rayThicknessnumberPointer ray thickness (diameter), metres.components/XRInteractor.ts:88