jetlag2d
    Preparing search index...

    Interface JetLagGameConfig

    JetLagGameConfig stores game-specific configuration values. The programmer makes one of these to tell JetLag how to run their game.

    interface JetLagGameConfig {
        accelerometerMode?: AccelerometerMode;
        aspectRatio: { height: number; width: number };
        hitBoxes: boolean;
        resources?: {
            cdn?: string;
            fonts?: string[];
            imageNames?: string[];
            loadingScreenFonts?: string[];
            loadingScreenImageNames?: string[];
            musicNames?: string[];
            soundNames?: string[];
            videoNames?: string[];
        };
        storageKey?: string;
    }
    Index
    accelerometerMode?: AccelerometerMode

    Accelerometer mode (customize for each device target and orientation)

    aspectRatio: { height: number; width: number }

    The width and height of the game, in meters. Common values are 16/9 (landscape) and 9/16 (portrait)

    Type Declaration

    • height: number

      The height part of the ratio

    • width: number

      The width part of the ratio

    hitBoxes: boolean

    Should JetLag print an outline around each actor in the game?

    resources?: {
        cdn?: string;
        fonts?: string[];
        imageNames?: string[];
        loadingScreenFonts?: string[];
        loadingScreenImageNames?: string[];
        musicNames?: string[];
        soundNames?: string[];
        videoNames?: string[];
    }

    Configuration of any assets used by the game

    Type Declaration

    • Optional Readonlycdn?: string

      An override for loading assets from a CDN url instead of the game's assets folder.

    • Optional Readonlyfonts?: string[]

      Fonts to load

    • Optional ReadonlyimageNames?: string[]

      The list of image files that can be used by the game

    • Optional ReadonlyloadingScreenFonts?: string[]

      The list of fonts needed EARLY (for the loading screen)

    • Optional ReadonlyloadingScreenImageNames?: string[]

      The list of image files needed EARLY (for the loading screen)

    • Optional ReadonlymusicNames?: string[]

      The list of audio files that can be used as (looping) background music

    • Optional ReadonlysoundNames?: string[]

      The list of audio files that can be used as sound effects by the game

    • Optional ReadonlyvideoNames?: string[]

      The list of video files that can be used for cut scenes

    storageKey?: string

    A prefix for every key in persistent storage