CompGeoJS Arrow Shape


Now that an early version of the Polygon class is complete, I can turn my attention to commonly used polygonal shapes.  The CompGeoJS PolygonalShape class serves as a base for developing named shapes that are completely defined by an axis-aligned bounding rectangle and a small number of parameters.

The first shape in the collection is a basic arrow.  As always, the computation of arrow vertices and the actual rendering of the arrow are completely separate.  For demonstration purposes, the EaselJS Canvas engine is used for rendering in the demo.  So, it should work on IE 9+ and any late-model Chrome/Firefox/Safari.

The online CompGeoJS documentation has been updated and a new Alpha 0.1 version of the code base is available from the main page.  The example code that illustrates usage of the Arrow class in tandem with EaselJS is written for ease of reading and is documented.  It can be immediately viewed from the demo page as there is no attempt to obfuscate or otherwise restrict access to the source.

As always, I follow a pretty rigid KISS philosophy with the demos, so they are pretty minimal and not at all optimized for being pleasing to the eye.  I hope the open-source nature of the project causes you to overlook that :)

View Arrow Demo

CompGeoJS main page

Comments are closed.