@awayjs/scene 0.13.274 → 0.13.276
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/bundle/awayjs-scene.umd.js +2 -2
- package/bundle/awayjs-scene.umd.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/display/TextField.d.ts +0 -5
- package/dist/lib/display/TextField.d.ts.map +1 -1
- package/dist/lib/display/TextField.js +25 -60
- package/dist/lib/display/TextSprite.js +2 -2
- package/dist/lib/managers/MouseManager.d.ts +1 -1
- package/dist/lib/managers/MouseManager.d.ts.map +1 -1
- package/dist/lib/managers/MouseManager.js +6 -5
- package/dist/lib/text/HTMLTextProcessor.d.ts.map +1 -1
- package/dist/lib/text/HTMLTextProcessor.js +3 -2
- package/index.ts +1 -1
- package/lib/display/TextField.ts +21 -66
- package/lib/display/TextSprite.ts +2 -2
- package/lib/managers/MouseManager.ts +3 -3
- package/lib/text/HTMLTextProcessor.ts +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
console.debug('AwayJS - Scene - 0.13.
|
|
1
|
+
console.debug('AwayJS - Scene - 0.13.276');
|
|
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,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAI1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI9C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,UAAU,KAAK;IACd,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAA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;;OA4CG;IACI,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,GAAE,MAAmB,EAAE,QAAQ,GAAE,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.
|
|
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
|
-
|
|
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.
|
|
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.
|
|
1273
|
-
return this.
|
|
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.
|
|
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.
|
|
1473
|
-
this._height = this.
|
|
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.
|
|
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 +
|
|
1755
|
-
+
|
|
1721
|
+
var maxSizeComplete = this._maxWidthLine + tf.indent
|
|
1722
|
+
+ tf.leftMargin + tf.rightMargin;
|
|
1756
1723
|
this.adjustPositionForAutoSize(maxSizeComplete);
|
|
1757
1724
|
}
|
|
1758
|
-
var maxLineWidth = this._width - (
|
|
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
|
|
1920
|
-
|
|
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) - (
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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.
|
|
2944
|
-
var table = this.
|
|
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
|
-
|
|
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.
|
|
19
|
-
this.transform.colorTransform.color = (tf.textColor != null) ? tf.textColor : tf.
|
|
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
|
};
|
|
@@ -34,7 +34,7 @@ export declare class MouseManager {
|
|
|
34
34
|
private _focusOut;
|
|
35
35
|
private _useSoftkeyboard;
|
|
36
36
|
private _isAVM1Dragging;
|
|
37
|
-
startDragObject(collision?: PickingCollision): void;
|
|
37
|
+
startDragObject(collision?: PickingCollision, isAVM1Dragging?: boolean): void;
|
|
38
38
|
stopDragObject(): void;
|
|
39
39
|
get showCursor(): boolean;
|
|
40
40
|
set showCursor(value: boolean);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MouseManager.d.ts","sourceRoot":"","sources":["../../../lib/managers/MouseManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAM9E,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD;;;GAGG;AACH,qBAAa,YAAY;IACxB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAe;IACvC,OAAc,aAAa,EAAE,cAAc,CAAC;IAE5C,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAC,aAAa,CAAoC;IAChE,OAAO,CAAC,aAAa,CAAoD;IACzE,OAAO,CAAC,iBAAiB,CAAmC;IAE5D,OAAO,CAAC,YAAY,CAAU;IAE9B,OAAO,CAAC,mBAAmB,CAAmB;IAC9C,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,UAAU,CAAgB;IAE3B,aAAa,EAAE,OAAO,CAAM;IAEnC,OAAO,CAAC,cAAc,CAAe;IACrC,OAAO,CAAC,wBAAwB,CAAe;IAE/C,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,WAAW,CAA+B;IAElD,OAAO,CAAC,WAAW,CAA4B;IAE/C,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAI/B;IAED,OAAc,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAqBvD;IAED,OAAO,CAAC,QAA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,GAAG,IAAI;IAI7C,uBAAuB,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,GAAE,MAAU,GAAG,IAAI;IAyF9E,4BAA4B,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,GAAE,MAAU,GAAG,IAAI;IA4DtF,OAAO,CAAC,UAAU;IA2ClB,OAAO,CAAC,aAAa;IAmBd,SAAS,CAAC,KAAK,KAAA,GAAG,IAAI;IAgCtB,OAAO,CAAC,KAAK,KAAA,GAAG,IAAI;IAiCpB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;IAKjD,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAKnC,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAKpC,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAUtC,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;IAkBjD,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;IAkB/C,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAK5C,OAAO,CAAC,eAAe;CAyBvB"}
|
|
@@ -56,8 +56,9 @@ var MouseManager = /** @class */ (function () {
|
|
|
56
56
|
// supress context menu
|
|
57
57
|
container.addEventListener('contextmenu', function (e) { return e.preventDefault(); });
|
|
58
58
|
}
|
|
59
|
-
MouseManager.prototype.startDragObject = function (collision) {
|
|
60
|
-
|
|
59
|
+
MouseManager.prototype.startDragObject = function (collision, isAVM1Dragging) {
|
|
60
|
+
if (isAVM1Dragging === void 0) { isAVM1Dragging = false; }
|
|
61
|
+
this._isAVM1Dragging = isAVM1Dragging;
|
|
61
62
|
// we MUST overrider collision target if present, because draggable !== drag emitter
|
|
62
63
|
if (collision)
|
|
63
64
|
this._mouseDragCollision = collision;
|
|
@@ -216,7 +217,7 @@ var MouseManager = /** @class */ (function () {
|
|
|
216
217
|
}
|
|
217
218
|
};
|
|
218
219
|
MouseManager.prototype._fireMouseEventsInternal = function (pointerData, forcePicker) {
|
|
219
|
-
var _a
|
|
220
|
+
var _a;
|
|
220
221
|
if (forcePicker === void 0) { forcePicker = null; }
|
|
221
222
|
var collision;
|
|
222
223
|
if (forcePicker) {
|
|
@@ -251,7 +252,7 @@ var MouseManager = /** @class */ (function () {
|
|
|
251
252
|
else if (this._eventBubbling)
|
|
252
253
|
this._stage.dispatchEvent(event);
|
|
253
254
|
if (this._mouseDragCollision) {
|
|
254
|
-
this.setFocus(
|
|
255
|
+
this.setFocus(this._mouseDragCollision.rootNode);
|
|
255
256
|
this.setupAndDispatchEvent(this._dragStart, pointerData, this._mouseDragCollision);
|
|
256
257
|
}
|
|
257
258
|
}
|
|
@@ -326,7 +327,7 @@ var MouseManager = /** @class */ (function () {
|
|
|
326
327
|
pointerData.rollOut.commonAncestor = null;
|
|
327
328
|
pointerData.rollOver.commonAncestor = null;
|
|
328
329
|
var collisionNode = collision === null || collision === void 0 ? void 0 : collision.rootNode;
|
|
329
|
-
var prevCollisionNode = (
|
|
330
|
+
var prevCollisionNode = (_a = pointerData.prevCollision) === null || _a === void 0 ? void 0 : _a.rootNode;
|
|
330
331
|
if (collisionNode != prevCollisionNode) {
|
|
331
332
|
// If colliding object has changed, queue OVER and OUT events.
|
|
332
333
|
// If the mouse is dragged (mouse-down is hold), use DRAG_OVER and DRAG_OUT as well as MOUSE_OVER MOUSE_OUT
|
|
@@ -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;
|
|
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
|
-
|
|
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,
|
|
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
package/lib/display/TextField.ts
CHANGED
|
@@ -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
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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.
|
|
1781
|
-
return this.
|
|
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.
|
|
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.
|
|
2110
|
-
this._height = this.
|
|
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.
|
|
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 +
|
|
2470
|
-
+
|
|
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 - (
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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.
|
|
3751
|
+
if (this._newTextFormat.font_table) {
|
|
3796
3752
|
|
|
3797
|
-
const table = this.
|
|
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
|
-
|
|
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.
|
|
19
|
-
this.transform.colorTransform.color = (tf.textColor != null) ? tf.textColor : tf.
|
|
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
|
}
|