Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 3 insertions, 3 deletions
-rw-r--r--Year 2/Computer Graphics with WebGL/Homework 02 - The rug/Homework.html6
diff --git a/Year 2/Computer Graphics with WebGL/Homework 02 - The rug/Homework.html b/Year 2/Computer Graphics with WebGL/Homework 02 - The rug/Homework.html
index c174ff9..23d72fb 100644
--- a/Year 2/Computer Graphics with WebGL/Homework 02 - The rug/Homework.html
+++ b/Year 2/Computer Graphics with WebGL/Homework 02 - The rug/Homework.html
@@ -54,9 +54,9 @@
var prevFrequency = 0;
for (var x = -1; x < 1.0001; x += lineAreaWidths) {
var frequency = Math.random() * 2.4 + 0.8; // [0.8, 3.2]
- var colR = Math.random() + 0.2;
- var colG = Math.random() + 0.2;
- var colB = Math.random() + 0.2;
+ var colR = Math.random() * 0.6 + 0.5;
+ var colG = Math.random() * 0.6 + 0.5;
+ var colB = Math.random() * 0.57 + 0.5;
for (var y = 1; y > -1.0001; y -= step) {
data.push(x + maxAmplitude * Math.sin(Math.PI * (y + 1) * prevFrequency), y, colR, colG, colB);
data.push(x + lineAreaWidths - separatorWidth + maxAmplitude * Math.sin(Math.PI * (y + 1) * frequency), y, colR, colG, colB);