Skip to main content
Version: Phaser v4.0.0-rc.6

Phaser.Renderer.WebGL.WebGLStencilParametersFactory

Scope: static

Source: src/renderer/webgl/parameters/WebGLStencilParametersFactory.js#L7
Since: 4.0.0

Static functions

create

<instance> create(renderer, [enabled], [func], [funcRef], [funcMask], [opFail], [opZfail], [opZpass], [clear])

Description:

Creates a new WebGLStencilParameters.

Parameters:

nametypeoptionaldefaultdescription
rendererPhaser.Renderer.WebGL.WebGLRendererNoThe WebGLRenderer to create the WebGLStencilParameters for.
enabledGLbooleanYesfalseWhether the stencil test is enabled.
funcGLenumYes"GL_ALWAYS"The comparison function.
funcRefGLintYes0The reference value for the stencil test.
funcMaskGLuintYes"0xFF"The mask to apply to the stencil test.
opFailGLenumYes"GL_KEEP"The operation to perform if the stencil test fails.
opZfailGLenumYes"GL_KEEP"The operation to perform if the depth test fails.
opZpassGLenumYes"GL_KEEP"The operation to perform if the stencil test passes and the depth test passes or is disabled.
clearGLintYes0The value to clear the stencil buffer to.

Returns: Phaser.Types.Renderer.WebGL.WebGLStencilParameters - The created WebGLStencilParameters.

Source: src/renderer/webgl/parameters/WebGLStencilParametersFactory.js#L15
Since: 4.0.0