The debug drawer of colliders for OimoPhysics using Babylon.js and JavaScript

Table of contents

Translated from the example: The debug drawer of colliders for rapier3d-compat using Babylon.js and JavaScript

Playgrounds:

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-oimophysics-babylonjs-js

debug-drawer-oimophysics-babylonjs-js

4 Likes

Thanks for the great sample.

Just a little improvement.
Since the loading of the import function is called asynchronously, I think it would be good to have the process run after the library has been loaded.

import("https://cdn.jsdelivr.net/gh/saharan/OimoPhysics@1.2.3/bin/js/OimoPhysics.js").then(() => {
   // Describe the processing after the library is loaded here
});
1 Like

Thanks a lot! I fixed it:

I like to use async/await instead of then:

var createScene = async function () {
    await import ("https://cdn.jsdelivr.net/gh/saharan/OimoPhysics@1.2.3/bin/js/OimoPhysics.js");
1 Like