Added clouds parallax
This commit is contained in:
parent
899dc410dc
commit
a813bbb804
@ -575,6 +575,9 @@ function drawClouds() {
|
||||
for (i = 0; i < clouds.length; i++) {
|
||||
push();
|
||||
translate((frameCount / clouds[i].y) * 20, 0); // imitating clouds movement, upper ones should go faster
|
||||
// Adding counter-translating to implement parallax, the feeling of depth
|
||||
// TODO: fix jitter during movement (possibly by implementing vectorized movement)
|
||||
translate(cameraPosX/1.1, 0);
|
||||
noStroke();
|
||||
fill(palette.cloud0);
|
||||
ellipse(
|
||||
|
Loading…
Reference in New Issue
Block a user