Interface SceneGeometryCompressedParams

Pre-compressed geometry creation parameters for SceneModel.createGeometryCompressed.

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

Properties

aabb?: AABB3

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

Optional only when framesCompressed is supplied; in that case framesCompressed[0].aabb becomes the base AABB.

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.

Complete fixed-topology geometry frames.

When provided without positionsCompressed, the first frame supplies the geometry's current/base positions and normals. Every frame must have the same vertex count as the base geometry. Frames share the geometry's topology, colors, material assignment and other non-position attributes. UVs may either remain static on the parent geometry or be supplied by every frame. Frame times must be finite and strictly increasing.

Frames are immutable geometry-owned data. A mesh chooses an interpolation time with SceneMeshParams.frameTime, so multiple meshes can share this geometry while sampling different frame times. When every frame supplies normals, renderers interpolate and normalize them. When every frame supplies UVs, renderers interpolate them. When frames omit normals or UVs, renderers use the base/static attributes when available.

id: string

ID for the geometry.

indices?: IntArrayParam

primitive indices.

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

Weighted morph target deltas relative to the base geometry.

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 the base vertex count times two.

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

origin?: Vec3

Optional RTC origin for the compressed vertex positions. When present, renderers add this world-space offset after decompressing positions from SceneGeometryCompressedParams.aabb.

positionsCompressed?: IntArrayParam

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

Internally, the Viewer decompresses these with SceneGeometryCompressedParams.aabb.

Optional only when framesCompressed is supplied; in that case framesCompressed[0].positionsCompressed becomes the current/base geometry.

primitive: number
rotations?: FloatArrayParam

Per-splat rotation quaternions — 4 floats per splat, xyzw. Only used for GaussianSplatsPrimitive. Carried uncompressed in P1.

Per-splat scales — 3 floats per splat. Only used for GaussianSplatsPrimitive. Carried uncompressed in P1.

texCoordsCompressed?: Record<number, FloatArrayParam>

Indexed texture-coordinate channels, packed as 32-bit floats.

Keys are non-negative integer channel indices. Channel 0 is equivalent to SceneGeometryCompressedParams.uvsCompressed; when both are supplied, uvsCompressed takes precedence for channel 0.

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.

vertexStatesCompressed?: SceneGeometryVertexStateCompressedParams[]

Complete untimed replacement vertex states.