From 866b2608dfbc53dcd968bdf3261005a9e0be8b36 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 25 Aug 2023 21:26:38 +0300 Subject: [WGL/P] Added most proper shader code, now have two roadblocks --- Year 2/Computer Graphics with WebGL/Project/star.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Year 2/Computer Graphics with WebGL/Project/star.js (limited to 'Year 2/Computer Graphics with WebGL/Project/star.js') 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(); +} -- cgit v1.3.1-26-gb76a