Renderer · interface
BoomTiming
The four numbers above, as something a caller can set.
Explained in Hello world.
interface BoomTimingimport type { BoomTiming } from '@driftengine/core';In depth
The defaults are written for an arm of several metres and they do not scale down. The speed ceilings are stated in metres a second, which is the unit that matters for a crane and the wrong one for an arm shorter than a hand: on a 170 mm boom neither ceiling ever binds, only the damping acts, and the trade the ceilings were chosen for is not the trade being made. Reported from outside on a 46 mm subject — a lip sweeping across a 170 mm arm left the eye 71 mm inside the wall on the first tick and inside it at all for 78 ticks of 120, 1.30 seconds — which on a subject that small renders the inside of the masonry: a black screen with the game running perfectly behind it.
Infinity is the immediate answer and needs no special case. damp is
lerp(a, b, 1 - exp(-lambda dt)), so an infinite lambda returns the target exactly, and an
infinite speed leaves the clamp unbounded. A rig that must come out of a wall on the tick it
touches one passes retractLambda: Infinity, retractSpeed: Infinity and keeps the easing on the
way back out, which is the half that stops the picture pumping.
Properties
| Name | Type | Description |
|---|---|---|
retractLambdareadonly | number | How eagerly the arm shortens against an obstruction. Higher is quicker. |
extendLambdareadonly | number | And how eagerly it lengthens once the obstruction clears. Lower is gentler. |
retractSpeedreadonly | number | A ceiling on how fast it may shorten, in metres a second. |
extendSpeedreadonly | number | And on how fast it may lengthen. |