mirror of
https://github.com/konvajs/konva.git
synced 2025-12-29 18:34:36 +08:00
added pixastic Solarize filter
This commit is contained in:
34
test/unit/filters/Solarize-test.js
Normal file
34
test/unit/filters/Solarize-test.js
Normal file
@@ -0,0 +1,34 @@
|
||||
suite('Solarize', function() {
|
||||
|
||||
// ======================================================
|
||||
test('solarize', function(done) {
|
||||
var stage = addStage();
|
||||
|
||||
var imageObj = new Image();
|
||||
imageObj.onload = function() {
|
||||
var layer = new Kinetic.Layer();
|
||||
darth = new Kinetic.Image({
|
||||
x: 10,
|
||||
y: 10,
|
||||
image: imageObj,
|
||||
draggable: true
|
||||
});
|
||||
|
||||
layer.add(darth);
|
||||
stage.add(layer);
|
||||
darth.cache();
|
||||
darth.filters([Kinetic.Filters.Solarize]);
|
||||
|
||||
|
||||
layer.draw();
|
||||
|
||||
|
||||
done();
|
||||
|
||||
};
|
||||
imageObj.src = 'assets/darth-vader.jpg';
|
||||
//imageObj.src = 'assets/lion.png';
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user