createCanvas(0.98 * windowWidth, 0.98 * windowHeight, WEBGL);
rect(0, 0, 0.98 * width, 0.95 * height)
fill('rgba(135,206,235,0.15)');
translate(0, 0, -3 * height);
rect(0, 0, 15 * width, 15 * height);
function drawLandscape() {
stroke('rgb(19,84,108)');
for (let a = 0; a < PI; a += PI / 180) {
strokeWeight(1.5 * sin(a));
line(0, -height / 4, -2.1 * height, cos(a) * 3 * width, -sin(a) * 3 * height, -2.1 * height);
for (let y = -height / 1.5; y < 0; y += height / 120) {
if (y < -height / 2) fill('ivory');
vertex(-3 * height, 0, 2 * y);
vertex(-3 * height, 0, 2 * y);
for (let x = -3 * height; x < 3 * height; x += height / 50) {
let wiggle = (height / 3) * noise((x + 2 * width) / 200, (y + 2 * width) / 200);
curveVertex(x, min(0, y + wiggle), 2 * y);
vertex(3 * height, 0, 2 * y);
vertex(3 * height, 0, 2 * y);
fill('rgba(255,255,240,0.2)');
for (let z = -height; z < 2 * height; z += height / 100) {
let rise = map(z, -height, 2 * height, 0, height / 8);
for (let x = -2 * height; x < 2 * height; x += height / 25) {
let y = rise + rise * noise((x + width) / 100, (z + width) / 100);