Geometry · interface
RibbonOptions
Explained in Hello world, Meshes and geometry.
interface RibbonOptionsimport type { RibbonOptions } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
color | Vec3 | |
emissiveoptional | number | |
stepMoptional | number | Distance between cross-sections. Smaller is smoother and heavier. |
thicknessMoptional | number | Depth of the slab below the surface. |
holesoptional | readonly RibbonHole[] | Interruptions: an unbridged track is a jump, and jumps are the point. |
shadeoptional | (distanceM: number, out: Vec3) => number | Called per cross-section to vary the surface along the route.MoreWrites the colour into |
edgeBandMoptional | number | Build only a band along one edge instead of the whole surface.MoreFor kerbs: a strip this wide, inset from the chosen edge and lifted clear, with the surface's own banking. Doing it as a second ribbon rather than as geometry bolted on afterwards means the kerb follows the bank exactly, and it is the banking that makes an edge hard to read without one. |
edgeSideoptional | -1 | 1 | |
lateralFromMoptional | number | Build a band between two absolute lateral offsets instead of edge-relative
ones — for anything painted at a particular place across the surface rather
than along its edge.MoreThe alternative is to lay a row of small boxes along the route, and it does not work: an axis-aligned box cannot follow a curve, so the row steps into a zigzag and reads as a staircase of holes rather than as a marking. Built as a ribbon it follows the centreline and the bank exactly, for free. |
lateralToMoptional | number | |
fromMoptional | number | Restrict the build to a stretch of the curve. |
toMoptional | number | |
liftMoptional | number | Raise the whole band by this much, so a kerb stands proud of the surface. |
colliderGiveMoptional | number | How far below the drawn surface the collider hulls' tops sit, metres.MoreA consumer's ground query rides the smooth curve; the hulls are the faceted mesh, and at a crest a facet ridge stands a few centimetres proud of the curve — each ridge a micro-wall under a character's feet if the hulls are exactly flush. The give hands the top few centimetres to the smooth query and everything beneath to the hull: a tolerance between two representations of the same surface, not a hole in the world — the slab's sides and underside stay exactly where they are drawn. Zero means flush. |