liko
    Preparing search index...

    Interface IAppOptions

    引擎初始化选项接口

    interface IAppOptions {
        autoResize?: boolean;
        bgColor?: ColorData;
        canvas?: HTMLCanvasElement;
        container?: string;
        height?: number;
        physics?: PhysicsOptions;
        pixelRatio?: number;
        title?: string;
        width?: number;
    }
    Index

    Properties

    autoResize?: boolean

    是否自动调整大小以适应画布容器

    bgColor?: ColorData

    背景颜色

    canvas?: HTMLCanvasElement

    自定义画布元素

    container?: string

    画布容器 ID,用来添加画布到指定容器中,如果提供则必须存在于 DOM 中

    height?: number

    画布高度(逻辑像素),必须为正数

    physics?: PhysicsOptions

    物理引擎选项

    pixelRatio?: number

    设备像素比

    title?: string

    应用标题

    width?: number

    画布宽度(逻辑像素),必须为正数