A StencilReference is a special type of Game Object that uses a Stencil
as a reference for its own rendering. This allows you to re-render a Stencil
using different settings.
For example, you can add a layer with a Stencil with some complex geometry,
draw objects affected by the stencil layer,
then use a StencilReference to subtract the same layer without recreating it.
It is WebGL-only.
A StencilReference temporarily changes the settings on the target Stencil,
then restores them after rendering.
Thus, it keeps the original Stencil's transforms.
The stencil options can be changed by setting the properties on this object.
Note that these properties will be set to default values,
so if you have configured the targetStencil with its own properties,
you should configure this with those properties as well,
altered to your requirements.
See the Phaser.GameObjects.Stencil documentation for more details.
A StencilReference Game Object.
A StencilReference is a special type of Game Object that uses a Stencil as a reference for its own rendering. This allows you to re-render a Stencil using different settings.
For example, you can add a layer with a Stencil with some complex geometry, draw objects affected by the stencil layer, then use a StencilReference to subtract the same layer without recreating it.
It is WebGL-only.
A StencilReference temporarily changes the settings on the target Stencil, then restores them after rendering. Thus, it keeps the original Stencil's transforms. The stencil options can be changed by setting the properties on this object. Note that these properties will be set to default values, so if you have configured the targetStencil with its own properties, you should configure this with those properties as well, altered to your requirements.
See the Phaser.GameObjects.Stencil documentation for more details.