Geometry · function
shellSkin
The same surface, in one flat colour and facing both ways.
Explained in Hello world, Meshes and geometry.
function shellSkin(mesh: MeshData, color?: Vec3): MeshDataimport { shellSkin } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
mesh | MeshData | |
color? | Vec3 |
In depth
This is the half that follows the model exactly. Drawn slightly smaller and inside the original it backs every panel with no tuning at all, and it is given a single colour because otherwise an opening shows the model's own brightwork through it, which is what it exists to hide.
Both windings are emitted for the reason addSolidBox emits both: a shell is opaque only from
the side its triangles face, and this one is looked at from inside as often as out. Normals are
negated with the reversed copy, or the inward face is shaded as though lit from within.