Skip to main content

Class: HingeBehaviour

Defined in: behaviours/hinge.ts:35

Implements​

Constructors​

Constructor​

new HingeBehaviour(config?: Omit<HingeConfig, "kind">): HingeBehaviour;

Defined in: behaviours/hinge.ts:48

Parameters​

ParameterType
configOmit<HingeConfig, "kind">

Returns​

HingeBehaviour

Properties​

PropertyModifierTypeDefault valueDescriptionDefined in
grabbablereadonlytruetrueTrue when this behaviour makes the interactable a grab target.behaviours/hinge.ts:39
kindreadonly"hinge""hinge"-behaviours/hinge.ts:36
ownershipreadonly"handDriven"undefined-behaviours/hinge.ts:37
requiresreadonlyreadonly ["grabs"]undefinedALL of these must be satisfied.behaviours/hinge.ts:38

Methods​

getMaxAngle()​

getMaxAngle(): number;

Defined in: behaviours/hinge.ts:105

Returns​

number


getValue()​

getValue(): number;

Defined in: behaviours/hinge.ts:96

Current logical 0..1 value (state snapshots, HUDs).

Returns​

number

Implementation of​

Behaviour.getValue


onGrabEnd()​

onGrabEnd(ctx: BehaviourContext, interactor: InteractorInfo): void;

Defined in: behaviours/hinge.ts:66

Parameters​

ParameterType
ctxBehaviourContext
interactorInteractorInfo

Returns​

void

Implementation of​

Behaviour.onGrabEnd


onGrabStart()​

onGrabStart(ctx: BehaviourContext, interactor: InteractorInfo): void;

Defined in: behaviours/hinge.ts:55

Parameters​

ParameterType
ctxBehaviourContext
interactorInteractorInfo

Returns​

void

Implementation of​

Behaviour.onGrabStart


setMaxAngle()​

setMaxAngle(maxAngle: number): void;

Defined in: behaviours/hinge.ts:101

Live-tune the swing range (playground steppers).

Parameters​

ParameterType
maxAnglenumber

Returns​

void


update()​

update(ctx: BehaviourContext, holder?: InteractorInfo): void;

Defined in: behaviours/hinge.ts:77

Per-frame tick. holder is set while a grab interactor holds this interactable (grab-family behaviours consume it; others ignore it).

Parameters​

ParameterType
ctxBehaviourContext
holder?InteractorInfo

Returns​

void

Implementation of​

Behaviour.update