interface AdvConfig {
    aspectRatio: number;
    assets: {
        audios: Record<string, string>;
        background?: Record<string, string>;
        images: Record<string, string>;
    };
    bgm: {
        autoplay: boolean;
        collection: Music[];
    };
    canvasWidth: number;
    cdn: {
        enable: boolean;
        prefix?: string;
    };
    characters: Character[];
    favicon: string;
    features: AdvFeatureFlags;
    pages: {
        start: {
            bg: string;
            darkBg?: string;
        };
    };
    remote?: boolean;
    selectable: boolean;
    showCharacterAvatar: boolean;
    theme: string;
    themeConfig: any;
    title: string;
}

Properties

aspectRatio: number

Aspect ratio for game should be like 16/9 or 1:1

Default

'16/9'
assets: {
    audios: Record<string, string>;
    background?: Record<string, string>;
    images: Record<string, string>;
}

Type declaration

  • audios: Record<string, string>

    audio url

  • Optional background?: Record<string, string>

    background url

  • images: Record<string, string>

    other images

bgm: {
    autoplay: boolean;
    collection: Music[];
}

Type declaration

  • autoplay: boolean

    auto play first bgm

  • collection: Music[]
canvasWidth: number

The actual width for canvas. unit in px.

Default

'980'
cdn: {
    enable: boolean;
    prefix?: string;
}

Type declaration

  • enable: boolean
  • Optional prefix?: string
characters: Character[]

all characters appear in the game

favicon: string

Default

'/favicon.svg'
features: AdvFeatureFlags
pages: {
    start: {
        bg: string;
        darkBg?: string;
    };
}

Type declaration

  • start: {
        bg: string;
        darkBg?: string;
    }

    Start Page

    • bg: string

      Path or URL @description:zh-CN 背景

    • Optional darkBg?: string

      Path or URL @description:zh-CN 暗色模式背景

remote?: boolean
selectable: boolean

Controls whether texts in slides are selectable

Default

false when debug is true
showCharacterAvatar: boolean

是否显示人物头像

Default

false
theme: string

Theme to use for the advjs

Default

'default'
themeConfig: any

Default

{}
title: string

Default

'ADV.JS'

Generated using TypeDoc