Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WebGL1Renderer

Since r118 WebGLRenderer automatically uses a WebGL 2 rendering context. When upgrading an existing project to => r118, applications might break because of two reasons: Custom shader code needs to be GLSL 3.0 conform. WebGL 1 extension checks have to be changed.

See the ngx3js docs page for details. See the ngx renderer page for a live demo.

Hierarchy

Index

Constructors

constructor

Properties

autoClear

autoClear: boolean

Defines whether the renderer should automatically clear its output before rendering.

default

true

autoClearColor

autoClearColor: boolean

If autoClear is true, defines whether the renderer should clear the color buffer. Default is true.

default

true

autoClearDepth

autoClearDepth: boolean

If autoClear is true, defines whether the renderer should clear the depth buffer. Default is true.

default

true

autoClearStencil

autoClearStencil: boolean

If autoClear is true, defines whether the renderer should clear the stencil buffer. Default is true.

default

true

capabilities

capabilities: WebGLCapabilities

clippingPlanes

clippingPlanes: any[]
default

[]

context

The HTML5 Canvas's 'webgl' context obtained from the canvas where the renderer will draw.

debug

debug: WebGLDebug

Debug configurations.

default

{ checkShaderErrors: true }

domElement

domElement: HTMLCanvasElement

A Canvas where the renderer draws its output. This is automatically created by the renderer in the constructor (if not provided already) : this; you just need to add it to your page.

default

document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' )

extensions

extensions: WebGLExtensions

info

info: WebGLInfo

Readonly isWebGL1Renderer

isWebGL1Renderer: true

localClippingEnabled

localClippingEnabled: boolean
default

false

outputEncoding

outputEncoding: TextureEncoding

Default is LinearEncoding.

default

THREE.LinearEncoding

physicallyCorrectLights

physicallyCorrectLights: boolean
default

false

pixelRatio

pixelRatio: number

properties

properties: WebGLProperties

renderLists

renderLists: WebGLRenderLists

shadowMap

shadowMap: WebGLShadowMap

sortObjects

sortObjects: boolean

Defines whether the renderer should sort objects. Default is true.

default

true

state

state: WebGLState

toneMapping

toneMapping: ToneMapping
default

THREE.NoToneMapping

toneMappingExposure

toneMappingExposure: number
default

1

xr

Methods

clear

  • clear(color?: boolean, depth?: boolean, stencil?: boolean): void

clearColor

  • clearColor(): void

clearDepth

  • clearDepth(): void

clearStencil

  • clearStencil(): void

clearTarget

  • clearTarget(renderTarget: I3JS.WebGLRenderTarget, color: boolean, depth: boolean, stencil: boolean): void

compile

copyFramebufferToTexture

  • Copies a region of the currently bound framebuffer into the selected mipmap level of the selected texture. This region is defined by the size of the destination texture's mip level, offset by the input position.

    Parameters

    • position: I3JS.Vector2

      Specifies the pixel offset from which to copy out of the framebuffer.

    • texture: I3JS.Texture

      Specifies the destination texture.

    • Optional level: number

      Specifies the destination mipmap level of the texture.

    Returns void

copyTextureToTexture

copyTextureToTexture3D

dispose

  • dispose(): void

forceContextLoss

  • forceContextLoss(): void

forceContextRestore

  • forceContextRestore(): void

getActiveCubeFace

  • getActiveCubeFace(): number

getActiveMipmapLevel

  • getActiveMipmapLevel(): number

getClearAlpha

  • getClearAlpha(): number

getClearColor

getContext

getContextAttributes

  • getContextAttributes(): any

getCurrentViewport

getDrawingBufferSize

getPixelRatio

  • getPixelRatio(): number

getRenderTarget

getScissor

getScissorTest

  • getScissorTest(): boolean

getSize

getViewport

initTexture

readRenderTargetPixels

render

renderBufferDirect

resetState

  • resetState(): void

setAnimationLoop

setClearAlpha

  • setClearAlpha(alpha: number): void

setClearColor

setDrawingBufferSize

  • setDrawingBufferSize(width: number, height: number, pixelRatio: number): void

setOpaqueSort

  • setOpaqueSort(method: (a: any, b: any) => number): void

setPixelRatio

  • setPixelRatio(value: number): void

setRenderTarget

setScissor

  • setScissor(x: number | I3JS.Vector4, y?: number, width?: number, height?: number): void

setScissorTest

  • setScissorTest(enable: boolean): void

setSize

  • setSize(width: number, height: number, updateStyle?: boolean): void

setTransparentSort

  • setTransparentSort(method: (a: any, b: any) => number): void

setViewport

  • setViewport(x: number | I3JS.Vector4, y?: number, width?: number, height?: number): void

Generated using TypeDoc