Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/ cox Public

Collision engine may evolve into physical engine.

Notifications You must be signed in to change notification settings

JetLua/cox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

15 Commits

Repository files navigation

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

About

Collision engine may evolve into physical engine.

Topics

Resources

Stars

Watchers

Forks

AltStyle によって変換されたページ (->オリジナル) /