Trischwartz
A library for generating and rendering arbitrary triangles via SVG
Installation
This module can be installed via NPM or Yarn:
yarn install trischwartz --save-dev
Usage
This module does three things:
-
Generates three random angles that make up a triangle
-
Calculates the coordinates for a triangle within a unit square, given angles
-
Creates an SVG element to draw and display a triangle in a page
See the webpack usage example.
Development commands
Run yarn build:demo
to build the webpack asset bundle for the demo.
Run unit tests via yarn test
or yarn test:live
.