Interface loadResourcesOptions

interface loadResourcesOptions {
    ShadertoyProgressOpacity?: boolean;
    autoHiddenSceneObjects?: boolean;
    enableCameraControl?: boolean;
    html?: {
        css?: string;
        div: string;
        textDivClassName?: string;
    };
    labelOptions?: Partial<LabelOptions> & {
        height?: number;
        position?: [number, number];
    };
    progressCb?: ((percentage, error?) => void);
    shadertoyMaterial?: Partial<ShadertoyMaterialParameters> & {
        hsbOffsetDelta?: [number, number, number];
        hsbOffsetMax?: [number, number, number];
    };
    showDivLabel?: boolean;
    showGlLabel?: boolean;
    showHtml?: boolean;
    showLoading?: boolean;
    showShadertoy?: boolean;
}

Properties

ShadertoyProgressOpacity?: boolean

背景随进度透明度变小

autoHiddenSceneObjects?: boolean

自动隐藏场景中其他实体 默认true

enableCameraControl?: boolean

禁用相机控件 默认false

html?: {
    css?: string;
    div: string;
    textDivClassName?: string;
}

使用html div做为进度条

Type declaration

  • Optional css?: string

    css的内容

  • div: string

    div的内容

  • Optional textDivClassName?: string

    进度文本div 类别

labelOptions?: Partial<LabelOptions> & {
    height?: number;
    position?: [number, number];
}

标签选项 text默认为 loading... {{percentage}}

Type declaration

  • Optional height?: number

    文字像素高度

  • Optional position?: [number, number]

    文字像素位置

progressCb?: ((percentage, error?) => void)

进度条回调

Type declaration

    • (percentage, error?): void
    • 进度条回调

      Parameters

      • percentage: number
      • Optional error: any

      Returns void

shadertoyMaterial?: Partial<ShadertoyMaterialParameters> & {
    hsbOffsetDelta?: [number, number, number];
    hsbOffsetMax?: [number, number, number];
}

材质参数选顶

Type declaration

  • Optional hsbOffsetDelta?: [number, number, number]
  • Optional hsbOffsetMax?: [number, number, number]
showDivLabel?: boolean

显示div进度条标签 默认 true

showGlLabel?: boolean

显示webgl进度条标签 默认 false

showHtml?: boolean

是否html的div进度要 默认false

showLoading?: boolean

是否显示loading界面 默认true

showShadertoy?: boolean

是否显示背景 默认 true