// Confetti02 // Dave Bollinger // http://www.davebollinger.com // for Processessing 0109 Beta /** Click and drag to spawn confetti.
Press space to toggle clear-screen/overdraw mode.
Press 'c' to toggle color/gray mode.
Press 'p' to select random palette.
Press 's' to toggle scale reduction.
*/ ArrayList things; MultiPalette pal; boolean bClearScreen = false; boolean bScaleReduce = true; boolean bUseColor = true; void setup() { size(360,360); smooth(); things = new ArrayList(); pal = new MultiPalette("palettes.jpg"); pal.select(); background(255); fill(255); } void draw() { if (bClearScreen) background(255); if (mousePressed && (mouseButton==LEFT)) spawn(); if (things.size() > 0) { for (int i=0, sz=things.size(); i