phaser-fx
Installation
SKILL.md
Phaser 4 Filters, Masks, Lights and the Beam Renderer
Phaser 4 replaced the v3 renderer wholesale. FX and masks — two separate, mutually incompatible systems in v3 — are now one system called Filters, available on every game object and every camera with no exceptions.
If you are converting v3 code, start at the conversion table at the bottom. If you are writing new code, start here.
The one rule that catches everyone
Game objects need enableFilters() first. Cameras do not.
// Game object — filters is null until you enable it
sprite.enableFilters();
sprite.filters!.internal.addGlow(0xff00ff, 4, 0, 1);