Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Computer Graphics with WebGL / Project / blackhole.js
diff options
context:
space:
mode:
Commit46ee648fff31004221d307d0af9cabc0c4250a4c (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-08-27 12:01:37 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-08-27 12:01:37 +0300
Files5c2041dec852318c1ba7ddb16f43abbeb942b53d /Year 2/Computer Graphics with WebGL/Project/blackhole.js
uni-projects-46ee648fff31004221d307d0af9cabc0c4250a4c.tar
uni-projects-46ee648fff31004221d307d0af9cabc0c4250a4c.tar.gz
uni-projects-46ee648fff31004221d307d0af9cabc0c4250a4c.zip
Parent87e9c9fa25b21bec3a658dcebc6c765a511d838e (diff)
[WGL/P] Minor formatting and naming changes
1 files changed, 2 insertions, 2 deletions
-rw-r--r--Year 2/Computer Graphics with WebGL/Project/blackhole.js4
diff --git a/Year 2/Computer Graphics with WebGL/Project/blackhole.js b/Year 2/Computer Graphics with WebGL/Project/blackhole.js
index 674093b..28252d1 100644
--- a/Year 2/Computer Graphics with WebGL/Project/blackhole.js
+++ b/Year 2/Computer Graphics with WebGL/Project/blackhole.js
@@ -2,7 +2,7 @@ blackHolesBuf = [];
BlackHole = function(center, size) {
if (blackHolesBuf.length == BLACKHOLE_MAX_COUNT)
- throw "Error: cannot add more black holes, limit of " + BLACKHOLE_MAX_COUNT + " reached!"
+ throw 'Error: cannot add more black holes, limit of ' + BLACKHOLE_MAX_COUNT + ' reached!'
this.rs = size / 3;
this.index = blackHolesBuf.push([]) - 1;
@@ -10,7 +10,7 @@ BlackHole = function(center, size) {
}
BlackHole.prototype.moveTo = function(newCenter) {
blackHolesBuf[this.index] = newCenter.concat(this.rs);
- gl.uniform4fv(gl.getUniformLocation(glprog, "uBH[" + this.index + "]"), blackHolesBuf[this.index]);
+ gl.uniform4fv(gl.getUniformLocation(glprog, 'uBH[' + this.index + ']'), blackHolesBuf[this.index]);
}
BlackHole.prototype.draw = function() {
// Black holes are not "drawn"