API

Function updateMeshNormals

  • Re-upload (part of) a mesh's NORMAL buffer — the twin of updateMeshPositions for dynamically re-generated geometry whose per-vertex normals change (e.g. a swept tube re-fitted each rebuild). No-op if the mesh was created without normals. Zero-allocation GPU upload only.

    Parameters

    • engine: EngineContext
    • mesh: Mesh
    • normals: Float32Array
    • vertexOffset: number = 0
    • OptionalvertexCount: number
    • sourceVertexOffset: number = 0

    Returns void