API

Function updateMeshUv2

  • Re-upload (part of) a mesh's second UV buffer (uv2) — the twin of updateMeshUvs for dynamically re-generated geometry whose per-vertex uv2 payload changes each rebuild (e.g. a procedural batch that re-bakes per-vertex AO / gradient data). The uv2 attribute is vec2 (8 bytes/vertex). No-op if the mesh was created without uv2. Zero-allocation GPU upload only.

    Parameters

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

    Returns void