Skip to content

API Interface ProjectSettings

github-actions[bot] edited this page Dec 1, 2026 · 9 revisions

Interface: ProjectSettings

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

Project settings, normally loaded from the game's project.json: the core's sections (CoreProjectSettings) and those other domains declare (ADR 0509). A domain adds its section by merging its key into this interface and registering its parse with registerSettingsSection (2D lighting, navigation, audio, languages, subtitles).

Extends

  • CoreProjectSettings

Properties

audio

audio: AudioSettings;

Defined in: src/engine/audio/settings.ts:50

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:93

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

Inherited from

CoreProjectSettings.autoload


bootstrap?

bootstrap?: BootstrapSetting;

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

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

Inherited from

CoreProjectSettings.bootstrap


display

display: object;

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

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.

Inherited from

CoreProjectSettings.display


graphics

graphics: GraphicsSettings;

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

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

Inherited from

CoreProjectSettings.graphics


input

input: object;

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

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).

actionSets

actionSets: string[];

Action set assets (*.actions.json, ADR 0433) defined at boot, in this order.

join

join: InputJoinPolicy;

maxPlayers

maxPlayers: number;

Inherited from

CoreProjectSettings.input


languages

languages: LanguageSettings;

Defined in: src/engine/localisation/languages.ts:351

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).


lateSection?

lateSection?: object;

Defined in: src/engine/tests/runtimeSettings.test.ts:101

A section this test registers late, as a domain loaded after the settings were resolved would.

level

level: number;

lighting2D

lighting2D: Lighting2DSettings;

Defined in: src/engine/render/lights2D/settings.ts:122

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


name

name: string;

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

Inherited from

CoreProjectSettings.name


navigation

navigation: NavigationSettings;

Defined in: src/engine/settingsSections.ts:17

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:41

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.

Inherited from

CoreProjectSettings.physics


plugins?

plugins?: PluginSettings;

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

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).

Inherited from

CoreProjectSettings.plugins


render

render: object;

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

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).

recordWarmUp

recordWarmUp: boolean;

Whether editor play mode records the content whose shaders the warm-up missed into the scene's warm file (<scene>.warm.json, ADR 0616 §3), which later loads warm. Optional in project.json: true.

sortingLayers

sortingLayers: string[];

Sorting layers from back to front (ADR 0014).

ySortedLayers

ySortedLayers: string[];

The sorting layers that are y-sorted (ADR 0440): draws with the same order in layer sort by their sort point's world height, higher first. Names from sortingLayers. Optional in project.json: none.

Inherited from

CoreProjectSettings.render


subtitles

subtitles: SubtitleProjectSettings;

Defined in: src/engine/localisation/subtitleSettings.ts:125

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:36

fixedDeltaTime

fixedDeltaTime: number;

maxFrameTime

maxFrameTime: number;

maxSubSteps

maxSubSteps: number;

Inherited from

CoreProjectSettings.time

Clone this wiki locally