API

Function updateMeshUvs

  • Re-upload (part of) a mesh's UV buffer — the twin of updateMeshNormals/updateMeshColors for dynamically re-generated geometry whose per-vertex UVs change (e.g. a procedural mesh whose parts carry per-rebuild UV payloads). The uv attribute is vec2 (8 bytes/vertex). No-op if the mesh was created without UVs. Zero-allocation GPU upload only.

    Parameters

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

    Returns void