This repo uses ThreeJS to visualise colliders in a JSON file exported by the Blender plugin Decentraland Toolkit: Cannon Colliders
It is a small aid for debugging and ensuring that the meshes being exported by the plugin are correct.
-
Clone this repository to your local machine:
git clone https://github.com/stom66/cannon-collider-visualiser.git
-
Navigate to the project directory and run:
npm install
-
Start the development server:
npx vite
This will start a development server using Vite, and you should see the demo running in your browser at http://localhost:8101
Use your mouse to navigate the viewport:
- Left-click to rotate
- Right-click to move
- Scroll to zoom
By default the file src/colliders.json
is loaded. To use your own colliders either overwrite this file with your own or update the import statement in _main.ts
at line #69.
- Show scene stats: number of collider types, tri-counts
- Support drag-drop JSON file import
- Allow toggling individual meshes