diff options
| author | jules <jules@okfoc.us> | 2013-12-13 17:39:40 -0500 |
|---|---|---|
| committer | jules <jules@okfoc.us> | 2013-12-13 17:39:40 -0500 |
| commit | 072f9186f57bb4dcb9c75457efa0f67b7a0225d3 (patch) | |
| tree | e781730c3be2c5bb2b10c1212373470a70ad76c6 /js/util.js | |
| parent | e6a10925902812fe78732af31f289d7176b2c1a3 (diff) | |
animated shader
Diffstat (limited to 'js/util.js')
| -rw-r--r-- | js/util.js | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,11 +1,11 @@ -$.fn.int = function(){ return parseInt($(this).val(),10) } -$.fn.float = function(){ return parseFloat($(this).val()) } +if (window.$) { + $.fn.int = function(){ return parseInt($(this).val(),10) } + $.fn.float = function(){ return parseFloat($(this).val()) } +} + function clamp(n,a,b){ return n<a?a:n<b?n:b } function loadImage(imageURL, callback) { - document.getElementById("save").style.display = "none" - document.getElementById("encode").style.display = "none" - status("loading") var imageURL = proxify( imageURL ); window.gif = window.img = null @@ -26,7 +26,7 @@ function loadImage(imageURL, callback) { } function giveImage() { - if (imageURL.substr(-3) === "gif") { + if (window.gif) { return gif.frames[gif.currentFrame()].ctx.canvas; } else { return img; |
