Simple example of rendering two differently colored triangles in 2D webgl with haxe, the example is self contained, and is perhaps a good starting point to extend and adapt, it can be a pain setting up webgl with a lot of time spent in front of a black screen so having a starting point that works can be really useful and is also important prior to just using a framework for that deeper understanding or not in the case of webgl! http://try.haxe.org/#Dc3f2
seems a cool concept perhaps using Macros in haxe it would be feasible to insert a regular expression at runtime, but the idea of trying to implement such a mini library does not excite me, but it could be super useful.
No, there isn't. Only some of haxe target platforms support finalizers, therefore it's pointless to implement them in haxe. However you can probably hook specific platforms(cpp and java I guess) to support finalizers. Also it is not an idiomatic way in haxe, so not recommended except when you really need it.
Updated hxPolyK port with a div drawing triangulation test, you can drag the points around and it will recalculate. Obviously this is heavy ( not using canvas or webgl ) so I only recalculate and redraw lines once in every 3 frames when dragging.