移除color

This commit is contained in:
yhh
2020-12-06 23:09:03 +08:00
parent 8b3b645fbb
commit 2a0d4ef4dd
4 changed files with 1 additions and 162 deletions

View File

@@ -7523,81 +7523,6 @@ var es;
es.Base64Utils = Base64Utils;
})(es || (es = {}));
var es;
(function (es) {
var Color = /** @class */ (function () {
/**
* 从代表红、绿、蓝和alpha值的标量构造RGBA颜色。
*/
function Color(r, g, b, alpha) {
if (((r | g | b | alpha) & 0xFFFFFF00) != 0) {
var clampedR = es.MathHelper.clamp(r, 0, 255);
var clampedG = es.MathHelper.clamp(g, 0, 255);
var clampedB = es.MathHelper.clamp(b, 0, 255);
var clampedA = es.MathHelper.clamp(alpha, 0, 255);
this._packedValue = (clampedA << 24) | (clampedB << 16) | (clampedG << 8) | (clampedR);
}
else {
this._packedValue = (alpha << 24) | (b << 16) | (g << 8) | r;
}
}
Object.defineProperty(Color.prototype, "b", {
get: function () {
return this._packedValue >> 16;
},
set: function (value) {
this._packedValue = (this._packedValue & 0xff00ffff) | (value << 16);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Color.prototype, "g", {
get: function () {
return this._packedValue >> 8;
},
set: function (value) {
this._packedValue = (this._packedValue & 0xffff00ff) | (value << 8);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Color.prototype, "r", {
get: function () {
return this._packedValue;
},
set: function (value) {
this._packedValue = (this._packedValue & 0xffffff00) | value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Color.prototype, "a", {
get: function () {
return this._packedValue >> 24;
},
set: function (value) {
this._packedValue = (this._packedValue & 0x00ffffff) | (value << 24);
},
enumerable: true,
configurable: true
});
Object.defineProperty(Color.prototype, "packedValue", {
get: function () {
return this._packedValue;
},
set: function (value) {
this._packedValue = value;
},
enumerable: true,
configurable: true
});
Color.prototype.equals = function (other) {
return this._packedValue == other._packedValue;
};
return Color;
}());
es.Color = Color;
})(es || (es = {}));
var es;
(function (es) {
var EdgeExt = /** @class */ (function () {
function EdgeExt() {