Skip to content

TrailAPI

Defined in: trail/TrailAPI.ts:15

Per-app motion-trail API. Wraps the C++ registry-scoped trail system so two App instances (e.g. editor tabs) drive independent trails without cross-talk.

Consumed as a resource: declare Res(Trail) as a system param, or grab it with app.getResource(Trail) outside ECS code.

new TrailAPI(module, registry): TrailAPI

Defined in: trail/TrailAPI.ts:20

NonNullable<EngineApi>

whichever engine core is present (see ecs/engineApi.ts).

CppRegistry

TrailAPI

clear(entity): void

Defined in: trail/TrailAPI.ts:31

Drop an entity’s recorded history (the streak vanishes instantly).

number

void


update(dt): void

Defined in: trail/TrailAPI.ts:26

Advance every trail: record points for moving emitters, age out old ones.

number

void