PhaserEditor icon indicating copy to clipboard operation
PhaserEditor copied to clipboard

implementing box2d plugin

Open bhnh opened this issue 5 years ago • 5 comments

I have purchased both Phaser Editor and the Phaser Box2d plugin. When I try to run the Box2d examples, I'm told I need the plugin. How do I implement the plugin so I can view the Box2d examples?

bhnh avatar Jan 07 '20 15:01 bhnh

Hello @bhnh

What version of Phaser are you using?

PhaserEditor2D avatar Jan 07 '20 17:01 PhaserEditor2D

Phaser Editor 1.5.4.20190529 Supports Phaser v2.6.2 (built-in)  OS: Windows 10, v.10.0, x86_64 / win32 

bhnh avatar Jan 07 '20 19:01 bhnh

Hi!

We cannot bundle the Box2D plugin inside Phaser Editor, it is a product from Phaser.io. But you can create a Phaser Editor project based on the Box2D example and add the Box2D runtime yourself.

For example:

  1. Create a Box2D example project:

image

  1. Copy the Box2D plugin runtime in the project's lib folder. In my case, I am using the runtime provided in the Phaser 2 examples:

image

  1. Load the Box2D plugin runtime in the index.html file of your project:

image

  1. Run the game.

Again, I used here the Box2D runtime provided by the Phaser examples, but you should follow the instructions provided by the Box2D plugin documentation.

PhaserEditor2D avatar Jan 08 '20 03:01 PhaserEditor2D

I attach here the final project: Bullet Bodies.zip

PhaserEditor2D avatar Jan 08 '20 03:01 PhaserEditor2D

Is this working?

PhaserEditor2D avatar Jan 14 '20 03:01 PhaserEditor2D