Skip to content

Provide a way to test if 2 rotated rectangles are colliding.

Notifications You must be signed in to change notification settings

AimForNaN/rect-collide

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Rect Collide

Provide a way to test if 2 rects are colliding.

Demo

Codepen reproduction

Install and Run Demo

cd example
npm i
npm start

Java-Script usage

import { isRectCollide } from './src/'

const rects = [
  {x:200, y: 450, w:250, h:200, angle: 60},
  {x:350, y: 100, w:50, h:125, angle: -10},
];

const isColliding = isRectCollide(...rects);

About

Provide a way to test if 2 rotated rectangles are colliding.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 80.1%
  • HTML 12.0%
  • CSS 7.9%