1.4.0 • Published 6 years ago

simple-intersect v1.4.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

intersects

a simple collection of 2d collision/intersects functions, supporting points, circles, lines, axis-aligned boxes, and polygons

rationale

I wanted a simplified collection of collision functions that work across different shapes. If you want a more advanced implementation designed for pixi.js.

Live Example

https://davidfig.github.io/simple-intersect/

Installation

npm i simple-intersect

Usage

    var intesect = require('simple-intersect');
    var intersected = intersect.boxBox(x1, y1, w1, h1, x2, y2, w2, h2);

or

    var circleBox = require('simple-intersect/circle-box');
    var intersected = circleBox(x, y, r, x1, y1, w1, h1);

API

1.4.0

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago