five-on-it / apps/tools/src/frame / mirrorGeometry
Function: mirrorGeometry()
mirrorGeometry(
positions,indices):object
Defined in: apps/tools/src/frame.ts:114
Geometry seen from the other side of the mirror x → −x: every vertex's x negated (never to -0), the triangles kept in their order. The index order is not reversed on purpose: a reflection turns a triangle's orientation around by itself, and the two frames wind their front faces the opposite way (the game counter-clockwise seen from outside, so that (b − a) × (c − a) points outward; Babylon's left-handed scene the other way, which is what its own builders produce and VertexData.ComputeNormals assumes), so negating x alone carries an outward-facing mesh from one frame to an outward-facing mesh in the other. Its own inverse.
Parameters
positions
readonly number[]
indices
readonly number[]
Returns
object
indices
indices:
number[]
positions
positions:
number[]