The debug drawer of colliders for Box2D-WASM using Babylon.js and JavaScript

Table of contents


GitHub repo with step-by-step instruction in the README file for building and running the project in debug and release using Rollup: GitHub - 8Observer8/debug-drawer-box2dwasm-babylonjs-js


Love what you have been doing with all those super useful examples :smiley:

1 Like

Thanks! I am very satisfied, be helpful.

It would be great if someone could fix:

var createScene = async function () {
    const Box2DLib = await import ("");

    let box2d = null;

    function initBox2D() {
        return new Promise(resolve => {
            Box2DLib().then((re) => {
                box2d = re;
    await initBox2D();

    const Scene = BABYLON.Scene;

This example doesn’t work on PlayCode: The debug drawer for Box2D-WASM using Babylon.js and JavaScript I wrote about it on the PlayCode discord channel.


I added an example in Replit. You need to wait 2-3 minutes for the Babylon.js files to load.