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;