From 9253f4faf6f9053a2674023de709fbf2e5e92b47 Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Tue, 6 Oct 2026 16:36:22 +0200 Subject: [PATCH] Re-add rotateY function --- assets/index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/index.html b/assets/index.html index 5ab8801..5f84c1c 100644 --- a/assets/index.html +++ b/assets/index.html @@ -67,6 +67,12 @@ const camera = { fov: 800 }; + function rotateY(p, angle) { + const cos = Math.cos(angle); + const sin = Math.sin(angle); + return { x: p.x * cos - p.z * sin, y: p.y, z: p.x * sin + p.z * cos }; + } + class Point3D { constructor(x, y, z) { this.x = x;