Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Computer Graphics with WebGL / Project / Project.html
diff options
context:
space:
mode:
Commit7526ea8de723888211101278198dc7a454024b84 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-08-26 16:14:05 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-08-26 16:14:05 +0300
Filesbee44f2bbc84522979e172f824b76ecbed707401 /Year 2/Computer Graphics with WebGL/Project/Project.html
uni-projects-7526ea8de723888211101278198dc7a454024b84.tar
uni-projects-7526ea8de723888211101278198dc7a454024b84.tar.gz
uni-projects-7526ea8de723888211101278198dc7a454024b84.zip
Parent7994fe1a000768b6ad21997039ab5960d4c530af (diff)
[WGL/P] Implemented crude ray rotation around black holes
1 files changed, 6 insertions, 3 deletions
-rw-r--r--Year 2/Computer Graphics with WebGL/Project/Project.html9
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);
}