summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorjules <jules@okfoc.us>2014-01-26 02:41:35 -0500
committerjules <jules@okfoc.us>2014-01-26 02:41:35 -0500
commit41c9d39a851a159d6a2e34fafb975e7c66bddf63 (patch)
tree66e0db1f8dd242af45b73040fa3163fb7138db45 /js
parentb0b1b4cfbe3217b9f35343bdc35cdd058f4cf534 (diff)
move width/height out
Diffstat (limited to 'js')
-rw-r--r--js/render.js20
1 files changed, 8 insertions, 12 deletions
diff --git a/js/render.js b/js/render.js
index f6684d7..993ba0e 100644
--- a/js/render.js
+++ b/js/render.js
@@ -1,7 +1,8 @@
var frame, img_frame;
var timeout, raf_id, start_t = 0, old_t = 0, pause_t = 0
-var paused = false, dragging = false, rendering = false, scrolling = false, deferring = false, scrollTimeout = null;
-var fps = 30;
+var paused = false, dragging = false, rendering = false, scrolling = false, deferring = false, scrollTimeout = null
+var fps = 30
+var imageURL = ""
function choose (){
imageURL = this.src
@@ -46,16 +47,7 @@ function displayWidthHeight(width, height){
$("#width").val(width)
$("#height").val(height)
}
-$("#width").change(function(){
- w = abs(parseInt(this.value,10)) || 1
- cc.canvas.width = w
- cc.canvas.height = h
-})
-$("#height").change(function(){
- h = abs(parseInt(this.value,10)) || 1
- cc.canvas.width = w
- cc.canvas.height = h
-})
+
function giveFrame(t){
if (window.gif) {
if (gif.currentFrame) {
@@ -80,6 +72,10 @@ function empty_frame(){
return { ctx: cx.context, cloneData: cx.getImageData(0,0,w,h) }
}
+function feedback_frame(){
+ return { ctx: cc.context, cloneData: cc.getImageData(0,0,w,h) }
+}
+
function reset(){
start_t = old_t
pause_t = 0