Optional ReadonlycontributesDefaults to true. An instance can be drawn but hidden from GI, or the reverse.
ReadonlyinstanceThe platform instance index. Comes back as BvhHit.instance.
Optional ReadonlymaskThe instance mask, 8 bits (0-255), stored in bits 8-15 of the record's
flags. A masked trace skips the instance when (mask & rayMask) == 0.
Defaults to 0xff, visible to every ray.
Optional ReadonlymaterialThe instance's material index (0 to MAX_MATERIAL, 65534), reported as
BvhHit.material for triangles without one of their own
(MeshInput.triangleMaterials); stored as material + 1 in bits 16-31 of the record's
flags. Omitted (or NO_MATERIAL): none, and hits report NO_MATERIAL.
Anything else is a RangeError. A merged record may not have one: its
triangles carry their sources' materials.
Optional ReadonlymergedA merged mesh of static instances (static-merge.ts): the record gets
INSTANCE_FLAG.merged, and hits take their instance from the triangle.
Its transform must be the identity; anything else throws, because the
sources' transforms are baked into the mesh. assembleTraceScene sets it.
This only catches the group's own record moving; a merged source that
moved is only caught when the scene is assembled again.
ReadonlymeshThe mesh's object-space box: [minX, minY, minZ, maxX, maxY, maxZ].
ReadonlynodeWhere this mesh's nodes start in the shared node buffer, counted in nodes.
ReadonlyobjectObject-to-world, column-major 4x4 (affine; mirrors and non-uniform scales allowed).
ReadonlytriangleWhere this mesh's triangles start in the shared triangle buffer, counted in triangles.
Optional ReadonlyvisibleDefaults to true.
One placed copy of a mesh, as the top-level builder sees it.