0.3.2 • Published 5 years ago

phaser3-debugger v0.3.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Phaser 3 Debugger

A debug scene that aids in debugging any other scene.

Features

Description% CompleteNotes
Display user-configurable properties of any entities in the scene.90%Doesn't handle nested properties (eg: 'prop.nested.inner')
Pause button.100%
Auto-pause when two physics bodies collide.33%Only works for MatterJS
Show physics bodies.33%Only works for MatterJS

Plans for Next Major Release

v0.3.0

Install

npm install phaser3-debugger

Configure the Debug Scene

To enable debug for an entity, set debug = true on the entity. Example: sprite.debug = true;

When creating the debug scene, you can pass in a config object. The table below shows the properties you can configure.

PropertyDescriptionDefault
propsAn array of the propertys to display.['x','y','angle']
colorThe color of the debug text.'#da4d4d'
pauseKeyHotkey to pause/unpause.'P'
pauseOnCollisionsEnable to pause when bodies collide.false
pauseOnCollisionsKeyHotkey for toggling pause-on-collisions on/off.'C'
showBodiesEnable debug mode for the physics engine.false
showBodiesKeyHotkey for toggling show-bodies on/off.'B'
slowDownGameKeyHotkey for slowing down the game loop iterations.'['
speedUpGameKeyHotkey for speeding up the game loop iterations (max normal speed).']'
resetGameSpeedKeyHotkey to resume normal game speed.'\'

Run the Demo

1) Clone this repository. 2) npm install 3) npm run demo-build

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago