All Projects → samme → phaser-plugin-debug-arcade-physics

samme / phaser-plugin-debug-arcade-physics

Licence: other
Draws properties of Arcade Physics bodies. Phaser 2/CE

Programming Languages

coffeescript
4710 projects
HTML
75241 projects

Projects that are alternatives of or similar to phaser-plugin-debug-arcade-physics

phaser-plugin-scene-graph
Prints the display tree. Phaser 2/CE
Stars: ✭ 32 (+77.78%)
Mutual labels:  phaser, phaser-plugin
craft
Phaser Library with utility chainable functions
Stars: ✭ 27 (+50%)
Mutual labels:  phaser, phaser-plugin
phaser-plugin-advanced-timing
Shows FPS, frame intervals, and performance info. Phaser 2/CE
Stars: ✭ 25 (+38.89%)
Mutual labels:  phaser, phaser-plugin
phaser-ui-comps
Phaser 3 UI Components built by Adobe Animate
Stars: ✭ 60 (+233.33%)
Mutual labels:  phaser, phaser-plugin
phaser-nineslice
NineSlice plugin for Phaser!
Stars: ✭ 52 (+188.89%)
Mutual labels:  phaser, phaser-plugin
phaser-super-storage
A cross platform storage plugin for Phaser
Stars: ✭ 49 (+172.22%)
Mutual labels:  phaser, phaser-plugin
phaser-plugin-game-scale
Scale or resize the game canvas. Phaser v3.15 only
Stars: ✭ 35 (+94.44%)
Mutual labels:  phaser, phaser-plugin
phaser-responsive
Adds a set of responsive objects to Phaser that can be pinned to
Stars: ✭ 25 (+38.89%)
Mutual labels:  phaser, phaser-plugin
phaser-particle-editor-plugin
This plugin creates particles based on JSON data generated by Phaser Particle Editor
Stars: ✭ 28 (+55.56%)
Mutual labels:  phaser, phaser-plugin
game-template
Cross-platform project template using Electron and Angular with the Phaser game engine. Project has Flexbox integrated for easy and responsive organization of components around the Phaser canvas.
Stars: ✭ 16 (-11.11%)
Mutual labels:  phaser
mmo-arch
Base Architecture for creating scalable games using microservices through Angular, Phaser, NestJS, NATS, and MySQL
Stars: ✭ 25 (+38.89%)
Mutual labels:  phaser
phaser3-simple-rpg
A simple Phaser3 RPG using Typescript ⚔️
Stars: ✭ 80 (+344.44%)
Mutual labels:  phaser
elemental-one
A simple platformer made along the theme of Ludum Dare 28
Stars: ✭ 36 (+100%)
Mutual labels:  phaser
phaser-starter
Minimal starter project to get a Phaser game environment up and running with ease.
Stars: ✭ 73 (+305.56%)
Mutual labels:  phaser
chunks tutorial
Small demo showing how to load and manage tilemap chunks on the fly with Phaser 3
Stars: ✭ 41 (+127.78%)
Mutual labels:  phaser
ts-phaser-bomb-game
Bomberman clone using websockets and phaser 3
Stars: ✭ 18 (+0%)
Mutual labels:  phaser
phaser-template-tsc
A simple template project for creating Phaser games in TypeScript.
Stars: ✭ 30 (+66.67%)
Mutual labels:  phaser
TooManyCaptains
🕹 Too Many Captains and Not Enough Wire
Stars: ✭ 34 (+88.89%)
Mutual labels:  phaser
phaser multiplayer demo
HTML5 Multiplayer with Phaser and Go
Stars: ✭ 35 (+94.44%)
Mutual labels:  phaser
Flappy-Bird
🐦 A Simple 2D Game Using Phaser
Stars: ✭ 13 (-27.78%)
Mutual labels:  phaser

Draws properties of Arcade Physics bodies. Demo

Screenshot

Install

npm install -S phaser-plugin-debug-arcade-physics

or

bower install -S samme/phaser-plugin-debug-arcade-physics

or add DebugArcadePhysics.js after phaser.js.

Use 🚀

game.plugins.add(Phaser.Plugin.DebugArcadePhysics);
// OR
game.plugins.add(Phaser.Plugin.DebugArcadePhysics, {
    // options … (see Configure, below)
});

Configure

You can try these in the demo.

game.debug.arcade.configSet({ // default values:
    bodyFilled:                false,
    filter:                    null ,
    lineWidth:                 1    ,
    on:                        true ,
    renderAcceleration:        true ,
    renderAngularAcceleration: true ,
    renderAngularDrag:         true ,
    renderAngularVelocity:     true ,
    renderBlocked:             true ,
    renderBody:                true ,
    renderBodyDisabled:        true ,
    renderCenter:              true ,
    renderConfig:              false,
    renderDrag:                true ,
    renderFriction:            true ,
    renderLegend:              true ,
    renderMaxVelocity:         true ,
    renderOffset:              true ,
    renderRotation:            true ,
    renderSpeed:               true ,
    renderTouching:            true ,
    renderVelocity:            true ,
}); // -> see console for values

Filters

Some filters are included:

  • exists
  • isAlive
  • isBullet
  • isNotBullet
  • isNotParticle
  • isNotSprite
  • isParticle
  • isSprite
// Example:
// Hide bodies of objects w/ exists=false (Phaser ignores these, but doesn't disable them)
game.debug.arcade.configSet({
    filter: Phaser.Plugin.DebugArcadePhysics.exists
});

// Example:
// Keep automatic rendering 'on' but limit to Bullets
game.debug.arcade.configSet({
    filter: Phaser.Plugin.DebugArcadePhysics.isBullet
});

// Example:
// Keep automatic rendering 'on' but limit to certain objects:
game.debug.arcade.configSet({
  filter: function (obj) { return obj.name === "player" }
});

Special uses

// Turn automatic rendering off
game.debug.arcade.off()

// Draw just one body
game.debug.arcade.renderObj(player);

// Draw one property of one body
game.debug.arcade.renderVelocity(player);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].