Creating a Flashlight or Spotlight Effect in Phaser 3 using a RenderTexture and alpha masks.
Tommy Leung from Ourcade presents a new tutorial: "Creating a spotlight or flashlight effect in Phaser 3 is fairly simple once you know how to use alpha masks.
You can also use this technique for a “magic lens” effect or anything that involves revealing hidden information.
If you are not familiar with using alpha masks in Phaser 3 then check out this first.
In this article, we will be building on the code example from our Reveal Effect in Phaser 3 with Alpha Masks to create a flashlight effect that illuminates a darkened Phaser logo."
Learn to code and lead your intrepid crew on a mission to save The Cloud in TwilioQuest, a PC role-playing game inspired by classics of the 16-bit era. Free forever, and available now for Windows, Mac, and Linux.
The first book on the creation of HTML5 cross platform games using Phaser 3 and other free software.
- By Emanuele Feronato
- 155 Pages
- 28 Source Code Examples
- Build a complete game from start to finish
- Cross Platform
- Scaling for devices