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

**URL:** <https://forum.babylonjs.com/t/the-debug-drawer-of-colliders-for-oimophysics-using-babylon-js-and-javascript/42446>\
**Category:** Demos and projects\
**Created:** [July 14, 2023, 10:58pm UTC](https://forum.babylonjs.com/t/the-debug-drawer-of-colliders-for-oimophysics-using-babylon-js-and-javascript/42446 "2023-07-14T22:58:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![8Observer8](https://avatars.discourse-cdn.com/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://forum.babylonjs.com/u/8Observer8)\
**Post date:** [July 14, 2023, 10:58pm UTC](https://forum.babylonjs.com/t/the-debug-drawer-of-colliders-for-oimophysics-using-babylon-js-and-javascript/42446/1 "2023-07-14T22:58:20Z")

</div>

[Table of contents](https://forum.babylonjs.com/t/the-debug-drawers-of-colliders-for-physics-engines-using-babylon-js-and-javascript-table-of-contents/42463)

Translated from the example: [The debug drawer of colliders for rapier3d-compat using Babylon.js and JavaScript](https://forum.babylonjs.com/t/the-debug-rendering-for-the-rapier3d-compat-physics-engine-and-babylon-js/42283)

Playgrounds:

- [Plunker](https://plnkr.co/edit/pLlvjTno01Nms3PT?preview)
- [Babylon.js Playground](https://playground.babylonjs.com/#M3GL05#1)
- [PlayCode](https://playcode.io/1533749)

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](https://github.com/8Observer8/debug-drawer-oimophysics-babylonjs-js)

![debug-drawer-oimophysics-babylonjs-js](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/1/f16df27cf45f2525b0abd416dc662e29992ec0de.gif)

---

<div class="post-metadata">

**Author:** ![cx20](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cx20/32/46_2.png) [@cx20](https://forum.babylonjs.com/u/cx20)\
**Post date:** [July 15, 2023, 5:09am UTC](https://forum.babylonjs.com/t/the-debug-drawer-of-colliders-for-oimophysics-using-babylon-js-and-javascript/42446/2 "2023-07-15T05:09:19Z")

</div>

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.

```auto
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
});

```

---

<div class="post-metadata">

**Author:** ![8Observer8](https://avatars.discourse-cdn.com/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://forum.babylonjs.com/u/8Observer8)\
**Post date:** [July 15, 2023, 7:15am UTC](https://forum.babylonjs.com/t/the-debug-drawer-of-colliders-for-oimophysics-using-babylon-js-and-javascript/42446/3 "2023-07-15T07:15:06Z")

</div>

Thanks a lot! I fixed it:

> **[Babylon.js Playground](https://playground.babylonjs.com/#M3GL05%231)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

I like to use `async/await` instead of `then`:

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

```
