Documentation - v19.16.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: false } });
    const scene = new Scene(settings);
    const renderer = await Renderer.create({ container, 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.

    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.

    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

    • 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