Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Game Objects
/
Gradient
Phaser 4.1.0
Phaser 4 examples
Gradient
14
examples
Examples
14
Advanced Gradient Offsets and Shapes
Demonstrates how different gradient shape modes, such as bilinear and symmetric conic, create unique visual effects like mirroring and kaleidoscopic patterns when their offsets and shapes are manipulated over time.
Animate Gradient Offset
Demonstrates animating the offset property of a radial gradient and using captureFrame to apply it as a dynamic displacement map for an image.
Animated Gauge with Conic Gradient
Create a color-changing gauge by masking an asymmetrical conic gradient with an animated Graphics arc.
Asymmetric Conic Gradient
This example demonstrates how to create and animate an asymmetric conic gradient, allowing for off-center focal points and custom transition angles.
Bilinear Gradient Shape
Demonstrates the bilinear shape mode for gradients, allowing for two-dimensional color transitions based on a defined start point and shape coordinate.
Conic Symmetric Gradient Shape
Demonstrates how to create and animate a symmetric conic gradient object, featuring smooth color transitions radiating from a central point.
Generating Normal Maps from Gradients
Learn how to programmatically create a spherical normal map by combining RGB gradient layers into a Dynamic Texture, then apply it to a light filter for real-time environment mapping.
Gradient Flare
Demonstrates how to create a radial lens flare effect using the Gradient Game Object with multiple color bands and an animated offset.
Gradient Repeat Mode Truncate
This example demonstrates the Truncate repeat mode for Gradient Game Objects, where the gradient is constrained within its defined shape without repeating or extending beyond its bounds.
Gradient Repeat Mode: Extend
Demonstrates the 'Extend' repeat mode for gradients, where the edge colors are stretched to fill the remainder of the Game Object's area.
Gradient Repeat Mode: Sawtooth
Demonstrates the Sawtooth repeat mode for a Gradient Game Object, creating a repeating linear pattern that resets to the start color at the beginning of every cycle.
Gradient Repeat Mode: Triangular
Demonstrates the triangular repeat mode for gradients, which creates a mirrored back-and-forth pattern as the gradient repeats across the Game Object.
Linear Gradient Shape
Demonstrates creating and animating a linear gradient Game Object, including adjusting its position and rotation.
Radial Gradient Shape Mode
Demonstrates how to create and animate a radial gradient using shapeMode, including color band configuration and center point positioning.