mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Move opacity precalculation out of variable definition.
This commit is contained in:
parent
117a828b2b
commit
9fa193d26f
1 changed files with 1 additions and 2 deletions
|
@ -51,7 +51,6 @@ var BlendMode = {
|
|||
src = sourceContext.getImageData(0, 0,
|
||||
sourceCanvas.width, sourceCanvas.height).data,
|
||||
min = Math.min,
|
||||
opacity = opacity / 255,
|
||||
sA, dA, sAM, dAM, dA2, sRA, sGA, sBA, dRA, dGA, dBA, demultiply;
|
||||
|
||||
// TODO: Some blend modes seem broken at the moment, e.g.
|
||||
|
@ -161,7 +160,7 @@ var BlendMode = {
|
|||
};
|
||||
|
||||
var process = modes[blendMode] || modes.unsupported;
|
||||
|
||||
opacity /= 255;
|
||||
for (var i = 0, l = dst.length; i < l; i += 4) {
|
||||
sA = src[i + 3] * opacity;
|
||||
dA = dst[i + 3] / 255;
|
||||
|
|
Loading…
Reference in a new issue