From acd8db1c8243a3bc34f07e7dbb43a71dedc79aba Mon Sep 17 00:00:00 2001 From: Isaiah Odhner Date: Tue, 25 Mar 2014 19:18:27 -0400 Subject: [PATCH] max workers and some junk --- app.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index d555d65..775682e 100644 --- a/app.js +++ b/app.js @@ -49,7 +49,7 @@ app.open = function(){ description: "Selects a rectangular part of the picture to move, copy, or edit.", cursor: ["precise", [16, 16], "crosshair"], passive: true, - implemented: false, + implemented: "kinda", mousedown: function(){ if(selection){ selection.destroy(); @@ -538,9 +538,10 @@ app.open = function(){ var $toolbox = $ToolBox(); var $colorbox = $ColorBox(); - var selection; - var undos = []; - var redos = []; + var selection;//the one and only Selection + var undos = [];//array of + var redos = [];//array of + var frames = [];//array of {speed:N, undos:[], redos:[], canvas:} var file_name; @@ -651,7 +652,7 @@ app.open = function(){ function go(){ var gif = new GIF({ - workers: Math.floor(undos.length/50)+1, + workers: Math.min(5, Math.floor(undos.length/50)+1), workerScript: 'gif.js/gif.worker.js', width: canvas.width, height: canvas.height,