createCanvas(windowWidth, windowHeight)
bg = createGraphics(width, height)
skyGrey = color('#AED2D9')
topSkyBlue = color('#7AC0EE')
magenta = color('#CC66A7')
topSnowBlue = color('#D8EDFB2')
for (let i = 0; i < 1000; i++) {
const x = random(-1, 1) * width/2
const y = random(-0.2, 1) * height/2
translate(width/2, height/2)
if (frameCount % 30 === 1) {
bg.translate(width/2, height/2)
for (let i = 0; i < 2000; i++) {
const x = random(-1, 1) * width/2
const y = random(-1, -0.2) * height/2
const w = random(0.01, 0.2) * width
lerpColor(topSkyBlue, white, map(y/(height/2) + random(-1,1)*0.1, -1, -0.2, 0, 1, true)),
for (let i = 0; i < 2000; i++) {
const x = random(-1, 1) * width/2
const y = random(-0.2, 1) * height/2
const w = random(0.01, 0.2) * width
const h = map(y, -0.2*height/2, height/2, 0.02 * height, 0.1*height)
const roadR = map(y, -0.2*height/2, height/2, 0, width*0.5, true)
lerpColor(topSnowBlue, white, map(y/(height/2) + random(-1,1)*0.1, -1, -0.2, 0, 1, true)),
map(x, -roadR-20, -roadR, 0, 1, true) * map(x, roadR, roadR+20, 1, 0, true)
for (let { x, y } of snowPts) {
const c = lerpColor(white, magenta, random(0, 0.2))
x += random(-1, 1) * width * 0.001
y += random(-1, 1) * height * 0.001
const alpha = map(noise(10000 + frameCount * 0.05 + x * 0.1 * 0.01, 10000 + y * 0.02, frameCount*0.01), 0.3, 0.8, 0, 1, true)
c.setAlpha(alpha*alpha*alpha * 255)