提交 afee71ff 编写于 作者: W WestLangley

Clean up

上级 f65db3e7
......@@ -331,7 +331,11 @@ Object.assign( Color.prototype, {
copySRGBToLinear: function ( color ) {
function SRGBToLinear( c ) { return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 ) };
function SRGBToLinear( c ) {
return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 );
}
this.r = SRGBToLinear( color.r );
this.g = SRGBToLinear( color.g );
......@@ -343,7 +347,11 @@ Object.assign( Color.prototype, {
copyLinearToSRGB: function ( color ) {
function LinearToSRGB( c ) { return ( c < 0.0031308 ) ? c * 12.92 : 1.055 * ( Math.pow( c, 0.41666 ) ) - 0.055 };
function LinearToSRGB( c ) {
return ( c < 0.0031308 ) ? c * 12.92 : 1.055 * ( Math.pow( c, 0.41666 ) ) - 0.055;
}
this.r = LinearToSRGB( color.r );
this.g = LinearToSRGB( color.g );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册