2015
01.17

Typescript 1.4 is out. Thanks to its new support for union types, you can now use directly an integer in place of a string color.

Before :

console.fore[x][y] = "#3388DD";

Now :

console.fore[x][y] = 0x3388DD;

This is much faster when using a pixi renderer as no conversion is necessary during rendering.

Note that the old formats still work but are slower :

console.fore[x][y] = "#3388DD";
console.fore[x][y] = "rgb(51, 136, 221)";
console.fore[x][y] = "orange";

No Comment.

Add Your Comment