Skip to content

@bendyline/molen-client/instruments ​

Molen rendering client: three.js wrapper, snapshot sync, interpolation.

ts
import { /* … */ } from '@bendyline/molen-client/instruments';

Interfaces ​

AltimeterInstrumentOptions ​

Properties ​

axis? ​
ts
optional axis?: "x" | "y" | "z";
direction? ​
ts
optional direction?: 1 | -1;

+Z facing the viewer uses -1 for clockwise motion. Reverse for a frame facing -Z.

hundreds ​
ts
hundreds: string;
responseSeconds? ​
ts
optional responseSeconds?: number;
source ​
ts
source: string;

Caller supplies barometrically indicated altitude in feet, or explicitly labels an approximation.

tenThousands? ​
ts
optional tenThousands?: string;
thousands ​
ts
thousands: string;

AttitudeInstrumentOptions ​

Properties ​

bankAxis? ​
ts
optional bankAxis?: "x" | "y" | "z";
bankDirection? ​
ts
optional bankDirection?: 1 | -1;
bankNode ​
ts
bankNode: string;

A bank frame containing the pitch card, inside the authored face mask.

pitchAxis? ​
ts
optional pitchAxis?: "x" | "y" | "z";
pitchLimit ​
ts
pitchLimit: number;
pitchNode ​
ts
pitchNode: string;
pitchScale ​
ts
pitchScale: number;

Local meters per radian; sign follows the face's orientation.

pitchSource? ​
ts
optional pitchSource?: string;
responseSeconds? ​
ts
optional responseSeconds?: number;
rollSource? ​
ts
optional rollSource?: string;

DialInstrumentOptions ​

Properties ​

axis? ​
ts
optional axis?: "x" | "y" | "z";
calibration ​
ts
calibration: [number, number][];

Measured [reading, needle radians from authored rest] pairs, including nonlinear scales.

missing? ​
ts
optional missing?: "hold" | "rest";
node ​
ts
node: string;
period? ​
ts
optional period?: number;

Usually 2π for a continuously rotating heading or altimeter needle.

responseSeconds? ​
ts
optional responseSeconds?: number;
source ​
ts
source: string;

NumericInstrumentOptions ​

Properties ​

digits ​
ts
digits: [string, string, string, string, string, string, string][];

Most-significant to least-significant digit; each has seven node names in a,b,c,d,e,f,g order.

prefix ​
ts
prefix: string;

Prefix for private derived variables, unique when combining multiple readouts.

source ​
ts
source: string;

Functions ​

altimeterInstrument() ​

ts
function altimeterInstrument(options): ModelSignalBinding[];

Three independent, continuous needles: one turn per 1,000 / 10,000 / 100,000 feet.

Parameters ​

options ​

AltimeterInstrumentOptions

Returns ​

ModelSignalBinding[]


annunciatorInstrument() ​

ts
function annunciatorInstrument(node, source): ModelSignalBinding;

Own an authored lamp/flag node; positive means on, missing readings turn it off.

Parameters ​

node ​

string

source ​

string

Returns ​

ModelSignalBinding


attitudeInstrument() ​

ts
function attitudeInstrument(options): ModelSignalBinding[];

Moving horizon behind a fixed aircraft symbol. Geometry supplies the circular mask.

Parameters ​

options ​

AttitudeInstrumentOptions

Returns ​

ModelSignalBinding[]


compileModelSignalExpressions() ​

ts
function compileModelSignalExpressions(definitions): (sources) => ModelSignals;

Compile a bounded dependency graph once. Evaluation is read-only and never executes code.

Parameters ​

definitions ​

Record<string, ModelSignalExpression> | undefined

Returns ​

(sources) => ModelSignals


dialInstrument() ​

ts
function dialInstrument(options): ModelSignalBinding;

The same binding can calibrate tick placement with modelSignalDisplacement(binding, reading).

Parameters ​

options ​

DialInstrumentOptions

Returns ​

ModelSignalBinding


modelSignalDisplacement() ​

ts
function modelSignalDisplacement(binding, signal): number;

A binding's displacement for a signal, before its limits: linear in the signal, or along its keyframed curve, which holds its end values outside the keys. Exported for tests.

Parameters ​

binding ​

ModelSignalBinding

signal ​

number

Returns ​

number


numericInstrument() ​

ts
function numericInstrument(options): ModelSignalSpec;

Fixed-width unsigned integer display; no DOM, textures or per-frame glyph allocation.

Parameters ​

options ​

NumericInstrumentOptions

Returns ​

ModelSignalSpec

References ​

createModelSignalVisual ​

Re-exports createModelSignalVisual


ModelSignals ​

Re-exports ModelSignals


ModelSignalVisual ​

Re-exports ModelSignalVisual


readModelSignals ​

Re-exports readModelSignals

50 guides · 44 schema formats · 51 API entry points · 11 samples. API, CLI and schema pages are generated from the shipped build.