A 2D geometry responsive computing, visualizing and interacting library.
# run these below in the repo root directory:
# install `lerna` monorepo tool at the workspace `root`.
npm ci
# install dependencies and symlinks for each `leaf` package.
npx lerna bootstrap --cinpm i geomtoynpm i "@geomtoy/core"
npm i "@geomtoy/view"
npm i "@geomtoy/util"- Basic geometries and general geometries with usual functionality out of the box.
- Support basic geometries:
Point,Vector,Rectangle,Circle,Ellipse,Line,Ray,RegularPolygon,Triangle,LineSegment,QuadraticBezier,Bezier. - Support general geometries:
Polygon,Path,Compound. - Support two non-geometric shape:
Image,Text.
- Support basic geometries:
- Microtask based event system handling geometric associations.
- Browser independent and can run in all javascript environments.
- Multiple predicates for intersections between basic geometries. More info.
Intersectionhandles both proper intersections and coincidental intersections.- Support predicates:
equal,separate,intersect,strike,contact,cross,touch,block,blockedBy,connect,coincide.
- Application of affine transformations returning the transformed geometry. More info.
- Inversion of points, lines, and circles. More info.
- Full boolean operations respecting fill rules and area computation of complex general geometries. More info.
- Support boolean operations:
selfUnion,union,intersection,difference,differenceReverse,exclusion.
- Support boolean operations:
- Interaction framework including most of the functionality.
- Support dragging, panning, and zooming.
- Support two kind, four activation modes.
- Support three type view elements.
- Support sub-views.
- ...
- Microtask based rendering without user attention.
- Support both SVG and Canvas as renderers.
- Customizable boundless interface of the coordinate system.
- Support specifying the coordinate system and display status.
- View scope and view element scope interaction events.
- Support touch devices.
Geomtoy is released under the MIT License.
- Support all conic curves.
- Support basic spirals.