未验证 提交 7558020b 编写于 作者: R Remi 提交者: GitHub

changes to prevent console warnings

上级 10bb930d
......@@ -541,20 +541,27 @@ Object.assign( Color.prototype, {
},
lerpChromatic: function ( color, alpha ) {
lerpHSL: function () {
var hslA = this.getHSL();
var hslB = color.getHSL();
var hslA = { h: 0, s: 0, l: 0 };
var hslB = { h: 0, s: 0, l: 0 };
var h = _Math.lerp( hslA.h, hslB.h, alpha );
var s = _Math.lerp( hslA.s, hslB.s, alpha );
var l = _Math.lerp( hslA.l, hslB.l, alpha );
return function lerpHSL( color, alpha ) {
this.setHSL( h, s, l );
this.getHSL( hslA );
color.getHSL( hslB );
return this;
var h = _Math.lerp( hslA.h, hslB.h, alpha );
var s = _Math.lerp( hslA.s, hslB.s, alpha );
var l = _Math.lerp( hslA.l, hslB.l, alpha );
},
this.setHSL( h, s, l );
return this;
};
}(),
equals: function ( c ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册