Skip to content

API Class PostProcessing

github-actions[bot] edited this page Nov 24, 2026 · 7 revisions

Class: PostProcessing

Defined in: src/engine/render/components.ts:507

Post-processing for the camera on the same node (ADR 0051). Effects run when this component asks for them and the graphics quality tier allows them. The main (lowest-depth) camera gets them in this version; other cameras draw without effects.

Extends

Constructors

Constructor

new PostProcessing(): PostProcessing;

Returns

PostProcessing

Inherited from

Component.constructor

Properties

ambientOcclusion

ambientOcclusion: boolean = false;

Defined in: src/engine/render/components.ts:523

Ambient occlusion: darkens creases and contact points.


aoIntensity

aoIntensity: number = 2;

Defined in: src/engine/render/components.ts:525

Strength of the ambient occlusion (2 = default).


aoRadius

aoRadius: number = 1;

Defined in: src/engine/render/components.ts:527

Radius of the occlusion search, in metres.


bloom

bloom: boolean = false;

Defined in: src/engine/render/components.ts:514

Bloom glow around bright areas.


bloomIntensity

bloomIntensity: number = 1;

Defined in: src/engine/render/components.ts:516

Strength of the bloom glow (1 = default).


bloomRadius

bloomRadius: number = 0.85;

Defined in: src/engine/render/components.ts:520

Spread of the bloom glow, 0 to 1.


bloomThreshold

bloomThreshold: number = 0.9;

Defined in: src/engine/render/components.ts:518

Brightness above which pixels bloom, 0 to 1 (luminance).


bokehScale

bokehScale: number = 2;

Defined in: src/engine/render/components.ts:559

Size of the out-of-focus blur (bokeh) shapes.


brightness

brightness: number = 0;

Defined in: src/engine/render/components.ts:530

Brightness offset, -1 to 1 (0 = unchanged).


chromaticAberration

chromaticAberration: boolean = false;

Defined in: src/engine/render/components.ts:562

Splits red, green and blue at the screen edges.


chromaticAberrationAmount

chromaticAberrationAmount: number = 0.002;

Defined in: src/engine/render/components.ts:564

Offset of the colour split, as a fraction of the screen (0.002 = default).


contrast

contrast: number = 0;

Defined in: src/engine/render/components.ts:532

Contrast, -1 to 1 (0 = unchanged).


depthOfField

depthOfField: boolean = false;

Defined in: src/engine/render/components.ts:553

Blurs what is out of focus.


exposure

exposure: number = 1;

Defined in: src/engine/render/components.ts:511

Exposure multiplier applied before tone mapping (1 = unchanged).


focusDistance

focusDistance: number = 10;

Defined in: src/engine/render/components.ts:555

Distance to the focused plane, in metres.


focusRange

focusRange: number = 5;

Defined in: src/engine/render/components.ts:557

Depth range around the focus distance that stays sharp, in metres.


hue

hue: number = 0;

Defined in: src/engine/render/components.ts:536

Hue rotation in degrees (0 = unchanged).


lut

lut: string = "";

Defined in: src/engine/render/components.ts:541

A colour lookup table (.cube, ADR 0111) applied to the final, tone-mapped image, as exported by grading tools (DaVinci Resolve, Photoshop). Empty: none.


lutIntensity

lutIntensity: number = 1;

Defined in: src/engine/render/components.ts:543

How much of the lookup table's look to apply, 0 to 1.


saturation

saturation: number = 0;

Defined in: src/engine/render/components.ts:534

Saturation, -1 (greyscale) to 1 (0 = unchanged).


toneMapping

toneMapping: ToneMapping = "agx";

Defined in: src/engine/render/components.ts:509

Tone mapping curve applied to the HDR scene.


vignette

vignette: boolean = false;

Defined in: src/engine/render/components.ts:546

Darkens the edges of the screen.


vignetteDarkness

vignetteDarkness: number = 0.5;

Defined in: src/engine/render/components.ts:548

How dark the vignette gets, 0 to 1.


vignetteOffset

vignetteOffset: number = 0.5;

Defined in: src/engine/render/components.ts:550

How far in from the edges the vignette starts, 0 to 1.

Accessors

enabled

Get Signature

get enabled(): boolean;

Defined in: src/engine/core/Component.ts:57

Returns

boolean

Set Signature

set enabled(value): void;

Defined in: src/engine/core/Component.ts:61

Parameters
value

boolean

Returns

void

Inherited from

Component.enabled


gameObject

Get Signature

get gameObject(): GameObject;

Defined in: src/engine/core/Component.ts:37

Unity-style alias for node.

Returns

GameObject

Inherited from

Component.gameObject


isActiveAndEnabled

Get Signature

get isActiveAndEnabled(): boolean;

Defined in: src/engine/core/Component.ts:68

True when enabled, the node is active in the hierarchy, and the node is in a loaded world.

Returns

boolean

Inherited from

Component.isActiveAndEnabled


node

Get Signature

get node(): GameObject;

Defined in: src/engine/core/Component.ts:32

The node this component is on.

Returns

GameObject

Inherited from

Component.node


owner

Get Signature

get owner(): GameObject;

Defined in: src/engine/core/Component.ts:45

The node this component acts for: the node itself when attached directly, or the parent node when this component lives on a component node (ADR 0009).

Returns

GameObject

Inherited from

Component.owner


time

Get Signature

get time(): Readonly<TimeState>;

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

This component's World's clock (ADR 0032): the same values as Time, but safe to read outside the World's frame too (after an await, say).

Returns

Readonly<TimeState>

Inherited from

Component.time


transform

Get Signature

get transform(): Transform;

Defined in: src/engine/core/Component.ts:51

The Transform of the node this component is on, if it has one.

Returns

Transform

Inherited from

Component.transform


world

Get Signature

get world(): WorldHandle;

Defined in: src/engine/core/Component.ts:82

A handle on this component's World (ADR 0132): the same one Engine.findWorld returns. Load a scene into it, pause, connect or destroy it: this.world.loadScene("scenes/level2.scene.json"). Throws for a World no Engine owns.

Returns

WorldHandle

Inherited from

Component.world

Methods

instantiate()

instantiate(prefabPath, options?): GameObject;

Defined in: src/engine/core/Component.ts:103

Instantiate a prefab in this component's World (ADR 0034), like GameObject.instantiate. Use it in code that may run after an await: by then the frame is over and the current World is the Engine's default one, which may not be this component's. A parent from another World throws.

Parameters

prefabPath

string

options?

InstantiateOptions = {}

Returns

GameObject

Inherited from

Component.instantiate

Clone this wiki locally