View original page

Masks And Stencils

Software Development

Masking in Phaser 4: the Mask filter (enableFilters, then filters.internal or filters.external.addMask with a Game Object or texture key, invert, autoUpdate, hardEdges for Graphics and Shape masks), Stencil and StencilReference (addLayer, subtractLayer, clear, clearRegion, stencilInvert), CustomContext (scissor, stencil test, alpha strategy), the render config's alphaStrategy, stencil and stencilAlphaStrategy, and the Canvas-only GeometryMask. Use when masking a sprite, container or camera, cutting a hole in a dark overlay, a spotlight or keyhole, fog of war, a reveal or wipe, a circular minimap or avatar, or clipping a scrolling UI panel. v3's BitmapMask and createBitmapMask don't exist in v4, and setMask only works in Canvas. Triggers on: mask, masking, setMask, BitmapMask, GeometryMask, createGeometryMask, invertAlpha, inverted mask, hole, cut-out, clip, clipping, scissor, stencil, Stencil, StencilReference, CustomContext, alphaStrategy, dither.

Publisher / source

phaserjs/phaser (found on skills.sh)

Upstream record

phaserjs/phaser

Version

Version 1

Published

2026-12-03

Publication review

Approved for publication

Content fingerprint

eab68b57b4b8fd3132c00be3ba14d08cb4d275a67dc9401f57bda72a0bffb9ea

Review before you use it

Publication approval is a recorded review state, not a guarantee of safe execution. Check the upstream license, required tools and permissions, and test in your intended client.

Sign in to inspect the full instructions and download the SKILL.md file. This public page contains metadata only.

Open skill in your workspace


Source: https://prompeteer.ai/skills-hub/c3078668-e3a3-46eb-b56f-b03440bfebce