Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Computer Graphics with WebGL / Project / blackhole.js
diff options
context:
space:
mode:
Commit53c352887fdb3e0345e97c2760d8f7985a1bfc48 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-08-28 13:01:49 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-08-28 13:01:49 +0300
Files4ca4700916a35a216a96ac7c347a5ad1b33a4ef2 /Year 2/Computer Graphics with WebGL/Project/blackhole.js
uni-projects-53c352887fdb3e0345e97c2760d8f7985a1bfc48.tar
uni-projects-53c352887fdb3e0345e97c2760d8f7985a1bfc48.tar.gz
uni-projects-53c352887fdb3e0345e97c2760d8f7985a1bfc48.zip
Parent8861a3e72f28f1757954c7f20ebeb469980f573a (diff)
[WGL/P] Added a lot of comments and reworked formatting of certain code
1 files changed, 0 insertions, 17 deletions
-rw-r--r--Year 2/Computer Graphics with WebGL/Project/blackhole.js17
diff --git a/Year 2/Computer Graphics with WebGL/Project/blackhole.js b/Year 2/Computer Graphics with WebGL/Project/blackhole.js
deleted file mode 100644
index 0bd0ff5..0000000
--- a/Year 2/Computer Graphics with WebGL/Project/blackhole.js
+++ /dev/null
@@ -1,17 +0,0 @@
-BlackHole = function(center, size, blackHolesBuf) {
- if (blackHolesBuf.length == BLACKHOLE_MAX_COUNT)
- throw 'Error: cannot add more black holes, limit of ' + BLACKHOLE_MAX_COUNT + ' reached!'
-
- this.rs = size / 3;
- this.index = blackHolesBuf.push([]) - 1;
- this.center = center;
-
- blackHolesBuf[this.index] = center.concat(this.rs);
-}
-BlackHole.prototype.moveTo = function(newCenter, blackHolesBuf) {
- blackHolesBuf[this.index] = newCenter.concat(this.rs);
- gl.uniform4fv(gl.getUniformLocation(glprog, 'uBH[' + this.index + ']'), blackHolesBuf[this.index]);
-}
-BlackHole.prototype.draw = function() {
- // Black holes are not "drawn"
-}