Skip to content

mckoss/creative-coding-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

creative-coding-class

Code following this online class:

Creative Codeing with JavaScript

canvas-sketch Chooser

The project implements a sketch-switcher (chooser.js). Each sketch does not call canvasSketch itself, but instead just exports a name, sketch, and (optional) createPane method.

The chooser then managers stopping any previous animation going on and removing the canvas that was used (since canvas-sketch by default will add another one to the body).

It may be possible that the sketch-manager from canvas-sketh could be used more intelligently, but this was a quick and easy way to deal with it.

Sample Sketches

boxes

circles

arcs

sphere

dots