From a3fae177fafdb3bd84bb9e26cb9096a16f50d80b Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Tue, 6 Oct 2026 15:13:22 +0200 Subject: [PATCH] Fix: add init() method to Landscape class --- assets/index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/assets/index.html b/assets/index.html index c0bfa4b..f0a6568 100644 --- a/assets/index.html +++ b/assets/index.html @@ -70,6 +70,16 @@ this.init(); } + init() { + const spacing = 40; + for (let x = -200; x <= 200; x += spacing) { + for (let z = -200; z <= 200; z += spacing) { + const y = Math.sin(x / 30) * 20 + Math.cos(z / 30) * 20 + Math.random() * 10; + this.points.set(`${x},${z}`, new Point3D(x, y, z)); + } + } + } + getKey(x, z) { return `${Math.round(x / this.gridSize)},${Math.round(z / this.gridSize)}`; }