two-ticks / p5.teach.js

A beginner friendly math animation library for p5.js
https://two-ticks.github.io/p5.teach.js/
59 stars 7 forks source link
education javascript p5js typescript

p5.teach.js

astrik-logo

A beginner friendly math animation library for p5.js

p5.teach.js provides tools for teaching through p5.js, such as functions to animate text, TeX, and shapes.

Get Started

Documentation

Setting up the development environment

  1. Yarn should be preinstalled
  2. Run yarn install for installing the dependencies
  3. Run yarn dev for running the dev environment
  4. As the code is updated, the final js file is updated in dist/p5.teach.js dynamically
  5. The sketch in the index.html file is reflected with the changes

Generating documentation

  1. We use TypeDoc
  2. Run yarn typedoc src for generating docs

Tests

  1. We use jest for testing
  2. Run yarn test for running tests
  3. Tests are in src/test

Formatting the code

  1. Before submitting PR, run yarn prettier to format the code

Build

  1. Run yarn build to export the final js file
  2. Final js file is exported as dist/p5.teach.js