@tsparticles/updater-out-modes 3.0.0-beta.0 → 3.0.0-beta.2
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/README.md +1 -1
- package/browser/BounceOutMode.js +1 -1
- package/browser/OutOfCanvasUpdater.js +4 -4
- package/browser/index.js +1 -1
- package/browser/package.json +1 -0
- package/cjs/BounceOutMode.js +3 -3
- package/cjs/OutOfCanvasUpdater.js +8 -8
- package/cjs/index.js +2 -2
- package/cjs/package.json +1 -0
- package/esm/BounceOutMode.js +1 -1
- package/esm/OutOfCanvasUpdater.js +4 -4
- package/esm/index.js +1 -1
- package/esm/package.json +1 -0
- package/package.json +18 -6
- package/report.html +23 -5
- package/tsparticles.updater.out-modes.js +1 -1
- package/tsparticles.updater.out-modes.min.js.LICENSE.txt +1 -1
- package/types/BounceOutMode.d.ts +1 -1
- package/types/DestroyOutMode.d.ts +1 -1
- package/types/NoneOutMode.d.ts +1 -1
- package/types/OutOfCanvasUpdater.d.ts +1 -1
- package/types/OutOutMode.d.ts +1 -1
- package/types/Utils.d.ts +1 -1
- package/umd/BounceOutMode.js +4 -4
- package/umd/OutOfCanvasUpdater.js +9 -9
- package/umd/index.js +3 -3
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@tsparticles/updater-out-modes)
|
|
7
7
|
[](https://www.npmjs.com/package/@tsparticles/updater-out-modes) [](https://github.com/sponsors/matteobruni)
|
|
8
8
|
|
|
9
|
-
[tsParticles](https://github.com/
|
|
9
|
+
[tsParticles](https://github.com/tsparticles/tsparticles) updater plugin for out modes animations.
|
|
10
10
|
|
|
11
11
|
## How to use it
|
|
12
12
|
|
package/browser/BounceOutMode.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { calculateBounds, } from "@tsparticles/engine";
|
|
2
|
-
import { bounceHorizontal, bounceVertical } from "./Utils";
|
|
2
|
+
import { bounceHorizontal, bounceVertical } from "./Utils.js";
|
|
3
3
|
export class BounceOutMode {
|
|
4
4
|
constructor(container) {
|
|
5
5
|
this.container = container;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BounceOutMode } from "./BounceOutMode";
|
|
2
|
-
import { DestroyOutMode } from "./DestroyOutMode";
|
|
3
|
-
import { NoneOutMode } from "./NoneOutMode";
|
|
4
|
-
import { OutOutMode } from "./OutOutMode";
|
|
1
|
+
import { BounceOutMode } from "./BounceOutMode.js";
|
|
2
|
+
import { DestroyOutMode } from "./DestroyOutMode.js";
|
|
3
|
+
import { NoneOutMode } from "./NoneOutMode.js";
|
|
4
|
+
import { OutOutMode } from "./OutOutMode.js";
|
|
5
5
|
export class OutOfCanvasUpdater {
|
|
6
6
|
constructor(container) {
|
|
7
7
|
this.container = container;
|
package/browser/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OutOfCanvasUpdater } from "./OutOfCanvasUpdater";
|
|
1
|
+
import { OutOfCanvasUpdater } from "./OutOfCanvasUpdater.js";
|
|
2
2
|
export async function loadOutModesUpdater(engine, refresh = true) {
|
|
3
3
|
await engine.addParticleUpdater("outModes", (container) => new OutOfCanvasUpdater(container), refresh);
|
|
4
4
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "module" }
|
package/cjs/BounceOutMode.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BounceOutMode = void 0;
|
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
|
5
|
-
const
|
|
5
|
+
const Utils_js_1 = require("./Utils.js");
|
|
6
6
|
class BounceOutMode {
|
|
7
7
|
constructor(container) {
|
|
8
8
|
this.container = container;
|
|
@@ -33,8 +33,8 @@ class BounceOutMode {
|
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = (0, engine_1.calculateBounds)(pos, size), canvasSize = container.canvas.size;
|
|
36
|
-
(0,
|
|
37
|
-
(0,
|
|
36
|
+
(0, Utils_js_1.bounceHorizontal)({ particle, outMode, direction, bounds, canvasSize, offset, size });
|
|
37
|
+
(0, Utils_js_1.bounceVertical)({ particle, outMode, direction, bounds, canvasSize, offset, size });
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
exports.BounceOutMode = BounceOutMode;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OutOfCanvasUpdater = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
const BounceOutMode_js_1 = require("./BounceOutMode.js");
|
|
5
|
+
const DestroyOutMode_js_1 = require("./DestroyOutMode.js");
|
|
6
|
+
const NoneOutMode_js_1 = require("./NoneOutMode.js");
|
|
7
|
+
const OutOutMode_js_1 = require("./OutOutMode.js");
|
|
8
8
|
class OutOfCanvasUpdater {
|
|
9
9
|
constructor(container) {
|
|
10
10
|
this.container = container;
|
|
@@ -14,10 +14,10 @@ class OutOfCanvasUpdater {
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
this.updaters = [
|
|
17
|
-
new
|
|
18
|
-
new
|
|
19
|
-
new
|
|
20
|
-
new
|
|
17
|
+
new BounceOutMode_js_1.BounceOutMode(container),
|
|
18
|
+
new DestroyOutMode_js_1.DestroyOutMode(container),
|
|
19
|
+
new OutOutMode_js_1.OutOutMode(container),
|
|
20
|
+
new NoneOutMode_js_1.NoneOutMode(container),
|
|
21
21
|
];
|
|
22
22
|
}
|
|
23
23
|
init() {
|
package/cjs/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.loadOutModesUpdater = void 0;
|
|
4
|
-
const
|
|
4
|
+
const OutOfCanvasUpdater_js_1 = require("./OutOfCanvasUpdater.js");
|
|
5
5
|
async function loadOutModesUpdater(engine, refresh = true) {
|
|
6
|
-
await engine.addParticleUpdater("outModes", (container) => new
|
|
6
|
+
await engine.addParticleUpdater("outModes", (container) => new OutOfCanvasUpdater_js_1.OutOfCanvasUpdater(container), refresh);
|
|
7
7
|
}
|
|
8
8
|
exports.loadOutModesUpdater = loadOutModesUpdater;
|
package/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|
package/esm/BounceOutMode.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { calculateBounds, } from "@tsparticles/engine";
|
|
2
|
-
import { bounceHorizontal, bounceVertical } from "./Utils";
|
|
2
|
+
import { bounceHorizontal, bounceVertical } from "./Utils.js";
|
|
3
3
|
export class BounceOutMode {
|
|
4
4
|
constructor(container) {
|
|
5
5
|
this.container = container;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BounceOutMode } from "./BounceOutMode";
|
|
2
|
-
import { DestroyOutMode } from "./DestroyOutMode";
|
|
3
|
-
import { NoneOutMode } from "./NoneOutMode";
|
|
4
|
-
import { OutOutMode } from "./OutOutMode";
|
|
1
|
+
import { BounceOutMode } from "./BounceOutMode.js";
|
|
2
|
+
import { DestroyOutMode } from "./DestroyOutMode.js";
|
|
3
|
+
import { NoneOutMode } from "./NoneOutMode.js";
|
|
4
|
+
import { OutOutMode } from "./OutOutMode.js";
|
|
5
5
|
export class OutOfCanvasUpdater {
|
|
6
6
|
constructor(container) {
|
|
7
7
|
this.container = container;
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OutOfCanvasUpdater } from "./OutOfCanvasUpdater";
|
|
1
|
+
import { OutOfCanvasUpdater } from "./OutOfCanvasUpdater.js";
|
|
2
2
|
export async function loadOutModesUpdater(engine, refresh = true) {
|
|
3
3
|
await engine.addParticleUpdater("outModes", (container) => new OutOfCanvasUpdater(container), refresh);
|
|
4
4
|
}
|
package/esm/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "module" }
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/updater-out-modes",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"description": "tsParticles particles out modes updater",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/
|
|
8
|
+
"url": "git+https://github.com/tsparticles/tsparticles.git",
|
|
9
9
|
"directory": "updaters/outModes"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
@@ -66,16 +66,28 @@
|
|
|
66
66
|
"author": "Matteo Bruni <matteo.bruni@me.com>",
|
|
67
67
|
"license": "MIT",
|
|
68
68
|
"bugs": {
|
|
69
|
-
"url": "https://github.com/
|
|
69
|
+
"url": "https://github.com/tsparticles/tsparticles/issues"
|
|
70
70
|
},
|
|
71
|
-
"
|
|
71
|
+
"sideEffects": false,
|
|
72
72
|
"jsdelivr": "tsparticles.updater.out-modes.min.js",
|
|
73
73
|
"unpkg": "tsparticles.updater.out-modes.min.js",
|
|
74
|
+
"browser": "browser/index.js",
|
|
75
|
+
"main": "cjs/index.js",
|
|
74
76
|
"module": "esm/index.js",
|
|
75
77
|
"types": "types/index.d.ts",
|
|
76
|
-
"
|
|
78
|
+
"exports": {
|
|
79
|
+
".": {
|
|
80
|
+
"types": "./types/index.d.ts",
|
|
81
|
+
"browser": "./browser/index.js",
|
|
82
|
+
"import": "./esm/index.js",
|
|
83
|
+
"require": "./cjs/index.js",
|
|
84
|
+
"umd": "./umd/index.js",
|
|
85
|
+
"default": "./cjs/index.js"
|
|
86
|
+
},
|
|
87
|
+
"./package.json": "./package.json"
|
|
88
|
+
},
|
|
77
89
|
"dependencies": {
|
|
78
|
-
"@tsparticles/engine": "^3.0.0-beta.
|
|
90
|
+
"@tsparticles/engine": "^3.0.0-beta.2"
|
|
79
91
|
},
|
|
80
92
|
"publishConfig": {
|
|
81
93
|
"access": "public"
|