first pass at implementing filters. Still have a lot to work through.

This commit is contained in:
Eric Rowell
2012-07-17 00:32:26 -07:00
parent 384a686740
commit 20adf7e036
10 changed files with 351 additions and 69 deletions

View File

@@ -31,7 +31,7 @@ Test.prototype.tests = {
for(var n = 0; n < 10000; n++) {
context.putImageData(imageData, 7, 7);
}
endTimer('draw 10,000 images with image object from image data');
endTimer('draw 10,000 images with putImageData');
},
'DRAWING - draw rect vs image from data url': function(containerId) {
@@ -61,15 +61,17 @@ Test.prototype.tests = {
endTimer('create data url');
var imageObj = new Image();
imageObj.onload = function() {
layer.clear();
startTimer();
for(var n = 0; n < 10000; n++) {
context.drawImage(imageObj, 7, 7, 106, 106, 10, 10, 106, 106);
}
endTimer('draw 10,000 images with image object from data url');
}
imageObj.src = url;
layer.clear();
startTimer();
for(var n = 0; n < 10000; n++) {
context.drawImage(imageObj, 7, 7, 106, 106, 10, 10, 106, 106);
}
endTimer('draw 10,000 images with image object from data url');
},
'DRAWING - draw 1,000 stars': function(containerId) {
var stage = new Kinetic.Stage({
@@ -121,7 +123,7 @@ Test.prototype.tests = {
layer.add(star);
stage.add(layer);
console.log('call toImage')
console.log('call toImage')
star.toImage(function(img) {
startTimer();
for(var n = 0; n < 1000; n++) {