Skip to content

phaserjs/plugin-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phaser3 Plugin Template

A base plugin template for Phaser 3 to allow you to create your own plugins.

Run npm install and then npm run build to build the plugin.

Using Plugins in Phaser 3

You can load plugins externally, or include them in your bundle.

To load an external plugin:

function preload ()
{
    this.load.plugin('BasePlugin', 'path/to/BasePlugin.js');
}

Then to install it into a Scene:

    this.sys.install('BasePlugin');

If you load the plugins in a Preloader scene then you can add them to any other Scenes by specifying them in the plugins array:

var config = {
    scene: {
        create: create,
        plugins: [ 'BasePlugin' ],
        map: {
            'base': 'base'
        }
    }
};

More examples and instructions will follow, but for now see the Phaser 3 Examples repo for details.

About

A base plugin template for Phaser 3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published