Code Monkey home page Code Monkey logo

react-pts-canvas-examples's Introduction

pts-react-example

This repo provides an example of using react-pts-canvas with Vite. The example code will also work with create-react-app if you prefer it over Vite.

please refer to documentations in react-pts-canvas repo for details.

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

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

screenshot

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 include PtsCanvas functional component in your own component. Take a look at PtsExamples.jsx for example components.

import { PtsCanvas } from "react-pts-canvas";

Legacy class component is deprecated in react-pts-canvas v0.4. If you still need it, use v0.3.x and take a look at the code in legacy folder.

If you need to use Pts, you can import a class like this:

import {Pt, Create, Util} 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.