Renderer · class

Boom

Explained in Hello world.

class Boom
import { Boom } from '@driftengine/core';

Constructor

new

constructor(timing?: Partial<BoomTiming>)
ParameterTypeDescription
timing?Partial<BoomTiming>

Properties

NameTypeDescription
fractionnumberHow much of the arm is currently extended, 0–1.

Methods

reset

reset(fraction: number): void

Place the arm outright, for a cut or a teleport.

ParameterTypeDescription
fractionnumber

step

step(clear: number, lengthM: number, dt: number): number

Move toward clear — the fraction of the arm that is unobstructed, already clamped by the caller to whatever minimum its framing needs.

ParameterTypeDescription
clearnumber
lengthMnumber
dtnumber
More

lengthM is the arm's full length, because the speed limit is stated in metres and a fraction covers more ground on a longer arm.