simple-canvas-library
    Preparing search index...

    Interface GameInterfaceConfig

    Configuration for GameInterface

    interface GameInterfaceConfig {
        autoresize?: boolean;
        canvasSize?: Size;
        containerClass?: string;
        cssVars?: Record<string, string>;
        fullscreen?: boolean;
        parent?: HTMLElement;
        scaleToFit?: boolean;
    }
    Index

    Properties

    autoresize?: boolean

    Whether to auto-resize the canvas bitmap to match display size

    canvasSize?: Size

    Size of the canvas area

    containerClass?: string

    CSS class for the main container

    cssVars?: Record<string, string>

    CSS variable overrides for this interface (e.g. { '--bar-background': '#222' })

    fullscreen?: boolean

    If true, make the interface fullscreen (canvas fills viewport, no scroll)

    parent?: HTMLElement

    Container element to append to (defaults to document.body)

    scaleToFit?: boolean

    If true, canvas display scales to fit container while maintaining aspect ratio. Use with canvasSize to have fixed logical resolution with flexible display size. Example: canvasSize: {width: 800, height: 600}, scaleToFit: true