Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Plugins
Phaser 4.1.0
Phaser 4 examples
Plugins
17
examples
Examples
17
Creating a Global Plugin
This example demonstrates how to create a custom global plugin, register it in the game configuration, and access its methods from within a scene.
Custom Game Object via Plugin
Demonstrates how to register a custom Game Object class as a plugin so it can be added to a scene using a custom method on the Scene Factory (this.add).
Custom Loader File Type
Demonstrates how to extend the Phaser Loader by registering a custom file type through a plugin, including processing the loaded data before it enters the cache.
Custom Scene Plugin
Demonstrates how to create, register, and use a custom Scene Plugin to extend Scene functionality with reusable logic.
Custom Scene Plugin
Demonstrates how to create and register a custom Scene Plugin that maps to a specific property on the Scene, used here to generate a procedural fractal via a Canvas texture.
Destroying a Game Instance with Plugins
Demonstrates how to completely destroy a Phaser game instance that uses a custom plugin and then safely recreate it from scratch.
Global Plugin from Class
Demonstrates how to define a custom class extending BasePlugin, register it globally via the Loader, and access its functionality from within a Scene.
Global Scene Plugin
Demonstrates how to register a global plugin in the game configuration and access its methods within a Scene using a custom property mapping.
Install Global Plugin At Runtime
Demonstrates how to dynamically register and instantiate custom global plugins using the Plugin Manager after the game has started.
Loading a Scene Plugin
Demonstrates how to load an external Scene-level plugin during the preload phase and access its functionality via a custom property on the Scene.
Loading a Scene Plugin
Demonstrates how to dynamically load a Scene Plugin and use its injected property to create and animate specialized content within a Scene.
Loading External Plugins
This example demonstrates how to load an external JavaScript plugin file during the preload phase and access its custom methods within a Scene.
Multiple Global Plugin Instances
Demonstrates how to start and manage multiple independent instances of the same global plugin class using the Plugin Manager, allowing for separate configurations and states.
Rendering FIGlet Fonts with Sprites
Demonstrates how to manually parse a FIGlet (.flf) font file and render text by positioning sprites based on the ASCII character data.
Scene Plugin Dynamic Fractal Canvas
Demonstrates how to create a custom Scene Plugin that renders an animated Julia set fractal onto a dynamic canvas texture. The example shows how to map the plugin to a Scene property and animate its internal variables using tweens.
Scene Plugin Loader
Demonstrates how to dynamically load an external Scene Plugin and access its functionality via a custom property on the Scene.
Start and Stop a Plugin
Demonstrates how to create a global plugin and dynamically toggle its execution at runtime using the Plugin Manager's start and stop methods.