This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hi; | |
var speed = 3; | |
//var song; | |
//function preload() { | |
// song = loadSound("soft_relaxing_music_white_snow.mp3"); | |
//} | |
function setup() { | |
createCanvas(800,600); | |
// song.loop(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Snowflake(x1, y1) { | |
this.x = x1; | |
this.y = y1; | |
this.h = random(50); | |
this.speed = random(1,3); | |
this.create = function() { | |
noFill(0); | |
stroke(255); | |
line(this.x + this.h, this.y, this.x - this.h, this.y); | |
line(this.x, this.y + this.h, this.x, this.y - this.h); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Particle(x1, x2){ | |
this.a = x1; | |
this.b = x2; | |
this.t1 = random(50); | |
this.t2 = random(50); | |
this.update = function(){ | |
this.a = noise(this.t1)*width; | |
this.b = noise(this.t2)*height; | |
this.t1 = this.t1 + 20; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var particles = [] | |
function setup(){ | |
createCanvas(360, 360); | |
colorMode(HSB, 360, 100, 100); | |
} | |
function draw(){ | |
background(255); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var img; | |
var clip; | |
var slider; | |
function preload(){ | |
img = loadImage("woods.jpg"); | |
clip = loadSound("scream.mp3"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var flake; | |
var snow = []; | |
function setup() { | |
createCanvas(800, 600); | |
//flake = new Snowflake(200, 200); | |
bg = loadImage("wp_snow2.jpg"); | |
} | |
function draw() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Snowflake(x1, y1) { | |
//this.x = x1; | |
//this.y = y1; | |
this.h = random(50); | |
//this.speed = random(1,3); | |
this.pos = createVector(x1, y1); // for position | |
this.vel = createVector(0, 0); // for velocity | |
this.acc = createVector(0,0) | |
//this.r = 16; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function colorWheel() { | |
this.move = function(stop, bp) { | |
colorMode(HSB, 360, 100, 100); | |
angleMode(DEGREES); | |
for (i = 90; i < stop; i++) { | |
fill(i%360, 100, 100); | |
stroke(i%360, 100, 100); | |
arc(700, 90, 130, 130, i, i+1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Cloud(x1, y1){ | |
this.pos = createVector (x1, y1); | |
this.vel = createVector(0,0); | |
this.scale= random(0.2, 1.2); | |
//this.acc=createVector(0,0); | |
this.applyForce = function(force){ | |
this.vel.add(force); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Rain(){ | |
this.pos = createVector (random(799), random(799)); | |
this.height = random (50,130); | |
this.vel = createVector(0,random(1,4)) | |
this.acc = createVector (0, 1) | |
this.applyForce=function(force){ | |
this.acc.add(force); | |
} |
OlderNewer