Skip to main content

Interface: SimulatorMesh

Defined in: src/world/mesh/SimulatorMesh.ts:12

A mesh injected into the MeshDetector by the desktop simulator.

The real WebXR Mesh Detection API only produces meshes from frame.detectedMeshes, which the simulator never provides. This is the mesh-detection analog of SimulatorPlane: the simulator extracts the ground-truth geometry of the loaded environment and feeds it to the MeshDetector via setSimulatorMeshes().

Properties

indices

indices: Uint32Array

Defined in: src/world/mesh/SimulatorMesh.ts:17

Triangle indices into vertices.


lastChangedTime

lastChangedTime: number

Defined in: src/world/mesh/SimulatorMesh.ts:23

Timestamp of the last geometry change, analogous to XRMesh.lastChangedTime. Simulator meshes are static, so this is typically 0.


position?

optional position: Vector3

Defined in: src/world/mesh/SimulatorMesh.ts:36

Optional world-space origin. Defaults to the identity. When vertices are already baked into world space this should be left undefined.


quaternion?

optional quaternion: Quaternion

Defined in: src/world/mesh/SimulatorMesh.ts:39

Optional world-space orientation. Defaults to the identity.


semanticLabel?

optional semanticLabel: string

Defined in: src/world/mesh/SimulatorMesh.ts:30

Optional semantic label (e.g. 'floor', 'ceiling', 'wall'). When it matches one of the detector's debug materials it is colored accordingly; otherwise the fallback debug material is used.


vertices

vertices: Float32Array

Defined in: src/world/mesh/SimulatorMesh.ts:14

Vertex positions as flat xyz triples, in world space.