schteppe / cannon.js

A lightweight 3D physics engine written in JavaScript.

Home Page:http://schteppe.github.com/cannon.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESM support

TomasHubelbauer opened this issue · comments

Hi, thanks for the amazing library! It looks like the preferred way of consumption in Three nowadays seems to be ESM modules, which I'm excited about. I'm also wondering if you'd consider adding ESM support (probably needs to be a new artifact of the build process as I don't think it can be tacked on) to Cannon? It would make it much nicer to use with codebases which are using Three and ESM. Thank you

Just found out about Cannon ES, which seems to be a maintained fork of Cannon, so whoever lands here looking for Cannon with ESM support, check it out.

import * as CANNON from 'https://unpkg.com/cannon-es/dist/cannon-es.js';