Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

pts

> 设计协作
Open source

A library for visualization and creative-coding

5.3K stars0 likes5 views
WebsiteGitHub

About

A library for visualization and creative-coding

Pts

Pts is a TypeScript and JavaScript library for visualization and creative coding.

Get started at ptsjs.org. Please try it, file issues, and send feedback to @williamngan.

Usage

Browser script

Download pts.js or pts.min.js from the dist directory, or use a CDN such as cdnjs, jsDelivr, or unpkg.

xml
<script src="path/to/pts.min.js"></script>

The classic script exposes the library as globalThis.Pts.

Package

Install the package:

bash
npm install pts

Pts is ESM-first and also provides a CommonJS compatibility entry.

javascript
import { CanvasSpace, Group, Line, Pt } from "pts";
javascript
const { CanvasSpace, Group, Line, Pt } = require("pts");

Starter projects and integrations:

  • pts-starter-kit
  • pts-react-example
  • react-pts-canvas

Read the guides and explore the demos.

Development

The maintained build environment is Node 24.18 or newer in the Node 24 line. The published library is also exercised on current Node 20 and 22 releases.

bash
pnpm install --frozen-lockfile
pnpm exec playwright install chromium
pnpm check

Useful individual commands include:

bash
pnpm build
pnpm typecheck
pnpm test
pnpm test:browser
pnpm test:integrations
pnpm check:package
pnpm format
pnpm format:watch

pnpm check validates formatting, linting, types, unit tests, deterministic documentation, documentation and bundle behavior in a real browser, reproducible artifacts, the packed package, ESM and CommonJS resolution, declarations, and tree-shaking. Its packed-package integration suite also builds and runs the maintained React, Vue, skia-canvas, and single-file vanilla fixtures in test/integrations.

Prettier defines the repository's formatting rules. Run pnpm format once or keep pnpm format:watch running to reformat maintained source files as they change. The recommended VS Code extension and workspace settings also enable Prettier on save, while pnpm check rejects unformatted changes in CI.

Generate documentation

The documentation generator uses TypeDoc's Node API to rebuild the custom static documentation JSON from explicit source entry points. It also generates docs.md, guide.md, and llms.txt for agents and other clients that cannot navigate the documentation SPA:

bash
pnpm run docs

Generated documentation is checked in. pnpm check:docs regenerates it in memory, reports stale or extra files, and exercises navigation, search, anchors, and responsive layouts in Chromium.

Contributing

Issues and small pull requests are welcome. For larger changes, please start a discussion with @williamngan.

License

Apache License 2.0. See LICENSE.

Copyright © 2017-present William Ngan and contributors.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptartcanvascreative-codingdesign

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category设计协作
PricingOpen source

> Related tools

F
Figma
协作式界面设计工具
S
sketch-wakatime
Sketch plugin for automatic time tracking and metrics generated from your Sketch usage.
Q
QuickColor
Quickly apply fills from the global or document color palettes to selected elements - 🎨