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

    Every setting of the engine, by theme: the scene, its meshes and sprites, their lighting, the drawing, its post-processing, its culling and the file loading. What an interface shows applies live, a frame drawn; the technical settings are hidden, most read at the creation of their object. A Scene's (new Scene(settings)), the Renderer drawing it reading them too (Renderer.create({ scene })).

    const settings = new EngineSettings({
    postProcessing: { ambientOcclusion: { enabled: false } },
    });
    const scene = new Scene(settings);
    const renderer = await Renderer.create({ canvas, scene });
    settings.meshes.xRayOpacity.value = 0.3; // applied live, a frame drawn

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    culling: CullingSettings = ...

    What the frame leaves out: culling, occlusion, small parts.

    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.

    lighting: LightingSettings = ...

    How the objects are lit.

    loading: LoadingSettings = ...

    How the files are loaded.

    meshes: MeshSettings = ...

    The meshes: selection, x-ray, edges, storage.

    postProcessing: PostProcessingSettings = ...

    The post-processing of the frame: antialiasing, ambient occlusion.

    renderer: RendererSettings = ...

    How the frame is drawn: pixel ratio, background.

    scene: SceneSettings = ...

    What the meshes and sprites share: picking, uploads, BoxTree.

    sprites: SpriteSettings = ...

    The sprites: their table, images and alpha test.

    title: "Engine" = 'Engine'

    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