Skip to content

API Interface ProjectSettings

github-actions[bot] edited this page Nov 25, 2026 · 9 revisions

Interface: ProjectSettings

Defined in: src/engine/core/settings.ts:18

Project settings, normally loaded from the game's project.json.

Properties

audio

audio: AudioSettings;

Defined in: src/engine/core/settings.ts:73

Audio mixer buses, snapshots, ducking and the backend (ADR 0097, 0098): audio.json's runtime view (ADR 0344), never a project.json section. Omitted: Master with Music, SFX, UI and Voice.


autoload

autoload: string[];

Defined in: src/engine/core/settings.ts:81

Scene/prefab files instanced under the World root at startup; they persist across scene loads (ADR 0016).


bootstrap?

bootstrap?: BootstrapSetting;

Defined in: src/engine/core/settings.ts:83

Which Worlds the Engine creates at start (ADR 0032). Omitted: the default bootstrap, one World.


display

display: object;

Defined in: src/engine/core/settings.ts:20

backgroundColor

backgroundColor: string;

height

height: number;

scaleMode

scaleMode: ScaleMode;

How the canvas fits its container (ADR 0116): "fit" keeps the aspect ratio and scales to the largest size that fits (letterboxed); "stretch" fills the container, ignoring the aspect ratio; "pixel-perfect" scales by whole numbers only (falling back to "fit" when the container is smaller than the reference size).

width

width: number;

Reference resolution. The canvas keeps this aspect ratio and scales to fit its container.


graphics

graphics: GraphicsSettings;

Defined in: src/engine/core/settings.ts:67

Graphics quality tiers (ADR 0050). Omitted: Low, Medium, High and Ultra, defaulting to High.


input

input: object;

Defined in: src/engine/core/settings.ts:79

Input players (ADR 0337): how players join, and how many local players there can be. single (default): player 0 owns every device; onePerDevice: the keyboard and pointer are one player, each gamepad another; pressToJoin: a device's first press makes it a new player; manual: the game joins players (InputPlayers).

join

join: InputJoinPolicy;

maxPlayers

maxPlayers: number;

languages

languages: LanguageSettings;

Defined in: src/engine/core/settings.ts:93

The game's languages for text and audio (ADR 0354 §1, 0356 §3, 0357 §2): codes, reference, default, fallbacks, shipping, fonts, direction, voice. Omitted: English only (localisation/languages.ts).


lighting2D

lighting2D: Lighting2DSettings;

Defined in: src/engine/core/settings.ts:69

2D lighting (ADR 0399): the light blend styles. Omitted: one, Multiply.


name

name: string;

Defined in: src/engine/core/settings.ts:19


navigation

navigation: NavigationSettings;

Defined in: src/engine/core/settings.ts:71

Built-in navigation (ADR 0065): agent types, areas, voxel sizes, runtime budgets. Omitted: one person-sized walker.


physics

physics: object;

Defined in: src/engine/core/settings.ts:38

backend2d?

backend2d?: string;

The physics backend for 2D and for 3D, by id (ADR 0137; Rapier's is "rapier"). Omitted: the only one enabled. Backends come from plugins, so the engine checks only the form (RUNTIME_SETTINGS.physics).

backend3d?

backend3d?: string;

collisionMatrix?

collisionMatrix?: Record<string, string[]>;

Which layers collide, as symmetric pairs: { "Player": ["Ground", "Obstacle"] }. When omitted, every layer collides with every other layer.

gravity

gravity: [number, number, number] | [number, number];

Gravity in m/s²: [x, y], or [x, y, z] for 3D physics (z is 0 when left out, ADR 0045).

layers

layers: string[];

Named collision layers (max 16). Index 0 is the default layer.


plugins?

plugins?: PluginSettings;

Defined in: src/engine/core/settings.ts:88

Per-project plugin enabling (ADR 0133): only what's off is stored, so new first-party plugins default on. A plugin is also off when one it depends on is. Names are read by the hosts (resolveEnabledPlugins).


render

render: object;

Defined in: src/engine/core/settings.ts:55

maxDecals

maxDecals: number;

How many decals each World's Decals pool holds of each kind, 3D and 2D (ADR 0395); spawning past it fades out the oldest. Placed decal Components don't count. Optional in project.json: 1000.

pixelsPerUnit

pixelsPerUnit: number;

Default sprite pixels per world unit (ADR 0014).

sortingLayers

sortingLayers: string[];

Sorting layers from back to front (ADR 0014).


subtitles

subtitles: SubtitleProjectSettings;

Defined in: src/engine/core/settings.ts:95

Subtitles (ADR 0357 §5): player defaults, reading speed, speakers. Omitted: the defaults (localisation/subtitleSettings.ts).


time

time: object;

Defined in: src/engine/core/settings.ts:33

fixedDeltaTime

fixedDeltaTime: number;

maxFrameTime

maxFrameTime: number;

maxSubSteps

maxSubSteps: number;

Clone this wiki locally