Skip to content

InspectorDriveContext

Defined in: Inspector.ts:637

The verbs Inspector.drive hands its callback.

readonly events: object

Defined in: Inspector.ts:657

clearLog: () => void

void

getLog: () => EventLogEntry[]

EventLogEntry[]

isEnabled: () => boolean

boolean

setCapacity: (n) => void

number

void

setEnabled: (enabled) => void

Turn event-log recording on/off at runtime. Off means zero per-event allocation: the EventBus tap detaches and recordBusEvent is never called. DebugConfig.eventLog controls the startup default; this is the runtime switch for toggling mid-session.

boolean

void

waitFor: (pattern, options?) => Promise<EventLogEntry>

Resolve the earliest retained match without consuming it, or wait for a future match. Clear the log before an action to require a new event. withinFrames expires after that many completed engine frames; events on the deadline frame match first. Zero searches retained history only. Disposing the Inspector or disabling the log rejects pending waits.

string | RegExp

"scene" | "entity" | "bus"

number

Promise<EventLogEntry>


readonly framesUsed: number

Defined in: Inspector.ts:639

Frames this drive has spent so far, counting frames issued any way.


readonly input: InspectorDriveInput

Defined in: Inspector.ts:650


readonly pointer: object

Defined in: Inspector.ts:656

Clicks that reach @yagejs/ui elements, which input never does. Dispatching spends no frame, so these are the same verbs Inspector.pointer carries, handed through unchanged.

click: (target, opts?) => InspectorPointerHit

Presses and releases at one point, which is what a UIButton requires to run its onClick.

InspectorPointerTarget

InspectorPointerButtonOpts

InspectorPointerHit

down: (target, opts?) => InspectorPointerHit

Presses a mouse button, left unless opts says otherwise.

InspectorPointerTarget

InspectorPointerButtonOpts

InspectorPointerHit

hitTest: (target) => InspectorPointerHit

Resolves target and reports what is under it, dispatching nothing.

InspectorPointerTarget

InspectorPointerHit

move: (target) => InspectorPointerHit

Moves the pointer, which drives hover state. Takes no button: a move presses and releases nothing, and carries whichever buttons an earlier down left held.

InspectorPointerTarget

InspectorPointerHit

up: (target, opts?) => InspectorPointerHit

Releases a mouse button, left unless opts says otherwise.

InspectorPointerTarget

InspectorPointerButtonOpts

InspectorPointerHit

capture(label?): Promise<string>

Defined in: Inspector.ts:659

Screenshots into the result, resolving with a PNG data URL.

string

Promise<string>


step(frames?, opts?): Promise<void>

Defined in: Inspector.ts:641

Advances frames frames, one at a time.

number

InspectorStepOptions

Promise<void>


until(predicate, opts?): Promise<number>

Defined in: Inspector.ts:646

Steps until predicate holds, resolving with the frames it took. Checks before the first frame, and throws once maxFrames is spent.

() => boolean

InspectorDriveUntilOptions

Promise<number>

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/core.md.