Added parallax to mountains
This commit is contained in:
parent
8eab7faf27
commit
899dc410dc
@ -608,8 +608,10 @@ function drawClouds() {
|
||||
}
|
||||
function drawMountains() {
|
||||
for (i = 0; i < mountains.length; i++) {
|
||||
push();
|
||||
// slowing down translation to add parallax, the feeling of depth
|
||||
translate(cameraPosX/8, 0);
|
||||
noStroke();
|
||||
|
||||
fill(palette.mountain_shadow);
|
||||
triangle(
|
||||
mountains[i].x - mountains[i].width,
|
||||
@ -628,6 +630,7 @@ function drawMountains() {
|
||||
mountains[i].x - mountains[i].width / 1.5,
|
||||
floorPos_y
|
||||
);
|
||||
pop();
|
||||
}
|
||||
}
|
||||
function drawHeart(isEmpty, x, y, size) {
|
||||
|
Loading…
Reference in New Issue
Block a user