Geomath
AMD Geometry and Matrix modules using reuse pattern for better performance
Installation
Using Bower:
$ bower install geomath --save
Using NuGet:
$ Install-Package GeoMath
Using NPM:
$ npm install geomath --save
Usage
You could use geomath in different context.
Browser (with built file)
Include built script in your HTML file.
<script type="text/javascript" src="path/to/geomath.min.js"></script>
Browser (AMD from source)
Configure RequireJS.
requirejs.config({
paths: {
math: 'path/to/geomath'
}
});
Then include promise in your dependencies.
Load all modules (not recommended)
define(["math"], function() {
math.geometry
math.matrix
math.matrix.M3
math.matrix.M4
math.matrix.V2
math.matrix.V3
});
Load modules independently
define(["math"], function() {
math.geometry
math.matrix
math.matrix.M3
math.matrix.M4
math.matrix.V2
math.matrix.V3
});
Node (installed using NPM)
Call require to register Promise to global object
var math = require("geomath");
var matrix3 = require("geomath/matrix3");
Documentation
For now documentation can be found in code.