@awayjs/scene 0.13.248 → 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 +29 -53
- 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/MovieClip.d.ts +1 -2
- package/dist/lib/display/MovieClip.d.ts.map +1 -1
- package/dist/lib/display/MovieClip.js +7 -15
- 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/MovieClip.ts +9 -18
- package/lib/events/MouseEvent.ts +5 -4
- package/lib/managers/MouseManager.ts +18 -36
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { IMovieClipAdapter } from './lib/adapters/IMovieClipAdapter';
|
|
|
3
3
|
export { IFilter } from './lib/adapters/IFilter';
|
|
4
4
|
export { IBitmapDrawable } from './lib/base/IBitmapDrawable';
|
|
5
5
|
export { IFrameScript } from './lib/base/IFrameScript';
|
|
6
|
+
export { MouseButtons } from './lib/base/MouseButtons';
|
|
6
7
|
export { Timeline } from './lib/base/Timeline';
|
|
7
8
|
export { TimelineActionType } from './lib/base/TimelineActionType';
|
|
8
9
|
export { ControllerBase } from './lib/controllers/ControllerBase';
|
package/dist/index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AAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
console.debug('AwayJS - Scene - 0.13.
|
|
1
|
+
console.debug('AwayJS - Scene - 0.13.249');
|
|
2
2
|
export { Timeline } from './lib/base/Timeline';
|
|
3
3
|
export { ControllerBase } from './lib/controllers/ControllerBase';
|
|
4
4
|
export { FirstPersonController } from './lib/controllers/FirstPersonController';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const enum MouseButtons {
|
|
2
|
+
/**
|
|
3
|
+
* Primary Button (usually the left button)
|
|
4
|
+
*/
|
|
5
|
+
PRIMARY_BUTTON = 1,
|
|
6
|
+
/**
|
|
7
|
+
* Secondary button (usually the right button)
|
|
8
|
+
*/
|
|
9
|
+
SECONDARY_BUTTON = 2,
|
|
10
|
+
/**
|
|
11
|
+
* Auxiliary button (usually the mouse wheel button or middle button)
|
|
12
|
+
*/
|
|
13
|
+
AUXILLARY_BUTTON = 4,
|
|
14
|
+
/**
|
|
15
|
+
* 4th button (typically the "Browser Back" button)
|
|
16
|
+
*/
|
|
17
|
+
FOURTH_BUTTON = 8,
|
|
18
|
+
/**
|
|
19
|
+
* 5th button (typically the "Browser Forward" button)
|
|
20
|
+
*/
|
|
21
|
+
FIFTH_BUTTON = 16
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=MouseButtons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MouseButtons.d.ts","sourceRoot":"","sources":["../../../lib/base/MouseButtons.ts"],"names":[],"mappings":"AACA,0BAAkB,YAAY;IAC7B;;OAEG;IACH,cAAc,IAAI;IAElB;;OAEG;IACH,gBAAgB,IAAI;IAEpB;;OAEG;IACH,gBAAgB,IAAI;IAEpB;;OAEG;IACH,aAAa,IAAI;IAEjB;;OAEG;IACH,YAAY,KAAK;CACjB"}
|
|
File without changes
|
|
@@ -33,10 +33,9 @@ export declare class MovieClip extends Sprite {
|
|
|
33
33
|
private _isButton;
|
|
34
34
|
private _onMouseOver;
|
|
35
35
|
private _onMouseOut;
|
|
36
|
-
private _onDragOver;
|
|
37
|
-
private _onDragOut;
|
|
38
36
|
private _onMouseDown;
|
|
39
37
|
private _onMouseUp;
|
|
38
|
+
private _onMouseUpOutside;
|
|
40
39
|
private _time;
|
|
41
40
|
private _currentFrameIndex;
|
|
42
41
|
private _isPlaying;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MovieClip.d.ts","sourceRoot":"","sources":["../../../lib/display/MovieClip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiB,MAAM,cAAc,CAAC;AAIxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"MovieClip.d.ts","sourceRoot":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AE,aAAa,GAAG,IAAI;IASvD,KAAK,IAAI,IAAI;CAoBpB"}
|
|
@@ -55,12 +55,12 @@ var MovieClip = /** @class */ (function (_super) {
|
|
|
55
55
|
//this.debugVisible=true;
|
|
56
56
|
_this._onMouseOver = function (_event) {
|
|
57
57
|
if (_this.buttonEnabled)
|
|
58
|
-
_this.currentFrameIndex = 1;
|
|
58
|
+
_this.currentFrameIndex = (_event.buttons & 1 /* PRIMARY_BUTTON */) ? _this.currentFrameIndex == 0 ? 0 : 2 : 1;
|
|
59
59
|
else
|
|
60
60
|
_this.currentFrameIndex = 0;
|
|
61
61
|
};
|
|
62
62
|
_this._onMouseOut = function (_event) {
|
|
63
|
-
_this.currentFrameIndex = 0;
|
|
63
|
+
_this.currentFrameIndex = (_event.buttons & 1 /* PRIMARY_BUTTON */ && _this.currentFrameIndex != 0) ? 1 : 0;
|
|
64
64
|
};
|
|
65
65
|
_this._onMouseDown = function (_event) {
|
|
66
66
|
if (_this.buttonEnabled)
|
|
@@ -69,17 +69,11 @@ var MovieClip = /** @class */ (function (_super) {
|
|
|
69
69
|
_this.currentFrameIndex = 0;
|
|
70
70
|
};
|
|
71
71
|
_this._onMouseUp = function (_event) {
|
|
72
|
-
_this.currentFrameIndex = _this.currentFrameIndex == 0 ? 0 : 1;
|
|
73
|
-
};
|
|
74
|
-
_this._onDragOver = function (_event) {
|
|
75
|
-
if (_this.buttonEnabled)
|
|
76
|
-
_this.currentFrameIndex = 2;
|
|
77
|
-
else
|
|
78
|
-
_this.currentFrameIndex = 0;
|
|
79
|
-
};
|
|
80
|
-
_this._onDragOut = function (_event) {
|
|
81
72
|
_this.currentFrameIndex = 1;
|
|
82
73
|
};
|
|
74
|
+
_this._onMouseUpOutside = function (_event) {
|
|
75
|
+
_this.currentFrameIndex = 0;
|
|
76
|
+
};
|
|
83
77
|
_this._timeline = timeline;
|
|
84
78
|
if (spriteMode) {
|
|
85
79
|
_this.transformToSprite();
|
|
@@ -573,8 +567,7 @@ var MovieClip = /** @class */ (function (_super) {
|
|
|
573
567
|
this.addEventListener(MouseEvent.MOUSE_OUT, this._onMouseOut);
|
|
574
568
|
this.addEventListener(MouseEvent.MOUSE_DOWN, this._onMouseDown);
|
|
575
569
|
this.addEventListener(MouseEvent.MOUSE_UP, this._onMouseUp);
|
|
576
|
-
this.addEventListener(MouseEvent.
|
|
577
|
-
this.addEventListener(MouseEvent.DRAG_OUT, this._onDragOut);
|
|
570
|
+
this.addEventListener(MouseEvent.MOUSE_UP_OUTSIDE, this._onMouseUpOutside);
|
|
578
571
|
this.mouseChildren = false;
|
|
579
572
|
};
|
|
580
573
|
MovieClip.prototype.removeButtonListeners = function () {
|
|
@@ -582,8 +575,7 @@ var MovieClip = /** @class */ (function (_super) {
|
|
|
582
575
|
this.removeEventListener(MouseEvent.MOUSE_OUT, this._onMouseOut);
|
|
583
576
|
this.removeEventListener(MouseEvent.MOUSE_DOWN, this._onMouseDown);
|
|
584
577
|
this.removeEventListener(MouseEvent.MOUSE_UP, this._onMouseUp);
|
|
585
|
-
this.removeEventListener(MouseEvent.
|
|
586
|
-
this.removeEventListener(MouseEvent.DRAG_OUT, this._onDragOut);
|
|
578
|
+
this.removeEventListener(MouseEvent.MOUSE_UP_OUTSIDE, this._onMouseUpOutside);
|
|
587
579
|
};
|
|
588
580
|
MovieClip.prototype.getTimelineChildAtSessionID = function (sessionID) {
|
|
589
581
|
return this._sessionID_childs[sessionID];
|
|
@@ -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,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
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,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;GAGG;AACH,qBAAa,UAAW,SAAQ,SAAS;IAEjC,aAAa,EAAE,UAAU,CAAC;IAC1B,cAAc,EAAE,KAAK,CAAC;IAE7B;;OAEG;IACH,OAAc,UAAU,EAAE,MAAM,CAAiB;IAEjD;;OAEG;IACH,OAAc,SAAS,EAAE,MAAM,CAAgB;IAE/C;;OAEG;IACH,OAAc,SAAS,EAAE,MAAM,CAAgB;IAE/C;;OAEG;IACH,OAAc,QA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AC;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;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;IAEzE,OAAO,CAAC,YAAY,CAAU;IAC9B,OAAO,CAAC,cAAc,CAAmB;IAEzC,OAAO,CAAC,mBAAmB,CAAmB;IAC9C,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,UAAU,CAAgB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,WAAW,GAAE,aAAoB,GAAG,IAAI;IAmOxD,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAI3C,gBAAgB,CAAC,MAAM,EAAE,aAAa,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;IAuClB,OAAO,CAAC,aAAa;IAed,SAAS,CAAC,KAAK,KAAA,GAAG,IAAI;IA+BtB,OAAO,CAAC,KAAK,KAAA,GAAG,IAAI;IAgCpB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;IASjD,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAOnC,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAOpC,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAY7C,OAAO,CAAC,OAAO,CAAkB;IAE1B,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;IA0BjD,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;IAwB/C,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAO5C,OAAO,CAAC,eAAe;CAKvB"}
|
|
@@ -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
|
+
}
|
package/lib/display/MovieClip.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { FrameScriptManager } from '../managers/FrameScriptManager';
|
|
|
8
8
|
import { DisplayObject } from './DisplayObject';
|
|
9
9
|
import { Sprite } from './Sprite';
|
|
10
10
|
import { DisplayObjectContainer } from './DisplayObjectContainer';
|
|
11
|
+
import { MouseButtons } from '../base/MouseButtons';
|
|
11
12
|
interface IScene {
|
|
12
13
|
offset: number;
|
|
13
14
|
name: string;
|
|
@@ -67,10 +68,9 @@ export class MovieClip extends Sprite {
|
|
|
67
68
|
|
|
68
69
|
private _onMouseOver: (event: MouseEvent) => void;
|
|
69
70
|
private _onMouseOut: (event: MouseEvent) => void;
|
|
70
|
-
private _onDragOver: (event: MouseEvent) => void;
|
|
71
|
-
private _onDragOut: (event: MouseEvent) => void;
|
|
72
71
|
private _onMouseDown: (event: MouseEvent) => void;
|
|
73
72
|
private _onMouseUp: (event: MouseEvent) => void;
|
|
73
|
+
private _onMouseUpOutside: (event: MouseEvent) => void;
|
|
74
74
|
|
|
75
75
|
private _time: number = 0;// the current time inside the animation
|
|
76
76
|
|
|
@@ -168,13 +168,13 @@ export class MovieClip extends Sprite {
|
|
|
168
168
|
|
|
169
169
|
this._onMouseOver = (_event: MouseEvent) => {
|
|
170
170
|
if (this.buttonEnabled)
|
|
171
|
-
this.currentFrameIndex = 1;
|
|
171
|
+
this.currentFrameIndex = (_event.buttons & MouseButtons.PRIMARY_BUTTON) ? this.currentFrameIndex == 0 ? 0 : 2 : 1;
|
|
172
172
|
else
|
|
173
173
|
this.currentFrameIndex = 0;
|
|
174
174
|
};
|
|
175
175
|
|
|
176
176
|
this._onMouseOut = (_event: MouseEvent) => {
|
|
177
|
-
this.currentFrameIndex = 0;
|
|
177
|
+
this.currentFrameIndex = (_event.buttons & MouseButtons.PRIMARY_BUTTON && this.currentFrameIndex != 0) ? 1 : 0;
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
this._onMouseDown = (_event: MouseEvent) => {
|
|
@@ -185,18 +185,11 @@ export class MovieClip extends Sprite {
|
|
|
185
185
|
};
|
|
186
186
|
|
|
187
187
|
this._onMouseUp = (_event: MouseEvent) => {
|
|
188
|
-
this.currentFrameIndex =
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
this._onDragOver = (_event: MouseEvent) => {
|
|
192
|
-
if (this.buttonEnabled)
|
|
193
|
-
this.currentFrameIndex = 2;
|
|
194
|
-
else
|
|
195
|
-
this.currentFrameIndex = 0;
|
|
188
|
+
this.currentFrameIndex = 1;
|
|
196
189
|
};
|
|
197
190
|
|
|
198
|
-
this.
|
|
199
|
-
this.currentFrameIndex =
|
|
191
|
+
this._onMouseUpOutside = (_event: MouseEvent) => {
|
|
192
|
+
this.currentFrameIndex = 0;
|
|
200
193
|
};
|
|
201
194
|
|
|
202
195
|
this._timeline = timeline;
|
|
@@ -695,8 +688,7 @@ export class MovieClip extends Sprite {
|
|
|
695
688
|
this.addEventListener(MouseEvent.MOUSE_OUT, this._onMouseOut);
|
|
696
689
|
this.addEventListener(MouseEvent.MOUSE_DOWN, this._onMouseDown);
|
|
697
690
|
this.addEventListener(MouseEvent.MOUSE_UP, this._onMouseUp);
|
|
698
|
-
this.addEventListener(MouseEvent.
|
|
699
|
-
this.addEventListener(MouseEvent.DRAG_OUT, this._onDragOut);
|
|
691
|
+
this.addEventListener(MouseEvent.MOUSE_UP_OUTSIDE, this._onMouseUpOutside);
|
|
700
692
|
|
|
701
693
|
this.mouseChildren = false;
|
|
702
694
|
}
|
|
@@ -706,8 +698,7 @@ export class MovieClip extends Sprite {
|
|
|
706
698
|
this.removeEventListener(MouseEvent.MOUSE_OUT, this._onMouseOut);
|
|
707
699
|
this.removeEventListener(MouseEvent.MOUSE_DOWN, this._onMouseDown);
|
|
708
700
|
this.removeEventListener(MouseEvent.MOUSE_UP, this._onMouseUp);
|
|
709
|
-
this.removeEventListener(MouseEvent.
|
|
710
|
-
this.removeEventListener(MouseEvent.DRAG_OUT, this._onDragOut);
|
|
701
|
+
this.removeEventListener(MouseEvent.MOUSE_UP_OUTSIDE, this._onMouseUpOutside);
|
|
711
702
|
}
|
|
712
703
|
|
|
713
704
|
public getTimelineChildAtSessionID(sessionID: number): DisplayObject {
|
package/lib/events/MouseEvent.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ContainerNode, INode, ITraversable, View, IPartitionContainer } from '@
|
|
|
4
4
|
|
|
5
5
|
import { IMaterial } from '@awayjs/renderer';
|
|
6
6
|
import FrameScriptManager from '../managers/FrameScriptManager';
|
|
7
|
+
import { MouseButtons } from '../base/MouseButtons';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* A MouseEvent is dispatched when a mouse event occurs over a mouseEnabled object in View.
|
|
@@ -181,9 +182,9 @@ export class MouseEvent extends EventBase {
|
|
|
181
182
|
public delta: number;
|
|
182
183
|
|
|
183
184
|
/**
|
|
184
|
-
* Current
|
|
185
|
+
* Current buttons status
|
|
185
186
|
*/
|
|
186
|
-
public
|
|
187
|
+
public buttons: MouseButtons = 0;
|
|
187
188
|
|
|
188
189
|
/**
|
|
189
190
|
* Create a new MouseEvent object.
|
|
@@ -256,7 +257,7 @@ export class MouseEvent extends EventBase {
|
|
|
256
257
|
|
|
257
258
|
result._iParentEvent = this;
|
|
258
259
|
result._iAllowedToPropagate = this._iAllowedToPropagate;
|
|
259
|
-
result.
|
|
260
|
+
result.buttons = this.buttons;
|
|
260
261
|
|
|
261
262
|
return result;
|
|
262
263
|
}
|
|
@@ -279,7 +280,7 @@ export class MouseEvent extends EventBase {
|
|
|
279
280
|
}
|
|
280
281
|
|
|
281
282
|
public _dispatchEvent(dispatcher: ContainerNode, target: IPartitionContainer) {
|
|
282
|
-
if (!dispatcher.isMouseDisabled()) {
|
|
283
|
+
if (!dispatcher.isMouseDisabled() || this.type == MouseEvent.MOUSE_OUT || this.type == MouseEvent.ROLL_OUT) {
|
|
283
284
|
dispatcher.container.dispatchEvent(this, target);
|
|
284
285
|
FrameScriptManager.execute_queue();
|
|
285
286
|
}
|