Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samme/phaser-plugin-debug-body-colors
Colors Arcade Physics bodies by collision state
https://github.com/samme/phaser-plugin-debug-body-colors
phaser phaser-plugin phaser3 phaser3-plugin
Last synced: 2 months ago
JSON representation
Colors Arcade Physics bodies by collision state
- Host: GitHub
- URL: https://github.com/samme/phaser-plugin-debug-body-colors
- Owner: samme
- Created: 2018-06-18T17:07:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-24T14:48:43.000Z (2 months ago)
- Last Synced: 2024-11-24T15:31:48.437Z (2 months ago)
- Topics: phaser, phaser-plugin, phaser3, phaser3-plugin
- Language: JavaScript
- Homepage: https://codepen.io/samme/pen/aPdGKO
- Size: 247 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
![](https://samme.github.io/phaser-plugin-debug-body-colors/preview.png)
Phaser 3 Debug Body Colors Plugin
=================================```javascript
new Phaser.Game({
plugins: {
scene: [
{ key: 'DebugBodyColorsPlugin', plugin: PhaserDebugBodyColorsPlugin, mapping: 'debugBodyColors' }
]
},
physics: {
arcade: { debug: true }
}
});
```or
```js
function preload () {
this.load.scenePlugin('PhaserDebugBodyColorsPlugin', 'https://cdn.jsdelivr.net/npm/[email protected]');
}
```Colors
------- [disabled][0] — gray
- [blocked][1], not disabled — red
- [touching][2], not disabled or blocked — yellow
- [embedded][3], not disabled, blocked or touching — aqua
- not disabled, blocked, touching, or embedded — violetExamples
--------- [collide](https://codepen.io/samme/pen/aPdGKO)
- [overlap](https://codepen.io/samme/pen/RdYKqO)
- [First Phaser 2 game](https://codepen.io/samme/pen/LqGdON)
- [sprite pool](https://codepen.io/samme/pen/RwWmXrx)[0]: https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Body.html#enable
[1]: https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Body.html#blocked
[2]: https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Body.html#touching
[3]: https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Body.html#embedded