summaryrefslogtreecommitdiff
path: root/js/matrix.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/matrix.js')
-rw-r--r--js/matrix.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/js/matrix.js b/js/matrix.js
index ff734bf..8108568 100644
--- a/js/matrix.js
+++ b/js/matrix.js
@@ -87,4 +87,16 @@ Matrix.prototype.ascii = function () {
}).filter(function(line){ return line.length > 0 })
var txt = '/exec -out printf "' + lines.join("\\n") + '"\n'
return txt
-} \ No newline at end of file
+}
+Matrix.prototype.expand = function(i){
+ var w = this.w = clamp(this.w+i, 1, 9), h = this.h = clamp(this.h+i, 1, 9)
+ console.log(w,h)
+ controls.width.char = ""+w
+ controls.width.build()
+ controls.height.char = ""+h
+ controls.height.build()
+ this.rebuild()
+}
+Matrix.prototype.contract = function(i){
+ brush.expand(-i)
+}