4.0.0 • Published 7 months ago

phaser-plugin-debug-body-colors v4.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
7 months ago

npm.io

Colors Arcade Physics bodies by collision state.

StateColor
disabledgray
blocked, not disabledred
touching, not disabled or blockedyellow
embedded, not disabled, blocked or touchingaqua
not disabled, blocked, touching, or embeddedviolet

UMD

<!-- after phaser.js -->
<script src="https://cdn.jsdelivr.net/npm/phaser-plugin-debug-body-colors@4.0.0"></script>
/* global Phaser, PhaserDebugBodyColorsPlugin */

new Phaser.Game({
  plugins: {
    scene: [
      { key: 'DebugBodyColorsPlugin', plugin: PhaserDebugBodyColorsPlugin, mapping: 'debugBodyColors' }
    ]
  },
  physics: {
    arcade: { debug: true }
  }
});

Quick load

function preload () {
  this.load.scenePlugin('PhaserDebugBodyColorsPlugin', 'https://cdn.jsdelivr.net/npm/phaser-plugin-debug-body-colors@4.0.0');
}

Module

import DebugBodyColorsPlugin from 'phaser-plugin-debug-body-colors';

new Phaser.Game({
  plugins: {
    scene: [
      { key: 'DebugBodyColorsPlugin', plugin: DebugBodyColorsPlugin, mapping: 'debugBodyColors' }
    ]
  },
  physics: {
    arcade: { debug: true }
  }
});
4.0.0

7 months ago

3.0.0

5 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.2.1

6 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago