@awayjs/scene 0.13.274 → 0.13.275

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- console.debug('AwayJS - Scene - 0.13.274');
1
+ console.debug('AwayJS - Scene - 0.13.275');
2
2
  export { Timeline } from './lib/base/Timeline';
3
3
  export { ControllerBase } from './lib/controllers/ControllerBase';
4
4
  export { FirstPersonController } from './lib/controllers/FirstPersonController';
@@ -148,12 +148,9 @@ export declare class TextField extends DisplayObjectContainer {
148
148
  private _textInteractionMode;
149
149
  private _textWidth;
150
150
  private _textHeight;
151
- private _charBoundaries;
152
151
  private _firstCharInParagraph;
153
152
  private _imageReference;
154
- private _lineMetrics;
155
153
  private _paragraphLength;
156
- _textFormat: TextFormat;
157
154
  _newTextFormat: TextFormat;
158
155
  _textFormats: TextFormat[];
159
156
  _textFormatsIdx: number[];
@@ -671,8 +668,6 @@ export declare class TextField extends DisplayObjectContainer {
671
668
  setLabelData(labelData: any): void;
672
669
  get newTextFormat(): TextFormat;
673
670
  set newTextFormat(value: TextFormat);
674
- get textFormat(): TextFormat;
675
- set textFormat(value: TextFormat);
676
671
  /**
677
672
  * Indicates the horizontal scale(percentage) of the object as applied from
678
673
  * the registration point. The default registration point is(0,0). 1.0
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../lib/display/TextField.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,SAAS,EAAS,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMhD,OAAO,EAAY,KAAK,EAA0C,MAAM,kBAAkB,CAAC;AAG3F,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,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AE,MAAmB,GAAG,IAAI;IAyI9G;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;WACW,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAIrE,aAAa,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,KAAK,CAAC,CAAC,EAAE,GAAG;IAOZ,WAAW,CAAC,QAAQ,EAAE,MAAM;IAKnC,OAAO,CAAC,kBAAkB;IAiCnB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,OAAe,EAAE,MAAM,GAAE,OAAe,EAAE,KAAK,GAAE,OAAe;IAsKtG,OAAO,CAAC,cAAc;IA8Bf,KAAK,IAAI,SAAS;IAQlB,MAAM,CAAC,WAAW,EAAE,SAAS,GAAG,IAAI;IAgC3C,OAAO,CAAC,gBAAgB;CAwBxB"}
@@ -186,6 +186,7 @@ var TextField = /** @class */ (function (_super) {
186
186
  */
187
187
  _this._text = '';
188
188
  _this._iTextWoLineBreaks = ''; // _iText without line breaks
189
+ _this._newTextFormat = new TextFormat();
189
190
  _this.cursorIntervalID = -1;
190
191
  _this.chars_codes = [];
191
192
  _this.chars_width = [];
@@ -471,7 +472,7 @@ var TextField = /** @class */ (function (_super) {
471
472
  }
472
473
  var x = 0;
473
474
  var y = 0;
474
- var tf = this.newTextFormat;
475
+ var tf = this._newTextFormat;
475
476
  if (this.char_positions_x.length == 0) {
476
477
  x = this.textOffsetX + (this._width / 2) + this._textWidth / 2;
477
478
  if (tf.align == 'justify') {
@@ -857,7 +858,6 @@ var TextField = /** @class */ (function (_super) {
857
858
  this._iTextWoLineBreaks = processedText.replace(/(\r\n|\n|\\n|\r)/gm, '');
858
859
  this._textDirty = true;
859
860
  //console.log("set text", value, "on" , this);
860
- this.newTextFormat = this._textFormats[this._textFormats.length - 1];
861
861
  this.invalidate();
862
862
  },
863
863
  enumerable: false,
@@ -1106,16 +1106,12 @@ var TextField = /** @class */ (function (_super) {
1106
1106
  };
1107
1107
  Object.defineProperty(TextField.prototype, "newTextFormat", {
1108
1108
  get: function () {
1109
- // only use the newTextformat if it is available, otherwise fall back to textFormat
1110
- if (this._newTextFormat == null) {
1111
- this._newTextFormat = this._textFormat ? this._textFormat : new TextFormat();
1112
- }
1113
- return this._newTextFormat;
1109
+ return this._newTextFormat.clone();
1114
1110
  },
1115
1111
  set: function (value) {
1116
1112
  if (!value)
1117
1113
  throw new Error('TextField::: set newTextFormat - no value!');
1118
- if (value.equal(this.newTextFormat))
1114
+ if (value.equal(this._newTextFormat))
1119
1115
  return;
1120
1116
  this._newTextFormat = value.clone();
1121
1117
  this._newFormatDirty = true;
@@ -1124,30 +1120,6 @@ var TextField = /** @class */ (function (_super) {
1124
1120
  enumerable: false,
1125
1121
  configurable: true
1126
1122
  });
1127
- Object.defineProperty(TextField.prototype, "textFormat", {
1128
- get: function () {
1129
- if (this._textFormat == null) {
1130
- this._textFormat = new TextFormat();
1131
- }
1132
- return this._textFormat;
1133
- },
1134
- set: function (value) {
1135
- if (!value)
1136
- throw new Error('TextField::: set textFormat - no value!');
1137
- if (value.equal(this.textFormat))
1138
- return;
1139
- this._textFormat = value.clone();
1140
- this._textShapesDirty = true;
1141
- // this._positionsDirty = true;
1142
- // this._glyphsDirty = true;
1143
- // this._shapesDirty = true;
1144
- this._textDirty = true;
1145
- //this.reConstruct();
1146
- this.invalidate();
1147
- },
1148
- enumerable: false,
1149
- configurable: true
1150
- });
1151
1123
  Object.defineProperty(TextField.prototype, "scaleX", {
1152
1124
  /**
1153
1125
  * Indicates the horizontal scale(percentage) of the object as applied from
@@ -1269,8 +1241,8 @@ var TextField = /** @class */ (function (_super) {
1269
1241
  get: function () {
1270
1242
  this.reConstruct();
1271
1243
  if (this.type == TextFieldType.INPUT && this._iText == '') {
1272
- this.textFormat.font_table.initFontSize(this.textFormat.size);
1273
- return this.textFormat.font_table.getLineHeight();
1244
+ this._newTextFormat.font_table.initFontSize(this._newTextFormat.size);
1245
+ return this._newTextFormat.font_table.getLineHeight();
1274
1246
  }
1275
1247
  return this._textHeight;
1276
1248
  },
@@ -1400,7 +1372,6 @@ var TextField = /** @class */ (function (_super) {
1400
1372
  }
1401
1373
  this._resetParagraph();
1402
1374
  this._clearTextShapes();
1403
- this._textFormat = null;
1404
1375
  };
1405
1376
  /**
1406
1377
  * Reconstructs the Graphics for this Text-field.
@@ -1438,10 +1409,6 @@ var TextField = /** @class */ (function (_super) {
1438
1409
  this._maxScrollH = 0;
1439
1410
  this._maxScrollV = 0;
1440
1411
  this._maxWidthLine = 0;
1441
- // sometimes needed for TLFTextfields
1442
- // todo: cleanup usage of _textFormats vs _textFormats
1443
- if (!this._textFormat && this._textFormats.length > 0)
1444
- this._textFormat = this._textFormats[0];
1445
1412
  this.buildParagraphs();
1446
1413
  //console.log("TextField buildParagraph", this.id, this._iText);
1447
1414
  //console.log("TextField buildParagraph", this.id, this._autoSize);
@@ -1456,9 +1423,9 @@ var TextField = /** @class */ (function (_super) {
1456
1423
  // if we have AUTOSIZE!=None
1457
1424
  if (this._positionsDirty) {
1458
1425
  this._glyphsDirty = true;
1459
- if (this._iText != '' && this._textFormat != null) {
1426
+ if (this._iText != '' && this._textFormats[0] != null) {
1460
1427
  //console.log("TextField getWordPositions", this.id, this.words);
1461
- this.getWordPositions();
1428
+ this.getWordPositions(this._textFormats[0]);
1462
1429
  }
1463
1430
  else {
1464
1431
  // this is empty text, we need to reset the text-size
@@ -1469,8 +1436,8 @@ var TextField = /** @class */ (function (_super) {
1469
1436
  this.adjustPositionForAutoSize(0); //(this._width - 4)/2);
1470
1437
  this._height = 4;
1471
1438
  if (this._type == TextFieldType.INPUT) {
1472
- this.newTextFormat.font_table.initFontSize(this.newTextFormat.size);
1473
- this._height = this.newTextFormat.font_table.getLineHeight() + 4;
1439
+ this._newTextFormat.font_table.initFontSize(this._newTextFormat.size);
1440
+ this._height = this._newTextFormat.font_table.getLineHeight() + 4;
1474
1441
  }
1475
1442
  }
1476
1443
  if (this._type == TextFieldType.INPUT)
@@ -1543,7 +1510,7 @@ var TextField = /** @class */ (function (_super) {
1543
1510
  return;
1544
1511
  }
1545
1512
  // clear paragraph data when clear
1546
- if (this._iText === '' || !this._textFormat) {
1513
+ if (this._iText === '' || !this._textFormats[0]) {
1547
1514
  this._resetParagraph();
1548
1515
  return;
1549
1516
  }
@@ -1725,7 +1692,7 @@ var TextField = /** @class */ (function (_super) {
1725
1692
  this._transform.invalidatePosition();
1726
1693
  }
1727
1694
  };
1728
- TextField.prototype.getWordPositions = function () {
1695
+ TextField.prototype.getWordPositions = function (tf) {
1729
1696
  /*console.log("this._iText", this._iText);
1730
1697
  console.log("this._width", this._width);
1731
1698
  console.log("this._height", this._height);*/
@@ -1751,11 +1718,11 @@ var TextField = /** @class */ (function (_super) {
1751
1718
  //console.log("this._wordWrap", this._wordWrap);
1752
1719
  // if we have autosize enabled, and no wordWrap, we can adjust the textfield width
1753
1720
  if (this._autoSize != TextFieldAutoSize.NONE && !this._wordWrap && this._textDirty) {
1754
- var maxSizeComplete = this._maxWidthLine + this._textFormat.indent
1755
- + this._textFormat.leftMargin + this._textFormat.rightMargin;
1721
+ var maxSizeComplete = this._maxWidthLine + tf.indent
1722
+ + tf.leftMargin + tf.rightMargin;
1756
1723
  this.adjustPositionForAutoSize(maxSizeComplete);
1757
1724
  }
1758
- var maxLineWidth = this._width - (this._textFormat.indent + this._textFormat.leftMargin + this._textFormat.rightMargin);
1725
+ var maxLineWidth = this._width - (tf.indent + tf.leftMargin + tf.rightMargin);
1759
1726
  var p = 0;
1760
1727
  var p_len = this._paragraph_textRuns_indices.length;
1761
1728
  linecnt = 0;
@@ -1916,11 +1883,11 @@ var TextField = /** @class */ (function (_super) {
1916
1883
  char_pos = 0;
1917
1884
  start_idx = word.start;
1918
1885
  c_len = start_idx + word.len;
1919
- var tf = this.tf_per_char[start_idx];
1920
- tf.font_table.initFontSize(tf.size);
1886
+ var tf_1 = this.tf_per_char[start_idx];
1887
+ tf_1.font_table.initFontSize(tf_1.size);
1921
1888
  //console.log("lineHeight", lineHeight);
1922
1889
  //console.log("lineHeight", tf.font_table.getLineHeight()+tf.leading);
1923
- var diff = (lineHeight) - (tf.font_table.getLineHeight() + tf.leading);
1890
+ var diff = (lineHeight) - (tf_1.font_table.getLineHeight() + tf_1.leading);
1924
1891
  diff = ((diff > 0) ? diff - 2 : 0);
1925
1892
  word.y = offsety + diff;
1926
1893
  for (c = start_idx; c < c_len; c++) {
@@ -2085,7 +2052,7 @@ var TextField = /** @class */ (function (_super) {
2085
2052
  var sampler = new ImageSampler();
2086
2053
  textShape.shape.style = new Style();
2087
2054
  if (textShape.format.material && this._textColor == 0) {
2088
- textShape.shape.material = this._textFormat.material;
2055
+ textShape.shape.material = this._textFormats[0].material;
2089
2056
  textShape.shape.style.addSamplerAt(sampler, textShape.shape.material.getTextureAt(0));
2090
2057
  textShape.shape.material.animateUVs = true;
2091
2058
  textShape.shape.style.uvMatrix =
@@ -2189,7 +2156,7 @@ var TextField = /** @class */ (function (_super) {
2189
2156
  else if (textShape.format.material && this._textColor == 0) {
2190
2157
  // used for textfields loaded from awd.
2191
2158
  // the material on the format uses textureAtlas from awd
2192
- textShape.shape.material = this._textFormat.material;
2159
+ textShape.shape.material = this._textFormats[0].material;
2193
2160
  textShape.shape.style.addSamplerAt(sampler, textShape.shape.material.getTextureAt(0));
2194
2161
  textShape.shape.material.animateUVs = true;
2195
2162
  textShape.shape.style.uvMatrix =
@@ -2500,12 +2467,11 @@ var TextField = /** @class */ (function (_super) {
2500
2467
  * specified is out of range.
2501
2468
  */
2502
2469
  TextField.prototype.getTextFormat = function (beginIndex, endIndex) {
2470
+ var _a;
2503
2471
  if (beginIndex === void 0) { beginIndex = -1; }
2504
2472
  if (endIndex === void 0) { endIndex = -1; }
2505
2473
  if (!this.tf_per_char || !this.tf_per_char.length) {
2506
- if (this._textFormat)
2507
- return this._textFormat.clone();
2508
- return new TextFormat();
2474
+ return ((_a = this._textFormats[0]) === null || _a === void 0 ? void 0 : _a.clone()) || new TextFormat();
2509
2475
  }
2510
2476
  if (beginIndex < 0)
2511
2477
  beginIndex = 0;
@@ -2940,8 +2906,8 @@ var TextField = /** @class */ (function (_super) {
2940
2906
  if (char == '')
2941
2907
  return;
2942
2908
  }
2943
- if (this.newTextFormat.font_table) {
2944
- var table = this.newTextFormat.font_table;
2909
+ if (this._newTextFormat.font_table) {
2910
+ var table = this._newTextFormat.font_table;
2945
2911
  var symbol = char.charCodeAt(0).toString();
2946
2912
  var exist = false;
2947
2913
  exist = (exist || table.hasChar(symbol));
@@ -3055,8 +3021,7 @@ var TextField = /** @class */ (function (_super) {
3055
3021
  newInstance.html = this.html;
3056
3022
  newInstance.width = this._width;
3057
3023
  newInstance.height = this._height;
3058
- if (this._textFormat)
3059
- newInstance.textFormat = this._textFormat.clone();
3024
+ newInstance.newTextFormat = this._newTextFormat.clone();
3060
3025
  newInstance.textColor = this._textColor;
3061
3026
  newInstance.border = this._border;
3062
3027
  newInstance.borderColor = this._borderColor;
@@ -15,8 +15,8 @@ var TextSprite = /** @class */ (function (_super) {
15
15
  _super.prototype._iInternalUpdate.call(this);
16
16
  var tf = this.parentTextField;
17
17
  //tf.reConstruct(true);
18
- if (tf._textFormat && !tf._textFormat.font_table.isAsset(TesselatedFontTable) && !tf._textFormat.material) {
19
- this.transform.colorTransform.color = (tf.textColor != null) ? tf.textColor : tf._textFormat.color;
18
+ if (tf._textFormats[0] && !tf._textFormats[0].font_table.isAsset(TesselatedFontTable) && !tf._textFormats[0].material) {
19
+ this.transform.colorTransform.color = (tf.textColor != null) ? tf.textColor : tf._textFormats[0].color;
20
20
  this._invalidateHierarchicalProperty(HierarchicalProperty.COLOR_TRANSFORM);
21
21
  }
22
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HTMLTextProcessor.d.ts","sourceRoot":"","sources":["../../../lib/text/HTMLTextProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAcjD,qBAAa,iBAAiB;IAC7B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAoB;WAC7B,GAAG;;IAUV,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAwP/D,OAAO,CAAC,+BAA+B;CAgJvC"}
1
+ {"version":3,"file":"HTMLTextProcessor.d.ts","sourceRoot":"","sources":["../../../lib/text/HTMLTextProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAcjD,qBAAa,iBAAiB;IAC7B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAoB;WAC7B,GAAG;;IAUV,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAyP/D,OAAO,CAAC,+BAA+B;CAgJvC"}
@@ -254,12 +254,13 @@ var HTMLTextProcessor = /** @class */ (function () {
254
254
  }
255
255
  }
256
256
  var textProps = { text: '' };
257
- target_tf._textFormats = [target_tf._textFormat];
257
+ var childFormat = target_tf.newTextFormat;
258
+ target_tf._textFormats = [childFormat];
258
259
  target_tf._textFormatsIdx = [0];
259
260
  var doc = parse(input);
260
261
  if (doc && doc.firstChild) {
261
262
  textProps.multiline = doc.firstChild.childNodes.length > 0;
262
- this.readHTMLTextPropertiesRecursive(target_tf, doc, textProps, target_tf._textFormat);
263
+ this.readHTMLTextPropertiesRecursive(target_tf, doc, textProps, childFormat);
263
264
  }
264
265
  if (textProps.text != '' && ((textProps.text.charCodeAt(textProps.text.length - 1) == 13)
265
266
  || (textProps.text.charCodeAt(textProps.text.length - 1) == 10))) {
package/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- console.debug('AwayJS - Scene - 0.13.274');
1
+ console.debug('AwayJS - Scene - 0.13.275');
2
2
 
3
3
  export { IDisplayObjectAdapter } from './lib/adapters/IDisplayObjectAdapter';
4
4
  export { IMovieClipAdapter } from './lib/adapters/IMovieClipAdapter';
@@ -257,14 +257,11 @@ export class TextField extends DisplayObjectContainer {
257
257
  private _textWidth: number;
258
258
  private _textHeight: number;
259
259
 
260
- private _charBoundaries: Rectangle;
261
260
  private _firstCharInParagraph: number;
262
261
  private _imageReference: DisplayObject
263
- private _lineMetrics: TextLineMetrics;
264
262
  private _paragraphLength: number;
265
263
 
266
- public _textFormat: TextFormat;
267
- public _newTextFormat: TextFormat;
264
+ public _newTextFormat: TextFormat = new TextFormat();
268
265
  public _textFormats: TextFormat[];
269
266
  public _textFormatsIdx: number[];
270
267
 
@@ -578,7 +575,7 @@ export class TextField extends DisplayObjectContainer {
578
575
 
579
576
  let x: number = 0;
580
577
  let y: number = 0;
581
- let tf: TextFormat = this.newTextFormat;
578
+ let tf: TextFormat = this._newTextFormat;
582
579
 
583
580
  if (this.char_positions_x.length == 0) {
584
581
  x = this.textOffsetX + (this._width / 2) + this._textWidth / 2;
@@ -1198,8 +1195,6 @@ export class TextField extends DisplayObjectContainer {
1198
1195
  this._textDirty = true;
1199
1196
  //console.log("set text", value, "on" , this);
1200
1197
 
1201
- this.newTextFormat = this._textFormats[this._textFormats.length - 1];
1202
-
1203
1198
  this.invalidate();
1204
1199
  }
1205
1200
 
@@ -1607,18 +1602,14 @@ export class TextField extends DisplayObjectContainer {
1607
1602
  }
1608
1603
 
1609
1604
  public get newTextFormat(): TextFormat {
1610
- // only use the newTextformat if it is available, otherwise fall back to textFormat
1611
- if (this._newTextFormat == null) {
1612
- this._newTextFormat = this._textFormat ? this._textFormat : new TextFormat();
1613
- }
1614
- return this._newTextFormat;
1605
+ return this._newTextFormat.clone();
1615
1606
  }
1616
1607
 
1617
1608
  public set newTextFormat(value: TextFormat) {
1618
1609
  if (!value)
1619
1610
  throw new Error('TextField::: set newTextFormat - no value!');
1620
1611
 
1621
- if (value.equal(this.newTextFormat))
1612
+ if (value.equal(this._newTextFormat))
1622
1613
  return;
1623
1614
 
1624
1615
  this._newTextFormat = value.clone();
@@ -1627,32 +1618,6 @@ export class TextField extends DisplayObjectContainer {
1627
1618
  this._textShapesDirty = true;
1628
1619
  }
1629
1620
 
1630
- public get textFormat(): TextFormat {
1631
- if (this._textFormat == null) {
1632
- this._textFormat = new TextFormat();
1633
- }
1634
- return this._textFormat;
1635
- }
1636
-
1637
- public set textFormat(value: TextFormat) {
1638
- if (!value)
1639
- throw new Error('TextField::: set textFormat - no value!');
1640
-
1641
- if (value.equal(this.textFormat))
1642
- return;
1643
-
1644
- this._textFormat = value.clone();
1645
-
1646
- this._textShapesDirty = true;
1647
- // this._positionsDirty = true;
1648
- // this._glyphsDirty = true;
1649
- // this._shapesDirty = true;
1650
- this._textDirty = true;
1651
- //this.reConstruct();
1652
-
1653
- this.invalidate();
1654
- }
1655
-
1656
1621
  /**
1657
1622
  * Indicates the horizontal scale(percentage) of the object as applied from
1658
1623
  * the registration point. The default registration point is(0,0). 1.0
@@ -1777,8 +1742,8 @@ export class TextField extends DisplayObjectContainer {
1777
1742
  public get textHeight(): number {
1778
1743
  this.reConstruct();
1779
1744
  if (this.type == TextFieldType.INPUT && this._iText == '') {
1780
- this.textFormat.font_table.initFontSize(this.textFormat.size);
1781
- return this.textFormat.font_table.getLineHeight();
1745
+ this._newTextFormat.font_table.initFontSize(this._newTextFormat.size);
1746
+ return this._newTextFormat.font_table.getLineHeight();
1782
1747
  }
1783
1748
 
1784
1749
  return this._textHeight;
@@ -2022,8 +1987,6 @@ export class TextField extends DisplayObjectContainer {
2022
1987
 
2023
1988
  this._resetParagraph();
2024
1989
  this._clearTextShapes();
2025
-
2026
- this._textFormat = null;
2027
1990
  }
2028
1991
 
2029
1992
  /**
@@ -2068,11 +2031,6 @@ export class TextField extends DisplayObjectContainer {
2068
2031
  this._maxScrollV = 0;
2069
2032
  this._maxWidthLine = 0;
2070
2033
 
2071
- // sometimes needed for TLFTextfields
2072
- // todo: cleanup usage of _textFormats vs _textFormats
2073
- if (!this._textFormat && this._textFormats.length > 0)
2074
- this._textFormat = this._textFormats[0];
2075
-
2076
2034
  this.buildParagraphs();
2077
2035
 
2078
2036
  //console.log("TextField buildParagraph", this.id, this._iText);
@@ -2093,9 +2051,9 @@ export class TextField extends DisplayObjectContainer {
2093
2051
 
2094
2052
  if (this._positionsDirty) {
2095
2053
  this._glyphsDirty = true;
2096
- if (this._iText != '' && this._textFormat != null) {
2054
+ if (this._iText != '' && this._textFormats[0] != null) {
2097
2055
  //console.log("TextField getWordPositions", this.id, this.words);
2098
- this.getWordPositions();
2056
+ this.getWordPositions(this._textFormats[0]);
2099
2057
  } else {
2100
2058
  // this is empty text, we need to reset the text-size
2101
2059
  this._textWidth = 0;
@@ -2106,8 +2064,8 @@ export class TextField extends DisplayObjectContainer {
2106
2064
 
2107
2065
  this._height = 4;
2108
2066
  if (this._type == TextFieldType.INPUT) {
2109
- this.newTextFormat.font_table.initFontSize(this.newTextFormat.size);
2110
- this._height = this.newTextFormat.font_table.getLineHeight() + 4;
2067
+ this._newTextFormat.font_table.initFontSize(this._newTextFormat.size);
2068
+ this._height = this._newTextFormat.font_table.getLineHeight() + 4;
2111
2069
  }
2112
2070
  }
2113
2071
  if (this._type == TextFieldType.INPUT)
@@ -2200,7 +2158,7 @@ export class TextField extends DisplayObjectContainer {
2200
2158
  }
2201
2159
 
2202
2160
  // clear paragraph data when clear
2203
- if (this._iText === '' || !this._textFormat) {
2161
+ if (this._iText === '' || !this._textFormats[0]) {
2204
2162
  this._resetParagraph();
2205
2163
  return;
2206
2164
  }
@@ -2435,7 +2393,7 @@ export class TextField extends DisplayObjectContainer {
2435
2393
  }
2436
2394
  }
2437
2395
 
2438
- private getWordPositions() {
2396
+ private getWordPositions(tf: TextFormat) {
2439
2397
  /*console.log("this._iText", this._iText);
2440
2398
  console.log("this._width", this._width);
2441
2399
  console.log("this._height", this._height);*/
@@ -2466,13 +2424,13 @@ export class TextField extends DisplayObjectContainer {
2466
2424
  // if we have autosize enabled, and no wordWrap, we can adjust the textfield width
2467
2425
  if (this._autoSize != TextFieldAutoSize.NONE && !this._wordWrap && this._textDirty) {
2468
2426
  const maxSizeComplete: number =
2469
- this._maxWidthLine + this._textFormat.indent
2470
- + this._textFormat.leftMargin + this._textFormat.rightMargin;
2427
+ this._maxWidthLine + tf.indent
2428
+ + tf.leftMargin + tf.rightMargin;
2471
2429
  this.adjustPositionForAutoSize(maxSizeComplete);
2472
2430
  }
2473
2431
 
2474
2432
  const maxLineWidth: number =
2475
- this._width - (this._textFormat.indent + this._textFormat.leftMargin + this._textFormat.rightMargin);
2433
+ this._width - (tf.indent + tf.leftMargin + tf.rightMargin);
2476
2434
 
2477
2435
  let p: number = 0;
2478
2436
  const p_len: number = this._paragraph_textRuns_indices.length;
@@ -2846,7 +2804,7 @@ export class TextField extends DisplayObjectContainer {
2846
2804
  const sampler: ImageSampler = new ImageSampler();
2847
2805
  textShape.shape.style = new Style();
2848
2806
  if (textShape.format.material && this._textColor == 0) {
2849
- textShape.shape.material = this._textFormat.material;
2807
+ textShape.shape.material = this._textFormats[0].material;
2850
2808
  textShape.shape.style.addSamplerAt(sampler, textShape.shape.material.getTextureAt(0));
2851
2809
  (<MaterialBase> textShape.shape.material).animateUVs = true;
2852
2810
  textShape.shape.style.uvMatrix =
@@ -2982,7 +2940,7 @@ export class TextField extends DisplayObjectContainer {
2982
2940
  } else if (textShape.format.material && this._textColor == 0) {
2983
2941
  // used for textfields loaded from awd.
2984
2942
  // the material on the format uses textureAtlas from awd
2985
- textShape.shape.material = this._textFormat.material;
2943
+ textShape.shape.material = this._textFormats[0].material;
2986
2944
  textShape.shape.style.addSamplerAt(sampler, textShape.shape.material.getTextureAt(0));
2987
2945
  (<MaterialBase> textShape.shape.material).animateUVs = true;
2988
2946
  textShape.shape.style.uvMatrix =
@@ -3327,9 +3285,7 @@ export class TextField extends DisplayObjectContainer {
3327
3285
  */
3328
3286
  public getTextFormat(beginIndex: number /*int*/ = -1, endIndex: number /*int*/ = -1): TextFormat {
3329
3287
  if (!this.tf_per_char || !this.tf_per_char.length) {
3330
- if (this._textFormat)
3331
- return this._textFormat.clone();
3332
- return new TextFormat();
3288
+ return this._textFormats[0]?.clone() || new TextFormat();
3333
3289
  }
3334
3290
  if (beginIndex < 0)
3335
3291
  beginIndex = 0;
@@ -3792,9 +3748,9 @@ export class TextField extends DisplayObjectContainer {
3792
3748
  if (char == '')
3793
3749
  return;
3794
3750
  }
3795
- if (this.newTextFormat.font_table) {
3751
+ if (this._newTextFormat.font_table) {
3796
3752
 
3797
- const table = this.newTextFormat.font_table;
3753
+ const table = this._newTextFormat.font_table;
3798
3754
  const symbol = char.charCodeAt(0).toString();
3799
3755
  let exist = false;
3800
3756
 
@@ -3917,8 +3873,7 @@ export class TextField extends DisplayObjectContainer {
3917
3873
  newInstance.html = this.html;
3918
3874
  newInstance.width = this._width;
3919
3875
  newInstance.height = this._height;
3920
- if (this._textFormat)
3921
- newInstance.textFormat = this._textFormat.clone();
3876
+ newInstance.newTextFormat = this._newTextFormat.clone();
3922
3877
  newInstance.textColor = this._textColor;
3923
3878
  newInstance.border = this._border;
3924
3879
  newInstance.borderColor = this._borderColor;
@@ -15,8 +15,8 @@ export class TextSprite extends Sprite {
15
15
  const tf: TextField = this.parentTextField;
16
16
  //tf.reConstruct(true);
17
17
 
18
- if (tf._textFormat && !tf._textFormat.font_table.isAsset(TesselatedFontTable) && !tf._textFormat.material) {
19
- this.transform.colorTransform.color = (tf.textColor != null) ? tf.textColor : tf._textFormat.color;
18
+ if (tf._textFormats[0] && !tf._textFormats[0].font_table.isAsset(TesselatedFontTable) && !tf._textFormats[0].material) {
19
+ this.transform.colorTransform.color = (tf.textColor != null) ? tf.textColor : tf._textFormats[0].color;
20
20
  this._invalidateHierarchicalProperty(HierarchicalProperty.COLOR_TRANSFORM);
21
21
  }
22
22
  }
@@ -247,13 +247,14 @@ export class HTMLTextProcessor {
247
247
  }
248
248
 
249
249
  const textProps: any = { text: '' };
250
+ const childFormat: TextFormat = target_tf.newTextFormat;
250
251
 
251
- target_tf._textFormats = [target_tf._textFormat];
252
+ target_tf._textFormats = [childFormat];
252
253
  target_tf._textFormatsIdx = [0];
253
254
  const doc = parse(input);
254
255
  if (doc && doc.firstChild) {
255
256
  textProps.multiline = doc.firstChild.childNodes.length > 0;
256
- this.readHTMLTextPropertiesRecursive(target_tf, doc, textProps, target_tf._textFormat);
257
+ this.readHTMLTextPropertiesRecursive(target_tf, doc, textProps, childFormat);
257
258
  }
258
259
  if (textProps.text != '' && ((textProps.text.charCodeAt(textProps.text.length - 1) == 13)
259
260
  || (textProps.text.charCodeAt(textProps.text.length - 1) == 10))) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awayjs/scene",
3
- "version": "0.13.274",
3
+ "version": "0.13.275",
4
4
  "description": "AwayJS scene classes",
5
5
  "main": "bundle/awayjs-scene.umd.js",
6
6
  "module": "dist/index.js",