@rozelin/matter-ts
v1.1.5
Published
a 2D rigid body physics engine for the web
Downloads
710
Maintainers
Readme
Matter.ts
This library is a TypeScript adaptation of Matter.js. The main usage is the same as Matter.js. See the README of Matter.js for details.
You can also see TypeDoc
install
npm install @rozelin/matter-ts
Type Declaration Usage
If you want to import and use interface definitions, etc., you can write as follows.
import Matter, { Body } from '@rozelin/matter-ts'
const body: Body.IBody = Matter.Body.create()
or
import * as MatterTypes from '@rozelin/matter-ts'
const Matter = MatterTypes.default
const body: MatterTypes.Body.IBody = Matter.Body.create()