Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function attachElementStorage

    • Create the element data texture + aSortedIndex attribute pair on a geometry, sized for capacity elements of layout. Returns the texture.

      • The texture is RGBA32F, NearestFilter, no mips, flipY: false — pure structured storage, addressed by texelFetch in the vertex shader (colormap-LUT precedent).
      • The texture rides geometry.userData.elementTexture and is disposed BY the geometry's own dispose event, so texture lifetime is structurally pinned to geometry lifetime at every dispose site. Growth therefore follows the pool contract for free: release + reacquire swaps in a fresh geometry+texture pair, never an in-place reallocation (the Info.memoryMap strand class).
      • aSortedIndex is a Uint32Array instanced attribute — the GL type UNSIGNED_INT makes three bind it via vertexAttribIPointer (matching the shader's in uint), and the WebGPU path derives its uint32 vertex format from the array constructor.

      Parameters

      Returns DataTexture