API

Function createHierarchyInstancePool

  • Build a fixed-capacity thin-instance pool from a template hierarchy.

    Call before registerScene(), after the hierarchy's parent links are established. Fresh loadGltf() hierarchies are also supported: this helper materializes child parent links from the children arrays before snapshotting template world matrices.

    The template meshes are converted to thin-instanced meshes with an active count of zero, so they do not draw until instances are added.

    Parameters

    • root: SceneNode

      Root transform node or mesh for the template hierarchy.

    • capacity: number

      Maximum number of active logical hierarchy instances.

    Returns HierarchyInstancePool