Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

pts-react-example

Pts is a typescript/javascript library for visualization and creative-coding. Get started at ptsjs.org.

This repo provides an example of using Pts in React via PtsCanvas component.

Let's take a look at the demo first before we start.

screenshot

Using Pts with create-react-app

create-react-app is a popular tool by Facebook to bootstrap a React application.

To get started, take a look at the README in create_react_app_example folder.

Quick Start

If you just want to try out Pts, there's no need to install and build. Try out the online demo editor for quick experimentations.

Technical notes

For common use cases, you can extend PtsCanvas and use it in your React app.

import PtsCanvas from "react-pts-canvas";

If you need to use Pts in some other ways, you can import a class like this:

import {Pt} from "pts"; // use ES6

Note that Pts is an javascript es6 library that targets modern browsers. It also provides an ES5 version for use in older builds. To use ES5, import a class like this:

import {Pt} from "pts/dist/es5"; // use ES5

License

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

About

An example project of using Pts with React

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.