Small World Engine API Reference - v0.76.20
    Preparing search index...

    Interface EngineOptions

    Global engine configuration options.

    interface EngineOptions {
        canvasId?: string;
        enableInspector?: boolean;
        enablePhysics?: boolean;
        fullscreen?: boolean;
        gravity?: [number, number, number];
        height?: number;
        inputMode?: InputMode;
        postProcessing?: PostProcessingConfig;
        projectionInstance?: AbstractProjection;
        projectionOptions?: ProjectionOptions;
        projectionType?: ProjectionType;
        quality?: QualityConfig;
        renderer?: RendererConfig;
        rendererType?: RendererType;
        width?: number;
    }
    Index
    canvasId?: string

    The ID of the canvas element in the DOM. Defaults to "SmallWorld".

    enableInspector?: boolean

    Whether to enable the built-in Gadget Inspector overlay (defaults to false/true depending on setup).

    enablePhysics?: boolean

    Whether to step the built-in PhysicsSystem (this.physics) automatically every frame. Defaults to false.

    fullscreen?: boolean

    Whether the engine should automatically resize the canvas to full screen.

    gravity?: [number, number, number]

    Initial gravity vector for the built-in physics system, e.g. [0, -9.81, 0]. Defaults to the PhysicsSystem default.

    height?: number

    Fixed height in pixels (ignored if fullscreen is true).

    inputMode?: InputMode

    The behavior of horizontal input keys (A/D). Defaults to TANK.

    postProcessing?: PostProcessingConfig

    Optional post-processing settings.

    projectionInstance?: AbstractProjection

    A fully constructed projection instance. When provided, projectionOptions and projection type are ignored. Use this to supply a custom or third-party projection.

    projectionOptions?: ProjectionOptions

    Projection startup parameters (near, far, fov, orthoSize).

    projectionType?: ProjectionType

    Default camera projection type.

    quality?: QualityConfig

    Optional quality settings.

    renderer?: RendererConfig

    Per-backend renderer configuration, keyed by backend (WEB_GPU/WEB_GL2/WEB_GL1).

    rendererType?: RendererType

    Primary renderer type to attempt initialization.

    width?: number

    Fixed width in pixels (ignored if fullscreen is true).