This package has been deprecated

Author message:

Package renamed to intersects.

simple-intersect

1.4.0 • Public • Published

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

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i simple-intersect

    Weekly Downloads

    0

    Version

    1.4.0

    License

    MIT

    Unpacked Size

    2.39 MB

    Total Files

    38

    Last publish

    Collaborators

    • davidfig