@awayjs/scene 0.13.245 → 0.13.247
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 +98 -124
- 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.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/base/Timeline.d.ts +4 -6
- package/dist/lib/base/Timeline.d.ts.map +1 -1
- package/dist/lib/base/Timeline.js +7 -19
- package/dist/lib/display/Billboard.d.ts +2 -2
- package/dist/lib/display/Billboard.d.ts.map +1 -1
- package/dist/lib/display/Billboard.js +2 -2
- package/dist/lib/display/Camera.d.ts +0 -1
- package/dist/lib/display/Camera.d.ts.map +1 -1
- package/dist/lib/display/Camera.js +0 -3
- package/dist/lib/display/DisplayObject.d.ts +31 -7
- package/dist/lib/display/DisplayObject.d.ts.map +1 -1
- package/dist/lib/display/DisplayObject.js +41 -7
- package/dist/lib/display/DisplayObjectContainer.d.ts +2 -24
- package/dist/lib/display/DisplayObjectContainer.d.ts.map +1 -1
- package/dist/lib/display/DisplayObjectContainer.js +5 -37
- package/dist/lib/display/LineSegment.d.ts +2 -2
- package/dist/lib/display/LineSegment.d.ts.map +1 -1
- package/dist/lib/display/LineSegment.js +2 -2
- package/dist/lib/display/MorphSprite.d.ts.map +1 -1
- package/dist/lib/display/MorphSprite.js +1 -3
- package/dist/lib/display/MovieClip.d.ts +2 -2
- package/dist/lib/display/MovieClip.d.ts.map +1 -1
- package/dist/lib/display/MovieClip.js +2 -5
- package/dist/lib/display/Skybox.d.ts +3 -2
- package/dist/lib/display/Skybox.d.ts.map +1 -1
- package/dist/lib/display/Skybox.js +3 -2
- package/dist/lib/display/Sprite.d.ts +2 -3
- package/dist/lib/display/Sprite.d.ts.map +1 -1
- package/dist/lib/display/Sprite.js +4 -12
- package/dist/lib/display/TextField.d.ts +2 -3
- package/dist/lib/display/TextField.d.ts.map +1 -1
- package/dist/lib/display/TextField.js +11 -18
- package/dist/lib/events/MouseEvent.d.ts +3 -3
- package/dist/lib/events/MouseEvent.d.ts.map +1 -1
- package/dist/lib/events/MouseEvent.js +3 -3
- package/dist/lib/factories/DefaultSceneGraphFactory.d.ts +7 -4
- package/dist/lib/factories/DefaultSceneGraphFactory.d.ts.map +1 -1
- package/dist/lib/factories/DefaultSceneGraphFactory.js +10 -4
- package/dist/lib/factories/ISceneGraphFactory.d.ts +7 -8
- package/dist/lib/factories/ISceneGraphFactory.d.ts.map +1 -1
- package/dist/lib/managers/MouseManager.d.ts.map +1 -1
- package/dist/lib/managers/MouseManager.js +7 -7
- package/index.ts +1 -2
- package/lib/base/Timeline.ts +9 -21
- package/lib/display/Billboard.ts +3 -2
- package/lib/display/Camera.ts +0 -4
- package/lib/display/DisplayObject.ts +48 -12
- package/lib/display/DisplayObjectContainer.ts +6 -38
- package/lib/display/LineSegment.ts +3 -3
- package/lib/display/MorphSprite.ts +2 -5
- package/lib/display/MovieClip.ts +4 -4
- package/lib/display/Skybox.ts +5 -3
- package/lib/display/Sprite.ts +5 -16
- package/lib/display/TextField.ts +12 -21
- package/lib/events/MouseEvent.ts +5 -5
- package/lib/factories/DefaultSceneGraphFactory.ts +12 -8
- package/lib/factories/ISceneGraphFactory.ts +9 -9
- package/lib/managers/MouseManager.ts +8 -9
- package/package.json +1 -1
- package/dist/lib/base/ISymbolDecoder.d.ts +0 -8
- package/dist/lib/base/ISymbolDecoder.d.ts.map +0 -1
- package/dist/lib/base/ISymbolDecoder.js +0 -0
- package/lib/base/ISymbolDecoder.ts +0 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@awayjs/core'), require('@awayjs/
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@awayjs/core', '@awayjs/
|
|
4
|
-
(factory((global.AwayjsScene = global.AwayjsScene || {}),global.AwayjsCore,global.
|
|
5
|
-
}(this, (function (exports,_awayjs_core,_awayjs_view,_awayjs_graphics,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@awayjs/core'), require('@awayjs/stage'), require('@awayjs/view'), require('@awayjs/graphics'), require('@awayjs/renderer'), require('@awayjs/materials'), require('node-html-parser')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@awayjs/core', '@awayjs/stage', '@awayjs/view', '@awayjs/graphics', '@awayjs/renderer', '@awayjs/materials', 'node-html-parser'], factory) :
|
|
4
|
+
(factory((global.AwayjsScene = global.AwayjsScene || {}),global.AwayjsCore,global.AwayjsStage,global.AwayjsView,global.AwayjsGraphics,global.AwayjsRenderer,global.AwayjsMaterials,global.nodeHtmlParser));
|
|
5
|
+
}(this, (function (exports,_awayjs_core,_awayjs_stage,_awayjs_view,_awayjs_graphics,_awayjs_renderer,_awayjs_materials,nodeHtmlParser) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1290,6 +1290,7 @@ var DisplayObject = /** @class */ (function (_super) {
|
|
|
1290
1290
|
*/
|
|
1291
1291
|
function DisplayObject() {
|
|
1292
1292
|
var _this = _super.call(this) || this;
|
|
1293
|
+
_this._mouseChildren = true;
|
|
1293
1294
|
_this._sessionID = -1;
|
|
1294
1295
|
_this._avmDepthID = -1;
|
|
1295
1296
|
//public _implicitPartition: PartitionBase;
|
|
@@ -2450,6 +2451,40 @@ var DisplayObject = /** @class */ (function (_super) {
|
|
|
2450
2451
|
enumerable: true,
|
|
2451
2452
|
configurable: true
|
|
2452
2453
|
});
|
|
2454
|
+
Object.defineProperty(DisplayObject.prototype, "mouseChildren", {
|
|
2455
|
+
/**
|
|
2456
|
+
* Determines whether or not the children of the object are mouse, or user
|
|
2457
|
+
* input device, enabled. If an object is enabled, a user can interact with
|
|
2458
|
+
* it by using a mouse or user input device. The default is
|
|
2459
|
+
* <code>true</code>.
|
|
2460
|
+
*
|
|
2461
|
+
* <p>This property is useful when you create a button with an instance of
|
|
2462
|
+
* the Sprite class(instead of using the SimpleButton class). When you use a
|
|
2463
|
+
* Sprite instance to create a button, you can choose to decorate the button
|
|
2464
|
+
* by using the <code>addChild()</code> method to add additional Sprite
|
|
2465
|
+
* instances. This process can cause unexpected behavior with mouse events
|
|
2466
|
+
* because the Sprite instances you add as children can become the target
|
|
2467
|
+
* object of a mouse event when you expect the parent instance to be the
|
|
2468
|
+
* target object. To ensure that the parent instance serves as the target
|
|
2469
|
+
* objects for mouse events, you can set the <code>mouseChildren</code>
|
|
2470
|
+
* property of the parent instance to <code>false</code>.</p>
|
|
2471
|
+
*
|
|
2472
|
+
* <p> No event is dispatched by setting this property. You must use the
|
|
2473
|
+
* <code>addEventListener()</code> method to create interactive
|
|
2474
|
+
* functionality.</p>
|
|
2475
|
+
*/
|
|
2476
|
+
get: function () {
|
|
2477
|
+
return this._mouseChildren;
|
|
2478
|
+
},
|
|
2479
|
+
set: function (value) {
|
|
2480
|
+
if (this._mouseChildren == value)
|
|
2481
|
+
return;
|
|
2482
|
+
this._mouseChildren = value;
|
|
2483
|
+
this._invalidateHierarchicalProperty(_awayjs_view.HierarchicalProperty.MOUSE_ENABLED);
|
|
2484
|
+
},
|
|
2485
|
+
enumerable: true,
|
|
2486
|
+
configurable: true
|
|
2487
|
+
});
|
|
2453
2488
|
Object.defineProperty(DisplayObject.prototype, "x", {
|
|
2454
2489
|
/**
|
|
2455
2490
|
* Indicates the <i>x</i> coordinate of the DisplayObject instance relative
|
|
@@ -2531,9 +2566,10 @@ var DisplayObject = /** @class */ (function (_super) {
|
|
|
2531
2566
|
DisplayObject.prototype.advanceFrame = function () {
|
|
2532
2567
|
//default to do nothing
|
|
2533
2568
|
};
|
|
2534
|
-
DisplayObject.prototype.
|
|
2535
|
-
return
|
|
2569
|
+
DisplayObject.prototype.getEntity = function () {
|
|
2570
|
+
return;
|
|
2536
2571
|
};
|
|
2572
|
+
DisplayObject.prototype._initNode = function (node) { };
|
|
2537
2573
|
/**
|
|
2538
2574
|
*
|
|
2539
2575
|
*/
|
|
@@ -2547,6 +2583,7 @@ var DisplayObject = /** @class */ (function (_super) {
|
|
|
2547
2583
|
displayObject.defaultBoundingVolume = this._defaultBoundingVolume;
|
|
2548
2584
|
if (this._registrationMatrix3D)
|
|
2549
2585
|
displayObject._registrationMatrix3D = this._registrationMatrix3D.clone();
|
|
2586
|
+
displayObject.mouseChildren = this._mouseChildren;
|
|
2550
2587
|
displayObject.material = this._material;
|
|
2551
2588
|
displayObject.style = this._style;
|
|
2552
2589
|
displayObject.pickObject = this._pickObject;
|
|
@@ -2652,11 +2689,8 @@ var DisplayObject = /** @class */ (function (_super) {
|
|
|
2652
2689
|
DisplayObject.prototype._invalidateHierarchicalProperty = function (propDirty) {
|
|
2653
2690
|
this.dispatchEvent(new _awayjs_view.HeirarchicalEvent(_awayjs_view.HeirarchicalEvent.INVALIDATE_PROPERTY, propDirty));
|
|
2654
2691
|
};
|
|
2655
|
-
DisplayObject.prototype.
|
|
2656
|
-
this.dispatchEvent(new _awayjs_view.ContainerEvent(_awayjs_view.ContainerEvent.
|
|
2657
|
-
};
|
|
2658
|
-
DisplayObject.prototype._clearEntity = function () {
|
|
2659
|
-
this.dispatchEvent(new _awayjs_view.ContainerEvent(_awayjs_view.ContainerEvent.CLEAR_ENTITY, this));
|
|
2692
|
+
DisplayObject.prototype._updateEntity = function () {
|
|
2693
|
+
this.dispatchEvent(new _awayjs_view.ContainerEvent(_awayjs_view.ContainerEvent.UPDATE_ENTITY, this));
|
|
2660
2694
|
};
|
|
2661
2695
|
/**
|
|
2662
2696
|
*
|
|
@@ -2779,7 +2813,6 @@ var DisplayObjectContainer = /** @class */ (function (_super) {
|
|
|
2779
2813
|
*/
|
|
2780
2814
|
function DisplayObjectContainer() {
|
|
2781
2815
|
var _this = _super.call(this) || this;
|
|
2782
|
-
_this._mouseChildren = true;
|
|
2783
2816
|
_this._children = new Array();
|
|
2784
2817
|
_this.doingSwap = false;
|
|
2785
2818
|
_this.tabChildren = false;
|
|
@@ -2795,40 +2828,6 @@ var DisplayObjectContainer = /** @class */ (function (_super) {
|
|
|
2795
2828
|
enumerable: true,
|
|
2796
2829
|
configurable: true
|
|
2797
2830
|
});
|
|
2798
|
-
Object.defineProperty(DisplayObjectContainer.prototype, "mouseChildren", {
|
|
2799
|
-
/**
|
|
2800
|
-
* Determines whether or not the children of the object are mouse, or user
|
|
2801
|
-
* input device, enabled. If an object is enabled, a user can interact with
|
|
2802
|
-
* it by using a mouse or user input device. The default is
|
|
2803
|
-
* <code>true</code>.
|
|
2804
|
-
*
|
|
2805
|
-
* <p>This property is useful when you create a button with an instance of
|
|
2806
|
-
* the Sprite class(instead of using the SimpleButton class). When you use a
|
|
2807
|
-
* Sprite instance to create a button, you can choose to decorate the button
|
|
2808
|
-
* by using the <code>addChild()</code> method to add additional Sprite
|
|
2809
|
-
* instances. This process can cause unexpected behavior with mouse events
|
|
2810
|
-
* because the Sprite instances you add as children can become the target
|
|
2811
|
-
* object of a mouse event when you expect the parent instance to be the
|
|
2812
|
-
* target object. To ensure that the parent instance serves as the target
|
|
2813
|
-
* objects for mouse events, you can set the <code>mouseChildren</code>
|
|
2814
|
-
* property of the parent instance to <code>false</code>.</p>
|
|
2815
|
-
*
|
|
2816
|
-
* <p> No event is dispatched by setting this property. You must use the
|
|
2817
|
-
* <code>addEventListener()</code> method to create interactive
|
|
2818
|
-
* functionality.</p>
|
|
2819
|
-
*/
|
|
2820
|
-
get: function () {
|
|
2821
|
-
return this._mouseChildren;
|
|
2822
|
-
},
|
|
2823
|
-
set: function (value) {
|
|
2824
|
-
if (this._mouseChildren == value)
|
|
2825
|
-
return;
|
|
2826
|
-
this._mouseChildren = value;
|
|
2827
|
-
this._invalidateHierarchicalProperty(_awayjs_view.HierarchicalProperty.MOUSE_ENABLED);
|
|
2828
|
-
},
|
|
2829
|
-
enumerable: true,
|
|
2830
|
-
configurable: true
|
|
2831
|
-
});
|
|
2832
2831
|
Object.defineProperty(DisplayObjectContainer.prototype, "animator", {
|
|
2833
2832
|
/**
|
|
2834
2833
|
* Defines the animator of the display object. Default value is <code>null</code>.
|
|
@@ -2949,7 +2948,6 @@ var DisplayObjectContainer = /** @class */ (function (_super) {
|
|
|
2949
2948
|
};
|
|
2950
2949
|
DisplayObjectContainer.prototype.copyTo = function (newInstance) {
|
|
2951
2950
|
_super.prototype.copyTo.call(this, newInstance);
|
|
2952
|
-
newInstance.mouseChildren = this._mouseChildren;
|
|
2953
2951
|
if (this._animator)
|
|
2954
2952
|
newInstance.animator = this._animator.clone();
|
|
2955
2953
|
var len = this._children.length;
|
|
@@ -3230,6 +3228,10 @@ var DisplayObjectContainer = /** @class */ (function (_super) {
|
|
|
3230
3228
|
}
|
|
3231
3229
|
}
|
|
3232
3230
|
};
|
|
3231
|
+
DisplayObjectContainer.prototype._initNode = function (node) {
|
|
3232
|
+
for (var i = 0; i < this._children.length; ++i)
|
|
3233
|
+
node.addChildAt(this._children[i], i);
|
|
3234
|
+
};
|
|
3233
3235
|
/**
|
|
3234
3236
|
* @private
|
|
3235
3237
|
*
|
|
@@ -3268,7 +3270,6 @@ var Sprite = /** @class */ (function (_super) {
|
|
|
3268
3270
|
if (graphics === void 0) { graphics = null; }
|
|
3269
3271
|
if (material === void 0) { material = null; }
|
|
3270
3272
|
var _this = _super.call(this) || this;
|
|
3271
|
-
_this._isEntity = false;
|
|
3272
3273
|
_this._onGraphicsInvalidateDelegate = function (event) { return _this._onGraphicsInvalidate(event); };
|
|
3273
3274
|
_this.graphics = graphics || _awayjs_graphics.Graphics.getGraphics();
|
|
3274
3275
|
_this.material = material;
|
|
@@ -3319,9 +3320,8 @@ var Sprite = /** @class */ (function (_super) {
|
|
|
3319
3320
|
configurable: true
|
|
3320
3321
|
});
|
|
3321
3322
|
Sprite.prototype._setGraphics = function (value) {
|
|
3322
|
-
if (this._graphics == value)
|
|
3323
|
+
if (this._graphics == value)
|
|
3323
3324
|
return;
|
|
3324
|
-
}
|
|
3325
3325
|
if (this._graphics) {
|
|
3326
3326
|
this._graphics.removeEventListener(_awayjs_core.AssetEvent.INVALIDATE, this._onGraphicsInvalidateDelegate);
|
|
3327
3327
|
this._graphics.usages--;
|
|
@@ -3330,7 +3330,7 @@ var Sprite = /** @class */ (function (_super) {
|
|
|
3330
3330
|
}
|
|
3331
3331
|
this._graphics = value;
|
|
3332
3332
|
this._graphics.usages++;
|
|
3333
|
-
this.
|
|
3333
|
+
this.invalidate();
|
|
3334
3334
|
};
|
|
3335
3335
|
Sprite.prototype._setParent = function (parent) {
|
|
3336
3336
|
_super.prototype._setParent.call(this, parent);
|
|
@@ -3343,8 +3343,8 @@ var Sprite = /** @class */ (function (_super) {
|
|
|
3343
3343
|
// console.log('Restore cache');
|
|
3344
3344
|
// }
|
|
3345
3345
|
};
|
|
3346
|
-
Sprite.prototype.
|
|
3347
|
-
return (this._graphics
|
|
3346
|
+
Sprite.prototype.getEntity = function () {
|
|
3347
|
+
return (this._graphics.count > 0) ? this : null;
|
|
3348
3348
|
};
|
|
3349
3349
|
/**
|
|
3350
3350
|
* @inheritDoc
|
|
@@ -3400,12 +3400,6 @@ var Sprite = /** @class */ (function (_super) {
|
|
|
3400
3400
|
* @private
|
|
3401
3401
|
*/
|
|
3402
3402
|
Sprite.prototype._onGraphicsInvalidate = function (_event) {
|
|
3403
|
-
var isEntity = this.isEntity();
|
|
3404
|
-
if (this._isEntity != isEntity) {
|
|
3405
|
-
if (!isEntity)
|
|
3406
|
-
this._clearEntity();
|
|
3407
|
-
this._isEntity = isEntity;
|
|
3408
|
-
}
|
|
3409
3403
|
this.invalidate();
|
|
3410
3404
|
};
|
|
3411
3405
|
/**
|
|
@@ -3469,11 +3463,9 @@ var MorphSprite = /** @class */ (function (_super) {
|
|
|
3469
3463
|
//if (!this._graphics.usages)
|
|
3470
3464
|
// this.graphics.dispose();
|
|
3471
3465
|
}
|
|
3472
|
-
if (!this._graphics)
|
|
3466
|
+
if (!this._graphics)
|
|
3473
3467
|
this._graphics = _awayjs_graphics.Graphics.getGraphics();
|
|
3474
|
-
}
|
|
3475
3468
|
this._graphics.copyFrom(value);
|
|
3476
|
-
this._onGraphicsInvalidate(null);
|
|
3477
3469
|
};
|
|
3478
3470
|
Object.defineProperty(MorphSprite.prototype, "assetType", {
|
|
3479
3471
|
get: function () {
|
|
@@ -3713,7 +3705,8 @@ function mapBlendIdToString(id) {
|
|
|
3713
3705
|
return BLEND_MODES[id] || BLEND_MODES[1];
|
|
3714
3706
|
}
|
|
3715
3707
|
var Timeline = /** @class */ (function () {
|
|
3716
|
-
function Timeline() {
|
|
3708
|
+
function Timeline(factory) {
|
|
3709
|
+
this.factory = factory;
|
|
3717
3710
|
this._update_indices = [];
|
|
3718
3711
|
this._update_frames = [];
|
|
3719
3712
|
this.isButton = false;
|
|
@@ -3731,16 +3724,6 @@ var Timeline = /** @class */ (function () {
|
|
|
3731
3724
|
this._framescripts_translated = {};
|
|
3732
3725
|
this.keyframe_to_frameidx = {};
|
|
3733
3726
|
}
|
|
3734
|
-
Object.defineProperty(Timeline.prototype, "symbolDecoder", {
|
|
3735
|
-
get: function () {
|
|
3736
|
-
return this._symbolDecoder;
|
|
3737
|
-
},
|
|
3738
|
-
set: function (value) {
|
|
3739
|
-
this._symbolDecoder = value;
|
|
3740
|
-
},
|
|
3741
|
-
enumerable: true,
|
|
3742
|
-
configurable: true
|
|
3743
|
-
});
|
|
3744
3727
|
Timeline.prototype.resetScripts = function () {
|
|
3745
3728
|
this._framescripts = {};
|
|
3746
3729
|
this._framescripts_translated = {};
|
|
@@ -3749,9 +3732,6 @@ var Timeline = /** @class */ (function () {
|
|
|
3749
3732
|
prepares
|
|
3750
3733
|
*/
|
|
3751
3734
|
Timeline.prototype.init = function () {
|
|
3752
|
-
if (!this._symbolDecoder) {
|
|
3753
|
-
console.warn('[Timeline] - init - no _symbolDecoder is set');
|
|
3754
|
-
}
|
|
3755
3735
|
if ((this.frame_command_indices == null) || (this.frame_recipe == null) || (this.keyframe_durations == null)) {
|
|
3756
3736
|
return;
|
|
3757
3737
|
}
|
|
@@ -3829,7 +3809,7 @@ var Timeline = /** @class */ (function () {
|
|
|
3829
3809
|
if (checkForTranslation && !this._framescripts_translated[frame_idx]) {
|
|
3830
3810
|
// todo: cleanup so we can retrieve className of target_mc without hacks
|
|
3831
3811
|
var name_1 = target_mc.className ? target_mc.className : target_mc.name;
|
|
3832
|
-
this._framescripts[frame_idx] = this.
|
|
3812
|
+
this._framescripts[frame_idx] = this.factory.createFrameScripts(this._framescripts[frame_idx], frame_idx, name_1, target_mc.id);
|
|
3833
3813
|
this._framescripts_translated[frame_idx] = true;
|
|
3834
3814
|
}
|
|
3835
3815
|
return this._framescripts[frame_idx];
|
|
@@ -3847,7 +3827,7 @@ var Timeline = /** @class */ (function () {
|
|
|
3847
3827
|
return this.keyframe_indices[frame_index];
|
|
3848
3828
|
};
|
|
3849
3829
|
Timeline.prototype.getChildInstance = function (symbolID, sessionID) {
|
|
3850
|
-
return this.
|
|
3830
|
+
return this.factory.createChildInstanceForTimeline(this, symbolID, sessionID);
|
|
3851
3831
|
};
|
|
3852
3832
|
Timeline.prototype.extractHitArea = function (target_mc) {
|
|
3853
3833
|
target_mc.reset(false);
|
|
@@ -4032,7 +4012,7 @@ var Timeline = /** @class */ (function () {
|
|
|
4032
4012
|
console.warn('[Timeline] - add_childs_continous - could not find child-id in child_stream for idx', idx, this.add_child_stream);
|
|
4033
4013
|
continue;
|
|
4034
4014
|
}
|
|
4035
|
-
var childAsset = this.
|
|
4015
|
+
var childAsset = this.factory.createChildInstanceForTimeline(this, this.add_child_stream[idx + 2], this.add_child_stream[idx]);
|
|
4036
4016
|
target_mc.adapter.addTimelineChildAtDepth(childAsset, this.add_child_stream[idx + 1]);
|
|
4037
4017
|
}
|
|
4038
4018
|
};
|
|
@@ -5135,8 +5115,8 @@ var Billboard = /** @class */ (function (_super) {
|
|
|
5135
5115
|
Billboard.prototype.advanceFrame = function () {
|
|
5136
5116
|
//override for billboard
|
|
5137
5117
|
};
|
|
5138
|
-
Billboard.prototype.
|
|
5139
|
-
return
|
|
5118
|
+
Billboard.prototype.getEntity = function () {
|
|
5119
|
+
return this;
|
|
5140
5120
|
};
|
|
5141
5121
|
/**
|
|
5142
5122
|
* @inheritDoc
|
|
@@ -5420,9 +5400,6 @@ var Camera = /** @class */ (function (_super) {
|
|
|
5420
5400
|
_this.z = -1000;
|
|
5421
5401
|
return _this;
|
|
5422
5402
|
}
|
|
5423
|
-
Camera.prototype.isEntity = function () {
|
|
5424
|
-
return true;
|
|
5425
|
-
};
|
|
5426
5403
|
Object.defineProperty(Camera.prototype, "assetType", {
|
|
5427
5404
|
//@override
|
|
5428
5405
|
get: function () {
|
|
@@ -5576,8 +5553,8 @@ var LineSegment = /** @class */ (function (_super) {
|
|
|
5576
5553
|
enumerable: true,
|
|
5577
5554
|
configurable: true
|
|
5578
5555
|
});
|
|
5579
|
-
LineSegment.prototype.
|
|
5580
|
-
return
|
|
5556
|
+
LineSegment.prototype.getEntity = function () {
|
|
5557
|
+
return this;
|
|
5581
5558
|
};
|
|
5582
5559
|
LineSegment.prototype._acceptTraverser = function (traverser) {
|
|
5583
5560
|
traverser.applyTraversable(this);
|
|
@@ -6740,7 +6717,7 @@ var MouseEvent$1 = /** @class */ (function (_super) {
|
|
|
6740
6717
|
result.screenX = this.screenX;
|
|
6741
6718
|
result.screenY = this.screenY;
|
|
6742
6719
|
result.view = this.view;
|
|
6743
|
-
result.
|
|
6720
|
+
result.containerNode = this.containerNode;
|
|
6744
6721
|
result.rootNode = this.rootNode;
|
|
6745
6722
|
result.traversable = this.traversable;
|
|
6746
6723
|
result.material = this.material;
|
|
@@ -6761,7 +6738,7 @@ var MouseEvent$1 = /** @class */ (function (_super) {
|
|
|
6761
6738
|
* The position in scene space where the event took place
|
|
6762
6739
|
*/
|
|
6763
6740
|
get: function () {
|
|
6764
|
-
return this.
|
|
6741
|
+
return this.containerNode.getMatrix3D().transformVector(this.position);
|
|
6765
6742
|
},
|
|
6766
6743
|
enumerable: true,
|
|
6767
6744
|
configurable: true
|
|
@@ -6771,7 +6748,7 @@ var MouseEvent$1 = /** @class */ (function (_super) {
|
|
|
6771
6748
|
* The normal in scene space where the event took place
|
|
6772
6749
|
*/
|
|
6773
6750
|
get: function () {
|
|
6774
|
-
var sceneNormal = this.
|
|
6751
|
+
var sceneNormal = this.containerNode.getMatrix3D().deltaTransformVector(this.normal);
|
|
6775
6752
|
sceneNormal.normalize();
|
|
6776
6753
|
return sceneNormal;
|
|
6777
6754
|
},
|
|
@@ -6870,7 +6847,6 @@ var MouseEvent$1 = /** @class */ (function (_super) {
|
|
|
6870
6847
|
var MovieClip = /** @class */ (function (_super) {
|
|
6871
6848
|
__extends(MovieClip, _super);
|
|
6872
6849
|
function MovieClip(timeline, spriteMode) {
|
|
6873
|
-
if (timeline === void 0) { timeline = null; }
|
|
6874
6850
|
if (spriteMode === void 0) { spriteMode = false; }
|
|
6875
6851
|
var _this = _super.call(this) || this;
|
|
6876
6852
|
_this.symbolID = 0;
|
|
@@ -6945,7 +6921,7 @@ var MovieClip = /** @class */ (function (_super) {
|
|
|
6945
6921
|
_this._onDragOut = function (_event) {
|
|
6946
6922
|
_this.currentFrameIndex = 1;
|
|
6947
6923
|
};
|
|
6948
|
-
_this._timeline = timeline
|
|
6924
|
+
_this._timeline = timeline;
|
|
6949
6925
|
if (spriteMode) {
|
|
6950
6926
|
_this.transformToSprite();
|
|
6951
6927
|
}
|
|
@@ -6956,10 +6932,9 @@ var MovieClip = /** @class */ (function (_super) {
|
|
|
6956
6932
|
MovieClip._activeSoundsOwners.clear();
|
|
6957
6933
|
};
|
|
6958
6934
|
MovieClip.getNewMovieClip = function (timeline) {
|
|
6959
|
-
if (timeline === void 0) { timeline = null; }
|
|
6960
6935
|
if (MovieClip._movieClips.length) {
|
|
6961
6936
|
var movieClip = MovieClip._movieClips.pop();
|
|
6962
|
-
movieClip.timeline = timeline
|
|
6937
|
+
movieClip.timeline = timeline;
|
|
6963
6938
|
movieClip.graphics = _awayjs_graphics.Graphics.getGraphics();
|
|
6964
6939
|
return movieClip;
|
|
6965
6940
|
}
|
|
@@ -7985,6 +7960,7 @@ var Skybox = /** @class */ (function (_super) {
|
|
|
7985
7960
|
_this.imageRect = false;
|
|
7986
7961
|
_this.useColorTransform = false;
|
|
7987
7962
|
_this.alphaThreshold = 0;
|
|
7963
|
+
_this.alphaBlending = true;
|
|
7988
7964
|
_this._onTextureInvalidateDelegate = function (event) { return _this.onTextureInvalidate(event); };
|
|
7989
7965
|
_this._owners = [_this];
|
|
7990
7966
|
_this.style = new _awayjs_renderer.Style();
|
|
@@ -8069,8 +8045,8 @@ var Skybox = /** @class */ (function (_super) {
|
|
|
8069
8045
|
Skybox.prototype.getTextureAt = function (index) {
|
|
8070
8046
|
return this._textures[index];
|
|
8071
8047
|
};
|
|
8072
|
-
Skybox.prototype.
|
|
8073
|
-
return
|
|
8048
|
+
Skybox.prototype.getEntity = function () {
|
|
8049
|
+
return this;
|
|
8074
8050
|
};
|
|
8075
8051
|
Object.defineProperty(Skybox.prototype, "assetType", {
|
|
8076
8052
|
get: function () {
|
|
@@ -11302,7 +11278,6 @@ var TextField = /** @class */ (function (_super) {
|
|
|
11302
11278
|
*/
|
|
11303
11279
|
function TextField() {
|
|
11304
11280
|
var _this = _super.call(this) || this;
|
|
11305
|
-
_this._isEntity = false;
|
|
11306
11281
|
_this.textOffsetX = 0;
|
|
11307
11282
|
_this.textOffsetY = 0;
|
|
11308
11283
|
_this._selectionBeginIndex = 0;
|
|
@@ -11490,7 +11465,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
11490
11465
|
// }
|
|
11491
11466
|
this.setSelection(0, 0);
|
|
11492
11467
|
this._glyphsDirty = true;
|
|
11493
|
-
this.
|
|
11468
|
+
this._updateEntity();
|
|
11494
11469
|
};
|
|
11495
11470
|
TextField.prototype.enableInput = function (enable) {
|
|
11496
11471
|
if (enable === void 0) { enable = true; }
|
|
@@ -11862,12 +11837,6 @@ var TextField = /** @class */ (function (_super) {
|
|
|
11862
11837
|
* @private
|
|
11863
11838
|
*/
|
|
11864
11839
|
TextField.prototype._onGraphicsInvalidate = function (event) {
|
|
11865
|
-
var isEntity = this.isEntity();
|
|
11866
|
-
if (this._isEntity != isEntity) {
|
|
11867
|
-
if (!isEntity)
|
|
11868
|
-
this._clearEntity();
|
|
11869
|
-
this._isEntity = isEntity;
|
|
11870
|
-
}
|
|
11871
11840
|
this.invalidate();
|
|
11872
11841
|
};
|
|
11873
11842
|
Object.defineProperty(TextField.prototype, "assetType", {
|
|
@@ -12010,7 +11979,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
12010
11979
|
if (this._autoSize != TextFieldAutoSize.NONE)
|
|
12011
11980
|
this.invalidate();
|
|
12012
11981
|
else
|
|
12013
|
-
this.
|
|
11982
|
+
this._updateEntity();
|
|
12014
11983
|
this.newTextFormat = this._textFormats[this._textFormats.length - 1];
|
|
12015
11984
|
},
|
|
12016
11985
|
enumerable: true,
|
|
@@ -12244,7 +12213,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
12244
12213
|
if (this._autoSize != TextFieldAutoSize.NONE)
|
|
12245
12214
|
this.invalidate();
|
|
12246
12215
|
else
|
|
12247
|
-
this.
|
|
12216
|
+
this._updateEntity();
|
|
12248
12217
|
},
|
|
12249
12218
|
enumerable: true,
|
|
12250
12219
|
configurable: true
|
|
@@ -12260,7 +12229,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
12260
12229
|
if (this._autoSize != TextFieldAutoSize.NONE)
|
|
12261
12230
|
this.invalidate();
|
|
12262
12231
|
else
|
|
12263
|
-
this.
|
|
12232
|
+
this._updateEntity();
|
|
12264
12233
|
};
|
|
12265
12234
|
Object.defineProperty(TextField.prototype, "newTextFormat", {
|
|
12266
12235
|
get: function () {
|
|
@@ -12301,7 +12270,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
12301
12270
|
if (this._autoSize != TextFieldAutoSize.NONE)
|
|
12302
12271
|
this.invalidate();
|
|
12303
12272
|
else
|
|
12304
|
-
this.
|
|
12273
|
+
this._updateEntity();
|
|
12305
12274
|
},
|
|
12306
12275
|
enumerable: true,
|
|
12307
12276
|
configurable: true
|
|
@@ -12403,7 +12372,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
12403
12372
|
this._implicitPartition.invalidateEntity(this);
|
|
12404
12373
|
//}*/
|
|
12405
12374
|
this._glyphsDirty = true;
|
|
12406
|
-
this.
|
|
12375
|
+
this._updateEntity();
|
|
12407
12376
|
},
|
|
12408
12377
|
enumerable: true,
|
|
12409
12378
|
configurable: true
|
|
@@ -12465,7 +12434,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
12465
12434
|
}
|
|
12466
12435
|
this._type = value;
|
|
12467
12436
|
this._textDirty = true;
|
|
12468
|
-
this.
|
|
12437
|
+
this._updateEntity();
|
|
12469
12438
|
if (value == TextFieldType.INPUT) {
|
|
12470
12439
|
//this._selectable=true;
|
|
12471
12440
|
this.enableInput(true);
|
|
@@ -12540,8 +12509,8 @@ var TextField = /** @class */ (function (_super) {
|
|
|
12540
12509
|
TextField.prototype.advanceFrame = function () {
|
|
12541
12510
|
//override for textfield
|
|
12542
12511
|
};
|
|
12543
|
-
TextField.prototype.
|
|
12544
|
-
return
|
|
12512
|
+
TextField.prototype.getEntity = function () {
|
|
12513
|
+
return this;
|
|
12545
12514
|
};
|
|
12546
12515
|
TextField.prototype.clear = function () {
|
|
12547
12516
|
_super.prototype.clear.call(this);
|
|
@@ -13435,7 +13404,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
13435
13404
|
if (this._autoSize != TextFieldAutoSize.NONE)
|
|
13436
13405
|
this.invalidate();
|
|
13437
13406
|
else
|
|
13438
|
-
this.
|
|
13407
|
+
this._updateEntity();
|
|
13439
13408
|
};
|
|
13440
13409
|
/**
|
|
13441
13410
|
* *tells the Textfield that a paragraph is defined completly.
|
|
@@ -13447,7 +13416,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
13447
13416
|
if (this._autoSize != TextFieldAutoSize.NONE)
|
|
13448
13417
|
this.invalidate();
|
|
13449
13418
|
else
|
|
13450
|
-
this.
|
|
13419
|
+
this._updateEntity();
|
|
13451
13420
|
};
|
|
13452
13421
|
/**
|
|
13453
13422
|
* Returns a rectangle that is the bounding box of the character.
|
|
@@ -14377,12 +14346,14 @@ var ResizeEvent = /** @class */ (function (_super) {
|
|
|
14377
14346
|
var DefaultSceneGraphFactory = /** @class */ (function (_super) {
|
|
14378
14347
|
__extends(DefaultSceneGraphFactory, _super);
|
|
14379
14348
|
function DefaultSceneGraphFactory() {
|
|
14380
|
-
|
|
14349
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
14350
|
+
_this.awaySymbols = {};
|
|
14351
|
+
return _this;
|
|
14381
14352
|
}
|
|
14382
14353
|
DefaultSceneGraphFactory.prototype.createMovieClip = function (timeline, symbol) {
|
|
14383
14354
|
if (timeline === void 0) { timeline = null; }
|
|
14384
14355
|
if (symbol === void 0) { symbol = null; }
|
|
14385
|
-
return new MovieClip(timeline);
|
|
14356
|
+
return new MovieClip(timeline || new Timeline(this));
|
|
14386
14357
|
};
|
|
14387
14358
|
DefaultSceneGraphFactory.prototype.createSprite = function (prefab, graphics, symbol) {
|
|
14388
14359
|
if (prefab === void 0) { prefab = null; }
|
|
@@ -14411,8 +14382,11 @@ var DefaultSceneGraphFactory = /** @class */ (function (_super) {
|
|
|
14411
14382
|
DefaultSceneGraphFactory.prototype.createFrameScripts = function (scripts, frameIdx, objName, objID) {
|
|
14412
14383
|
throw ('[DefaultSceneGraphFactory] - createFrameScripts should be overwritten by AVM');
|
|
14413
14384
|
};
|
|
14385
|
+
DefaultSceneGraphFactory.prototype.createChildInstanceForTimeline = function (timeline, symbolID, sessionID) {
|
|
14386
|
+
throw ('[DefaultSceneGraphFactory] - createChildInstanceForTimeline should be overwritten by AVM');
|
|
14387
|
+
};
|
|
14414
14388
|
return DefaultSceneGraphFactory;
|
|
14415
|
-
}(_awayjs_stage.
|
|
14389
|
+
}(_awayjs_stage.DefaultStageFactory));
|
|
14416
14390
|
|
|
14417
14391
|
// empty matrix for transform reset
|
|
14418
14392
|
var TMP_POINT = new _awayjs_core.Point(0, 0);
|
|
@@ -15370,13 +15344,13 @@ var MouseManager = /** @class */ (function () {
|
|
|
15370
15344
|
this._stage.dispatchEvent(event);
|
|
15371
15345
|
// @todo: at this point the object under the mouse might have been changed,
|
|
15372
15346
|
// so we need to recheck the collision ?
|
|
15373
|
-
var
|
|
15347
|
+
var upContainerNode = null;
|
|
15374
15348
|
var upRootNode = null;
|
|
15375
15349
|
if (this._isAVM1Dragging && this._mouseDragCollision) {
|
|
15376
15350
|
// avm1dragging is in process, dispatch the mouse-up on this.
|
|
15377
15351
|
// mouseDragEntity instead of the current collision
|
|
15378
15352
|
upRootNode = this._mouseDragCollision.rootNode;
|
|
15379
|
-
|
|
15353
|
+
upContainerNode = this._mouseDragCollision.containerNode;
|
|
15380
15354
|
}
|
|
15381
15355
|
else if (this._mouseDragging && this._mouseDragCollision
|
|
15382
15356
|
&& this._mouseDragCollision.rootNode != dispatcher) {
|
|
@@ -15395,11 +15369,11 @@ var MouseManager = /** @class */ (function () {
|
|
|
15395
15369
|
// but current collision is not the same as collision that appeared on mouse-down,
|
|
15396
15370
|
// need to dispatch a MOUSE_UP_OUTSIDE on _mouseDragEntity
|
|
15397
15371
|
upRootNode = this._mouseDragCollision.rootNode;
|
|
15398
|
-
|
|
15372
|
+
upContainerNode = this._mouseDragCollision.containerNode;
|
|
15399
15373
|
}
|
|
15400
15374
|
if (this._mouseDragging && dispatcher)
|
|
15401
15375
|
this.setupAndDispatchEvent(this._mouseOver, event, collision);
|
|
15402
|
-
if (this._isTouch &&
|
|
15376
|
+
if (this._isTouch && upContainerNode)
|
|
15403
15377
|
this.setupAndDispatchEvent(this._mouseOut, this._mouseMoveEvent, this._mouseDragCollision);
|
|
15404
15378
|
if (upRootNode) {
|
|
15405
15379
|
//console.log("onRelease", upRootNode)
|
|
@@ -15409,7 +15383,7 @@ var MouseManager = /** @class */ (function () {
|
|
|
15409
15383
|
this.dispatchEvent(event, dispatcher);
|
|
15410
15384
|
else if (this._eventBubbling)
|
|
15411
15385
|
this._stage.dispatchEvent(event);
|
|
15412
|
-
if (
|
|
15386
|
+
if (upContainerNode)
|
|
15413
15387
|
this.setupAndDispatchEvent(this._dragStop, event, this._mouseDragCollision);
|
|
15414
15388
|
this._mouseDragCollision = null;
|
|
15415
15389
|
this._mouseDragging = false;
|
|
@@ -15687,7 +15661,7 @@ var MouseManager = /** @class */ (function () {
|
|
|
15687
15661
|
//console.log("event", event, collisionNode, collisionNode);
|
|
15688
15662
|
// 3D properties.
|
|
15689
15663
|
if (collision) {
|
|
15690
|
-
event.
|
|
15664
|
+
event.containerNode = collision.containerNode;
|
|
15691
15665
|
event.rootNode = collision.rootNode;
|
|
15692
15666
|
// Object.
|
|
15693
15667
|
event.traversable = collision.traversable;
|
|
@@ -15702,7 +15676,7 @@ var MouseManager = /** @class */ (function () {
|
|
|
15702
15676
|
}
|
|
15703
15677
|
else {
|
|
15704
15678
|
// Set all to null.
|
|
15705
|
-
event.
|
|
15679
|
+
event.containerNode = null;
|
|
15706
15680
|
event.rootNode = null;
|
|
15707
15681
|
event.traversable = null;
|
|
15708
15682
|
event.uv = null;
|
|
@@ -18325,7 +18299,7 @@ var Scene = /** @class */ (function () {
|
|
|
18325
18299
|
_awayjs_graphics.MaterialManager.materialClass = _awayjs_materials.MethodMaterial;
|
|
18326
18300
|
_awayjs_graphics.MaterialManager.textureClass = _awayjs_renderer.ImageTexture2D;
|
|
18327
18301
|
|
|
18328
|
-
console.debug('AwayJS - Scene - 0.13.
|
|
18302
|
+
console.debug('AwayJS - Scene - 0.13.247');
|
|
18329
18303
|
|
|
18330
18304
|
exports.Timeline = Timeline;
|
|
18331
18305
|
exports.ControllerBase = ControllerBase;
|