forked from schteppe/cannon.js
-
Notifications
You must be signed in to change notification settings - Fork 154
I have been using CannonJS, but recently I have realised that there are some issues and the library has been unmaintained for many years, so I found cannon-es.
It looks good but I need to be able to import it using a script tag, not an NPM install.
In CannonJS you can just import it like this:
<script src="https://cdnjs.cloudflare.com/ajax/libs/cannon.js/0.6.2/cannon.js"></script> <script> //And then just use like this const world = new CANNON.World(); </script>
Is there a way to import Cannon-Es the same way ?
All reactions
Replies: 1 comment
yes of course! you can import it like this:
<script type="module"> import * as CANNON from 'https://unpkg.com/cannon-es@0.19.0/dist/cannon-es.js' // And then just use like this const world = new CANNON.World(); </script>
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment