Types.GameObjects.Stencil
StencilConfig
<static> StencilConfig
| name | type | optional | description |
|---|---|---|---|
| children | Array.<Phaser.GameObjects.GameObject> | Yes | An optional array of Game Objects to add to the Stencil. |
| options | Phaser.Types.GameObjects.Stencil.StencilOptions | Yes | The options for the Stencil. |
Type: object
Member of: Phaser.Types.GameObjects.Stencil
Source: src/gameobjects/stencil/typedefs/StencilConfig.js#L1
Since: 4.2.0
StencilLayerMode
<static> StencilLayerMode
Type: 'addLayer' | 'subtractLayer' | 'clear' | 'clearRegion'
Member of: Phaser.Types.GameObjects.Stencil
Source: src/gameobjects/stencil/typedefs/StencilLayerModes.js#L1
Since: 4.2.0
StencilOptions
<static> StencilOptions
| name | type | optional | default | description |
|---|---|---|---|---|
| stencilAlphaStrategy | Phaser.Types.Renderer.WebGL.AlphaStrategy | Yes | "'dither'" | The alpha strategy to use when rendering the stencil. |
| stencilClearValue | number | Yes | 0 | The value to clear the stencil to, if the stencilLayerMode is clear or clearRegion. Must be between 0 and 255. |
| stencilCompositeCheck | boolean | 'auto' | Yes | "'auto'" | Whether to composite the contents of the stencil to a framebuffer. |
| stencilInvert | boolean | Yes | false | Whether to invert the stencil, using an extra draw call. This only works with the addLayer and subtractLayer modes. |
| stencilLayerMode | Phaser.Types.GameObjects.Stencil.StencilLayerMode | Yes | "'addLayer'" | The mode which the Stencil runs in. |
| stencilValueWrap | boolean | Yes | true | Whether to wrap the value in the stencil buffer when it overflows or underflows when using the addLayer or subtractLayer mode. This is useful when defining stencils with subtraction, and you don't want to underflow from 0 to 255. |
Type: object
Member of: Phaser.Types.GameObjects.Stencil
Source: src/gameobjects/stencil/typedefs/StencilOptions.js#L1
Since: 4.2.0