https://github.com/rozelin-dc/matter-ts
A 2D rigid body physics engine for the web. TypeScript adaptation of Matter.js.
https://github.com/rozelin-dc/matter-ts
canvas javascript physics physics-engine rigid-bodies typescript web
Last synced: about 1 month ago
JSON representation
A 2D rigid body physics engine for the web. TypeScript adaptation of Matter.js.
- Host: GitHub
- URL: https://github.com/rozelin-dc/matter-ts
- Owner: Rozelin-dc
- License: other
- Created: 2023-09-14T04:34:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-17T07:36:14.000Z (almost 2 years ago)
- Last Synced: 2025-10-23T07:57:16.289Z (8 months ago)
- Topics: canvas, javascript, physics, physics-engine, rigid-bodies, typescript, web
- Language: JavaScript
- Homepage: https://rozelin-dc.github.io/matter-ts/
- Size: 2.55 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Matter.ts
This library is a TypeScript adaptation of [Matter.js](https://github.com/liabru/matter-js). The main usage is the same as [Matter.js](https://github.com/liabru/matter-js). See [the README of Matter.js](https://github.com/liabru/matter-js/blob/master/README.md) for details.
You can also see [TypeDoc](https://rozelin-dc.github.io/matter-ts)
## install
```bash
npm install @rozelin/matter-ts
```
## Type Declaration Usage
If you want to import and use interface definitions, etc., you can write as follows.
```ts
import Matter, { Body } from '@rozelin/matter-ts'
const body: Body.IBody = Matter.Body.create()
```
or
```ts
import * as MatterTypes from '@rozelin/matter-ts'
const Matter = MatterTypes.default
const body: MatterTypes.Body.IBody = Matter.Body.create()
```