Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samme/phaser-plugin-loader
A collection of small Phaser 3 loader plugins
https://github.com/samme/phaser-plugin-loader
phaser phaser3
Last synced: 2 months ago
JSON representation
A collection of small Phaser 3 loader plugins
- Host: GitHub
- URL: https://github.com/samme/phaser-plugin-loader
- Owner: samme
- License: mit
- Created: 2020-12-11T23:08:00.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-19T18:21:32.000Z (over 1 year ago)
- Last Synced: 2024-11-10T10:06:11.025Z (2 months ago)
- Topics: phaser, phaser3
- Language: JavaScript
- Homepage: https://codepen.io/collection/BNxZzx
- Size: 43.9 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Phaser 3 Loader Plugins
=======================A collection of small loader plugins to help your development.
See [examples](https://codepen.io/collection/BNxZzx).
Loader Bar Plugin
-----------------Shows a progress bar. Removed when loading is complete.
Loader Logger Plugin
--------------------Prints to console:
- debug: loader configuration, load progress, file add/load/complete
- info: loader start, post-process, complete
- warn: loader complete with failures
- error: file load failureLoader Text Plugin
------------------Shows load progress and file status while loading. Removed when loading is complete.
Loader Timer Plugin
-------------------Prints to console the time interval from start to completion.
Use
---Add any of the plugins you need.
### Browser / UMD
```js
/* global PhaserLoaderPlugin */
new Phaser.Game({
plugins: {
scene: [
{ key: 'LoaderBar', plugin: PhaserLoaderPlugin.LoaderBarPlugin, start: true },
{ key: 'LoaderLogger', plugin: PhaserLoaderPlugin.LoaderLoggerPlugin, start: true },
{ key: 'LoaderText', plugin: PhaserLoaderPlugin.LoaderTextPlugin, start: true },
{ key: 'LoaderTimer', plugin: PhaserLoaderPlugin.LoaderTimerPlugin, start: true }
]
}
});
```### Modules
```js
import { LoaderLoggerPlugin, LoaderTimerPlugin, LoaderBarPlugin, LoaderTextPlugin } from 'phaser-plugin-loader';new Phaser.Game({
plugins: {
scene: [
{ key: 'LoaderBar', plugin: LoaderBarPlugin, start: true },
{ key: 'LoaderLogger', plugin: LoaderLoggerPlugin, start: true },
{ key: 'LoaderText', plugin: LoaderTextPlugin, start: true },
{ key: 'LoaderTimer', plugin: LoaderTimerPlugin, start: true }
]
}
});
```