diff options
Diffstat (limited to 'js/blit.js')
| -rw-r--r-- | js/blit.js | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -28,6 +28,15 @@ var blit = (function(){ } }) } + blit.copy_toroidal_from = function(A, B, x, y){ + x = x || 0 ; y = y || 0 + B.forEach(function(lex, u, v){ + var cell = A.get(u+x, v+y) + if (cell) { + lex.assign(cell) + } + }) + } blit.copy_to = function(A, B, x, y){ x = x || 0 ; y = y || 0 B.forEach(function(lex, u, v){ |
