A geometry in a SceneModel.

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

Properties

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

colorsCompressed?: IntArrayParam

Vertex RGBA colors, quantized as 8-bit integers.

destroyed: boolean = false

True if this SceneGeometry has been destroyed.

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.

model: SceneModel

The SceneModel that contains this SceneGeometry.

normalsCompressed?: IntArrayParam

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

When defined, the renderer reads these per-vertex and uses them for smooth shading; when undefined, fragments derive a flat face normal from view-space position derivatives.

numMeshes: number

The count of SceneMeshes that reference this SceneGeometry.

positionsCompressed: IntArrayParam

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

Internally, the Viewer dequantizes these using SceneGeometry.aabb, which provides their unquantized 3D boundary.

Vertex positions are required for all primitive types.

primitive: number
uniqueId: string

The global ID of this SceneGeometry, unique among all SceneGeometrys within the Scene, which is the concatenation of the SceneModel's ID and this SceneGeometry's ID, separated by "__".

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.

Methods