@flashist/flibs 0.0.248 → 0.0.250
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/TestLibClass.js +3 -5
- package/TestLibClass.js.map +1 -1
- package/base/data/BaseDataVO.js +57 -100
- package/base/data/BaseDataVO.js.map +1 -1
- package/base/data/BaseDataVOEvent.js +1 -1
- package/base/data/BaseDataVOEvent.js.map +1 -1
- package/device/tools/DeviceFullscreenTools.js +106 -125
- package/device/tools/DeviceFullscreenTools.js.map +1 -1
- package/device/tools/DeviceTools.js +12 -16
- package/device/tools/DeviceTools.js.map +1 -1
- package/display/pixijs/custom/FApp.js +24 -47
- package/display/pixijs/custom/FApp.js.map +1 -1
- package/display/pixijs/custom/display/FContainer.js +89 -125
- package/display/pixijs/custom/display/FContainer.js.map +1 -1
- package/display/pixijs/custom/display/FStage.js +7 -26
- package/display/pixijs/custom/display/FStage.js.map +1 -1
- package/display/pixijs/custom/display/events/FDisplayEvent.js +1 -1
- package/display/pixijs/custom/display/events/FDisplayEvent.js.map +1 -1
- package/display/pixijs/custom/display/text/FLabel.js +331 -465
- package/display/pixijs/custom/display/text/FLabel.js.map +1 -1
- package/display/pixijs/custom/display/text/FLabelDefaultConfig.js +3 -5
- package/display/pixijs/custom/display/text/FLabelDefaultConfig.js.map +1 -1
- package/display/pixijs/custom/display/text/FLabelEvent.js +1 -1
- package/display/pixijs/custom/display/text/FLabelEvent.js.map +1 -1
- package/display/pixijs/custom/display/tools/FDisplayTools.js +18 -23
- package/display/pixijs/custom/display/tools/FDisplayTools.js.map +1 -1
- package/display/pixijs/display/events/DisplayEvent.js +1 -1
- package/display/pixijs/display/events/DisplayEvent.js.map +1 -1
- package/display/pixijs/display/events/InteractiveEvent.js +1 -1
- package/display/pixijs/display/events/InteractiveEvent.js.map +1 -1
- package/display/pixijs/display/tools/DisplayResizeTools.js +10 -14
- package/display/pixijs/display/tools/DisplayResizeTools.js.map +1 -1
- package/display/pixijs/display/tools/DisplayTools.js +14 -19
- package/display/pixijs/display/tools/DisplayTools.js.map +1 -1
- package/display/pixijs/display/tools/FLabelTools.js +9 -15
- package/display/pixijs/display/tools/FLabelTools.js.map +1 -1
- package/display/pixijs/display/tools/GraphicsTools.js +5 -13
- package/display/pixijs/display/tools/GraphicsTools.js.map +1 -1
- package/html/tools/HtmlTools.js +6 -10
- package/html/tools/HtmlTools.js.map +1 -1
- package/input/pixijs/InputManager.js +58 -88
- package/input/pixijs/InputManager.js.map +1 -1
- package/input/pixijs/InputManagerEvent.js +1 -1
- package/input/pixijs/InputManagerEvent.js.map +1 -1
- package/input/pixijs/InputManagerEventData.js +3 -5
- package/input/pixijs/InputManagerEventData.js.map +1 -1
- package/load/abstract/AbstractLoadFactory.js +12 -14
- package/load/abstract/AbstractLoadFactory.js.map +1 -1
- package/load/abstract/AbstractLoadManager.js +41 -70
- package/load/abstract/AbstractLoadManager.js.map +1 -1
- package/load/abstract/LoadEvent.js +1 -1
- package/load/abstract/LoadEvent.js.map +1 -1
- package/load/abstract/LoadResourcesCache.js +11 -15
- package/load/abstract/LoadResourcesCache.js.map +1 -1
- package/load/abstract/Loader.js +51 -79
- package/load/abstract/Loader.js.map +1 -1
- package/load/abstract/LoaderQueue.js +16 -18
- package/load/abstract/LoaderQueue.js.map +1 -1
- package/load/abstract/commands/LoadItemCommand.js +16 -36
- package/load/abstract/commands/LoadItemCommand.js.map +1 -1
- package/load/abstract/commands/LoadItemsListCommand.js +16 -37
- package/load/abstract/commands/LoadItemsListCommand.js.map +1 -1
- package/load/abstract/commands/WaitGroupLoadingCompleteCommand.js +11 -31
- package/load/abstract/commands/WaitGroupLoadingCompleteCommand.js.map +1 -1
- package/load/abstract/data/FileType.js +1 -1
- package/load/abstract/data/FileType.js.map +1 -1
- package/load/abstract/group/LoadGroup.js +38 -67
- package/load/abstract/group/LoadGroup.js.map +1 -1
- package/load/abstract/item/AbstractLoadItem.js +51 -76
- package/load/abstract/item/AbstractLoadItem.js.map +1 -1
- package/load/abstract/item/AbstractSoundLoadItem.js +2 -23
- package/load/abstract/item/AbstractSoundLoadItem.js.map +1 -1
- package/load/abstract/item/DefaultLoadItemConfig.js +9 -11
- package/load/abstract/item/DefaultLoadItemConfig.js.map +1 -1
- package/load/abstract/loadstatus/LoadStatusEvent.js +1 -1
- package/load/abstract/loadstatus/LoadStatusEvent.js.map +1 -1
- package/load/abstract/loadstatus/LoadStatusPriority.js +2 -2
- package/load/abstract/loadstatus/LoadStatusPriority.js.map +1 -1
- package/load/abstract/loadstatus/LoadStatusPriorityTools.js +8 -13
- package/load/abstract/loadstatus/LoadStatusPriorityTools.js.map +1 -1
- package/load/abstract/progress/LoadProgressTool.js +10 -15
- package/load/abstract/progress/LoadProgressTool.js.map +1 -1
- package/load/preloadjspixihowler/PreloadjsPixiLoadFactory.js +12 -37
- package/load/preloadjspixihowler/PreloadjsPixiLoadFactory.js.map +1 -1
- package/load/preloadjspixihowler/PreloadjsPixiLoadManager.js +6 -31
- package/load/preloadjspixihowler/PreloadjsPixiLoadManager.js.map +1 -1
- package/load/preloadjspixihowler/item/FileLoadItem.js +30 -52
- package/load/preloadjspixihowler/item/FileLoadItem.js.map +1 -1
- package/load/preloadjspixihowler/item/FontLoadItem.js +40 -56
- package/load/preloadjspixihowler/item/FontLoadItem.js.map +1 -1
- package/load/preloadjspixihowler/item/HowlerSoundLoadItem.js +30 -50
- package/load/preloadjspixihowler/item/HowlerSoundLoadItem.js.map +1 -1
- package/load/preloadjspixihowler/item/PixiImageLoadItem.js +4 -25
- package/load/preloadjspixihowler/item/PixiImageLoadItem.js.map +1 -1
- package/load/preloadjspixihowler/item/PixiSpineLoadItem.js +4 -25
- package/load/preloadjspixihowler/item/PixiSpineLoadItem.js.map +1 -1
- package/load/preloadjspixihowler/item/PreloadjsLoadQueueEventType.js +1 -1
- package/load/preloadjspixihowler/item/PreloadjsLoadQueueEventType.js.map +1 -1
- package/load/tools/LoadTools.js +4 -8
- package/load/tools/LoadTools.js.map +1 -1
- package/locale/ILocaleConfig.js +2 -6
- package/locale/ILocaleConfig.js.map +1 -1
- package/locale/LanguageId.js +4 -8
- package/locale/LanguageId.js.map +1 -1
- package/locale/LocaleManager.js +37 -48
- package/locale/LocaleManager.js.map +1 -1
- package/model/generic/GenericObjectsByTypeModel.js +21 -25
- package/model/generic/GenericObjectsByTypeModel.js.map +1 -1
- package/model/generic/GenericObjectsModel.js +27 -58
- package/model/generic/GenericObjectsModel.js.map +1 -1
- package/model/generic/GenericObjectsModelEvent.js +1 -1
- package/model/generic/GenericObjectsModelEvent.js.map +1 -1
- package/other/KeyCodes.js +1 -1
- package/other/KeyCodes.js.map +1 -1
- package/other/cursor/CSSCursor.js +1 -1
- package/other/cursor/CSSCursor.js.map +1 -1
- package/other/dragHelper/DragHelper.js +97 -156
- package/other/dragHelper/DragHelper.js.map +1 -1
- package/other/dragHelper/DragHelperEvent.js +5 -9
- package/other/dragHelper/DragHelperEvent.js.map +1 -1
- package/package.json +1 -1
- package/pool/ServiceLocatorObjectsPool.js +4 -38
- package/pool/ServiceLocatorObjectsPool.js.map +1 -1
- package/servicelocator/ServiceLocator.js +50 -71
- package/servicelocator/ServiceLocator.js.map +1 -1
- package/servicelocator/ServiceLocatorShortcuts.js +4 -4
- package/servicelocator/ServiceLocatorShortcuts.js.map +1 -1
- package/sounds/abstract/AbstractSound.js +22 -44
- package/sounds/abstract/AbstractSound.js.map +1 -1
- package/sounds/abstract/AbstractSoundsManager.js +70 -109
- package/sounds/abstract/AbstractSoundsManager.js.map +1 -1
- package/sounds/abstract/SoundsManagerEvent.js +1 -1
- package/sounds/abstract/SoundsManagerEvent.js.map +1 -1
- package/sounds/howler/HowlerSound.js +20 -44
- package/sounds/howler/HowlerSound.js.map +1 -1
- package/sounds/howler/HowlerSoundEvent.js +1 -1
- package/sounds/howler/HowlerSoundEvent.js.map +1 -1
- package/sounds/howler/HowlerSoundsManager.js +6 -33
- package/sounds/howler/HowlerSoundsManager.js.map +1 -1
- package/timeout/tools/TimeoutTools.js +9 -42
- package/timeout/tools/TimeoutTools.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceLocator.js","sourceRoot":"","sources":["../../src/servicelocator/ServiceLocator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServiceLocator.js","sourceRoot":"","sources":["../../src/servicelocator/ServiceLocator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgB,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAQxE,MAAM,OAAO,cAAc;IAQvB,MAAM,CAAC,SAAS,CAAC,SAAiC,EAAE;QAChD,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,QAAQ;QACX,IAAI,aAAyB,CAAC;QAC9B,MAAM,IAAI,GAAmB,cAAc,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;QACpE,KAAK,IAAI,IAAI,IAAI,IAAI,EAAE;YACnB,aAAa,GAAG,cAAc,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC3D,IAAI,aAAa,CAAC,MAAM,EAAE;gBACtB,IAAI,aAAa,CAAC,MAAM,CAAC,aAAa,EAAE;oBACpC,cAAc,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;iBAClD;aACJ;SACJ;IACL,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,IAAkB,EAAE,MAAsB;QACjD,IAAI,aAAa,GAAe,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAElE,IAAI,MAAM,EAAE;YACR,IAAI,MAAM,CAAC,YAAY,EAAE;gBACrB,aAAa,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;gBAEjD,IAAI,qBAAqB,GAAe,cAAc,CAAC,YAAY,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;gBAChG,qBAAqB,CAAC,YAAY,GAAG,IAAI,CAAC;gBAE1C,IAAI,qBAAqB,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B,CAAC,WAAyB;QACvD,IAAI,MAAM,GAAW,WAAW,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;QACjE,IAAI,CAAC,MAAM,EAAE;YACT,IAAI,SAAS,GAAG,QAAQ,CAAC;YACzB,IAAI,UAAU,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC;YAC9E,IAAI,OAAO,GAAG,UAAU,CAAC;YACzB,IAAI,QAAQ,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YAEvD,MAAM,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;SAC/D;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;;AA/Mc,qBAAM,GAA2B,EAAE,CAAC;AAEpC,4BAAa,GAAyC,IAAI,UAAU,EAA4B,CAAC;AAEjG,uCAAwB,GAAkC,IAAI,UAAU,EAAqB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ServiceLocator } from "./ServiceLocator";
|
|
2
2
|
// Shortcuts
|
|
3
|
-
export
|
|
3
|
+
export const getInstance = ServiceLocator.getInstance;
|
|
4
4
|
// export const getInstanceWithConstructorParams: typeof ServiceLocator.getInstanceWithConstructorParams = ServiceLocator.getInstanceWithConstructorParams;
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
5
|
+
export const serviceLocatorAdd = ServiceLocator.add;
|
|
6
|
+
export const serviceLocatorProcessItemOnActivate = ServiceLocator.processItemOnActivate;
|
|
7
|
+
export const serviceLocatorProcessItemOnDeactivate = ServiceLocator.processItemOnDeactivate;
|
|
8
8
|
// For console debug
|
|
9
9
|
window["getInstance"] = getInstance;
|
|
10
10
|
//# sourceMappingURL=ServiceLocatorShortcuts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceLocatorShortcuts.js","sourceRoot":"","sources":["../../src/servicelocator/ServiceLocatorShortcuts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,YAAY;AACZ,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"ServiceLocatorShortcuts.js","sourceRoot":"","sources":["../../src/servicelocator/ServiceLocatorShortcuts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,YAAY;AACZ,MAAM,CAAC,MAAM,WAAW,GAAsC,cAAc,CAAC,WAAW,CAAC;AACzF,2JAA2J;AAC3J,MAAM,CAAC,MAAM,iBAAiB,GAA8B,cAAc,CAAC,GAAG,CAAC;AAC/E,MAAM,CAAC,MAAM,mCAAmC,GAAgD,cAAc,CAAC,qBAAqB,CAAC;AACrI,MAAM,CAAC,MAAM,qCAAqC,GAAkD,cAAc,CAAC,uBAAuB,CAAC;AAE3I,oBAAoB;AACpB,MAAM,CAAC,aAAa,CAAC,GAAG,WAAW,CAAC"}
|
|
@@ -1,60 +1,38 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { BaseObject } from "@flashist/fcore";
|
|
17
2
|
import { TweenLite } from "gsap";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return _super.call(this, config) || this;
|
|
3
|
+
export class AbstractSound extends BaseObject {
|
|
4
|
+
constructor(config) {
|
|
5
|
+
super(config);
|
|
22
6
|
}
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
construction(config) {
|
|
8
|
+
super.construction();
|
|
25
9
|
this.config = config;
|
|
26
|
-
}
|
|
27
|
-
|
|
10
|
+
}
|
|
11
|
+
setVolume(value) {
|
|
28
12
|
TweenLite.killTweensOf(this);
|
|
29
13
|
this.internalSetVolume(value);
|
|
30
|
-
}
|
|
31
|
-
|
|
14
|
+
}
|
|
15
|
+
tweenVolume(volume, time, onComplete) {
|
|
32
16
|
this.tweenVolumeValue = this.getVolume();
|
|
33
17
|
TweenLite.killTweensOf(this);
|
|
34
18
|
TweenLite.to(this, time, {
|
|
35
19
|
tweenVolumeValue: volume,
|
|
36
|
-
onComplete:
|
|
20
|
+
onComplete: () => {
|
|
37
21
|
if (onComplete) {
|
|
38
22
|
onComplete();
|
|
39
23
|
}
|
|
40
24
|
}
|
|
41
25
|
});
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
enumerable: false,
|
|
55
|
-
configurable: true
|
|
56
|
-
});
|
|
57
|
-
return AbstractSound;
|
|
58
|
-
}(BaseObject));
|
|
59
|
-
export { AbstractSound };
|
|
26
|
+
}
|
|
27
|
+
get tweenVolumeValue() {
|
|
28
|
+
return this._tweenVolumeValue;
|
|
29
|
+
}
|
|
30
|
+
set tweenVolumeValue(value) {
|
|
31
|
+
if (value === this._tweenVolumeValue) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
this._tweenVolumeValue = value;
|
|
35
|
+
this.internalSetVolume(this._tweenVolumeValue);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
60
38
|
//# sourceMappingURL=AbstractSound.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractSound.js","sourceRoot":"","sources":["../../../src/sounds/abstract/AbstractSound.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AbstractSound.js","sourceRoot":"","sources":["../../../src/sounds/abstract/AbstractSound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAG3C,OAAO,EAAC,SAAS,EAAC,MAAM,MAAM,CAAC;AAK/B,MAAM,OAAgB,aAAc,SAAQ,UAAU;IAKlD,YAAY,MAAoB;QAC5B,KAAK,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAES,YAAY,CAAC,MAAoB;QACvC,KAAK,CAAC,YAAY,EAAE,CAAC;QAErB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAMM,SAAS,CAAC,KAAa;QAC1B,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAGM,WAAW,CAAC,MAAc,EAAE,IAAY,EAAE,UAAqB;QAClE,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAEzC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC7B,SAAS,CAAC,EAAE,CACR,IAAI,EACJ,IAAI,EACJ;YACI,gBAAgB,EAAE,MAAM;YAExB,UAAU,EAAE,GAAG,EAAE;gBACb,IAAI,UAAU,EAAE;oBACZ,UAAU,EAAE,CAAC;iBAChB;YACL,CAAC;SACJ,CACJ,CAAC;IACN,CAAC;IAED,IAAc,gBAAgB;QAC1B,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IACD,IAAc,gBAAgB,CAAC,KAAa;QACxC,IAAI,KAAK,KAAK,IAAI,CAAC,iBAAiB,EAAE;YAClC,OAAO;SACV;QAED,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QAC/B,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACnD,CAAC;CAeJ"}
|
|
@@ -1,109 +1,76 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { AssociativeArray, BaseObject, Lock } from "@flashist/fcore";
|
|
17
2
|
import { TweenLite } from "gsap";
|
|
18
3
|
import { SoundsManagerEvent } from "./SoundsManagerEvent";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
AbstractSoundsManager.prototype.construction = function () {
|
|
29
|
-
var args = [];
|
|
30
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
31
|
-
args[_i] = arguments[_i];
|
|
32
|
-
}
|
|
33
|
-
_super.prototype.construction.apply(this, args);
|
|
4
|
+
export class AbstractSoundsManager extends BaseObject {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.soundsToIdMap = new AssociativeArray();
|
|
8
|
+
this.defaultTweenTime = 0.5;
|
|
9
|
+
this.volume = 1;
|
|
10
|
+
}
|
|
11
|
+
construction(...args) {
|
|
12
|
+
super.construction(...args);
|
|
34
13
|
this._enabled = false;
|
|
35
14
|
this.disableLock = new Lock();
|
|
36
15
|
this.defaultTweenTime = 0.5;
|
|
37
16
|
this.volume = 1;
|
|
38
17
|
this.setVolume(this.volume);
|
|
39
18
|
this.calculateEnabled();
|
|
40
|
-
}
|
|
41
|
-
|
|
19
|
+
}
|
|
20
|
+
registerSound(id, sound) {
|
|
42
21
|
this.soundsToIdMap.push(sound, id);
|
|
43
|
-
}
|
|
44
|
-
|
|
22
|
+
}
|
|
23
|
+
getSound(id) {
|
|
45
24
|
return this.soundsToIdMap.getItem(id);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
});
|
|
60
|
-
AbstractSoundsManager.prototype.calculateEnabled = function () {
|
|
61
|
-
var prevEnabled = this.enabled;
|
|
62
|
-
var newEnabled = !this.disableLock.enabled;
|
|
25
|
+
}
|
|
26
|
+
// ENABLED: START
|
|
27
|
+
/**
|
|
28
|
+
* Used to disable (aka mute) Sounds Manager (e.g. when focus is lost / tab is switched).
|
|
29
|
+
* It's different from the mute value, because the mute value will be controlled by the sound control buttons
|
|
30
|
+
* and saved / restored from the local storage (aka save system)
|
|
31
|
+
*/
|
|
32
|
+
get enabled() {
|
|
33
|
+
return this._enabled;
|
|
34
|
+
}
|
|
35
|
+
calculateEnabled() {
|
|
36
|
+
const prevEnabled = this.enabled;
|
|
37
|
+
const newEnabled = !this.disableLock.enabled;
|
|
63
38
|
this._enabled = newEnabled;
|
|
64
39
|
if (newEnabled !== prevEnabled) {
|
|
65
40
|
this.dispatchEvent(SoundsManagerEvent.ENABLED_CHANGE);
|
|
66
41
|
}
|
|
67
42
|
this.commitData();
|
|
68
|
-
}
|
|
69
|
-
|
|
43
|
+
}
|
|
44
|
+
addDisableLock(locker) {
|
|
70
45
|
this.disableLock.add(locker);
|
|
71
46
|
this.calculateEnabled();
|
|
72
|
-
}
|
|
73
|
-
|
|
47
|
+
}
|
|
48
|
+
removeDisableLock(locker) {
|
|
74
49
|
this.disableLock.remove(locker);
|
|
75
50
|
this.calculateEnabled();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
enumerable: false,
|
|
83
|
-
configurable: true
|
|
84
|
-
});
|
|
85
|
-
AbstractSoundsManager.prototype.activate = function () {
|
|
51
|
+
}
|
|
52
|
+
// ENABLED: END
|
|
53
|
+
get isActivated() {
|
|
54
|
+
return this._isActivated;
|
|
55
|
+
}
|
|
56
|
+
activate() {
|
|
86
57
|
this._isActivated = true;
|
|
87
58
|
this.commitData();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
});
|
|
104
|
-
AbstractSoundsManager.prototype.commitData = function () {
|
|
105
|
-
_super.prototype.commitData.call(this);
|
|
106
|
-
var newVolume = this.getVolume();
|
|
59
|
+
}
|
|
60
|
+
get isMuted() {
|
|
61
|
+
return this._isMuted;
|
|
62
|
+
}
|
|
63
|
+
set isMuted(value) {
|
|
64
|
+
if (value === this.isMuted) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this._isMuted = value;
|
|
68
|
+
this.dispatchEvent(SoundsManagerEvent.IS_MUTED_CHANGE);
|
|
69
|
+
this.commitData();
|
|
70
|
+
}
|
|
71
|
+
commitData() {
|
|
72
|
+
super.commitData();
|
|
73
|
+
let newVolume = this.getVolume();
|
|
107
74
|
if (!this.isActivated) {
|
|
108
75
|
newVolume = 0;
|
|
109
76
|
}
|
|
@@ -120,18 +87,18 @@ var AbstractSoundsManager = /** @class */ (function (_super) {
|
|
|
120
87
|
catch (error) {
|
|
121
88
|
console.log("AbstractSoundsManager | commitData __ error: ", error);
|
|
122
89
|
}
|
|
123
|
-
}
|
|
90
|
+
}
|
|
124
91
|
// VOLUME: START
|
|
125
|
-
|
|
92
|
+
getVolume() {
|
|
126
93
|
return this.volume;
|
|
127
|
-
}
|
|
128
|
-
|
|
94
|
+
}
|
|
95
|
+
setVolume(value) {
|
|
129
96
|
TweenLite.killTweensOf(this);
|
|
130
97
|
this.volume = value;
|
|
131
98
|
this.dispatchEvent(SoundsManagerEvent.VOLUME_CHANGE);
|
|
132
99
|
this.commitData();
|
|
133
|
-
}
|
|
134
|
-
|
|
100
|
+
}
|
|
101
|
+
tweenVolume(volume, time, onComplete) {
|
|
135
102
|
if (!time && time !== 0) {
|
|
136
103
|
time = this.defaultTweenTime;
|
|
137
104
|
}
|
|
@@ -139,28 +106,22 @@ var AbstractSoundsManager = /** @class */ (function (_super) {
|
|
|
139
106
|
TweenLite.killTweensOf(this);
|
|
140
107
|
TweenLite.to(this, time, {
|
|
141
108
|
tweenVolumeValue: volume,
|
|
142
|
-
onComplete:
|
|
109
|
+
onComplete: () => {
|
|
143
110
|
if (onComplete) {
|
|
144
111
|
onComplete();
|
|
145
112
|
}
|
|
146
113
|
}
|
|
147
114
|
});
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
enumerable: false,
|
|
161
|
-
configurable: true
|
|
162
|
-
});
|
|
163
|
-
return AbstractSoundsManager;
|
|
164
|
-
}(BaseObject));
|
|
165
|
-
export { AbstractSoundsManager };
|
|
115
|
+
}
|
|
116
|
+
get tweenVolumeValue() {
|
|
117
|
+
return this._tweenVolumeValue;
|
|
118
|
+
}
|
|
119
|
+
set tweenVolumeValue(value) {
|
|
120
|
+
if (value === this._tweenVolumeValue) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
this._tweenVolumeValue = value;
|
|
124
|
+
this.setVolume(this._tweenVolumeValue);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
166
127
|
//# sourceMappingURL=AbstractSoundsManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractSoundsManager.js","sourceRoot":"","sources":["../../../src/sounds/abstract/AbstractSoundsManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AbstractSoundsManager.js","sourceRoot":"","sources":["../../../src/sounds/abstract/AbstractSoundsManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAC,SAAS,EAAC,MAAM,MAAM,CAAC;AAG/B,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAExD,MAAM,OAAgB,qBAAsB,SAAQ,UAAU;IAA9D;;QAEc,kBAAa,GAA4B,IAAI,gBAAgB,EAAS,CAAC;QAU1E,qBAAgB,GAAW,GAAG,CAAC;QAC5B,WAAM,GAAW,CAAC,CAAC;IAgKjC,CAAC;IA9Ja,YAAY,CAAC,GAAG,IAAI;QAC1B,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;QAE5B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAA;QACrB,IAAI,CAAC,WAAW,GAAG,IAAI,IAAI,EAAE,CAAC;QAE9B,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAEhB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAA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,gBAAgB,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAEzC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC7B,SAAS,CAAC,EAAE,CACR,IAAI,EACJ,IAAI,EACJ;YACI,gBAAgB,EAAE,MAAM;YAExB,UAAU,EAAE,GAAG,EAAE;gBACb,IAAI,UAAU,EAAE;oBACZ,UAAU,EAAE,CAAC;iBAChB;YACL,CAAC;SACJ,CACJ,CAAC;IACN,CAAC;IAED,IAAc,gBAAgB;QAC1B,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAClC,CAAC;IACD,IAAc,gBAAgB,CAAC,KAAa;QACxC,IAAI,KAAK,KAAK,IAAI,CAAC,iBAAiB,EAAE;YAClC,OAAO;SACV;QAED,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC3C,CAAC;CAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SoundsManagerEvent.js","sourceRoot":"","sources":["../../../src/sounds/abstract/SoundsManagerEvent.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"SoundsManagerEvent.js","sourceRoot":"","sources":["../../../src/sounds/abstract/SoundsManagerEvent.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,aAAa,EAAE,kCAAkC;IACjD,cAAc,EAAE,mCAAmC;IACnD,eAAe,EAAE,iCAAiC;CACrD,CAAC"}
|
|
@@ -1,63 +1,39 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { Howl } from "howler";
|
|
17
2
|
import { AbstractSound } from "../abstract/AbstractSound";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return _super.call(this, config) || this;
|
|
3
|
+
export class HowlerSound extends AbstractSound {
|
|
4
|
+
constructor(config) {
|
|
5
|
+
super(config);
|
|
22
6
|
}
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
construction(config) {
|
|
8
|
+
super.construction(config);
|
|
25
9
|
this.engineSound = new Howl({ src: this.config.src, preload: this.config.preload });
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
10
|
+
}
|
|
11
|
+
destruction() {
|
|
12
|
+
super.destruction();
|
|
29
13
|
if (this.engineSound) {
|
|
30
14
|
this.engineSound.unload();
|
|
31
15
|
this.engineSound = null;
|
|
32
16
|
}
|
|
33
|
-
}
|
|
34
|
-
|
|
17
|
+
}
|
|
18
|
+
getVolume() {
|
|
35
19
|
return this.engineSound.volume();
|
|
36
|
-
}
|
|
37
|
-
|
|
20
|
+
}
|
|
21
|
+
internalSetVolume(value) {
|
|
38
22
|
this.engineSound.volume(value);
|
|
39
|
-
}
|
|
40
|
-
|
|
23
|
+
}
|
|
24
|
+
play(config) {
|
|
41
25
|
if (!config) {
|
|
42
26
|
config = {};
|
|
43
27
|
}
|
|
44
28
|
this.engineSound.loop(config.loop);
|
|
45
29
|
this.engineSound.play();
|
|
46
|
-
}
|
|
47
|
-
|
|
30
|
+
}
|
|
31
|
+
stop() {
|
|
48
32
|
this.engineSound.stop();
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
}(AbstractSound));
|
|
52
|
-
export { HowlerSound };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
53
35
|
// TODO: change when more adapters are supported,
|
|
54
36
|
// probably builds of the flibs should be separated per adapter
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
function Sound() {
|
|
58
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
59
|
-
}
|
|
60
|
-
return Sound;
|
|
61
|
-
}(HowlerSound));
|
|
62
|
-
export { Sound };
|
|
37
|
+
export class Sound extends HowlerSound {
|
|
38
|
+
}
|
|
63
39
|
//# sourceMappingURL=HowlerSound.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HowlerSound.js","sourceRoot":"","sources":["../../../src/sounds/howler/HowlerSound.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HowlerSound.js","sourceRoot":"","sources":["../../../src/sounds/howler/HowlerSound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAK1D,MAAM,OAAO,WAAY,SAAQ,aAAa;IAM1C,YAAY,MAA0B;QAClC,KAAK,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAES,YAAY,CAAC,MAA0B;QAC7C,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAE3B,IAAI,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED,WAAW;QACP,KAAK,CAAC,WAAW,EAAE,CAAC;QAEpB,IAAI,IAAI,CAAC,WAAW,EAAE;YAClB,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;YAC1B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;SAC3B;IACL,CAAC;IAED,SAAS;QACL,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;IACrC,CAAC;IAES,iBAAiB,CAAC,KAAa;QACrC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,IAAI,CAAC,MAAyB;QAC1B,IAAI,CAAC,MAAM,EAAE;YACT,MAAM,GAAG,EAAE,CAAC;SACf;QAED,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED,IAAI;QACA,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;CAsEJ;AAED,iDAAiD;AACjD,+DAA+D;AAC/D,MAAM,OAAO,KAAM,SAAQ,WAAW;CACrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HowlerSoundEvent.js","sourceRoot":"","sources":["../../../src/sounds/howler/HowlerSoundEvent.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"HowlerSoundEvent.js","sourceRoot":"","sources":["../../../src/sounds/howler/HowlerSoundEvent.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,WAAW;IACvB,MAAM,EAAE,QAAQ;IAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;oFA4BgF;CACnF,CAAA"}
|
|
@@ -1,39 +1,12 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { Howler } from "howler";
|
|
17
2
|
import { AbstractSoundsManager } from "../../index";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function HowlerSoundsManager() {
|
|
21
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
|
-
}
|
|
23
|
-
HowlerSoundsManager.prototype.internalSetVolume = function (value) {
|
|
3
|
+
export class HowlerSoundsManager extends AbstractSoundsManager {
|
|
4
|
+
internalSetVolume(value) {
|
|
24
5
|
Howler.volume(value);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}(AbstractSoundsManager));
|
|
28
|
-
export { HowlerSoundsManager };
|
|
6
|
+
}
|
|
7
|
+
}
|
|
29
8
|
// TODO: change when more adapters are supported,
|
|
30
9
|
// probably builds of the flibs should be separated per adapter
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
function SoundsManager() {
|
|
34
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
-
}
|
|
36
|
-
return SoundsManager;
|
|
37
|
-
}(HowlerSoundsManager));
|
|
38
|
-
export { SoundsManager };
|
|
10
|
+
export class SoundsManager extends HowlerSoundsManager {
|
|
11
|
+
}
|
|
39
12
|
//# sourceMappingURL=HowlerSoundsManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HowlerSoundsManager.js","sourceRoot":"","sources":["../../../src/sounds/howler/HowlerSoundsManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HowlerSoundsManager.js","sourceRoot":"","sources":["../../../src/sounds/howler/HowlerSoundsManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,MAAM,EAAC,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAC,qBAAqB,EAAC,MAAM,aAAa,CAAC;AAElD,MAAM,OAAO,mBAAoB,SAAQ,qBAAqB;IAChD,iBAAiB,CAAC,KAAa;QACrC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;CACJ;AAED,iDAAiD;AACjD,+DAA+D;AAC/D,MAAM,OAAO,aAAc,SAAQ,mBAAmB;CACrD"}
|
|
@@ -7,48 +7,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
var TimeoutTools = /** @class */ (function () {
|
|
38
|
-
function TimeoutTools() {
|
|
39
|
-
}
|
|
40
|
-
TimeoutTools.asyncTimeout = function (timeout) {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
-
return __generator(this, function (_a) {
|
|
43
|
-
return [2 /*return*/, new Promise(function (resolve) {
|
|
44
|
-
setTimeout(function () {
|
|
45
|
-
resolve();
|
|
46
|
-
}, timeout);
|
|
47
|
-
})];
|
|
10
|
+
export class TimeoutTools {
|
|
11
|
+
static asyncTimeout(timeout) {
|
|
12
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
13
|
+
return new Promise((resolve) => {
|
|
14
|
+
setTimeout(() => {
|
|
15
|
+
resolve();
|
|
16
|
+
}, timeout);
|
|
48
17
|
});
|
|
49
18
|
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
}());
|
|
53
|
-
export { TimeoutTools };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
54
21
|
//# sourceMappingURL=TimeoutTools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeoutTools.js","sourceRoot":"","sources":["../../../src/timeout/tools/TimeoutTools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimeoutTools.js","sourceRoot":"","sources":["../../../src/timeout/tools/TimeoutTools.ts"],"names":[],"mappings":";;;;;;;;;AAAA,MAAM,OAAO,YAAY;IACrB,MAAM,CAAO,YAAY,CAAC,OAAe;;YACrC,OAAO,IAAI,OAAO,CACd,CAAC,OAAiB,EAAE,EAAE;gBAClB,UAAU,CACN,GAAG,EAAE;oBACD,OAAO,EAAE,CAAC;gBACd,CAAC,EACD,OAAO,CACV,CAAC;YACN,CAAC,CACJ,CAAA;QACL,CAAC;KAAA;CACJ"}
|