Skip to content

const observable: object

Defined in: packages/three-flatland/src/observable/index.ts:307

Observable strategies for three.js value types. Call a strategy’s attach(value, notify) directly to make a value fire notify on in-place mutation (R3F compat).

  • observable.color — Color (r, g, b)
  • observable.vector2 — Vector2 (x, y)
  • observable.vector3 — Vector3 (x, y, z)
  • observable.euler — Euler (x, y, z, order) — hooks into three’s existing _onChangeCallback rather than installing accessors

readonly color: object

attach: (c, notify) => void = attachColor

Color 

() => void

void

snapshot: (c) => Snapshot = snapshotColor

Color 

Snapshot

readonly euler: object

attach: (e, notify) => void = attachEuler

Euler 

() => void

void

snapshot: (e) => Snapshot = snapshotEuler

Euler 

Snapshot

readonly vector2: object

attach: (v, notify) => void = attachVector2

Vector2 

() => void

void

snapshot: (v) => Snapshot = snapshotVector2

Vector2 

Snapshot

readonly vector3: object

attach: (v, notify) => void = attachVector3

Vector3 

() => void

void

snapshot: (v) => Snapshot = snapshotVector3

Vector3 

Snapshot