Skip to main content

Class: UITouchGuardSystem

Defined in: packages/iwsdk-uiextensions/src/systems/touch-guard-system.ts:65

Extends

  • System<{ allowFromBehind: { default: boolean; type: Boolean; }; pressDistance: { default: number; type: Float32; }; releaseDistance: { default: number; type: Float32; }; }, { }, this>

Constructors

Constructor

new UITouchGuardSystem(
_w: World,
_qm: QueryManager,
_p: number
): UITouchGuardSystem;

Defined in: node_modules/elics/lib/system.d.ts:76

Parameters

ParameterType
_wWorld
_qmQueryManager
_pnumber

Returns

UITouchGuardSystem

Inherited from

createSystem(
{},
{
/ Signed distance in front (meters) at or under which a touch presses. /
pressDistance: { type: Types.Float32, default: DEFAULT_TOUCH_PRESS.pressDistance },
/ Signed distance in front the finger must come back past to release. /
releaseDistance: { type: Types.Float32, default: DEFAULT_TOUCH_PRESS.releaseDistance },
/ Let a fingertip arriving from behind a panel press. /
allowFromBehind: { type: Types.Boolean, default: DEFAULT_TOUCH_PRESS.allowFromBehind },
},
).constructor

Methods

init()

init(): void;

Defined in: packages/iwsdk-uiextensions/src/systems/touch-guard-system.ts:78

Returns

void

Overrides

createSystem(
{},
{
/ Signed distance in front (meters) at or under which a touch presses. /
pressDistance: { type: Types.Float32, default: DEFAULT_TOUCH_PRESS.pressDistance },
/ Signed distance in front the finger must come back past to release. /
releaseDistance: { type: Types.Float32, default: DEFAULT_TOUCH_PRESS.releaseDistance },
/ Let a fingertip arriving from behind a panel press. /
allowFromBehind: { type: Types.Boolean, default: DEFAULT_TOUCH_PRESS.allowFromBehind },
},
).init

pressFor()

pressFor(hand: Handedness):
| TouchPress<Object3D<Object3DEventMap>>
| undefined;

Defined in: packages/iwsdk-uiextensions/src/systems/touch-guard-system.ts:125

The state machine for a hand, for inspection and tests.

Parameters

ParameterType
handHandedness

Returns

| TouchPress<Object3D<Object3DEventMap>> | undefined


update()

update(_delta: number, time: number): void;

Defined in: packages/iwsdk-uiextensions/src/systems/touch-guard-system.ts:111

Per-frame tick. Both arguments are in seconds (Three.js Clock convention), not milliseconds.

Parameters

ParameterTypeDescription
_deltanumber-
timenumberAccumulated Clock.elapsedTime (seconds since the render loop started ticking the clock); monotonic across frames within a session.

Returns

void

Overrides

createSystem(
{},
{
/ Signed distance in front (meters) at or under which a touch presses. /
pressDistance: { type: Types.Float32, default: DEFAULT_TOUCH_PRESS.pressDistance },
/ Signed distance in front the finger must come back past to release. /
releaseDistance: { type: Types.Float32, default: DEFAULT_TOUCH_PRESS.releaseDistance },
/ Let a fingertip arriving from behind a panel press. /
allowFromBehind: { type: Types.Boolean, default: DEFAULT_TOUCH_PRESS.allowFromBehind },
},
).update