From 7526ea8de723888211101278198dc7a454024b84 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 26 Aug 2023 16:14:05 +0300 Subject: [WGL/P] Implemented crude ray rotation around black holes --- Year 2/Computer Graphics with WebGL/Project/Project.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Year 2/Computer Graphics with WebGL/Project/Project.html') diff --git a/Year 2/Computer Graphics with WebGL/Project/Project.html b/Year 2/Computer Graphics with WebGL/Project/Project.html index fc9bae8..29d26f1 100644 --- a/Year 2/Computer Graphics with WebGL/Project/Project.html +++ b/Year 2/Computer Graphics with WebGL/Project/Project.html @@ -103,9 +103,12 @@ h2 { skybox = new Skybox(10000, [0,0,0], undefined); - star = new Star([1000,0,1000], 50) + stars = [ + new Star([1000,0,1000], 50), + // new Star([1000,0,900], 30), + new Star([950,0,1100], 40), + ]; // new Star([1000,0,-1000], 50) - // new Star([950,0,1100], 40) // new Star([0,0,0], 100) // new Star([1000, 0, -30], 20); for (var i = 0; i < starsBuf.length; i++) { @@ -137,7 +140,7 @@ h2 { gl.uniform3fv(uEye, pos); skybox.draw(); - star.draw(); + stars.forEach((s) => s.draw()); requestAnimationFrame(drawFrame); } -- cgit v1.3.1-26-gb76a