KitShape beta
Interface of @v12-engine/client
export interface KitShapeThe shapes a game's own renderers draw, as points, normals and triangles with no renderer: what Babylon's builders gave them (CreateTorus, CreateCylinder, CreateDisc, CreateBox, CreateLines), each at its own size and in the builder's own frame, so that a copy placed as the Babylon mesh was (CopyPlace: a place, a yaw, a pitch, a roll, a size) stands where the mesh stood: - a torus lies flat, round the y axis; - a cylinder stands along y, its middle at the origin (a top of no width is a cone); - a disc is in the plane of x and y facing -z, its arc opening from the x axis (pitched a quarter turn it lies on the ground facing up); - a plane is a square in the plane of x and y facing -z, as a disc is; - a box is about the origin; - a line is a strip on the ground, wide across, through points of the world: Babylon's was a pixel wide at any distance, which the renderer has no topology for.
Triangles are wound as the units' solids are, the renderer's way (the first edge crossed with the second points away from the normal). A flat shape (flat) is drawn from both of its sides: a disc laid on the ground as Babylon's was, wound so, was left out by the renderer's culling when looked at from above, and which side of one a card takes for its front was not settled. TODO: settle it, and a flat shape is one-sided where its look says, as Babylon's was.
Members
flat
flat?: boolean;A shape with no inside (a disc, a plane, a strip): drawn from both of its sides, lit on the one that is seen
indices
indices: Uint32Array;Its triangles, three points each, wound the renderer's way
normals
normals: Float32Array;The way each point faces, three numbers each
positions
positions: Float32Array;Its points, three numbers each