Skip to content

five-on-it / apps/client/src/renderer/glass

apps/client/src/renderer/glass ​

A vehicle model's glass as panes, for the cracks a shot leaves (cracks.ts): plain geometry on the triangles models.ts hands over (GlassGeometry, in the actor's frame), no Babylon. A pane is a flat run of glass (a windscreen, a window's outer face, a door's window): the glass triangles in one plane that share edges. It knows its plane, a frame on it and its outline there, so a crack can be placed at a point of it and kept inside it (placeCrack); traceGlass finds the first pane a line crosses, entering it from outside or leaving it from inside. crackPixels draws what a crack looks like.

Interfaces ​

Functions ​