Skip to content

@bendyline/molen-kernel/platformer ​

Molen headless deterministic simulation kernel (no DOM, no three.js).

ts
import { /* … */ } from '@bendyline/molen-kernel/platformer';

Interfaces ​

PlatformBodyData ​

Extends ​

Indexable ​

ts
[key: string]: JsonValue | undefined

Properties ​

acceleration? ​
ts
optional acceleration?: number;
buffered? ​
ts
optional buffered?: number;
bufferTicks? ​
ts
optional bufferTicks?: number;
coyoteTicks? ​
ts
optional coyoteTicks?: number;
grace? ​
ts
optional grace?: number;
gravity? ​
ts
optional gravity?: number;
grounded? ​
ts
optional grounded?: boolean;
halfExtents ​
ts
halfExtents: [number, number];
jumpSpeed? ​
ts
optional jumpSpeed?: number;
speed? ​
ts
optional speed?: number;
vel? ​
ts
optional vel?: [number, number];

PlatformIntentData ​

Extends ​

Indexable ​

ts
[key: string]: JsonValue | undefined

Properties ​

jump? ​
ts
optional jump?: boolean;
jumpHeld? ​
ts
optional jumpHeld?: boolean;
move ​
ts
move: number;

PlatformSolidData ​

Extends ​

Indexable ​

ts
[key: string]: JsonValue | undefined

Properties ​

halfExtents ​
ts
halfExtents: [number, number];
oneWay? ​
ts
optional oneWay?: boolean;

Variables ​

PlatformBody ​

ts
const PlatformBody: ComponentType<PlatformBodyData>;

PlatformIntent ​

ts
const PlatformIntent: ComponentType<PlatformIntentData>;

PlatformSolid ​

ts
const PlatformSolid: ComponentType<PlatformSolidData>;

Functions ​

installPlatformer() ​

ts
function installPlatformer(world): void;

Small deterministic XY controller against static, world-axis boxes. Sweeps X then Y to the nearest face (no speed-dependent substep limit). Z is preserved. Solids are in world meters, independent of visual scale/rotation. Author non-overlapping spawn positions. No body/body response, moving-platform carry, slopes or rigid-body dynamics; use Rapier for those. All continuation state is in components, including jump grace and buffering.

Parameters ​

world ​

World

Returns ​

void

37 guides · 36 schema formats · 41 API entry points · 10 samples. API, CLI and schema pages are generated from the shipped build.