CompGeoJS Basic Polygon Demo
CompGeoJS is coming along, slowly but surely The basic foundation of the Polygon class in the shapes package is finished and all of the code has been written except for two methods. The pointAt(t:Float) and intersects(p:Polygon) methods are currently deferred until later in the alpha development phase so that I can move forward with other classes in the shapes package.
The GeomUtils class is new to the current update. It will eventually contain a very wide variety of utility methods that are useful in analytic geometry.
The Basic Polygon Demo adheres to the KISS principle that governs all the demos. It is designed to exercise many of the Polygon methods, including area of the Polygon and point testing (inside/outside Polygon). CompGeoJS strictly separates computations from rendering, so the demo uses EaselJS for graphic display, however, there is nothing in the CompGeoJS library that requires such usage.
The demo code is not obfuscated or minified in any way and you don’t even have to View Source to check it out; the demo code is hyperlinked from the demo page. The demo should run on IE 9+ and any late-model Chrome/Safari/Firefox. No feature testing is employed to test for browser compatibility. You shouldn’t be considering use of this library if you don’t know what you’re browsing with