Class: Renderer
渲染器
Constructors
constructor
• new Renderer(gl
, opts?
): Renderer
Parameters
Name | Type |
---|---|
gl | WebGLRenderingContext | WebGL2RenderingContext | HTMLCanvasElement |
opts | Partial <RendererOptions > |
Returns
Defined in
Properties
vertexAttribDivisor
• vertexAttribDivisor: (index
: number
, divisor
: number
) => void
| (index
: number
, divisor
: number
) => void
Defined in
drawArraysInstanced
• drawArraysInstanced: (mode
: number
, first
: number
, count
: number
, primcount
: number
) => void
| (mode
: number
, first
: number
, count
: number
, instanceCount
: number
) => void
Defined in
drawElementsInstanced
• drawElementsInstanced: (mode
: number
, count
: number
, type
: number
, offset
: number
, primcount
: number
) => void
| (mode
: number
, count
: number
, type
: number
, offset
: number
, instanceCount
: number
) => void
Defined in
createVertexArray
• createVertexArray: () => null
| WebGLVertexArrayObjectOES
| () => null
| WebGLVertexArrayObject
Defined in
bindVertexArray
• bindVertexArray: (arrayObject
: null
| WebGLVertexArrayObjectOES
) => void
| (array
: null
| WebGLVertexArrayObject
) => void
Defined in
deleteVertexArray
• deleteVertexArray: (arrayObject
: null
| WebGLVertexArrayObjectOES
) => void
| (vertexArray
: null
| WebGLVertexArrayObject
) => void
Defined in
width
• width: number
Defined in
height
• height: number
Defined in
Accessors
gl
• get
gl(): WebGLRenderingContext
| WebGL2RenderingContext
获取 gl 实例
Returns
WebGLRenderingContext
| WebGL2RenderingContext
Defined in
attributes
• get
attributes(): Object
获取 Renderer
的内部属性值
Returns
Object
Name | Type |
---|---|
dpr | number |
flipY | boolean |
depth | WithUndef <boolean > |
color | boolean |
antialias | WithUndef <boolean > |
alpha | WithUndef <boolean > |
stencil | WithUndef <boolean > |
autoClear | boolean |
frustumCull | boolean |
premultipliedAlpha | WithUndef <boolean > |
preserveDrawingBuffer | WithUndef <boolean > |