Repository navigation
API 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).
CoreProjectSettings
audio: AudioSettings;Defined in: src/engine/audio/settings.ts:970
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: string[];Defined in: src/engine/core/settings.ts:88
Scene/prefab files instanced under the World root at startup; they persist across scene loads (ADR 0016).
CoreProjectSettings.autoload
bootstrap?: BootstrapSetting;Defined in: src/engine/core/settings.ts:90
Which Worlds the Engine creates at start (ADR 0032). Omitted: the default bootstrap, one World.
CoreProjectSettings.bootstrap
display: object;Defined in: src/engine/core/settings.ts:23
backgroundColor: string;height: number;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: number;Reference resolution. The canvas keeps this aspect ratio and scales to fit its container.
CoreProjectSettings.display
graphics: GraphicsSettings;Defined in: src/engine/core/settings.ts:75
Graphics quality tiers (ADR 0050). Omitted: Low, Medium, High and Ultra, defaulting to High.
CoreProjectSettings.graphics
input: object;Defined in: src/engine/core/settings.ts:81
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: string[];Action set assets (*.actions.json, ADR 0433) defined at boot, in this order.
join: InputJoinPolicy;maxPlayers: number;CoreProjectSettings.input
languages: LanguageSettings;Defined in: src/engine/localisation/languages.ts:345
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?: 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: number;lighting2D: Lighting2DSettings;Defined in: src/engine/render/lights2D/settings.ts:122
2D lighting (ADR 0399): the light blend styles. Omitted: one, Multiply.
name: string;Defined in: src/engine/core/settings.ts:22
CoreProjectSettings.name
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: object;Defined in: src/engine/core/settings.ts:41
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?: string;collisionMatrix?: Record<string, string[]>;Which layers collide, as symmetric pairs: { "Player": ["Ground", "Obstacle"] }.
When omitted, every layer collides with every other layer.
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: string[];Named collision layers (max 16). Index 0 is the default layer.
CoreProjectSettings.physics
plugins?: PluginSettings;Defined in: src/engine/core/settings.ts:95
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).
CoreProjectSettings.plugins
render: object;Defined in: src/engine/core/settings.ts:58
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: number;Default sprite pixels per world unit (ADR 0014).
sortingLayers: string[];Sorting layers from back to front (ADR 0014).
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.
CoreProjectSettings.render
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: object;Defined in: src/engine/core/settings.ts:36
fixedDeltaTime: number;maxFrameTime: number;maxSubSteps: number;CoreProjectSettings.time
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference