Skip to content

curve beta ​

Variable of @v12-engine/engine/ai

ts
curve: {
    readonly linear: (max?: number) => Curve;
    readonly saturate: (k: number) => Curve;
    readonly inverse: (k: number) => Curve;
    readonly step: (at: number) => Curve;
    readonly band: (low: number, high: number) => Curve;
    readonly custom: (fn: (x: number) => number) => Curve;
}

The usual response curves, each a line (consider(name, read, curve.saturate(6))): how a raw number becomes "how much do I care". A curve gives 0..1; what gives nonsense (NaN) counts as 0