diff options
[WGL/P] Added most proper shader code, now have two roadblocks
1 files changed, 10 insertions, 0 deletions
| -rw-r--r-- | Year 2/Computer Graphics with WebGL/Project/star.js | 10 |
diff --git a/Year 2/Computer Graphics with WebGL/Project/star.js b/Year 2/Computer Graphics with WebGL/Project/star.js new file mode 100644 index 0000000..7aebc6c --- /dev/null +++ b/Year 2/Computer Graphics with WebGL/Project/star.js @@ -0,0 +1,10 @@ +starsBuf = []; + +Star = function(center, size) { + this.sphere = new Sphere(center, size); + this.sphere.color = [0.956,0.5,0.215]; + starsBuf.push([center[0], center[1], center[2], size]); +} +Star.prototype.draw = function() { + this.sphere.draw(); +} |
