Apache License 2.0

项目介绍

williamngan/pts 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 Apache License 2.0 许可证,目前获得 5.4k 个 Star、182 次 Fork。

仓库全名
williamngan/pts
开源许可证
Apache License 2.0
Star 数
5.4k
Fork 数
182
未关闭 Issue
19

README 摘要

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. The classic script exposes the library as globalThis.Pts. Package Install the package: Pts is ESM-first and also…

完整内容见 GitHub 原始 README 或本页 。

常见问题

pts 用什么语言开发?

主要使用 TypeScript 编写,采用 Apache License 2.0 许可证,目前有 5.4k 个 Star。

pts 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 pts 的源码?

可以直接克隆仓库:git clone https://github.com/williamngan/pts.git,默认分支为 master;安装与运行步骤见仓库 README。

pts 最近还在维护吗?

仓库最近一次更新为 1 周前,当前有 19 个未关闭 Issue;Star 数为 5.4k,可作为社区活跃度的参考。

简要分析

热度分
5789
价值分
3277
活跃状态
活跃

语言占比

CSS
HTML
JavaScript
TypeScript
Vue

Release

README

Pts

Pts examples

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.

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

The classic script exposes the library as globalThis.Pts.

Package

Install the package:

npm install pts

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

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

Starter projects and integrations:

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.

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

Useful individual commands include:

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:

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.

评论

暂无评论