@tsparticles/interaction-external-slow 3.0.0-alpha.0
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/LICENSE +21 -0
- package/README.md +70 -0
- package/browser/Options/Classes/Slow.js +17 -0
- package/browser/Options/Classes/SlowOptions.js +1 -0
- package/browser/Options/Interfaces/ISlow.js +1 -0
- package/browser/Slower.js +47 -0
- package/browser/Types.js +1 -0
- package/browser/index.js +6 -0
- package/cjs/Options/Classes/Slow.js +21 -0
- package/cjs/Options/Classes/SlowOptions.js +2 -0
- package/cjs/Options/Interfaces/ISlow.js +2 -0
- package/cjs/Slower.js +62 -0
- package/cjs/Types.js +2 -0
- package/cjs/index.js +35 -0
- package/esm/Options/Classes/Slow.js +17 -0
- package/esm/Options/Classes/SlowOptions.js +1 -0
- package/esm/Options/Interfaces/ISlow.js +1 -0
- package/esm/Slower.js +47 -0
- package/esm/Types.js +1 -0
- package/esm/index.js +6 -0
- package/package.json +82 -0
- package/report.html +39 -0
- package/tsparticles.interaction.external.slow.js +187 -0
- package/tsparticles.interaction.external.slow.min.js +2 -0
- package/tsparticles.interaction.external.slow.min.js.LICENSE.txt +8 -0
- package/types/Options/Classes/Slow.d.ts +8 -0
- package/types/Options/Classes/SlowOptions.d.ts +7 -0
- package/types/Options/Interfaces/ISlow.d.ts +4 -0
- package/types/Slower.d.ts +12 -0
- package/types/Types.d.ts +16 -0
- package/types/index.d.ts +4 -0
- package/umd/Options/Classes/Slow.js +31 -0
- package/umd/Options/Classes/SlowOptions.js +12 -0
- package/umd/Options/Interfaces/ISlow.js +12 -0
- package/umd/Slower.js +61 -0
- package/umd/Types.js +12 -0
- package/umd/index.js +34 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.0.0-alpha.0
|
|
8
|
+
*/
|
|
9
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
+
module.exports = factory(require("@tsparticles/engine"));
|
|
12
|
+
else if(typeof define === 'function' && define.amd)
|
|
13
|
+
define(["@tsparticles/engine"], factory);
|
|
14
|
+
else {
|
|
15
|
+
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine")) : factory(root["window"]);
|
|
16
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
|
+
}
|
|
18
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__533__) => {
|
|
19
|
+
return /******/ (() => { // webpackBootstrap
|
|
20
|
+
/******/ "use strict";
|
|
21
|
+
/******/ var __webpack_modules__ = ({
|
|
22
|
+
|
|
23
|
+
/***/ 533:
|
|
24
|
+
/***/ ((module) => {
|
|
25
|
+
|
|
26
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__533__;
|
|
27
|
+
|
|
28
|
+
/***/ })
|
|
29
|
+
|
|
30
|
+
/******/ });
|
|
31
|
+
/************************************************************************/
|
|
32
|
+
/******/ // The module cache
|
|
33
|
+
/******/ var __webpack_module_cache__ = {};
|
|
34
|
+
/******/
|
|
35
|
+
/******/ // The require function
|
|
36
|
+
/******/ function __webpack_require__(moduleId) {
|
|
37
|
+
/******/ // Check if module is in cache
|
|
38
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
39
|
+
/******/ if (cachedModule !== undefined) {
|
|
40
|
+
/******/ return cachedModule.exports;
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ // Create a new module (and put it into the cache)
|
|
43
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
44
|
+
/******/ // no module.id needed
|
|
45
|
+
/******/ // no module.loaded needed
|
|
46
|
+
/******/ exports: {}
|
|
47
|
+
/******/ };
|
|
48
|
+
/******/
|
|
49
|
+
/******/ // Execute the module function
|
|
50
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // Return the exports of the module
|
|
53
|
+
/******/ return module.exports;
|
|
54
|
+
/******/ }
|
|
55
|
+
/******/
|
|
56
|
+
/************************************************************************/
|
|
57
|
+
/******/ /* webpack/runtime/define property getters */
|
|
58
|
+
/******/ (() => {
|
|
59
|
+
/******/ // define getter functions for harmony exports
|
|
60
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
61
|
+
/******/ for(var key in definition) {
|
|
62
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
63
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
64
|
+
/******/ }
|
|
65
|
+
/******/ }
|
|
66
|
+
/******/ };
|
|
67
|
+
/******/ })();
|
|
68
|
+
/******/
|
|
69
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
70
|
+
/******/ (() => {
|
|
71
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
72
|
+
/******/ })();
|
|
73
|
+
/******/
|
|
74
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
75
|
+
/******/ (() => {
|
|
76
|
+
/******/ // define __esModule on exports
|
|
77
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
78
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
79
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
80
|
+
/******/ }
|
|
81
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
82
|
+
/******/ };
|
|
83
|
+
/******/ })();
|
|
84
|
+
/******/
|
|
85
|
+
/************************************************************************/
|
|
86
|
+
var __webpack_exports__ = {};
|
|
87
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
88
|
+
(() => {
|
|
89
|
+
// ESM COMPAT FLAG
|
|
90
|
+
__webpack_require__.r(__webpack_exports__);
|
|
91
|
+
|
|
92
|
+
// EXPORTS
|
|
93
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
94
|
+
"Slow": () => (/* reexport */ Slow),
|
|
95
|
+
"loadExternalSlowInteraction": () => (/* binding */ loadExternalSlowInteraction)
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"}
|
|
99
|
+
var engine_root_window_ = __webpack_require__(533);
|
|
100
|
+
;// CONCATENATED MODULE: ./dist/browser/Options/Classes/Slow.js
|
|
101
|
+
class Slow {
|
|
102
|
+
constructor() {
|
|
103
|
+
this.factor = 3;
|
|
104
|
+
this.radius = 200;
|
|
105
|
+
}
|
|
106
|
+
load(data) {
|
|
107
|
+
if (!data) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (data.factor !== undefined) {
|
|
111
|
+
this.factor = data.factor;
|
|
112
|
+
}
|
|
113
|
+
if (data.radius !== undefined) {
|
|
114
|
+
this.radius = data.radius;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
;// CONCATENATED MODULE: ./dist/browser/Slower.js
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
class Slower extends engine_root_window_.ExternalInteractorBase {
|
|
122
|
+
constructor(container) {
|
|
123
|
+
super(container);
|
|
124
|
+
}
|
|
125
|
+
clear(particle, delta, force) {
|
|
126
|
+
if (particle.slow.inRange && !force) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
particle.slow.factor = 1;
|
|
130
|
+
}
|
|
131
|
+
init() {
|
|
132
|
+
const container = this.container,
|
|
133
|
+
slow = container.actualOptions.interactivity.modes.slow;
|
|
134
|
+
if (!slow) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
container.retina.slowModeRadius = slow.radius * container.retina.pixelRatio;
|
|
138
|
+
}
|
|
139
|
+
async interact() {}
|
|
140
|
+
isEnabled(particle) {
|
|
141
|
+
var _a;
|
|
142
|
+
const container = this.container,
|
|
143
|
+
mouse = container.interactivity.mouse,
|
|
144
|
+
events = ((_a = particle === null || particle === void 0 ? void 0 : particle.interactivity) !== null && _a !== void 0 ? _a : container.actualOptions.interactivity).events;
|
|
145
|
+
return events.onHover.enable && !!mouse.position && (0,engine_root_window_.isInArray)("slow", events.onHover.mode);
|
|
146
|
+
}
|
|
147
|
+
loadModeOptions(options, ...sources) {
|
|
148
|
+
if (!options.slow) {
|
|
149
|
+
options.slow = new Slow();
|
|
150
|
+
}
|
|
151
|
+
for (const source of sources) {
|
|
152
|
+
options.slow.load(source === null || source === void 0 ? void 0 : source.slow);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
reset(particle) {
|
|
156
|
+
particle.slow.inRange = false;
|
|
157
|
+
const container = this.container,
|
|
158
|
+
options = container.actualOptions,
|
|
159
|
+
mousePos = container.interactivity.mouse.position,
|
|
160
|
+
radius = container.retina.slowModeRadius,
|
|
161
|
+
slow = options.interactivity.modes.slow;
|
|
162
|
+
if (!slow || !radius || radius < 0 || !mousePos) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
const particlePos = particle.getPosition(),
|
|
166
|
+
dist = (0,engine_root_window_.getDistance)(mousePos, particlePos),
|
|
167
|
+
proximityFactor = dist / radius,
|
|
168
|
+
slowFactor = slow.factor;
|
|
169
|
+
if (dist <= radius) {
|
|
170
|
+
particle.slow.inRange = true;
|
|
171
|
+
particle.slow.factor = proximityFactor / slowFactor;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
;// CONCATENATED MODULE: ./dist/browser/index.js
|
|
176
|
+
|
|
177
|
+
async function loadExternalSlowInteraction(engine) {
|
|
178
|
+
await engine.addInteractor("externalSlow", container => new Slower(container));
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
})();
|
|
183
|
+
|
|
184
|
+
/******/ return __webpack_exports__;
|
|
185
|
+
/******/ })()
|
|
186
|
+
;
|
|
187
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see tsparticles.interaction.external.slow.min.js.LICENSE.txt */
|
|
2
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],e);else{var o="object"==typeof exports?e(require("@tsparticles/engine")):e(t.window);for(var r in o)("object"==typeof exports?exports:t)[r]=o[r]}}(this,(t=>(()=>{"use strict";var e={533:e=>{e.exports=t}},o={};function r(t){var i=o[t];if(void 0!==i)return i.exports;var n=o[t]={exports:{}};return e[t](n,n.exports,r),n.exports}r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{r.r(i),r.d(i,{Slow:()=>e,loadExternalSlowInteraction:()=>n});var t=r(533);class e{constructor(){this.factor=3,this.radius=200}load(t){t&&(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.radius&&(this.radius=t.radius))}}class o extends t.ExternalInteractorBase{constructor(t){super(t)}clear(t,e,o){t.slow.inRange&&!o||(t.slow.factor=1)}init(){const t=this.container,e=t.actualOptions.interactivity.modes.slow;e&&(t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}async interact(){}isEnabled(e){var o;const r=this.container,i=r.interactivity.mouse,n=(null!==(o=null==e?void 0:e.interactivity)&&void 0!==o?o:r.actualOptions.interactivity).events;return n.onHover.enable&&!!i.position&&(0,t.isInArray)("slow",n.onHover.mode)}loadModeOptions(t,...o){t.slow||(t.slow=new e);for(const e of o)t.slow.load(null==e?void 0:e.slow)}reset(e){e.slow.inRange=!1;const o=this.container,r=o.actualOptions,i=o.interactivity.mouse.position,n=o.retina.slowModeRadius,s=r.interactivity.modes.slow;if(!s||!n||n<0||!i)return;const a=e.getPosition(),l=(0,t.getDistance)(i,a),c=l/n,d=s.factor;l<=n&&(e.slow.inRange=!0,e.slow.factor=c/d)}}async function n(t){await t.addInteractor("externalSlow",(t=>new o(t)))}})(),i})()));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IOptionLoader, RecursivePartial } from "@tsparticles/engine";
|
|
2
|
+
import type { ISlow } from "../Interfaces/ISlow";
|
|
3
|
+
export declare class Slow implements ISlow, IOptionLoader<ISlow> {
|
|
4
|
+
factor: number;
|
|
5
|
+
radius: number;
|
|
6
|
+
constructor();
|
|
7
|
+
load(data?: RecursivePartial<ISlow>): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ExternalInteractorBase } from "@tsparticles/engine";
|
|
2
|
+
import type { IDelta, IModes, Modes, Particle, RecursivePartial } from "@tsparticles/engine";
|
|
3
|
+
import type { ISlowMode, SlowContainer, SlowMode } from "./Types";
|
|
4
|
+
export declare class Slower extends ExternalInteractorBase<SlowContainer> {
|
|
5
|
+
constructor(container: SlowContainer);
|
|
6
|
+
clear(particle: Particle, delta: IDelta, force?: boolean): void;
|
|
7
|
+
init(): void;
|
|
8
|
+
interact(): Promise<void>;
|
|
9
|
+
isEnabled(particle?: Particle): boolean;
|
|
10
|
+
loadModeOptions(options: Modes & SlowMode, ...sources: RecursivePartial<(IModes & ISlowMode) | undefined>[]): void;
|
|
11
|
+
reset(particle: Particle): void;
|
|
12
|
+
}
|
package/types/Types.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Container } from "@tsparticles/engine";
|
|
2
|
+
import type { ISlow } from "./Options/Interfaces/ISlow";
|
|
3
|
+
import type { Slow } from "./Options/Classes/Slow";
|
|
4
|
+
import type { SlowOptions } from "./Options/Classes/SlowOptions";
|
|
5
|
+
export type ISlowMode = {
|
|
6
|
+
slow: ISlow;
|
|
7
|
+
};
|
|
8
|
+
export type SlowMode = {
|
|
9
|
+
slow?: Slow;
|
|
10
|
+
};
|
|
11
|
+
export type SlowContainer = Container & {
|
|
12
|
+
actualOptions: SlowOptions;
|
|
13
|
+
retina: {
|
|
14
|
+
slowModeRadius?: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Slow = void 0;
|
|
13
|
+
class Slow {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.factor = 3;
|
|
16
|
+
this.radius = 200;
|
|
17
|
+
}
|
|
18
|
+
load(data) {
|
|
19
|
+
if (!data) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (data.factor !== undefined) {
|
|
23
|
+
this.factor = data.factor;
|
|
24
|
+
}
|
|
25
|
+
if (data.radius !== undefined) {
|
|
26
|
+
this.radius = data.radius;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.Slow = Slow;
|
|
31
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
});
|
package/umd/Slower.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", "@tsparticles/engine", "./Options/Classes/Slow"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Slower = void 0;
|
|
13
|
+
const engine_1 = require("@tsparticles/engine");
|
|
14
|
+
const Slow_1 = require("./Options/Classes/Slow");
|
|
15
|
+
class Slower extends engine_1.ExternalInteractorBase {
|
|
16
|
+
constructor(container) {
|
|
17
|
+
super(container);
|
|
18
|
+
}
|
|
19
|
+
clear(particle, delta, force) {
|
|
20
|
+
if (particle.slow.inRange && !force) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
particle.slow.factor = 1;
|
|
24
|
+
}
|
|
25
|
+
init() {
|
|
26
|
+
const container = this.container, slow = container.actualOptions.interactivity.modes.slow;
|
|
27
|
+
if (!slow) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
container.retina.slowModeRadius = slow.radius * container.retina.pixelRatio;
|
|
31
|
+
}
|
|
32
|
+
async interact() {
|
|
33
|
+
}
|
|
34
|
+
isEnabled(particle) {
|
|
35
|
+
var _a;
|
|
36
|
+
const container = this.container, mouse = container.interactivity.mouse, events = ((_a = particle === null || particle === void 0 ? void 0 : particle.interactivity) !== null && _a !== void 0 ? _a : container.actualOptions.interactivity).events;
|
|
37
|
+
return events.onHover.enable && !!mouse.position && (0, engine_1.isInArray)("slow", events.onHover.mode);
|
|
38
|
+
}
|
|
39
|
+
loadModeOptions(options, ...sources) {
|
|
40
|
+
if (!options.slow) {
|
|
41
|
+
options.slow = new Slow_1.Slow();
|
|
42
|
+
}
|
|
43
|
+
for (const source of sources) {
|
|
44
|
+
options.slow.load(source === null || source === void 0 ? void 0 : source.slow);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
reset(particle) {
|
|
48
|
+
particle.slow.inRange = false;
|
|
49
|
+
const container = this.container, options = container.actualOptions, mousePos = container.interactivity.mouse.position, radius = container.retina.slowModeRadius, slow = options.interactivity.modes.slow;
|
|
50
|
+
if (!slow || !radius || radius < 0 || !mousePos) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const particlePos = particle.getPosition(), dist = (0, engine_1.getDistance)(mousePos, particlePos), proximityFactor = dist / radius, slowFactor = slow.factor;
|
|
54
|
+
if (dist <= radius) {
|
|
55
|
+
particle.slow.inRange = true;
|
|
56
|
+
particle.slow.factor = proximityFactor / slowFactor;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.Slower = Slower;
|
|
61
|
+
});
|
package/umd/Types.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
});
|
package/umd/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
+
if (k2 === undefined) k2 = k;
|
|
3
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(o, k2, desc);
|
|
8
|
+
}) : (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
o[k2] = m[k];
|
|
11
|
+
}));
|
|
12
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
13
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
14
|
+
};
|
|
15
|
+
(function (factory) {
|
|
16
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
17
|
+
var v = factory(require, exports);
|
|
18
|
+
if (v !== undefined) module.exports = v;
|
|
19
|
+
}
|
|
20
|
+
else if (typeof define === "function" && define.amd) {
|
|
21
|
+
define(["require", "exports", "./Slower", "./Options/Classes/Slow", "./Options/Interfaces/ISlow"], factory);
|
|
22
|
+
}
|
|
23
|
+
})(function (require, exports) {
|
|
24
|
+
"use strict";
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.loadExternalSlowInteraction = void 0;
|
|
27
|
+
const Slower_1 = require("./Slower");
|
|
28
|
+
async function loadExternalSlowInteraction(engine) {
|
|
29
|
+
await engine.addInteractor("externalSlow", (container) => new Slower_1.Slower(container));
|
|
30
|
+
}
|
|
31
|
+
exports.loadExternalSlowInteraction = loadExternalSlowInteraction;
|
|
32
|
+
__exportStar(require("./Options/Classes/Slow"), exports);
|
|
33
|
+
__exportStar(require("./Options/Interfaces/ISlow"), exports);
|
|
34
|
+
});
|