diff options
| author | jules <jules@okfoc.us> | 2013-12-17 14:02:38 -0500 |
|---|---|---|
| committer | jules <jules@okfoc.us> | 2013-12-17 14:02:38 -0500 |
| commit | faf61060be1bed61b7ea9543b831e02be14a489e (patch) | |
| tree | 5f78066e431679c8179b25ffb4f3db3f0bc03632 /shader-gif.html | |
| parent | 989742198a63312932f7bc43320e932f5da41887 (diff) | |
fix issue where the thing breaks when w/h change
Diffstat (limited to 'shader-gif.html')
| -rw-r--r-- | shader-gif.html | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shader-gif.html b/shader-gif.html index 41d80d1..6bff9e2 100644 --- a/shader-gif.html +++ b/shader-gif.html @@ -243,6 +243,7 @@ function shade(frame, t){ var clone = cloneData.data try { + var realw = w, realh = h for (var x = 0; x < w; x++) { for (var y = 0; y < h; y++) { q = 4*(y*w+x) @@ -252,6 +253,7 @@ function shade(frame, t){ data[q+1] = g data[q+2] = b data[q+3] = a + w = realw, h = realh } } } |
