JSPM

  • Created
  • Published
  • Downloads 96754
  • Score
    100M100P100Q166156F
  • License MIT

A lightweight 3D physics engine written in JavaScript.

Package Exports

  • cannon-es

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cannon-es) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

cannon-es

This is a maintained fork of cannon.js, originally created by Stefan Hedman @schteppe.

It's a type-safe flatbundle (esm and cjs) which allows for tree shaking and usage in modern environments.

These minor changes and improvements were also made:

If instead you're using Three.js in a React environment with react-three-fiber, check out use-cannon! It's a wrapper around cannon-es.

Installation

yarn add cannon-es

Usage

import { World } from 'cannon-es'

// ...

or, if you're using webpack, you can import it like this while still taking advantage of tree shaking:

import * as CANNON from 'cannon-es'

// ...

Examples

TO DO: