memononen/tess2.js — pull request #1 by piaoger (2013-09-05 16:19:09+00:00)
Title: Make it compatible with Node.js

1. Don't use global variable "contours" in Tess2.tesselate()

From:
tess.addContour(opts.vertexSize || 2, contours[i]);

To:
tess.addContour(opts.vertexSize || 2, opts.contours[i]);

2. Node.js compatibility

From:
(function(global) {
// ...
}(this);

To:

(function(global) {
// ...
}((typeof(window) === 'undefined') ? module.exports : window));