From 87e9c9fa25b21bec3a658dcebc6c765a511d838e Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 27 Aug 2023 11:44:43 +0300 Subject: [WGL/P] Slight code reorganisation, moved buffer logic for black holes in BlackHole and exported count limits as global variables --- Year 2/Computer Graphics with WebGL/Project/Project.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Year 2/Computer Graphics with WebGL/Project/Project.html') diff --git a/Year 2/Computer Graphics with WebGL/Project/Project.html b/Year 2/Computer Graphics with WebGL/Project/Project.html index 41f4943..4c88553 100644 --- a/Year 2/Computer Graphics with WebGL/Project/Project.html +++ b/Year 2/Computer Graphics with WebGL/Project/Project.html @@ -112,10 +112,9 @@ h2 { // new Star([0,0,0], 100) // new Star([1000, 0, -30], 20); - blackHole = new BlackHole([1000,0,900], 30); - for (var i = 0; i < blackHolesBuf.length; i++) { - gl.uniform4fv(gl.getUniformLocation(glprog, "uBH[" + i + "]"), blackHolesBuf[i]); - } + blackHoles = [ + new BlackHole([1000,0,900], 30) + ]; resizeglcanvas(); } -- cgit v1.3.1-23-gd82d