API

Function updateMeshGeometry

  • Replace every attribute + index value of a tightly-packed procedural mesh without replacing its GPU buffers. Counts and optional-attribute presence must match the existing geometry; use resizeMeshGeometry when topology/layout changes. Stable buffer identities keep cached render/shadow bundles valid, while retained CPU geometry + bounds keep detailed picking and recovery exact.

    Parameters

    • engine: EngineContext
    • mesh: Mesh
    • positions: Float32Array
    • normals: Float32Array
    • indices: Uint32Array
    • Optionaluvs: Float32Array<ArrayBufferLike>
    • Optionaluvs2: Float32Array<ArrayBufferLike>
    • Optionaltangents: Float32Array<ArrayBufferLike>
    • Optionalcolors: Float32Array<ArrayBufferLike>

    Returns void