Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

radify/geometry.js

Repository files navigation

Travis Build Status

Geometry.js

A collection of ES6 classes for simple geometric objects and calculations.

Why?

This library was extracted from an in-house project, and serves as a repository of geometry operations across several dependent libraries, including radify/Pathfinding.js. If you need to do 2D graphing calculations in arbitrary coordinate space using points, lines, and rectangles, this might just be the library for you.

Setup

You can grab it directly from NPM or JSPM:

npm install geometry.js
# or
jspm install geometry.js

Then:

<script src="geometry.js/dist/geometry[.min].js"></script>

By default, geometry.js exports classes in CommonJS format, but you can rebuild it in the format of your choice. For example:

cd geometry.js
npm install -g gulp
npm install
gulp dist --modules=amd

...will build AMD modules. Replace amd with any module format supported by Babel, including amd, umd, or system, for SystemJS.