Skip to content

Documentation / @debuffjp/dev / DevState

Interface: DevState ​

Defined in: dev/src/index.ts:48

Properties ​

camera ​

camera: object

Defined in: dev/src/index.ts:79

Camera centre in world units, its zoom, and the view size in logical units.

height ​

height: number

width ​

width: number

x ​

x: number

y ​

y: number

zoom ​

zoom: number


events ​

events: Record<string, number>

Defined in: dev/src/index.ts:89

How many times the game emitted each event (game.emit("coin") → events.coin) since load.


frozen ​

frozen: boolean

Defined in: dev/src/index.ts:54


height ​

height: number

Defined in: dev/src/index.ts:70


hidden ​

hidden: boolean

Defined in: dev/src/index.ts:66

True while the tab is hidden (a background tab, a minimised window, a hidden agent browser). The browser stops animation frames there, so tick stands still even though nothing paused the game. step(n) still advances it. Since 0.25.


notes ​

notes: number

Defined in: dev/src/index.ts:87

Number of notes the human has flagged (read them with notes()).


pausedBy ​

pausedBy: string | null

Defined in: dev/src/index.ts:60

Who paused the game ("you", "agent", "spike", "error"…), or null while it's started. From 0.31.1 it follows the game loop: "game" when the game's own code called game.stop(), and null once anything calls game.start(). Before, it only knew about pauses made through the dev tools.


pluginNames ​

pluginNames: readonly string[]

Defined in: dev/src/index.ts:83

Installed plugin names, in install order.


plugins ​

plugins: Record<string, unknown>

Defined in: dev/src/index.ts:85

Snapshots from game.inspect providers, keyed by name. debuff's own dev tools (dev-*) are left out.


reducedMotion ​

reducedMotion: boolean

Defined in: dev/src/index.ts:72

game.reducedMotion: when true, the game's own animations may be frozen or toned down.


reducedMotionForced ​

reducedMotionForced: boolean

Defined in: dev/src/index.ts:74

True when reducedMotion(value) forced it, rather than the player's OS setting or the game's option.


renderer ​

renderer: "2d" | "webgl2"

Defined in: dev/src/index.ts:76

Active rendering backend.


scene ​

scene: string | undefined

Defined in: dev/src/index.ts:49


state ​

state: unknown

Defined in: dev/src/index.ts:81

Whatever the active scene's inspect() returns.


stats ​

stats: object

Defined in: dev/src/index.ts:77

fps ​

fps: number

frameMs ​

frameMs: number

samples ​

samples: number

workMs ​

workMs: number

workP95Ms ​

workP95Ms: number


step ​

step: number

Defined in: dev/src/index.ts:53

Seconds per fixed simulation step (the game's clock.step, 1/60 by default).


tick ​

tick: number

Defined in: dev/src/index.ts:50


time ​

time: number

Defined in: dev/src/index.ts:51


timeScale ​

timeScale: number

Defined in: dev/src/index.ts:67


width ​

width: number

Defined in: dev/src/index.ts:69

Logical size (game.width/game.height); with scale: "expand" it follows the container.