BlackHole = function(center, size) { this.boundary = new Sphere(center, size); this.rs = 2/3 * size; } BlackHole.prototype.draw = function() { gl.vertexAttrib4fv(aSphere, [this.boundary.center[0], this.boundary.center[1], this.boundary.center[2], this.rs]); this.boundary.draw(); }