mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-08 05:42:07 -05:00
Merge remote branch 'origin/master'
This commit is contained in:
commit
c22d8f8f3c
4 changed files with 6 additions and 9 deletions
1
build/.gitignore
vendored
Normal file
1
build/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/scriptographer.sh
|
|
@ -98,7 +98,7 @@ var Color = this.Color = Base.extend(new function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
'hsb-rgb': function(color) {
|
'hsb-rgb': function(color) {
|
||||||
var h = color._hue / 60, // Scale to 0..6
|
var h = (color._hue / 60) % 6, // Scale to 0..6
|
||||||
s = color._saturation,
|
s = color._saturation,
|
||||||
b = color._brightness,
|
b = color._brightness,
|
||||||
i = Math.floor(h), // 0..5
|
i = Math.floor(h), // 0..5
|
||||||
|
|
|
@ -293,7 +293,10 @@ var Tool = this.Tool = Base.extend({
|
||||||
if (needsChange && pt.equals(this._point))
|
if (needsChange && pt.equals(this._point))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this._lastPoint = this._point;
|
// Make sure mousemove events have lastPoint set even for the first move
|
||||||
|
// so event.delta is always defined for them.
|
||||||
|
// TODO: Decide wether mousedown also should always have delta set.
|
||||||
|
this._lastPoint = start && type == 'mousemove' ? pt : this._point;
|
||||||
this._point = pt;
|
this._point = pt;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'mousedown':
|
case 'mousedown':
|
||||||
|
|
|
@ -203,13 +203,6 @@ var BlendMode = {
|
||||||
db = (bb + sb) / 2;
|
db = (bb + sb) / 2;
|
||||||
},
|
},
|
||||||
|
|
||||||
'pin-light': function() {
|
|
||||||
var op = sr < 128 ? min : max;
|
|
||||||
dr = op(sr, br);
|
|
||||||
dg = op(sg, bg);
|
|
||||||
db = op(sb, bb);
|
|
||||||
},
|
|
||||||
|
|
||||||
negation: function() {
|
negation: function() {
|
||||||
dr = 255 - abs(255 - sr - br);
|
dr = 255 - abs(255 - sr - br);
|
||||||
dg = 255 - abs(255 - sg - bg);
|
dg = 255 - abs(255 - sg - bg);
|
||||||
|
|
Loading…
Reference in a new issue