Documentation - v20.0.0-dev
    Preparing search index...

    The settings of the drawing: the backend, read when a Renderer is made (the page reloaded at its change); pixel ratio and background, applied live; the depth offsets of the edges and the GPU buffers, hidden, read when a scene or a backend is made.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    The backend a Renderer draws with, read at its creation: auto, WebGPU when the browser can draw with it, else WebGL2. A canvas keeps the backend it first drew with: at a change, the renderer reloads the page, the application saving its settings then (e.g. at beforeunload).

    background: ColorController = ...

    Colour where no object is drawn, sRGB: sky blue.

    edgeNearer: NumberController = ...

    The edges are drawn nearer than the faces they lie on, by this fraction of their distance to the camera (along the view ray: they stay at the same pixels), so that they pass the depth test (1e-4: 1 cm at 100 m).

    emittedIndicesGrowth: NumberController = ...

    When a view needs more emitted indices, their buffer grows to this many times the need.

    emittedIndicesInitialMB: NumberController = ...

    The index buffer the culling emits for the narrow geometries' draws, sized for what a view needs, not for every instance (it only grows, never past every instance's need): its size before the first culling is read back, in MB.

    faceOffsetFactor: NumberController = ...

    The faces are drawn farther by a polygon offset, so that the edges on them pass the depth test where the faces slope away (grazing angles), which a shift by distance does not cover. On the faces: the offset of lines exists in neither WebGL nor WebGPU. This factor scales the face's depth slope.

    faceOffsetUnits: NumberController = ...

    The polygon offset of the faces (see faceOffsetFactor), in the depth's smallest steps.

    icon: "renderer" = 'renderer'

    Drawn by an interface before its title.

    isCategory: boolean = false

    A category of the group holding it: drawn by an interface inside that group (e.g. the post-processing's antialiasing and ambient occlusion), which stays a group of its own even without settings of its own (a group of groups only is drawn in place, e.g. the engine's).

    isSettings: true

    Tells a group of settings from a setting, without instanceof.

    pixelRatio: NumberController = ...

    Device pixels per CSS pixel of the drawing buffer: 1, not the screen's (2 on a Retina screen: 4 times the pixels, 1.5 times the frame time measured).

    title: "Renderer" = 'Renderer'

    Shown by an interface above its settings.

    Methods

    • Sets the settings config gives, each validated (see ValueController.validate): a value refused is skipped with a warning, the others set. The keys that are not settings are ignored (e.g. of a config saved by another version).

      Parameters

      Returns void

    • Disconnects every listener of the settings: they are not used after.

      Returns void

    • The values changed from their default, group by group, but those never saved (ValueControllerOptions.skipSave): a config for applyConfig, what is saved.

      Returns SettingsConfig<this>

    • Sets the settings saved under key in the local storage (saveToLocalStorage); none saved: unchanged. A value refused (e.g. by a later version) is skipped with a warning, the others set (see applyConfig); saved settings that cannot be read are ignored with a warning.

      Parameters

      • key: string

      Returns void

    • Sets every setting back to its default.

      Returns void

    • Saves the values changed from their default under key in the local storage, the key removed when none is: the others follow the defaults of the next versions.

      Parameters

      • key: string

      Returns void