diff options
[WGL/P] Minor formatting and naming changes
1 files changed, 2 insertions, 2 deletions
| -rw-r--r-- | Year 2/Computer Graphics with WebGL/Project/star.js | 4 |
diff --git a/Year 2/Computer Graphics with WebGL/Project/star.js b/Year 2/Computer Graphics with WebGL/Project/star.js index 1931c7f..de1e9e9 100644 --- a/Year 2/Computer Graphics with WebGL/Project/star.js +++ b/Year 2/Computer Graphics with WebGL/Project/star.js @@ -2,7 +2,7 @@ starsBuf = []; Star = function(center, size) { if (starsBuf.length == STAR_MAX_COUNT) - throw "Error: cannot add more stars, limit of " + STAR_MAX_COUNT + " reached!" + throw 'Error: cannot add more stars, limit of ' + STAR_MAX_COUNT + ' reached!' this.sphere = new Sphere(center, size); this.sphere.color = [0.956,0.5,0.215]; @@ -12,7 +12,7 @@ Star = function(center, size) { Star.prototype.moveTo = function(newCenter) { this.sphere.center = newCenter; starsBuf[this.index] = newCenter.concat(this.sphere.size); - gl.uniform4fv(gl.getUniformLocation(glprog, "uStars[" + this.index + "]"), starsBuf[this.index]); + gl.uniform4fv(gl.getUniformLocation(glprog, 'uStars[' + this.index + ']'), starsBuf[this.index]); } Star.prototype.draw = function() { this.sphere.draw(); |
