Pt

Hello there. Allow me to introduce Pt, which is a study of Point, Form, and Space. It is experimental and fun, and I hope you will use it to make crazy, strange, awesome things.

Update 2017

There's an improved version of Pt, written in typescript and with simplified workflows. Please visit https://ptsjs.org and check out the new repo

Get started

The best places to get started are:
- Demos page shows various interactive sketches, usually done in short form (50-70 lines of code).
- Description is a little essay about the motivations behind Pt. 7 mins read.
- Quick start guide helps you understand how Pt works, intended for both technical and non-technical audiences.
- Documentation describes Pt's classes and functions.
- Release notes talks about what's past, or passing, or to come.
- Issues page is the place to report bugs and discuss features. Also you can ask questions on stackoverflow with #ptjs tag, or ping me anytime @williamngan. Your feedbacks and ideas are appreciated!

Files

Looking for the actual javascript library files? Here you go:
- If using npm, you can do: npm install ptjs and then use it like import {Vector, Rectangle} from 'ptjs'

If using standalone file, pt.js is the full version, without namespace. If you just want to sketch out a simple idea with Pt, this is probably what you need.

Pt has a set of core classes, and a growing list of extended classes. If you just want the core classes (smaller file size, only ~70kb min or ~20kb gzip without dependencies), you can get pt-core.js and others in the core folder.

The latest release is always in the master branch. For now.

Compiling

(Note to general users: this section is useful only if you want to contribute code. You don't need to compile anything to use Pt. Simply include the pt.js file above in your html and you're good to go -- check the quick start guide if you're not sure.)

Pt's source code is written in coffeescript. Coffeescript is quick and I think quite suitable at this experimental stage. We'll see how it goes.

To compile the source, first run npm install in terminal to get the dependencies. (If you haven't, install node and npm first.)

Then simply run gulp in terminal, and it will watch for changes and build the project continuously.

The build system is very rough at this stage, and there are only some rudimentary unit tests. Let's make these better.