It's Snowing at the Planet

Is this a "oh crap we will be snowed in for days" snow, a "we need milk and bread to make french toast" snow, or a look at the pretty snow and all the mustangs in the ditch snow?
 
Now if I could figure out how to edit this file...

/*
// Snow.js - v0.0.3
// kurisubrooks.com
*/
var snowMax = 35, snowColor = ["#DDD", "#EEE"], snowEntity = "•", snowSpeed = .75, snowMinSize = 8, snowMaxSize = 24, snowRefresh = 50, snowStyles = "cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;", snow = [], pos = [], coords = [], lefr = [], marginBottom, marginRight;
function randomise(a) {
return rand = Math.floor(a * Math.random())
}
function initSnow() {
var a = snowMaxSize - snowMinSize;
marginBottom = document.body.scrollHeight - 5;
marginRight = document.body.clientWidth - 15;
for (i = 0; i <= snowMax; i++)
coords = 0,
lefr = 15 * Math.random(),
pos = .03 + Math.random() / 10,
snow = document.getElementById("flake" + i),
snow.style.fontFamily = "inherit",
snow.size = randomise(a) + snowMinSize,
snow.style.fontSize = snow.size + "px",
snow.style.color = snowColor[randomise(snowColor.length)],
snow.style.zIndex = 1E3,
snow.sink = snowSpeed * snow.size / 5,
snow.posX = randomise(marginRight - snow.size),
snow.posY = randomise(2 * marginBottom - marginBottom - 2 * snow.size),
snow.style.left = snow.posX + "px",
snow.style.top = snow.posY + "px";
moveSnow()
}
function resize() {
marginBottom = document.body.scrollHeight - 5;
marginRight = document.body.clientWidth - 15
}
function moveSnow() {
for (i = 0; i <= snowMax; i++)
if (coords += pos,
snow.posY += snow.sink,
snow.style.left = snow.posX + lefr * Math.sin(coords) + "px",
snow.style.top = snow.posY + "px",
snow.posY >= marginBottom - 2 * snow.size || parseInt(snow.style.left) > marginRight - 3 * lefr)
snow.posX = randomise(marginRight - snow.size),
snow.posY = 0;
setTimeout("moveSnow()", snowRefresh)
}
for (i = 0; i <= snowMax; i++)
document.write("<span id='flake" + i + "' style='" + snowStyles + "position:absolute;top:-" + snowMaxSize + "'>" + snowEntity + "</span>");
window.addEventListener("resize", resize);
window.addEventListener("load", initSnow);
 
I would make snowmax at the top 3500 just to create blizzard conditions ( to see if I could ) then fool around with min and max size
I could alter the file to do that, or maybe make a copy instead, or if you want to attach it with the changes and we could try it on a slow morning.

It probably wouldn't be too bad as most of the text boxes are already white, but it would be interesting to see how much of the blue background it drowned out.
 
Back
Top