Skip to content

Rozelin-dc/matter-ts

Repository files navigation

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()