--- const cam = {dist: 800, tz: -390, angle: 67 * Math.PI / 180, scale: 0.7}; const step = 260; function project(x, y) { const xs = x * cam.scale; const ys = y * cam.scale; const depth = cam.dist - (ys * Math.sin(cam.angle) + cam.tz); if (depth <= 0) return null; return {x: xs / (depth / cam.dist), y: (ys * Math.cos(cam.angle)) / (depth / cam.dist)}; } const lines = []; // Horizontal: front to back, stop when lines converge let prevY = null; for (let j = 10; j >= -100; j--) { const l = project(-8000, j * step); const r = project(8000, j * step); if (!l || !r) continue; if (prevY !== null && Math.abs(prevY - l.y) < 1.5) break; lines.push({x1: l.x, y1: l.y, x2: r.x, y2: r.y}); prevY = l.y; } // Vertical: left to right for (let i = -30; i <= 30; i++) { const near = project(i * step, 1700); const far = project(i * step, -3000); if (!near || !far) continue; lines.push({x1: near.x, y1: near.y, x2: far.x, y2: far.y}); } ---