1681-engine / index / EngineOptions
Interface: EngineOptions ​
Defined in: src/engine/Engine.ts:12
1681 Engine: the core's public API, for 2D games in any art style. Pixel-art tools are 1681-engine/pixel. Anything not exported here or there is internal and may change in any release.
Properties ​
background? ​
optional background?: string;Defined in: src/engine/Engine.ts:19
CSS colour behind the world (default black).
followReducedMotion? ​
optional followReducedMotion?: boolean;Defined in: src/engine/Engine.ts:48
Mirror the system's "reduce motion" setting into engineSettings.reducedFx, now and on every change (default false). Leave it off when the game has its own reduced-effects toggle and mirrors that instead.
height? ​
optional height?: number;Defined in: src/engine/Engine.ts:17
hz? ​
optional hz?: number;Defined in: src/engine/Engine.ts:23
Simulation steps per second (default 60).
parent ​
parent: HTMLElement;Defined in: src/engine/Engine.ts:14
Where the canvas goes.
pauseWhenHidden? ​
optional pauseWhenHidden?: boolean;Defined in: src/engine/Engine.ts:43
Pause simulating and drawing while the page is hidden (another tab, the phone's home screen) and resume when it is shown, with no catch-up burst of steps (default false). A pause the game made itself is left alone.
pixelPerfect? ​
optional pixelPerfect?: boolean;Defined in: src/engine/Engine.ts:30
Pixel art: nearest-neighbour textures, no antialiasing, one backing pixel per CSS pixel, and a camera that lands on whole pixels (default false: smooth textures drawn at the screen's own density, for any other art style).
preference? ​
optional preference?: "webgl" | "webgpu";Defined in: src/engine/Engine.ts:38
Renderer preference (default 'webgl'). WebGL 2 runs everywhere the engine is tested. 'webgpu' is experimental: Pixi falls back to WebGL where WebGPU is missing, but the engine's own paths (pooled PixelLayer buffers, the erase blend Darkness cuts lights with, the fill filters) have only been profiled on WebGL.
resolution? ​
optional resolution?: number;Defined in: src/engine/Engine.ts:32
Backing pixels per CSS pixel when not pixelPerfect (default devicePixelRatio, at most 2).
textures? ​
optional textures?: TextureRegistry;Defined in: src/engine/Engine.ts:25
Textures shared by the stage; a fresh registry by default.
width? ​
optional width?: number;Defined in: src/engine/Engine.ts:16
A fixed canvas size in CSS pixels. Leave both out to fill parent and follow its size.
zoom? ​
optional zoom?: number;Defined in: src/engine/Engine.ts:21
World pixels are drawn this many screen pixels wide (default 1). Whole numbers keep pixel art crisp.