1.0.3 • Published 2 years ago

@iro/cox v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

cox

Collision engine may evolve into physical engine.

Install

npm i @iro/cox

Usage

import {collide, Polygon, Circle} from '@iro/cox'

const polygon = new Polygon({
  x: 10,
  y: 20,
  vertices: [-60, -60, -120, 0, -60, 60, 60, 60, 120, 0, 60, -60]
})
​
const circle = new Circle({
  x: 60,
  y: 60,
  r: 50
})
​
collide(polygon, circle) // output: true
1.0.3

2 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago