@pmndrs/bvh
    Preparing search index...

    Class SceneTreesObject3DSync

    Index
    poseCounts: Object3DPoseCounts = ...

    What the last pose posed.

    root: Object3D<Object3DEventMap> | readonly Object3D<Object3DEventMap>[]
    • get meshCount(): number

      Meshes the sync can still share (a mesh merged away is no longer counted).

      Returns number

    • get meshHandles(): number[]

      The SceneTrees mesh handles the sync holds now, one per mesh it added (a shared geometry range, or a posed object's own), for SceneTrees.meshStatus and stats. A new array each time; a sync can add and remove handles.

      Returns number[]

    • get ready(): Promise<void>

      Settles once every pose-pass compile started so far has (a failed one warns, and its pass compiles at its first update). Until then update skips the objects whose pass is compiling; await it after the constructor (or a sync that added posed objects) to have every object posed from the next update. Never rejects.

      Returns Promise<void>

    • Removes every instance and mesh the sync added from the SceneTrees, except merged static instances (SceneTrees can't remove them) and their meshes.

      Returns void

    • Walks the scene again: adds new meshes and instances, removes gone ones, then pushes changes as update does (and material indices). The walk and the plan come first, so a throwing material callback changes nothing; each SceneTrees call then updates the sync's records with it.

      Returns Object3DSyncCounts

    • Pushes the moved, shown, hidden and re-layered instances the sync knows (not static ones), skipping objects that didn't change (see the file comment). Call once per frame, after updateMatrixWorld() and before SceneTrees.update.

      Returns Object3DSyncCounts