移除color
This commit is contained in:
18
source/bin/framework.d.ts
vendored
18
source/bin/framework.d.ts
vendored
@@ -2953,24 +2953,6 @@ declare module es {
|
|||||||
static decodeCSV(input: string): Array<number>;
|
static decodeCSV(input: string): Array<number>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare module es {
|
|
||||||
class Color {
|
|
||||||
/**
|
|
||||||
* 存储为RGBA
|
|
||||||
*/
|
|
||||||
private _packedValue;
|
|
||||||
/**
|
|
||||||
* 从代表红、绿、蓝和alpha值的标量构造RGBA颜色。
|
|
||||||
*/
|
|
||||||
constructor(r: number, g: number, b: number, alpha: number);
|
|
||||||
b: number;
|
|
||||||
g: number;
|
|
||||||
r: number;
|
|
||||||
a: number;
|
|
||||||
packedValue: number;
|
|
||||||
equals(other: Color): boolean;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
declare module es {
|
declare module es {
|
||||||
class EdgeExt {
|
class EdgeExt {
|
||||||
static oppositeEdge(self: Edge): Edge;
|
static oppositeEdge(self: Edge): Edge;
|
||||||
|
|||||||
@@ -7523,81 +7523,6 @@ var es;
|
|||||||
es.Base64Utils = Base64Utils;
|
es.Base64Utils = Base64Utils;
|
||||||
})(es || (es = {}));
|
})(es || (es = {}));
|
||||||
var 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) {
|
(function (es) {
|
||||||
var EdgeExt = /** @class */ (function () {
|
var EdgeExt = /** @class */ (function () {
|
||||||
function EdgeExt() {
|
function EdgeExt() {
|
||||||
|
|||||||
2
source/bin/framework.min.js
vendored
2
source/bin/framework.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,68 +0,0 @@
|
|||||||
module es {
|
|
||||||
export class Color {
|
|
||||||
/**
|
|
||||||
* 存储为RGBA
|
|
||||||
*/
|
|
||||||
private _packedValue: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 从代表红、绿、蓝和alpha值的标量构造RGBA颜色。
|
|
||||||
*/
|
|
||||||
constructor(r: number, g: number,b: number, alpha: number){
|
|
||||||
if (((r | g |b | alpha) & 0xFFFFFF00) != 0){
|
|
||||||
let clampedR = MathHelper.clamp(r, 0, 255);
|
|
||||||
let clampedG = MathHelper.clamp(g, 0, 255);
|
|
||||||
let clampedB = MathHelper.clamp(b, 0, 255);
|
|
||||||
let clampedA = MathHelper.clamp(alpha, 0, 255);
|
|
||||||
|
|
||||||
this._packedValue = (clampedA << 24) | (clampedB << 16) | (clampedG << 8) | (clampedR);
|
|
||||||
}else{
|
|
||||||
this._packedValue = (alpha << 24 ) | (b << 16) | (g << 8) | r;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public get b(){
|
|
||||||
return this._packedValue >> 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
public set b(value: number){
|
|
||||||
this._packedValue = (this._packedValue & 0xff00ffff) | (value << 16);
|
|
||||||
}
|
|
||||||
|
|
||||||
public get g(){
|
|
||||||
return this._packedValue >> 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
public set g(value: number){
|
|
||||||
this._packedValue = (this._packedValue & 0xffff00ff) | (value << 8)
|
|
||||||
}
|
|
||||||
|
|
||||||
public get r(){
|
|
||||||
return this._packedValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public set r(value: number){
|
|
||||||
this._packedValue = (this._packedValue & 0xffffff00) | value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public get a(){
|
|
||||||
return this._packedValue >> 24;
|
|
||||||
}
|
|
||||||
|
|
||||||
public set a(value: number){
|
|
||||||
this._packedValue = (this._packedValue & 0x00ffffff) | (value << 24);
|
|
||||||
}
|
|
||||||
|
|
||||||
public get packedValue(){
|
|
||||||
return this._packedValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public set packedValue(value: number){
|
|
||||||
this._packedValue = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public equals(other: Color):boolean{
|
|
||||||
return this._packedValue == other._packedValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user