Skip to main content

@novorender/web_app / RenderState

Interface: RenderState

An object describing the what to be rendered and how by RenderContext.render.

Remarks

The render state is immutable by design. You should not attempt to mutate existing objects. The correct way to change render state is to use the modifyRenderState function. This function will create a new copy of objects with new/modified properties, while retaining all objects that hasn't changed. It will also perform basic validation. The engine uses strict equality to determine if some portion of the state has changed. Hence, it's important that unchanged sub objects are not copied.

The render state is serializable via JSON or structuredClone(). This can be useful for test/diagnostics purposes, since the render state should define how the output image eventually is rendered. It may take a while for downloads of streamed resources to complete, however, so the output image will not be fully resolved until all pending downloads are complete. There are also other runtime factors, such as device specific limitations or variations, that may contribute to small deviations in the output image. A direct pixel to pixel comparison between two output images generated by identical render state is thus likely to fail unless it's rendered on the same device and same version of our API, browser, OS and drivers.

Extended by

Properties

background

readonly background: RenderStateBackground;

background/environment related state.

Defined in

@novorender/core3d/state/index.ts:36


camera

readonly camera: RenderStateCamera;

camera related state.

Defined in

@novorender/core3d/state/index.ts:39


clipping

readonly clipping: RenderStateClipping;

Clipping planes related state.

Defined in

@novorender/core3d/state/index.ts:63


cube

readonly cube: RenderStateCube;

@internal.

Defined in

@novorender/core3d/state/index.ts:51


dynamic

readonly dynamic: RenderStateDynamicObjects;

Dynamic objects related state.

Defined in

@novorender/core3d/state/index.ts:60


grid

readonly grid: RenderStateGrid;

Grid helper related state.

Defined in

@novorender/core3d/state/index.ts:45


highlights

readonly highlights: RenderStateHighlightGroups;

Highlights related state.

Defined in

@novorender/core3d/state/index.ts:66


outlines

readonly outlines: RenderStateOutlines;

Outlines related state.

Defined in

@novorender/core3d/state/index.ts:69


output

readonly output: RenderStateOutput;

Output image related state.

Defined in

@novorender/core3d/state/index.ts:33


pick

readonly pick: RenderStatePick;

Pick info rendering related state.

Defined in

@novorender/core3d/state/index.ts:81


points

readonly points: RenderStatePointCloud;

Point cloud rendering related state.

Defined in

@novorender/core3d/state/index.ts:75


quality

readonly quality: RenderStateQuality;

Render quality related state.

Defined in

@novorender/core3d/state/index.ts:42


scene

readonly scene: undefined | RenderStateScene;

Static, streamable scene related state.

Defined in

@novorender/core3d/state/index.ts:54


terrain

readonly terrain: RenderStateTerrain;

Terrain rendering related state.

Defined in

@novorender/core3d/state/index.ts:57


tonemapping

readonly tonemapping: RenderStateTonemapping;

Tonemapping related state.

Defined in

@novorender/core3d/state/index.ts:72


toonOutline

readonly toonOutline: RenderStateToonOutline;

Toon outline rendering related state.

Defined in

@novorender/core3d/state/index.ts:78