mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Remove 'unsupported' blend mode.
This commit is contained in:
parent
9142c974c3
commit
b08abcdd69
1 changed files with 3 additions and 9 deletions
|
@ -51,14 +51,6 @@ var BlendMode = {
|
|||
|
||||
// TODO: Some blend modes seem broken at the moment, e.g. dodge, burn
|
||||
var modes = {
|
||||
unsupported: function(i) {
|
||||
// Render checker pattern
|
||||
rA = 1;
|
||||
dst[i] = 255;
|
||||
dst[i + 1] = i % 8 == 0 ? 255 : 0;
|
||||
dst[i + 2] = i % 8 == 0 ? 0 : 255;
|
||||
},
|
||||
|
||||
normal: function(i) {
|
||||
dst[i] = (sRA + dRA - dRA * sA) * rM;
|
||||
dst[i + 1] = (sGA + dGA - dGA * sA) * rM;
|
||||
|
@ -152,7 +144,9 @@ var BlendMode = {
|
|||
}
|
||||
};
|
||||
|
||||
var process = modes[blendMode] || modes.unsupported;
|
||||
var process = modes[blendMode];
|
||||
if (!process)
|
||||
return;
|
||||
opacity /= 255;
|
||||
for (var i = 0, l = dst.length; i < l; i += 4) {
|
||||
sA = src[i + 3] * opacity;
|
||||
|
|
Loading…
Reference in a new issue