@awayjs/scene 0.13.247 → 0.13.249
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 +70 -196
- 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 +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/base/MouseButtons.d.ts +23 -0
- package/dist/lib/base/MouseButtons.d.ts.map +1 -0
- package/dist/lib/base/MouseButtons.js +0 -0
- package/dist/lib/display/DisplayObject.d.ts +1 -3
- package/dist/lib/display/DisplayObject.d.ts.map +1 -1
- package/dist/lib/display/DisplayObject.js +1 -5
- package/dist/lib/display/MorphSprite.d.ts +0 -1
- package/dist/lib/display/MorphSprite.d.ts.map +1 -1
- package/dist/lib/display/MorphSprite.js +1 -17
- package/dist/lib/display/MovieClip.d.ts +1 -2
- package/dist/lib/display/MovieClip.d.ts.map +1 -1
- package/dist/lib/display/MovieClip.js +9 -18
- package/dist/lib/display/Sprite.d.ts +1 -18
- package/dist/lib/display/Sprite.d.ts.map +1 -1
- package/dist/lib/display/Sprite.js +23 -57
- package/dist/lib/display/TextField.d.ts +1 -15
- package/dist/lib/display/TextField.d.ts.map +1 -1
- package/dist/lib/display/TextField.js +12 -64
- package/dist/lib/display/TextSprite.d.ts +1 -2
- package/dist/lib/display/TextSprite.d.ts.map +1 -1
- package/dist/lib/display/TextSprite.js +2 -2
- package/dist/lib/events/MouseEvent.d.ts +3 -2
- package/dist/lib/events/MouseEvent.d.ts.map +1 -1
- package/dist/lib/events/MouseEvent.js +4 -4
- package/dist/lib/managers/MouseManager.d.ts +0 -1
- package/dist/lib/managers/MouseManager.d.ts.map +1 -1
- package/dist/lib/managers/MouseManager.js +17 -33
- package/index.ts +2 -1
- package/lib/base/MouseButtons.ts +27 -0
- package/lib/display/DisplayObject.ts +0 -9
- package/lib/display/MorphSprite.ts +1 -22
- package/lib/display/MovieClip.ts +11 -20
- package/lib/display/Sprite.ts +16 -59
- package/lib/display/TextField.ts +17 -72
- package/lib/display/TextSprite.ts +3 -4
- package/lib/events/MouseEvent.ts +6 -5
- package/lib/managers/MouseManager.ts +18 -36
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
|
-
import { ColorUtils, Matrix, Rectangle, Point, Vector3D
|
|
2
|
+
import { ColorUtils, Matrix, Rectangle, Point, Vector3D } from '@awayjs/core';
|
|
3
3
|
import { ImageSampler, Float2Attributes } from '@awayjs/stage';
|
|
4
|
-
import { PartitionBase, EntityNode } from '@awayjs/view';
|
|
5
4
|
import { Style, TriangleElements } from '@awayjs/renderer';
|
|
6
5
|
import { Graphics, Shape, GraphicsFactoryHelper, MaterialManager } from '@awayjs/graphics';
|
|
7
6
|
import { TextFieldAutoSize } from '../text/TextFieldAutoSize';
|
|
@@ -230,7 +229,6 @@ var TextField = /** @class */ (function (_super) {
|
|
|
230
229
|
_this.startSelectionByMouseDelegate = function (event) { return _this.startSelectionByMouse(event); };
|
|
231
230
|
_this.stopSelectionByMouseDelegate = function (event) { return _this.stopSelectionByMouse(event); };
|
|
232
231
|
_this.updateSelectionByMouseDelegate = function (event) { return _this.updateSelectionByMouse(event); };
|
|
233
|
-
_this._onGraphicsInvalidateDelegate = function (event) { return _this._onGraphicsInvalidate(event); };
|
|
234
232
|
_this._onClipboardPasteDelegate = function (event) { return _this.onClipboardPaste(event); };
|
|
235
233
|
_this.cursorIntervalID = -1;
|
|
236
234
|
_this._tabEnabled = true;
|
|
@@ -261,7 +259,6 @@ var TextField = /** @class */ (function (_super) {
|
|
|
261
259
|
_this._scrollV = 0;
|
|
262
260
|
_this._textFormats = [];
|
|
263
261
|
_this._graphics = Graphics.getGraphics(); //unique graphics object for each TextField
|
|
264
|
-
_this._graphics.addEventListener(AssetEvent.INVALIDATE, _this._onGraphicsInvalidateDelegate);
|
|
265
262
|
_this.mouseEnabled = _this._selectable;
|
|
266
263
|
return _this;
|
|
267
264
|
}
|
|
@@ -353,7 +350,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
353
350
|
// }
|
|
354
351
|
this.setSelection(0, 0);
|
|
355
352
|
this._glyphsDirty = true;
|
|
356
|
-
this.
|
|
353
|
+
this.invalidate();
|
|
357
354
|
};
|
|
358
355
|
TextField.prototype.enableInput = function (enable) {
|
|
359
356
|
if (enable === void 0) { enable = true; }
|
|
@@ -719,14 +716,6 @@ var TextField = /** @class */ (function (_super) {
|
|
|
719
716
|
// this._internalScale=scale;
|
|
720
717
|
// this._glyphsDirty=true;
|
|
721
718
|
};
|
|
722
|
-
/**
|
|
723
|
-
* //TODO
|
|
724
|
-
*
|
|
725
|
-
* @private
|
|
726
|
-
*/
|
|
727
|
-
TextField.prototype._onGraphicsInvalidate = function (event) {
|
|
728
|
-
this.invalidate();
|
|
729
|
-
};
|
|
730
719
|
Object.defineProperty(TextField.prototype, "assetType", {
|
|
731
720
|
/**
|
|
732
721
|
*
|
|
@@ -864,11 +853,8 @@ var TextField = /** @class */ (function (_super) {
|
|
|
864
853
|
this._iTextWoLineBreaks = processedText.replace(/(\r\n|\n|\\n|\r)/gm, '');
|
|
865
854
|
this._textDirty = true;
|
|
866
855
|
//console.log("set text", value, "on" , this);
|
|
867
|
-
if (this._autoSize != TextFieldAutoSize.NONE)
|
|
868
|
-
this.invalidate();
|
|
869
|
-
else
|
|
870
|
-
this._updateEntity();
|
|
871
856
|
this.newTextFormat = this._textFormats[this._textFormats.length - 1];
|
|
857
|
+
this.invalidate();
|
|
872
858
|
},
|
|
873
859
|
enumerable: true,
|
|
874
860
|
configurable: true
|
|
@@ -1098,10 +1084,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
1098
1084
|
this._textFormatsIdx = [this._iText.length];
|
|
1099
1085
|
this._textDirty = true;
|
|
1100
1086
|
//console.log("set text", value, "on" , this);
|
|
1101
|
-
|
|
1102
|
-
this.invalidate();
|
|
1103
|
-
else
|
|
1104
|
-
this._updateEntity();
|
|
1087
|
+
this.invalidate();
|
|
1105
1088
|
},
|
|
1106
1089
|
enumerable: true,
|
|
1107
1090
|
configurable: true
|
|
@@ -1114,10 +1097,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
1114
1097
|
this._textDirty = false;
|
|
1115
1098
|
this._positionsDirty = false;
|
|
1116
1099
|
this._glyphsDirty = true;
|
|
1117
|
-
|
|
1118
|
-
this.invalidate();
|
|
1119
|
-
else
|
|
1120
|
-
this._updateEntity();
|
|
1100
|
+
this.invalidate();
|
|
1121
1101
|
};
|
|
1122
1102
|
Object.defineProperty(TextField.prototype, "newTextFormat", {
|
|
1123
1103
|
get: function () {
|
|
@@ -1155,34 +1135,11 @@ var TextField = /** @class */ (function (_super) {
|
|
|
1155
1135
|
// this._shapesDirty = true;
|
|
1156
1136
|
this._textDirty = true;
|
|
1157
1137
|
//this.reConstruct();
|
|
1158
|
-
|
|
1159
|
-
this.invalidate();
|
|
1160
|
-
else
|
|
1161
|
-
this._updateEntity();
|
|
1138
|
+
this.invalidate();
|
|
1162
1139
|
},
|
|
1163
1140
|
enumerable: true,
|
|
1164
1141
|
configurable: true
|
|
1165
1142
|
});
|
|
1166
|
-
/**
|
|
1167
|
-
*
|
|
1168
|
-
* @param renderer
|
|
1169
|
-
*
|
|
1170
|
-
* @internal
|
|
1171
|
-
*/
|
|
1172
|
-
TextField.prototype._acceptTraverser = function (traverser) {
|
|
1173
|
-
if (!this.maskMode) {
|
|
1174
|
-
//if(!this.cursorBlinking && this._isInFocus && this.cursorShape && this._type==TextFieldType.INPUT){
|
|
1175
|
-
// traverser[this.cursorShape.elements.traverseName](this.cursorShape);
|
|
1176
|
-
//}
|
|
1177
|
-
this._graphics._acceptTraverser(traverser);
|
|
1178
|
-
//if(this.showSelection && this._isInFocus && this.bgShapeSelect){
|
|
1179
|
-
// traverser[this.bgShapeSelect.elements.traverseName](this.bgShapeSelect);
|
|
1180
|
-
//}
|
|
1181
|
-
//if(this.bgShape){// && this.background){
|
|
1182
|
-
// traverser[this.bgShape.elements.traverseName](this.bgShape);
|
|
1183
|
-
//}
|
|
1184
|
-
}
|
|
1185
|
-
};
|
|
1186
1143
|
Object.defineProperty(TextField.prototype, "scaleX", {
|
|
1187
1144
|
/**
|
|
1188
1145
|
* Indicates the horizontal scale(percentage) of the object as applied from
|
|
@@ -1260,7 +1217,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
1260
1217
|
this._implicitPartition.invalidateEntity(this);
|
|
1261
1218
|
//}*/
|
|
1262
1219
|
this._glyphsDirty = true;
|
|
1263
|
-
this.
|
|
1220
|
+
this.invalidate();
|
|
1264
1221
|
},
|
|
1265
1222
|
enumerable: true,
|
|
1266
1223
|
configurable: true
|
|
@@ -1317,12 +1274,10 @@ var TextField = /** @class */ (function (_super) {
|
|
|
1317
1274
|
return this._type;
|
|
1318
1275
|
},
|
|
1319
1276
|
set: function (value) {
|
|
1320
|
-
if (this._type == value)
|
|
1277
|
+
if (this._type == value)
|
|
1321
1278
|
return;
|
|
1322
|
-
}
|
|
1323
1279
|
this._type = value;
|
|
1324
1280
|
this._textDirty = true;
|
|
1325
|
-
this._updateEntity();
|
|
1326
1281
|
if (value == TextFieldType.INPUT) {
|
|
1327
1282
|
//this._selectable=true;
|
|
1328
1283
|
this.enableInput(true);
|
|
@@ -1332,6 +1287,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
1332
1287
|
this.enableInput(false);
|
|
1333
1288
|
this.removeEventListener(KeyboardEvent.KEYDOWN, this.onKeyDelegate);
|
|
1334
1289
|
}
|
|
1290
|
+
this.invalidate();
|
|
1335
1291
|
},
|
|
1336
1292
|
enumerable: true,
|
|
1337
1293
|
configurable: true
|
|
@@ -1398,7 +1354,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
1398
1354
|
//override for textfield
|
|
1399
1355
|
};
|
|
1400
1356
|
TextField.prototype.getEntity = function () {
|
|
1401
|
-
return this;
|
|
1357
|
+
return this._graphics;
|
|
1402
1358
|
};
|
|
1403
1359
|
TextField.prototype.clear = function () {
|
|
1404
1360
|
_super.prototype.clear.call(this);
|
|
@@ -2013,7 +1969,6 @@ var TextField = /** @class */ (function (_super) {
|
|
|
2013
1969
|
}
|
|
2014
1970
|
}
|
|
2015
1971
|
}
|
|
2016
|
-
this.updateMaskMode();
|
|
2017
1972
|
};
|
|
2018
1973
|
TextField.prototype.buildGlyphsForLabelData = function () {
|
|
2019
1974
|
this._clearTextShapes();
|
|
@@ -2289,10 +2244,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
2289
2244
|
}
|
|
2290
2245
|
this._iText += newText;
|
|
2291
2246
|
this._textDirty = true;
|
|
2292
|
-
|
|
2293
|
-
this.invalidate();
|
|
2294
|
-
else
|
|
2295
|
-
this._updateEntity();
|
|
2247
|
+
this.invalidate();
|
|
2296
2248
|
};
|
|
2297
2249
|
/**
|
|
2298
2250
|
* *tells the Textfield that a paragraph is defined completly.
|
|
@@ -2301,10 +2253,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
2301
2253
|
TextField.prototype.closeParagraph = function () {
|
|
2302
2254
|
this._iText += '\n';
|
|
2303
2255
|
this._textDirty = true;
|
|
2304
|
-
|
|
2305
|
-
this.invalidate();
|
|
2306
|
-
else
|
|
2307
|
-
this._updateEntity();
|
|
2256
|
+
this.invalidate();
|
|
2308
2257
|
};
|
|
2309
2258
|
/**
|
|
2310
2259
|
* Returns a rectangle that is the bounding box of the character.
|
|
@@ -3146,4 +3095,3 @@ var TextField = /** @class */ (function (_super) {
|
|
|
3146
3095
|
return TextField;
|
|
3147
3096
|
}(DisplayObjectContainer));
|
|
3148
3097
|
export { TextField };
|
|
3149
|
-
PartitionBase.registerAbstraction(EntityNode, TextField);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Sprite } from './Sprite';
|
|
2
2
|
import { TextField } from './TextField';
|
|
3
|
-
import { IEntityTraverser } from '@awayjs/view';
|
|
4
3
|
/**
|
|
5
4
|
* TextSprite is used for masked text.
|
|
6
5
|
* It is a child of the textfield that is used to render all visible (masked) graphics
|
|
7
6
|
*/
|
|
8
7
|
export declare class TextSprite extends Sprite {
|
|
9
8
|
parentTextField: TextField;
|
|
10
|
-
|
|
9
|
+
_iInternalUpdate(): void;
|
|
11
10
|
}
|
|
12
11
|
//# sourceMappingURL=TextSprite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextSprite.d.ts","sourceRoot":"","sources":["../../../lib/display/TextSprite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"TextSprite.d.ts","sourceRoot":"","sources":["../../../lib/display/TextSprite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC;;;GAGG;AACH,qBAAa,UAAW,SAAQ,MAAM;IAC9B,eAAe,EAAE,SAAS,CAAC;IAE3B,gBAAgB,IAAI,IAAI;CAU/B"}
|
|
@@ -11,14 +11,14 @@ var TextSprite = /** @class */ (function (_super) {
|
|
|
11
11
|
function TextSprite() {
|
|
12
12
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
13
13
|
}
|
|
14
|
-
TextSprite.prototype.
|
|
14
|
+
TextSprite.prototype._iInternalUpdate = function () {
|
|
15
|
+
_super.prototype._iInternalUpdate.call(this);
|
|
15
16
|
var tf = this.parentTextField;
|
|
16
17
|
//tf.reConstruct(true);
|
|
17
18
|
if (tf._textFormat && !tf._textFormat.font_table.isAsset(TesselatedFontTable) && !tf._textFormat.material) {
|
|
18
19
|
this.transform.colorTransform.color = (tf.textColor != null) ? tf.textColor : tf._textFormat.color;
|
|
19
20
|
this._invalidateHierarchicalProperty(HierarchicalProperty.COLOR_TRANSFORM);
|
|
20
21
|
}
|
|
21
|
-
this._graphics._acceptTraverser(traverser);
|
|
22
22
|
};
|
|
23
23
|
return TextSprite;
|
|
24
24
|
}(Sprite));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Point, Vector3D, EventBase } from '@awayjs/core';
|
|
2
2
|
import { ContainerNode, INode, ITraversable, View, IPartitionContainer } from '@awayjs/view';
|
|
3
3
|
import { IMaterial } from '@awayjs/renderer';
|
|
4
|
+
import { MouseButtons } from '../base/MouseButtons';
|
|
4
5
|
/**
|
|
5
6
|
* A MouseEvent is dispatched when a mouse event occurs over a mouseEnabled object in View.
|
|
6
7
|
* TODO: we don't have screenZ data, tho this should be easy to implement
|
|
@@ -147,9 +148,9 @@ export declare class MouseEvent extends EventBase {
|
|
|
147
148
|
*/
|
|
148
149
|
delta: number;
|
|
149
150
|
/**
|
|
150
|
-
* Current
|
|
151
|
+
* Current buttons status
|
|
151
152
|
*/
|
|
152
|
-
|
|
153
|
+
buttons: MouseButtons;
|
|
153
154
|
/**
|
|
154
155
|
* Create a new MouseEvent object.
|
|
155
156
|
* @param type The type of the MouseEvent.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MouseEvent.d.ts","sourceRoot":"","sources":["../../../lib/events/MouseEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,
|
|
1
|
+
{"version":3,"file":"MouseEvent.d.ts","sourceRoot":"","sources":["../../../lib/events/MouseEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EAAE,SAAS,EAAE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E,IAAI,CAAC;IAElB;;OAEG;IACI,aAAa,EAAE,aAAa,CAAC;IAEpC;;OAEG;IACI,QAAQ,EAAE,aAAa,CAAC;IAE/B;;OAEG;IACI,WAAW,EAAE,YAAY,CAAC;IAEjC;;OAEG;IACI,QAAQ,EAAE,SAAS,CAAC;IAE3B;;OAEG;IACI,EAAE,EAAE,KAAK,CAAC;IAEjB;;OAEG;IACI,YAAY,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACI,QAAQ,EAAE,QAAQ,CAAC;IAE1B;;OAEG;IACI,MAAM,EAAE,QAAQ,CAAC;IAExB;;OAEG;IACI,OAAO,EAAE,OAAO,CAAC;IAExB;;OAEG;IACI,MAAM,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACI,QAAQ,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACI,KAAK,EAAE,MAAM,CAAC;IAErB;;OAEG;IACI,OAAO,EAAE,YAAY,CAAK;IAEjC;;;OAGG;gBACS,IAAI,EAAE,MAAM;IAIxB;;OAEG;IACH,IAAW,OAAO,IAAI,OAAO,CAO5B;IAED;;OAEG;IACI,eAAe,IAAI,IAAI;IAO9B;;OAEG;IACI,wBAAwB,IAAI,IAAI;IAQvC;;OAEG;IACI,KAAK,IAAI,UAAU;IAgC1B;;OAEG;IACH,IAAW,aAAa,IAAI,QAAQ,CAEnC;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,QAAQ,CAKjC;IAEM,cAAc,CAAC,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,mBAAmB;CAM5E"}
|
|
@@ -14,9 +14,9 @@ var MouseEvent = /** @class */ (function (_super) {
|
|
|
14
14
|
function MouseEvent(type) {
|
|
15
15
|
var _this = _super.call(this, type) || this;
|
|
16
16
|
/**
|
|
17
|
-
* Current
|
|
17
|
+
* Current buttons status
|
|
18
18
|
*/
|
|
19
|
-
_this.
|
|
19
|
+
_this.buttons = 0;
|
|
20
20
|
return _this;
|
|
21
21
|
}
|
|
22
22
|
Object.defineProperty(MouseEvent.prototype, "bubbles", {
|
|
@@ -75,7 +75,7 @@ var MouseEvent = /** @class */ (function (_super) {
|
|
|
75
75
|
result.shiftKey = this.shiftKey;
|
|
76
76
|
result._iParentEvent = this;
|
|
77
77
|
result._iAllowedToPropagate = this._iAllowedToPropagate;
|
|
78
|
-
result.
|
|
78
|
+
result.buttons = this.buttons;
|
|
79
79
|
return result;
|
|
80
80
|
};
|
|
81
81
|
Object.defineProperty(MouseEvent.prototype, "scenePosition", {
|
|
@@ -101,7 +101,7 @@ var MouseEvent = /** @class */ (function (_super) {
|
|
|
101
101
|
configurable: true
|
|
102
102
|
});
|
|
103
103
|
MouseEvent.prototype._dispatchEvent = function (dispatcher, target) {
|
|
104
|
-
if (!dispatcher.isMouseDisabled()) {
|
|
104
|
+
if (!dispatcher.isMouseDisabled() || this.type == MouseEvent.MOUSE_OUT || this.type == MouseEvent.ROLL_OUT) {
|
|
105
105
|
dispatcher.container.dispatchEvent(this, target);
|
|
106
106
|
FrameScriptManager.execute_queue();
|
|
107
107
|
}
|
|
@@ -80,7 +80,6 @@ export declare class MouseManager {
|
|
|
80
80
|
onMouseMove(event: MouseEvent | TouchEvent): void;
|
|
81
81
|
onMouseOut(event: MouseEvent): void;
|
|
82
82
|
onMouseOver(event: MouseEvent): void;
|
|
83
|
-
onClick(event: MouseEvent): void;
|
|
84
83
|
onDoubleClick(event: MouseEvent): void;
|
|
85
84
|
private _isDown;
|
|
86
85
|
onMouseDown(event: MouseEvent | TouchEvent): void;
|
|
@@ -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,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;A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KvB"}
|
|
@@ -41,7 +41,6 @@ var MouseManager = /** @class */ (function () {
|
|
|
41
41
|
this._isAVM1Dragging = false;
|
|
42
42
|
this._isDown = false;
|
|
43
43
|
this._stage = stage;
|
|
44
|
-
this.onClick = this.onClick.bind(this);
|
|
45
44
|
this.onDoubleClick = this.onDoubleClick.bind(this);
|
|
46
45
|
this.onMouseDown = this.onMouseDown.bind(this);
|
|
47
46
|
this.onMouseMove = this.onMouseMove.bind(this);
|
|
@@ -57,15 +56,12 @@ var MouseManager = /** @class */ (function () {
|
|
|
57
56
|
this._mouseDragging = false;
|
|
58
57
|
//register stage
|
|
59
58
|
var container = this._stage.container;
|
|
60
|
-
container.addEventListener('click', this.onClick);
|
|
61
|
-
container.addEventListener('dblclick', this.onClick);
|
|
62
59
|
container.addEventListener('touchstart', this.onMouseDown);
|
|
63
60
|
container.addEventListener('mousedown', this.onMouseDown);
|
|
64
61
|
window.addEventListener('touchmove', this.onMouseMove);
|
|
65
62
|
window.addEventListener('mousemove', this.onMouseMove);
|
|
66
63
|
window.addEventListener('mouseup', this.onMouseUp);
|
|
67
64
|
container.addEventListener('touchend', this.onMouseUp);
|
|
68
|
-
container.addEventListener('touchend', this.onClick);
|
|
69
65
|
container.addEventListener('mousewheel', this.onMouseWheel);
|
|
70
66
|
container.addEventListener('mouseover', this.onMouseOver);
|
|
71
67
|
container.addEventListener('mouseout', this.onMouseOut);
|
|
@@ -139,7 +135,6 @@ var MouseManager = /** @class */ (function () {
|
|
|
139
135
|
MouseManager.prototype.dispose = function () {
|
|
140
136
|
//unregister stage
|
|
141
137
|
var container = this._stage.container;
|
|
142
|
-
container.removeEventListener('click', this.onClick);
|
|
143
138
|
container.removeEventListener('dblclick', this.onDoubleClick);
|
|
144
139
|
container.removeEventListener('touchstart', this.onMouseDown);
|
|
145
140
|
container.removeEventListener('mousedown', this.onMouseDown);
|
|
@@ -147,7 +142,6 @@ var MouseManager = /** @class */ (function () {
|
|
|
147
142
|
window.removeEventListener('mousemove', this.onMouseMove);
|
|
148
143
|
window.removeEventListener('mouseup', this.onMouseUp);
|
|
149
144
|
container.removeEventListener('touchend', this.onMouseUp);
|
|
150
|
-
container.removeEventListener('touchend', this.onClick);
|
|
151
145
|
container.removeEventListener('wheel', this.onMouseWheel);
|
|
152
146
|
container.removeEventListener('mouseover', this.onMouseOver);
|
|
153
147
|
container.removeEventListener('mouseout', this.onMouseOut);
|
|
@@ -229,6 +223,7 @@ var MouseManager = /** @class */ (function () {
|
|
|
229
223
|
event.ctrlKey = sourceEvent.ctrlKey;
|
|
230
224
|
event.altKey = sourceEvent.altKey;
|
|
231
225
|
event.shiftKey = sourceEvent.shiftKey;
|
|
226
|
+
event.buttons = sourceEvent.buttons;
|
|
232
227
|
}
|
|
233
228
|
event = this.setUpEvent(event, collision, commonAncestor);
|
|
234
229
|
this.dispatchEvent(event, event.rootNode);
|
|
@@ -295,25 +290,16 @@ var MouseManager = /** @class */ (function () {
|
|
|
295
290
|
&& this._mouseDragCollision.rootNode != dispatcher) {
|
|
296
291
|
// no avm1dragging is in process, but current collision
|
|
297
292
|
// is not the same as collision that appeared on mouse-down,
|
|
298
|
-
// need to dispatch a MOUSE_UP_OUTSIDE
|
|
299
|
-
if (this._mouseDragCollision.rootNode.buttonEnabled)
|
|
300
|
-
this.setupAndDispatchEvent(this._mouseOut, event, this._mouseDragCollision);
|
|
301
|
-
if (!this._eventBubbling) {
|
|
302
|
-
this.setupAndDispatchEvent(this._mouseUpOutside, event, this._mouseDragCollision);
|
|
303
|
-
}
|
|
293
|
+
// need to dispatch a MOUSE_UP_OUTSIDE after mouse up
|
|
304
294
|
}
|
|
305
295
|
else if (this._mouseDragging && this._mouseDragCollision
|
|
306
296
|
&& this._mouseDragCollision.rootNode == dispatcher) {
|
|
307
297
|
// no avm1dragging is in process,
|
|
308
|
-
//
|
|
309
|
-
// need to dispatch a
|
|
298
|
+
// current collision is the same as collision that appeared on
|
|
299
|
+
// mouse-down, need to dispatch a MOUSE_CLICK event after mouse up
|
|
310
300
|
upRootNode = this._mouseDragCollision.rootNode;
|
|
311
301
|
upContainerNode = this._mouseDragCollision.containerNode;
|
|
312
302
|
}
|
|
313
|
-
if (this._mouseDragging && dispatcher)
|
|
314
|
-
this.setupAndDispatchEvent(this._mouseOver, event, collision);
|
|
315
|
-
if (this._isTouch && upContainerNode)
|
|
316
|
-
this.setupAndDispatchEvent(this._mouseOut, this._mouseMoveEvent, this._mouseDragCollision);
|
|
317
303
|
if (upRootNode) {
|
|
318
304
|
//console.log("onRelease", upRootNode)
|
|
319
305
|
this.dispatchEvent(event, upRootNode);
|
|
@@ -322,8 +308,14 @@ var MouseManager = /** @class */ (function () {
|
|
|
322
308
|
this.dispatchEvent(event, dispatcher);
|
|
323
309
|
else if (this._eventBubbling)
|
|
324
310
|
this._stage.dispatchEvent(event);
|
|
325
|
-
if (upContainerNode)
|
|
311
|
+
if (upContainerNode) {
|
|
312
|
+
if (!this._isAVM1Dragging)
|
|
313
|
+
this.setupAndDispatchEvent(this._mouseClick, this._isTouch ? this._mouseMoveEvent : event, this._mouseDragCollision);
|
|
326
314
|
this.setupAndDispatchEvent(this._dragStop, event, this._mouseDragCollision);
|
|
315
|
+
}
|
|
316
|
+
else if (this._mouseDragging && this._mouseDragCollision) {
|
|
317
|
+
this.setupAndDispatchEvent(this._mouseUpOutside, event, this._mouseDragCollision);
|
|
318
|
+
}
|
|
327
319
|
this._mouseDragCollision = null;
|
|
328
320
|
this._mouseDragging = false;
|
|
329
321
|
this._isAVM1Dragging = false;
|
|
@@ -357,14 +349,13 @@ var MouseManager = /** @class */ (function () {
|
|
|
357
349
|
var prevCollisionNode = (_d = this._prevCollision) === null || _d === void 0 ? void 0 : _d.rootNode;
|
|
358
350
|
if (collisionNode != prevCollisionNode) {
|
|
359
351
|
// If colliding object has changed, queue OVER and OUT events.
|
|
360
|
-
// If the mouse is dragged (mouse-down is hold), use DRAG_OVER and DRAG_OUT
|
|
352
|
+
// If the mouse is dragged (mouse-down is hold), use DRAG_OVER and DRAG_OUT as well as MOUSE_OVER MOUSE_OUT
|
|
361
353
|
// DRAG_OVER and DRAG_OUT are only dispatched on the object that was hit on the mouse-down
|
|
362
354
|
// (_mouseDragEntity)
|
|
363
355
|
// Store the info if the collision is a enabled Button (_collisionIsEnabledButton)
|
|
364
356
|
if (prevCollisionNode) {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
else if (this._mouseDragging && this._mouseDragCollision
|
|
357
|
+
this.setupAndDispatchEvent(this._mouseOut, this._mouseMoveEvent, this._prevCollision);
|
|
358
|
+
if (this._mouseDragging && this._mouseDragCollision
|
|
368
359
|
&& this._mouseDragCollision.rootNode == prevCollisionNode)
|
|
369
360
|
this.setupAndDispatchEvent(this._dragOut, this._mouseMoveEvent, this._prevCollision);
|
|
370
361
|
}
|
|
@@ -405,10 +396,8 @@ var MouseManager = /** @class */ (function () {
|
|
|
405
396
|
}
|
|
406
397
|
this._collisionIsEnabledButton = collisionNode ? collisionNode.buttonEnabled : false;
|
|
407
398
|
if (collisionNode) {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
else if (this._mouseDragging && this._mouseDragCollision &&
|
|
411
|
-
this._mouseDragCollision.rootNode == collisionNode)
|
|
399
|
+
this.setupAndDispatchEvent(this._mouseOver, this._mouseMoveEvent, collision);
|
|
400
|
+
if (this._mouseDragging)
|
|
412
401
|
this.setupAndDispatchEvent(this._dragOver, this._mouseMoveEvent, collision);
|
|
413
402
|
}
|
|
414
403
|
this._prevCollision = collision;
|
|
@@ -632,7 +621,7 @@ var MouseManager = /** @class */ (function () {
|
|
|
632
621
|
event.ctrlKey = sourceEvent.ctrlKey;
|
|
633
622
|
event.altKey = sourceEvent.altKey;
|
|
634
623
|
event.shiftKey = sourceEvent.shiftKey;
|
|
635
|
-
event.
|
|
624
|
+
event.buttons = (sourceEvent instanceof MouseEvent) ? sourceEvent.buttons : 0;
|
|
636
625
|
this._queuedEvents.push(event);
|
|
637
626
|
};
|
|
638
627
|
// ---------------------------------------------------------------------
|
|
@@ -710,11 +699,6 @@ var MouseManager = /** @class */ (function () {
|
|
|
710
699
|
this.updateColliders(event);
|
|
711
700
|
this.queueDispatch(this._mouseOver, event);
|
|
712
701
|
};
|
|
713
|
-
MouseManager.prototype.onClick = function (event) {
|
|
714
|
-
!MouseManager.inputRecorder || MouseManager.inputRecorder.recordEvent(event);
|
|
715
|
-
this.updateColliders(event);
|
|
716
|
-
this.queueDispatch(this._mouseClick, event);
|
|
717
|
-
};
|
|
718
702
|
MouseManager.prototype.onDoubleClick = function (event) {
|
|
719
703
|
!MouseManager.inputRecorder || MouseManager.inputRecorder.recordEvent(event);
|
|
720
704
|
this.updateColliders(event);
|
package/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
console.debug('AwayJS - Scene - 0.13.
|
|
1
|
+
console.debug('AwayJS - Scene - 0.13.249');
|
|
2
2
|
|
|
3
3
|
export { IDisplayObjectAdapter } from './lib/adapters/IDisplayObjectAdapter';
|
|
4
4
|
export { IMovieClipAdapter } from './lib/adapters/IMovieClipAdapter';
|
|
@@ -6,6 +6,7 @@ export { IFilter } from './lib/adapters/IFilter';
|
|
|
6
6
|
|
|
7
7
|
export { IBitmapDrawable } from './lib/base/IBitmapDrawable';
|
|
8
8
|
export { IFrameScript } from './lib/base/IFrameScript';
|
|
9
|
+
export { MouseButtons } from './lib/base/MouseButtons';
|
|
9
10
|
export { Timeline } from './lib/base/Timeline';
|
|
10
11
|
export { TimelineActionType } from './lib/base/TimelineActionType';
|
|
11
12
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
export const enum MouseButtons {
|
|
3
|
+
/**
|
|
4
|
+
* Primary Button (usually the left button)
|
|
5
|
+
*/
|
|
6
|
+
PRIMARY_BUTTON = 1,
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Secondary button (usually the right button)
|
|
10
|
+
*/
|
|
11
|
+
SECONDARY_BUTTON = 2,
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Auxiliary button (usually the mouse wheel button or middle button)
|
|
15
|
+
*/
|
|
16
|
+
AUXILLARY_BUTTON = 4,
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 4th button (typically the "Browser Back" button)
|
|
20
|
+
*/
|
|
21
|
+
FOURTH_BUTTON = 8,
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 5th button (typically the "Browser Forward" button)
|
|
25
|
+
*/
|
|
26
|
+
FIFTH_BUTTON = 16,
|
|
27
|
+
}
|
|
@@ -16,12 +16,10 @@ import {
|
|
|
16
16
|
BoundingBox,
|
|
17
17
|
BoundingSphere,
|
|
18
18
|
BoundingVolumeType,
|
|
19
|
-
IEntityTraverser,
|
|
20
19
|
IPartitionEntity,
|
|
21
20
|
BoundsPicker,
|
|
22
21
|
HeirarchicalEvent,
|
|
23
22
|
HierarchicalProperty,
|
|
24
|
-
ContainerEvent,
|
|
25
23
|
AlignmentMode,
|
|
26
24
|
OrientationMode,
|
|
27
25
|
BasicPartition,
|
|
@@ -40,7 +38,6 @@ import {
|
|
|
40
38
|
import { DisplayObjectContainer } from './DisplayObjectContainer';
|
|
41
39
|
import { ControllerBase } from '../controllers/ControllerBase';
|
|
42
40
|
import { IBitmapDrawable } from '../base/IBitmapDrawable';
|
|
43
|
-
import { FocusEvent } from '../events/FocusEvent';
|
|
44
41
|
|
|
45
42
|
import { PrimitiveCubePrefab } from '../prefabs/PrimitiveCubePrefab';
|
|
46
43
|
import { PrimitiveSpherePrefab } from '../prefabs/PrimitiveSpherePrefab';
|
|
@@ -1766,10 +1763,6 @@ export class DisplayObject extends AssetBase implements IBitmapDrawable, IPartit
|
|
|
1766
1763
|
this.dispatchEvent(new HeirarchicalEvent(HeirarchicalEvent.INVALIDATE_PROPERTY, propDirty));
|
|
1767
1764
|
}
|
|
1768
1765
|
|
|
1769
|
-
public _updateEntity(): void {
|
|
1770
|
-
this.dispatchEvent(new ContainerEvent(ContainerEvent.UPDATE_ENTITY, this));
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
1766
|
/**
|
|
1774
1767
|
*
|
|
1775
1768
|
*/
|
|
@@ -1785,8 +1778,6 @@ export class DisplayObject extends AssetBase implements IBitmapDrawable, IPartit
|
|
|
1785
1778
|
return this._maskId;
|
|
1786
1779
|
}
|
|
1787
1780
|
|
|
1788
|
-
public _acceptTraverser(_traverser: IEntityTraverser): void {}
|
|
1789
|
-
|
|
1790
1781
|
protected _setScaleX(val: number): void {
|
|
1791
1782
|
if (this.scaleX == val)
|
|
1792
1783
|
return;
|
|
@@ -44,25 +44,6 @@ export class MorphSprite extends Sprite {
|
|
|
44
44
|
private _ratio: ui16;
|
|
45
45
|
private _frameCaches: NumberMap<GraphicsPath[]> = {};
|
|
46
46
|
|
|
47
|
-
protected _setGraphics(value: Graphics): void {
|
|
48
|
-
if (this._graphics == value) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (this._graphics) {
|
|
53
|
-
this._graphics.removeEventListener(AssetEvent.INVALIDATE, this._onGraphicsInvalidateDelegate);
|
|
54
|
-
this._graphics.usages--;
|
|
55
|
-
|
|
56
|
-
//if (!this._graphics.usages)
|
|
57
|
-
// this.graphics.dispose();
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (!this._graphics)
|
|
61
|
-
this._graphics = Graphics.getGraphics();
|
|
62
|
-
|
|
63
|
-
this._graphics.copyFrom(value);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
47
|
public get assetType(): string {
|
|
67
48
|
return MorphSprite.assetType;
|
|
68
49
|
}
|
|
@@ -366,6 +347,4 @@ export class MorphSprite extends Sprite {
|
|
|
366
347
|
|
|
367
348
|
return newInstance;
|
|
368
349
|
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
PartitionBase.registerAbstraction(EntityNode, MorphSprite);
|
|
350
|
+
}
|