diff options
[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.js | 7 |
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" } |
