Re-add rotateY function

This commit is contained in:
Richard Zink committed 2026-10-06 16:36:22 +02:00
1 parent 5bbb16496e
commit 9253f4faf6
1 file changed
+6
+6
View File
@@ -67,6 +67,12 @@
const camera = { fov: 800 }; 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 { class Point3D {
constructor(x, y, z) { constructor(x, y, z) {
this.x = x; this.x = x;