Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Computer Graphics with WebGL / Project / blackhole.js
diff options
context:
space:
mode:
Commit866b2608dfbc53dcd968bdf3261005a9e0be8b36 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-08-25 21:26:38 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-08-25 21:26:38 +0300
Files1f7f965553173ba41cb4f343d872ef3d1ed3c311 /Year 2/Computer Graphics with WebGL/Project/blackhole.js
uni-projects-866b2608dfbc53dcd968bdf3261005a9e0be8b36.tar
uni-projects-866b2608dfbc53dcd968bdf3261005a9e0be8b36.tar.gz
uni-projects-866b2608dfbc53dcd968bdf3261005a9e0be8b36.zip
Parent6dd51a351bebd3347c1c4d9d8caf4d7b2f2a4338 (diff)
[WGL/P] Added most proper shader code, now have two roadblocks
1 files changed, 4 insertions, 3 deletions
-rw-r--r--Year 2/Computer Graphics with WebGL/Project/blackhole.js7
diff --git a/Year 2/Computer Graphics with WebGL/Project/blackhole.js b/Year 2/Computer Graphics with WebGL/Project/blackhole.js
index 50e7edb..5093bc4 100644
--- a/Year 2/Computer Graphics with WebGL/Project/blackhole.js
+++ b/Year 2/Computer Graphics with WebGL/Project/blackhole.js
@@ -1,8 +1,9 @@
+blackHolesBuf = [];
+
BlackHole = function(center, size) {
- this.boundary = new Sphere(center, size);
this.rs = 2/3 * size;
+ blackHolesBuf.push([center[0], center[1], center[2], this.rs]);
}
BlackHole.prototype.draw = function() {
- gl.vertexAttrib4fv(aSphere, [this.boundary.center[0], this.boundary.center[1], this.boundary.center[2], this.rs]);
- this.boundary.draw();
+ // Black holes are not "drawn"
}