HarryStevens/geometric
HarryStevens/geometric has 1,106 GitHub stars and 50 forks. Star changes are not measured yet. Last checked 2026-11-09 10:13 UTC. Last push 2026-06-19.
A JavaScript library for doing geometry.
Measured star growth
- in 24h
- Update delayed
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalGeometric.js
Geometric.js is a JavaScript library for working with points, lines, polygons, and angles. It uses plain JavaScript arrays for geometry primitives, includes TypeScript declarations for editor autocomplete and type checking, and works in modern browsers and Node.js.
Documentation and interactive examples are on the Geometric.js website.
Install
npm install geometric -S
import * as geometric from "geometric";
Why Geometric.js?
Geometric.js keeps geometry simple. A point is an [x, y] array, a line is an array of two points, and a polygon is an array of points.
import { pointTranslate, lineRotate, polygonScale } from "geometric";
const point = [0, 0];
const line = [
[0, 0],
[10, 10],
];
const polygon = [
[0, 0],
[10, 0],
[10, 10],
[0, 10],
];
const translated = pointTranslate(point, 90, 10);
const rotated = lineRotate(line, 90);
const scaled = polygonScale(polygon, 2);
There are no custom classes to instantiate and no special data structures to learn. The values you pass into Geometric.js are the same values you can serialize, inspect, and draw to SVG or Canvas.
Development
pnpm install
pnpm test
The test suite builds the package, runs runtime tests, and checks the TypeScript declarations.
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,607 starspublic-apis/public-apis
A collective list of free APIs
497,930 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
449,872 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,297 stars