@moxijs/core - v0.3.4
    Preparing search index...

    Interface SetupMoxiArgs

    Configuration for setupMoxi().

    interface SetupMoxiArgs {
        backgroundColor?: number;
        height?: number;
        hostElement: HTMLElement;
        loadingSceneOptions?: LoadingSceneOptions;
        physics?: boolean | PhysicsWorldOptions;
        pixelPerfect?: boolean | PixelPerfectOptions;
        renderOptions?: Partial<PIXI.AutoDetectOptions>;
        scaleMode?: ScaleMode;
        showLoadingScene?: boolean;
        suppressContextMenu?: boolean;
        width?: number;
    }
    Index

    Properties

    backgroundColor?: number

    Background color (hex number like 0x1a1a2e). Convenience option.

    height?: number

    Canvas height in pixels. Convenience option (alternative to renderOptions.height). If both are provided, this takes precedence.

    hostElement: HTMLElement

    Container element to attach the canvas.

    loadingSceneOptions?: LoadingSceneOptions

    Customize loading scene appearance.

    physics?: boolean | PhysicsWorldOptions

    Enable physics. Pass true for defaults or PhysicsWorldOptions.

    pixelPerfect?: boolean | PixelPerfectOptions

    Enable pixel-perfect rendering. Pass true for defaults.

    renderOptions?: Partial<PIXI.AutoDetectOptions>

    PIXI render options (width, height, backgroundColor, etc).

    scaleMode?: ScaleMode

    How to scale the canvas within the host element.

    • 'none': No scaling, canvas uses its native size (default)
    • 'fit': Scale to fit within host while maintaining aspect ratio (letterbox/pillarbox)
    • 'fill': Scale to fill host while maintaining aspect ratio (may crop)
    • 'stretch': Stretch to fill host (distorts aspect ratio)
    showLoadingScene?: boolean

    Show loading overlay during asset loading.

    suppressContextMenu?: boolean

    Suppress right-click context menu on the canvas. Default false.

    width?: number

    Canvas width in pixels. Convenience option (alternative to renderOptions.width). If both are provided, this takes precedence.