Phaser 4 examples

Gradient

  • 14 examples

Examples 14

Advanced Gradient Offsets and ShapesDemonstrates 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 OffsetDemonstrates 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 GradientCreate a color-changing gauge by masking an asymmetrical conic gradient with an animated Graphics arc.Asymmetric Conic GradientThis example demonstrates how to create and animate an asymmetric conic gradient, allowing for off-center focal points and custom transition angles.Bilinear Gradient ShapeDemonstrates the bilinear shape mode for gradients, allowing for two-dimensional color transitions based on a defined start point and shape coordinate.Conic Symmetric Gradient ShapeDemonstrates how to create and animate a symmetric conic gradient object, featuring smooth color transitions radiating from a central point.Generating Normal Maps from GradientsLearn 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 FlareDemonstrates how to create a radial lens flare effect using the Gradient Game Object with multiple color bands and an animated offset.Gradient Repeat Mode TruncateThis 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: ExtendDemonstrates 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: SawtoothDemonstrates 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: TriangularDemonstrates the triangular repeat mode for gradients, which creates a mirrored back-and-forth pattern as the gradient repeats across the Game Object.Linear Gradient ShapeDemonstrates creating and animating a linear gradient Game Object, including adjusting its position and rotation.Radial Gradient Shape ModeDemonstrates how to create and animate a radial gradient using shapeMode, including color band configuration and center point positioning.