offcircle
JavaScript Generative Art
A recreation of the Matplotlib Ellipse Demo in JavaScript
Installation
npm install offcircle
API
The offCircle function operates on the Canvas API (node & browser).
ctx
= 2D canvas context to render onellipseCount
= Number of ellipses to render on the canvas (defaults to 120)
returns Void
Usage
Node
// or common js var fs = var path = var Canvas = var offCircle = var canvas = Canvasvar ctx = canvas var out = fsvar stream = canvasstream
Web (React)
;;; { const canvasRef = React; return <div className="App"> <canvas ref=canvasRef width=windowinnerWidth height=windowinnerHeight /> </div> ;} ;
License
MIT