Interface SceneGeometryCompressedParams

Pre-compressed geometry creation parameters for SceneModel.createGeometryCompressed.

See @xeokit/sdk/model/scene for usage.

interface SceneGeometryCompressedParams {
    aabb?: AABB3;
    colorsCompressed?: IntArrayParam;
    edgeIndices?: IntArrayParam;
    id: string;
    indices?: IntArrayParam;
    normalsCompressed?: IntArrayParam;
    origin?: Vec3;
    positionsCompressed: IntArrayParam;
    primitive: number;
    uvsCompressed?: FloatArrayParam;
    uvsDecompressMatrix?: Mat4;
}

Properties

aabb?: AABB3

Axis-aligned, non-quantized 3D boundary of the geometry's vertex positions.

colorsCompressed?: IntArrayParam

vertex RGBA colors, quantized as 8-bit integers.

edgeIndices?: IntArrayParam

edge indices.

This is either an array of 8-bit, 16-bit or 32-bit values.

id: string

ID for the geometry.

indices?: IntArrayParam

primitive indices.

This is either an array of 8-bit, 16-bit or 32-bit values.

normalsCompressed?: IntArrayParam

Vertex normals, octahedral-encoded as pairs of 16-bit unsigned integers.

Optional. Two values per vertex: each pair represents the octahedral (x, y) projection of the unit normal, mapped from [-1, 1] to [0, 65535]. Length must equal (positionsCompressed.length / 3) * 2.

Geometry without normalsCompressed is rendered with shader-derived flat face normals.

origin?: Vec3

TODO

positionsCompressed: IntArrayParam

3D vertex positions, quantized as 16-bit integers.

Internally, the Viewer decompresses thses with SceneGeometryCompressedParams.aabb.

Vertex positions are required for all primitive types.

primitive: number
uvsCompressed?: FloatArrayParam

UV coordinates, packed as 32-bit floats (one Float32Array of length 2 × vertexCount). UVs ship to the GPU uncompressed so tiling values (UVs outside [0, 1]) survive intact — the shader applies a per-fragment fract() before transforming into the mesh's atlas sub-rect.

uvsDecompressMatrix?: Mat4

4x4 matrix to de-quantize the geometry's UV coordinates, when UVs are provided.