diff options
[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.html | 9 |
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);
}
|
