Skip to main content

Interface: RendererOptions

Table of contents

Properties

Properties

dpr

dpr: number

指定 devicePixelRatio

Defined in

src/core/Renderer.ts:79


autoClear

autoClear: boolean

指定是否开启自动清除

Defined in

src/core/Renderer.ts:84


depth

depth: boolean

指定是否开启深度检测

Defined in

src/core/Renderer.ts:89


alpha

alpha: boolean

指定画布是否包含alpha缓冲区,仅在传入的是 canvas 对象时有用

Defined in

src/core/Renderer.ts:94


antialias

antialias: boolean

指定是否开启抗锯齿,仅在传入的是 canvas 对象时有用

Defined in

src/core/Renderer.ts:99


stencil

stencil: boolean

指定是否开启模板缓冲区

Defined in

src/core/Renderer.ts:104


powerPreference

powerPreference: WebGLPowerPreference

指定GPU的性能配置,仅在传入的是 canvas 对象时有用

Defined in

src/core/Renderer.ts:109


premultipliedAlpha

premultipliedAlpha: boolean

指定是否开启预乘alpha

Defined in

src/core/Renderer.ts:114


preserveDrawingBuffer

preserveDrawingBuffer: boolean

是否开启绘制缓冲区,仅在传入的是 canvas 对象时有用

Defined in

src/core/Renderer.ts:119


requestWebGl2

requestWebGl2: boolean

获取 webgl2 实例,仅在传入的是 canvas 对象时有用

Defined in

src/core/Renderer.ts:124


frustumCull

frustumCull: boolean

是否开启视锥剔除,默认不开启

Defined in

src/core/Renderer.ts:128


extensions

extensions: ExternalExtensionKeys[]

WebGL 上下文支持的扩展列表。默认 []

Defined in

src/core/Renderer.ts:133