From 87159fbb1efcaa9ee11467a4bfe9a239102adb29 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 13 Dec 2013 17:56:57 -0500 Subject: gif! --- js/util.js | 2 +- shader-animate.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/js/util.js b/js/util.js index d31af47..5466c07 100644 --- a/js/util.js +++ b/js/util.js @@ -27,7 +27,7 @@ function loadImage(imageURL, callback) { function giveImage() { if (window.gif) { - return gif.frames[gif.currentFrame()].ctx.canvas; + return gif.frames[gif.currentFrame()]; } else { return img; } diff --git a/shader-animate.html b/shader-animate.html index afacad0..67a0d57 100644 --- a/shader-animate.html +++ b/shader-animate.html @@ -26,6 +26,7 @@ delay + @@ -77,6 +78,7 @@ function draw(t){ } function shade(frame, t){ try { + if (window.gif) frame = giveImage() var f = $("#shader").val() if (!f.length) return; var shader = new Function('x','y','t', f) -- cgit v1.2.3-70-g09d2