Skip to content

Class: SyncedQuaternion

Defined in: packages/core/src/transform/synced-quaternion.ts:21

Quaternion whose internal _x/_y/_z/_w are backed by a Float32Array.

Remarks

  • Three.js quaternion math reads/writes the internal fields; by replacing those with array‑backed accessors, all operations become zero‑copy against the ECS component buffer.
  • When no target is set, it behaves like a normal Quaternion.

Extends

  • Quaternion

Constructors

Constructor

new SyncedQuaternion(x, y, z, w): SyncedQuaternion

Defined in: packages/core/src/transform/synced-quaternion.ts:29

Parameters

x

number = 0

y

number = 0

z

number = 0

w

number = 1

Returns

SyncedQuaternion

Overrides

Quaternion.constructor

Methods

setTarget()

setTarget(target, offset): this

Defined in: packages/core/src/transform/synced-quaternion.ts:123

Bind this quaternion to a packed float array.

Parameters

target

Float32Array

Float32Array to read/write (xyzw at consecutive indices).

offset

number = 0

Starting index within the array (x at offset).

Returns

this