Skip to content

Instantly share code, notes, and snippets.

var circles = [];
function setup() {
createCanvas(400, 400);
for (var index = 0; index < 100; index = index + 1) {
circles[index] = {
x: width / 2,
y: height / 2,
xSpeed: random(-5, 5),
var x = [];
var y = [];
var xSpeed = [];
var ySpeed = [];
var colors = [];
function setup() {
createCanvas(400, 400);
for (var index = 0; index < 100; index = index + 1) {
@zamfi
zamfi / champagne.js
Last active October 5, 2017 17:25 — forked from anonymous/champagne.js
var circles = [];
function setup() {
createCanvas(400, 400);
var count = 0;
while (count < 20) {
circles.push({
x: random(width),
y: height,
vx: 0,
background(255);
strokeWeight(3);
colorMode(HSB);
while (true) {
var h = random(360)
stroke(h, 50, 90);
fill(h, 50, 100);
var r = random(30, 60);
@zamfi
zamfi / cycling-hue.js
Last active September 20, 2017 18:28 — forked from anonymous/cycling-hue.js
background(255);
noStroke();
var h = 0;
while(true) {
background(255);
colorMode(HSB);
fill(h, 100, 100);
ellipse(width/2, height/2, 100, 100);