跳到主要内容

Config

Ploy3D / Config

Interface: Config

引擎配置声明。

Table of contents

Properties

Properties

alphaMode

alphaMode: "opaque" | "premultiplied"

画布混合模式。


canvas

canvas: HTMLCanvasElement

画布,用于创建默认交换链。


colorSpace

colorSpace: "srgb"

画布色彩空间类型。


devicePixelRatio

devicePixelRatio: number

画布物理像素/设备独立像素比率。


initHeight

initHeight: number

画布初始高度。


initWidth

initWidth: number

画布初始宽度。


mobile

mobile: boolean

是否是移动端。


powerPreference

powerPreference: "high-performance" | "low-power"

引擎选用低功耗还是高性能的显卡。


vdbShader

vdbShader: number

在画布上可视化调试着色器:-1表示不启用,[0, 1]表示调试显示横向起始偏移。


webgl

webgl: boolean

是否使用WebGL。