Phaser 4 examples

Renderer

  • 18 examples
  • 1 folder

Folders 1

Examples 14

Bend Shader with Custom Batch HandlerDemonstrates applying a custom batch handler shader to multiple sprites using setRenderNodeRole to create a visual bending effect.Color FilterDemonstrates how to enable and apply a hue-rotation color filter to individual sprites using custom filter controllers.Container Post-Processing FilterThis example demonstrates how to enable and apply custom post-processing filters to a Container and all of its nested children.Custom Batch SizeDemonstrates how to define a custom batch size in the Game configuration to control the number of quads processed by the WebGL renderer in a single draw call.Custom FilterDemonstrates how to create and apply a custom GLSL fragment shader filter to a Game Object, using a Filter Controller to manage uniforms like time and speed.Custom Grayscale Shader via Batch HandlerApply a custom shader effect to individual game objects by assigning a specific Batch Handler and updating its shader uniforms in real-time.Custom Shader Single Texture Render NodeDemonstrates how to create a custom render node to apply a color-warping fragment shader and time-based uniforms to specific Sprites.Custom Shader with Batch HandlerDemonstrates how to apply a custom GLSL shader to specific sprites using a BatchHandlerQuad render node and the setRenderNodeRole method.Hue Rotation Shader via Batch HandlerApply a custom hue rotation shader to multiple sprites by registering a BatchHandler render node and updating shader uniforms in the game loop.Local Grayscale Shader AdditionDemonstrates how to inject custom GLSL code into a specific batch handler to create a grayscale effect and apply it selectively to individual sprites using Render Node roles.Smooth Pixel Art RenderingDemonstrates the use of the smoothPixelArt configuration property to enable anti-aliasing for textures while maintaining smooth edges during camera zooms and rotations.Swirl FilterApply a swirl distortion effect to a Game Object and animate the effect's strength using the Tween Manager.WebGL Context RecoveryDemonstrates how Phaser automatically restores standard GameObjects like images, shapes, and text after a WebGL context loss occurs and is subsequently recovered.WebGL Renderer InformationAccess and display WebGL renderer details including supported extensions, configuration properties, texture compression formats, and hardware texture limits.