Skip to content

Commit

Permalink
starting work on [#28]
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Desautels committed Apr 13, 2011
1 parent c7ce521 commit 2d5a257
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions sundae.js
Expand Up @@ -38,6 +38,28 @@ var sundae = {};
_blurWorkerA.postMessage(event.data);
//_blurWorkerB.postMessage(event.data);
};
var _pool = {};
_pool.getThread = function (){
var n = _pool.worker.length;
while(n--){
if(_pool.worker[n].status)
return _pool.worker[n];
}
};
_pool.setup = function (n){
_pool.worker = [];
var temp;
while (n--){
temp = new Worker();
temp.onmessage = function (event){
//Dom changing stuff
};
_pool.worker.push(temp);
}
};
_pool.recycle = function (n){
_pool.worker[n].status = true;
};
sundae.setBlurRadius = function(s){
if(s)
_sigma = Math.abs(+s);
Expand Down

0 comments on commit 2d5a257

Please sign in to comment.