Physics · interface
RibbonSurfaceOptions
Explained in Your first game, Rigid bodies.
interface RibbonSurfaceOptionsimport type { RibbonSurfaceOptions } from '@driftengine/physics';Properties
| Name | Type | Description |
|---|---|---|
cellMoptional | number | Side of a seed grid cell, metres. |
holesoptional | readonly RibbonHole[] | Stretches of arc length where there is no surface at all. |
marginMoptional | number | Extra width, each side, that still counts as being over the surface. A character is a box, not a point, and the edge should be forgiving by about half of one. |
holeEdgeMoptional | number | How far the mesh keeps deck past the start of a hole, metres — one cross-section step.MoreA hole is authored as a span of arc length and a ribbon's geometry cannot cut exactly
there. Defaults to the ribbon builder's own default step, so a caller who has not changed the step does not have to say so; a caller who has must pass it, or the two disagree by the difference. |
edgeBandMoptional | number | Width of the raised trim down each edge, metres, and how far it stands proud.MoreA kerb is drawn as its own ribbon over the outermost band of the deck, lifted a few centimetres — and a surface that does not know about it reports the deck's height under geometry the player can plainly see they are standing on, so their feet sink into it. The two figures are the same ones the kerb ribbon is built from, passed here so the drawn trim and the walkable floor cannot disagree. Zero by default, which is every consumer that has no trim: the arithmetic below is skipped entirely rather than adding zero. |
edgeLiftMoptional | number |