mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Rename parameter.
This commit is contained in:
parent
09e3010ed5
commit
5e7998d803
1 changed files with 3 additions and 3 deletions
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
|
||||
var BlendMode = {
|
||||
process: function(blendMode, sourceContext, destContext, opacity, offset) {
|
||||
process: function(blendMode, sourceContext, destContext, alpha, offset) {
|
||||
var sourceCanvas = sourceContext.canvas,
|
||||
dstData = destContext.getImageData(offset.x, offset.y,
|
||||
sourceCanvas.width, sourceCanvas.height),
|
||||
|
@ -206,12 +206,12 @@ var BlendMode = {
|
|||
sa = src[i + 3];
|
||||
ba = dst[i + 3];
|
||||
process();
|
||||
var a1 = sa * opacity / 255,
|
||||
var a1 = sa * alpha / 255,
|
||||
a2 = 1 - a1;
|
||||
dst[i] = a1 * dr + a2 * br;
|
||||
dst[i + 1] = a1 * dg + a2 * bg;
|
||||
dst[i + 2] = a1 * db + a2 * bb;
|
||||
dst[i + 3] = sa * opacity + a2 * ba;
|
||||
dst[i + 3] = sa * alpha + a2 * ba;
|
||||
}
|
||||
destContext.putImageData(dstData, offset.x, offset.y);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue