Pts is a TypeScript and JavaScript library for visualization and creative coding. It offers geometry helpers and a friendly API for canvas, SVG, and related targets.
Overview
Pts targets artists and developers who want lightweight, modular tools for visual ideas on the web. It is written in TypeScript with ESM-first packaging and a CommonJS compatibility entry.
Consumers can load it from CDNs, npm, or classic browser scripts that expose globalThis.Pts. The API supports quick prototyping and larger projects through helpers for geometry, simulation, sound, and drawing.
Documentation and demos live at ptsjs.org, with guides for npm usage and starter integrations including React and Vue fixtures in the project's integration tests.
A separate Pts.py project extends the same philosophy to Python. The core library is Apache-licensed open source.
Key features
- Canvas and SVG drawing helpers
- Geometry and simulation utilities
- ESM and CommonJS package entries
- CDN and npm distribution
- TypeScript-first API
- Sound-related helpers
- React and Vue integration fixtures
- Documented demos and guides
Use cases
- Generative art in the browser
- Data visualization prototypes
- Creative coding coursework
- Integration with front-end frameworks