Skip to content
A library for visualization and creative-coding
TypeScript JavaScript HTML CSS Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets color update and screenshot May 6, 2019
demo Add demos Mar 6, 2020
dist rebuild May 4, 2020
docs rebuild May 2, 2020
guide Add ctx property to CanvasForm. Update guide. Mar 2, 2020
src Fix axis bug May 4, 2020
study bug fixes and IE fixes Aug 6, 2018
.gitignore Update to new docs Jul 31, 2018
.nojekyll add nojekyll Jul 10, 2017
.npmignore Rebuild Aug 29, 2018
.pylintrc docs parsing in progress Jun 25, 2018
LICENSE update package Mar 24, 2017
README.md rebuild May 2, 2019
favicon.ico Update assets and homepage Aug 6, 2018
index.html rebuild May 2, 2019
mocha.opts initial tests Mar 28, 2017
package-lock.json 0.9.4 May 4, 2020
package.json 0.9.4 May 4, 2020
parse.py Fix doc search link bug Mar 21, 2019
site.webmanifest Update assets and homepage Aug 6, 2018
tsconfig.json
tslint.json update typescript Nov 14, 2018
webpack.dev.js fix copyright comment formatting Aug 29, 2018
webpack.es5.js fix copyright comment formatting Aug 29, 2018
webpack.mod.js fix copyright comment formatting Aug 29, 2018
webpack.prod.js fix copyright comment formatting Aug 29, 2018

README.md

Pts

image

Pts is a typescript/javascript library for visualization and creative-coding.

Get started at ptsjs.org.

Please give it a try, file issues, and send feedbacks to @williamngan. Thank you!


Usage

Option 1
Get the latest pts.js or pts.min.js (in dist folder). Alternatively use a CDN service like cdnjs or jsdelivr or unpkg. Then add it to your html page like this:

<script type="text/javascript" src="path/to/pts.js"></script>

Pts is pretty lightweight. Currently at ~90kb minified and 26kb gzipped.

Option 2:
Install via npm install pts. Then you can choose to import some parts of Pts into your project as needed.

import {CanvasSpace, Pt, Group, Line} from 'pts';

To quickly get started, try download or clone these repos:

Get Started
Read the guides and take a look at the demos and their source code.
If you need help, please don't hesitate to file an issue.


For development

Pts is written in typescript. You can clone or fork this project and build it as follows:

Build and test

Clone this repo and install dependencies via npm install.

npm start
npm run build
npm test

Generate documentations

Run this to generate Pts styled documentations. (Requires python 3.6)

npm run docs 

If you prefer to generate default typedocs, run this:

typedoc --readme none --out typedocs src --name Pts

Generate typescript declaration files and minify

npm run typings
npm run minify

Contributing

We appreciate your support and feedbacks!

Please file issues if you find bugs and have feature requests. If you are able to send small PRs to improve Pts or fix bugs, that would be awesome too.

For larger PRs, please ping @williamngan to discuss first.


License

Apache License 2.0. See LICENSE file for details.
Copyright © 2017-2019 by William Ngan and contributors.

You can’t perform that action at this time.