More pretty images <3
[Dynartic.git] / DynImage.js
index 523e3c3..4b681da 100644 (file)
@@ -150,6 +150,20 @@ DynImage.prototype.explosion = function(width, radius, thresh, dk, ck ) {
     }
 }
 
+DynImage.prototype.prettyNoise = function(width, height, mul) {
+    for(var i = 0; i < width; ++i) {
+        for(var j = 0; j < height; ++j) {
+            var color = this.getColor(i, j);
+
+            this.setColor(i, j,
+                    color[0] + ( (Math.random() - 0.5) * mul),
+                    color[1] + ( (Math.random() - 0.5) * mul),
+                    color[2] + ( (Math.random() - 0.5) * mul)
+            );
+        }
+    }
+}
+
 DynImage.prototype.character2 = function(width, height) {
        for(var x = 0; x < width; ++x) {
                for(var y = 0; y < height; ++y) {
This page took 0.0236 seconds and 4 git commands to generate.