diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-11-21 13:50:30 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-11-21 13:50:30 -0500 |
| commit | e46886c6382bd2517eca07826e9a2cf6cb353962 (patch) | |
| tree | 73ac7463f82525a568d6baff09473179733f3289 /js/matrix.js | |
| parent | fea42b1513e321b6c397c914327a9a4a7d96e331 (diff) | |
right/left bracket to resize brush
Diffstat (limited to 'js/matrix.js')
| -rw-r--r-- | js/matrix.js | 14 |
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) +} |
