@awayjs/scene 0.13.254 → 0.13.256
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 +20 -6
- package/bundle/awayjs-scene.umd.js.map +1 -1
- package/bundle/awayjs-scene.umd.min.js.map +1 -1
- package/bundle/awayjs-scene.umd.min.js.map.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/display/Sprite.d.ts.map +1 -1
- package/dist/lib/display/Sprite.js +2 -0
- package/dist/lib/display/TextField.d.ts.map +1 -1
- package/dist/lib/display/TextField.js +17 -4
- package/index.ts +1 -1
- package/lib/display/Sprite.ts +4 -2
- package/lib/display/TextField.ts +20 -4
- package/package.json +1 -1
|
@@ -3399,7 +3399,8 @@ var Sprite = /** @class */ (function (_super) {
|
|
|
3399
3399
|
Sprite._sprites = new Array();
|
|
3400
3400
|
Sprite.assetType = '[asset Sprite]';
|
|
3401
3401
|
return Sprite;
|
|
3402
|
-
}(DisplayObjectContainer));
|
|
3402
|
+
}(DisplayObjectContainer));
|
|
3403
|
+
_awayjs_view.PartitionBase.registerAbstraction(_awayjs_view.EntityNode, Sprite);
|
|
3403
3404
|
|
|
3404
3405
|
var ONCE_EMIT_MORPH_ERROR = Object.create(null);
|
|
3405
3406
|
function once(obj, error) {
|
|
@@ -11363,7 +11364,6 @@ var TextField = /** @class */ (function (_super) {
|
|
|
11363
11364
|
this.maskChild.visible = false;
|
|
11364
11365
|
this._graphics.clear();
|
|
11365
11366
|
this.targetGraphics = this.textChild.graphics;
|
|
11366
|
-
return;
|
|
11367
11367
|
}
|
|
11368
11368
|
// only use masking if needed:
|
|
11369
11369
|
if (this._textWidth > this._width || this._textHeight > this._height) {
|
|
@@ -11665,9 +11665,23 @@ var TextField = /** @class */ (function (_super) {
|
|
|
11665
11665
|
this.scrollToCursor(startx + width, oldy + height);
|
|
11666
11666
|
};
|
|
11667
11667
|
TextField.prototype.drawBG = function () {
|
|
11668
|
-
this.
|
|
11669
|
-
|
|
11670
|
-
|
|
11668
|
+
//TODO this fixes masking using static textfields, but dynamic textfields still have problems. (see addChild(this.maskChild))
|
|
11669
|
+
if (this._background) {
|
|
11670
|
+
this._graphics.beginFill(this.backgroundColor, 1);
|
|
11671
|
+
this._graphics.drawRect(this.textOffsetX, this.textOffsetY, this.width, this.height);
|
|
11672
|
+
this._graphics.endFill();
|
|
11673
|
+
}
|
|
11674
|
+
//create a hitArea for the textfield
|
|
11675
|
+
var pickObject = this.pickObject;
|
|
11676
|
+
if (!pickObject) {
|
|
11677
|
+
this.pickObject = pickObject || (pickObject = new Sprite());
|
|
11678
|
+
pickObject.pickObjectFromTimeline = true;
|
|
11679
|
+
}
|
|
11680
|
+
var graphics = pickObject.graphics;
|
|
11681
|
+
graphics.clear();
|
|
11682
|
+
graphics.beginFill(0x000000, 1);
|
|
11683
|
+
graphics.drawRect(this.textOffsetX, this.textOffsetY, this.width, this.height);
|
|
11684
|
+
graphics.endFill();
|
|
11671
11685
|
};
|
|
11672
11686
|
TextField.prototype.drawBorder = function () {
|
|
11673
11687
|
var half_thickness_x = this.border ? 0.25 * this.internalScale.x : 0;
|
|
@@ -18178,7 +18192,7 @@ var Scene = /** @class */ (function () {
|
|
|
18178
18192
|
_awayjs_graphics.MaterialManager.materialClass = _awayjs_materials.MethodMaterial;
|
|
18179
18193
|
_awayjs_graphics.MaterialManager.textureClass = _awayjs_renderer.ImageTexture2D;
|
|
18180
18194
|
|
|
18181
|
-
console.debug('AwayJS - Scene - 0.13.
|
|
18195
|
+
console.debug('AwayJS - Scene - 0.13.256');
|
|
18182
18196
|
|
|
18183
18197
|
exports.Timeline = Timeline;
|
|
18184
18198
|
exports.ControllerBase = ControllerBase;
|