Skip to content
本页内容

Type alias: CanvasConfig

Ƭ CanvasConfig: Object

外部canvas功能配置

Type declaration

NameTypeDescription
canvas?HTMLCanvasElement需要外部传入的canvas
alpha?boolean是否使用3D透明背景层 在使用3D透明背景时注意设置 SkyRenderer天空渲染组件的 enable 为 false skyRender.enable = false
zIndex?numbercanvas styler zIndex
devicePixelRatio?numbercanvas pixel ratio
backgroundImage?stringcanvas background image need call scene.hideSky() and set CanvasConfig.alpha is true

Defined in

src/engine/gfx/graphics/webGpu/WebGpuCanvasConfig.ts:7