4 ms·
Cool! How does it compare (in vision and features) to p5.js and pixi.js?
by Zalastax 8y ago
Cool! How does it compare (in vision and features) to p5.js and pixi.js?
- roywiggins 8y agoAt first glance, it seems to support geometrical operations that neither of those have built in. Things like "draw the incircle of this triangle" and "draw a perpendicular from a line to this point" and "find the intersection of these circles." So if you can construct your figure using compass-and-straightedge, you can probably cobble it together using the existing API without touching trigonometry or vector manipulations at all. p5 and pixi seem to be more on the "just tell me where to put it, and I'll draw it for you" line. Pts has a whole bunch of higher-level abstractions where you can define mathematical and geometric operations to apply to your points: https://ptsjs.org/guide/op-0400 https://ptsjs.org/guide/op-0400
- DigitalWheelie 8y agoGreat observations. That always felt like part of what was missing in other libraries. Sometimes just drawing a triangle was a long process that felt kind of hacky.
- vanderZwan 8y agoHow does it compare to ganja.js? https://github.com/enkimute/ganja.js https://github.com/enkimute/ganja.js
- carapace 8y agoThat is cool, cooool. > Ganja.js is a Geometric Algebra code generator for javascript. It generates Clifford algebras and sub-algebras of any signature and implements operator overloading and algebraic constants. > (Mathematically, an algebra generated by ganja.js is a graded exterior (Grassmann) algebra (or one of its subalgebras) with a non-metric outer product, extended (Clifford) with geometric and contraction inner products, a Poincare duality operator and the main involutions and morphisms.) > (Technically, ganja.js is a code generator producing classes that reificate algebraic literals and expressions by using reflection, a built-in tokenizer and a simple AST translator to rewrite functions containing algebraic constructs to their procedural counterparts.) > (Practically, ganja.js enables real math syntax inside javascript, with element, vector and matrix operations over reals, complex numbers, dual numbers, quaternions, or any other Clifford Algebra.)
- vanderZwan 8y agoBTW, enkimute's blog is full of small, interesting bits of JS code: https://enkimute.github.io/ https://enkimute.github.io/