@urso/core 0.4.15 → 0.4.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urso/core",
3
- "version": "0.4.15",
3
+ "version": "0.4.16",
4
4
  "description": "HTML5 game engine",
5
5
  "main": "build/js/index.js",
6
6
  "author": "Megbrimef",
@@ -39,12 +39,14 @@ PIXI.Text.prototype.drawLetterSpacing = function (text, x, y, isStroke) {
39
39
  }
40
40
  var currentPosition = x;
41
41
 
42
- var customColors = [];//colors patch block
43
- var textIndexOffset = this.text.indexOf(text);
42
+ var textIndexOffset = this.text.indexOf(text); //colors patch block
43
+ var allTextLength = this.text.length;
44
+ var customColors = new Array(allTextLength);
44
45
  if (this.fillCustomColors) {
45
- for (var k in this.fillCustomColors){
46
+ for (var k in this.fillCustomColors) {
46
47
  var colorsParams = this.fillCustomColors[k];
47
- customColors[colorsParams.position] = colorsParams.color;
48
+ //customColors[colorsParams.position] = colorsParams.color;
49
+ customColors.fill(colorsParams.color, colorsParams.position, allTextLength);
48
50
  }
49
51
  }
50
52