# Interface RuntimeSettings

Interface for a configuration object containing the settings that can be changed during runtime.

The default values for RuntimeSettings can be found in [[defaultRuntimeSettings]].

interface RuntimeSettings {
ambientLight: vec3;
colorPalette: (
| IndexedCollection
| [number, number, number]
| [number, number, number, number]
)[];
distanceRenderScale: number;
enableHighDpiRendering: boolean;
isWorldInverted: boolean;
lightCutoffDistance: number;
lightsRenderScale: number;
motionBlur: number;
textures: { [textureName: string]: TexImageSource | TextureWithOptions };
tileMultiplier: number;
}

- Defined in graphics/rendering/settings/runtime-settings.ts:10

##### Index

### Properties

ambientLight
colorPalette
distanceRenderScale
enableHighDpiRendering
isWorldInverted
lightCutoffDistance
lightsRenderScale
motionBlur
textures
tileMultiplier

## Properties

### ambientLight

ambientLight: vec3

A light affecting every pixel (even the ones inside objects).

- Defined in graphics/rendering/settings/runtime-settings.ts:91

### colorPalette

colorPalette: (
| IndexedCollection
| [number, number, number]
| [number, number, number, number]
)[]

The possible colors for the objects. Each color is referenced by its index in the palette.

Its length should be less than the `paletteSize` specified in [[StartupSettings]].

Colors can have transparency, but only if WebGL2 support is enabled.

- Defined in graphics/rendering/settings/runtime-settings.ts:49

### distanceRenderScale

distanceRenderScale: number

The resolution of the distance field rendering will be scaled up or down with this value.

Because of interpolation, this can be set much lower than the `lightsRenderScale`, while maintaining closely the same perceived quality.

Setting this is a great way to balance quality and performance.

- Defined in graphics/rendering/settings/runtime-settings.ts:59

### enableHighDpiRendering

enableHighDpiRendering: boolean

When set to `true`, rendering will be done at the screen's real resolution.

- Defined in graphics/rendering/settings/runtime-settings.ts:14

### isWorldInverted

isWorldInverted: boolean

By default, every pixel is outside of objects. Flipping this value to `true` will result in every pixel being inside a large object. From then on, it only makes sense to draw inverted objects.

- Defined in graphics/rendering/settings/runtime-settings.ts:33

### lightCutoffDistance

lightCutoffDistance: number

When lights reach the edge of the display, they are slowly faded out. The length of this fade-out can be set through this value.

- Defined in graphics/rendering/settings/runtime-settings.ts:39

### lightsRenderScale

lightsRenderScale: number

The resolution of the final frame will be scaled by this value.

Setting this is a great way to balance quality and performance.

- Defined in graphics/rendering/settings/runtime-settings.ts:66

### motionBlur

motionBlur: number

Set the extent of the motion blur.

The values must be between 0 and 1. Where 0 means no motion blur, and values just below 1 mean an extreme amount of motion blur.

- Defined in graphics/rendering/settings/runtime-settings.ts:74

### textures

textures: { [textureName: string]: TexImageSource | TextureWithOptions }

It is possible to use your own textures in your SDF definitions.

The keys of the object should be the names used to reference them in the GLSL code, and the values should be the textures themselves, or a TextureWithOptions specifying the texture's [[TextureOptions]]. A texture can be a canvas, an img element, an Image, and so on.

- Defined in graphics/rendering/settings/runtime-settings.ts:84

### tileMultiplier

tileMultiplier: number

First, the SDF of the scene is evaluated at every single pixel. To speed this process up, the screen is divided into tiles, so each one has to deal with fewer objects.

For each tile, it is decided which objects are in its vicinity. This comes with some overhead for the CPU, while saving the GPU from loads of calculations. The workload can be balanced between the CPU and the GPU by setting this number.

- Defined in graphics/rendering/settings/runtime-settings.ts:26