@tsparticles/updater-tilt 4.0.0-alpha.8 → 4.0.0-beta.1
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/17.min.js +1 -0
- package/browser/Options/Classes/Tilt.js +3 -0
- package/browser/Options/Classes/TiltAnimation.js +4 -0
- package/browser/TiltUpdater.js +3 -0
- package/browser/index.js +3 -3
- package/cjs/Options/Classes/Tilt.js +3 -0
- package/cjs/Options/Classes/TiltAnimation.js +4 -0
- package/cjs/TiltUpdater.js +3 -0
- package/cjs/index.js +3 -3
- package/dist_browser_TiltUpdater_js.js +5 -5
- package/esm/Options/Classes/Tilt.js +3 -0
- package/esm/Options/Classes/TiltAnimation.js +4 -0
- package/esm/TiltUpdater.js +3 -0
- package/esm/index.js +3 -3
- package/package.json +2 -2
- package/report.html +84 -29
- package/tsparticles.updater.tilt.js +31 -19
- package/tsparticles.updater.tilt.min.js +2 -2
- package/umd/Options/Classes/Tilt.js +3 -0
- package/umd/Options/Classes/TiltAnimation.js +4 -0
- package/umd/TiltUpdater.js +3 -0
- package/umd/index.js +3 -3
- package/582.min.js +0 -2
- package/582.min.js.LICENSE.txt +0 -1
- package/tsparticles.updater.tilt.min.js.LICENSE.txt +0 -1
package/17.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunk_tsparticles_updater_tilt=this.webpackChunk_tsparticles_updater_tilt||[]).push([[17],{17(e,t,i){i.d(t,{TiltUpdater:()=>c});var n,a,s=i(303);(n=a||(a={})).clockwise="clockwise",n.counterClockwise="counter-clockwise",n.random="random";class o{decay;enable;speed;sync;constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(e){(0,s.isNull)(e)||(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.speed&&(this.speed=(0,s.setRangeValue)(e.speed)),void 0!==e.decay&&(this.decay=(0,s.setRangeValue)(e.decay)),void 0!==e.sync&&(this.sync=e.sync))}}class l extends s.ValueWithRandom{animation;direction;enable;constructor(){super(),this.animation=new o,this.direction=a.clockwise,this.enable=!1,this.value=0}load(e){super.load(e),(0,s.isNull)(e)||(this.animation.load(e.animation),void 0!==e.direction&&(this.direction=e.direction),void 0!==e.enable&&(this.enable=e.enable))}}class c{container;constructor(e){this.container=e}getTransformValues(e){let t=e.tilt?.enable&&e.tilt;return{b:t?Math.cos(t.value)*t.cosDirection:void 0,c:t?Math.sin(t.value)*t.sinDirection:void 0}}init(e){let t=e.options.tilt;if(!t)return;e.tilt={enable:t.enable,value:(0,s.degToRad)((0,s.getRangeValue)(t.value)),sinDirection:(0,s.getRandom)()>=s.half?s.identity:-s.identity,cosDirection:(0,s.getRandom)()>=s.half?s.identity:-s.identity,min:0,max:s.doublePI};let i=t.direction;switch(i===a.random&&(i=Math.floor((0,s.getRandom)()*s.double)>0?a.counterClockwise:a.clockwise),i){case a.counterClockwise:case"counterClockwise":e.tilt.status=s.AnimationStatus.decreasing;break;case a.clockwise:e.tilt.status=s.AnimationStatus.increasing}let n=e.options.tilt?.animation;n?.enable&&(e.tilt.decay=s.identity-(0,s.getRangeValue)(n.decay),e.tilt.velocity=(0,s.getRangeValue)(n.speed)/360*this.container.retina.reduceFactor,n.sync||(e.tilt.velocity*=(0,s.getRandom)()))}isEnabled(e){let t=e.options.tilt?.animation;return!e.destroyed&&!e.spawning&&!!t?.enable}loadOptions(e,...t){for(let i of(e.tilt??=new l,t))e.tilt.load(i?.tilt)}update(e,t){this.isEnabled(e)&&e.tilt&&(0,s.updateAnimation)(e,e.tilt,!1,s.DestroyType.none,t)}}}}]);
|
|
@@ -2,6 +2,9 @@ import { ValueWithRandom, isNull } from "@tsparticles/engine";
|
|
|
2
2
|
import { TiltDirection } from "../../TiltDirection.js";
|
|
3
3
|
import { TiltAnimation } from "./TiltAnimation.js";
|
|
4
4
|
export class Tilt extends ValueWithRandom {
|
|
5
|
+
animation;
|
|
6
|
+
direction;
|
|
7
|
+
enable;
|
|
5
8
|
constructor() {
|
|
6
9
|
super();
|
|
7
10
|
this.animation = new TiltAnimation();
|
package/browser/TiltUpdater.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Tilt } from "./Options/Classes/Tilt.js";
|
|
|
3
3
|
import { TiltDirection } from "./TiltDirection.js";
|
|
4
4
|
const maxAngle = 360;
|
|
5
5
|
export class TiltUpdater {
|
|
6
|
+
container;
|
|
6
7
|
constructor(container) {
|
|
7
8
|
this.container = container;
|
|
8
9
|
}
|
|
@@ -39,6 +40,8 @@ export class TiltUpdater {
|
|
|
39
40
|
case TiltDirection.clockwise:
|
|
40
41
|
particle.tilt.status = AnimationStatus.increasing;
|
|
41
42
|
break;
|
|
43
|
+
default:
|
|
44
|
+
break;
|
|
42
45
|
}
|
|
43
46
|
const tiltAnimation = particle.options.tilt?.animation;
|
|
44
47
|
if (tiltAnimation?.enable) {
|
package/browser/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export async function loadTiltUpdater(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-
|
|
3
|
-
await engine.register(e => {
|
|
4
|
-
e.addParticleUpdater("tilt", async (container) => {
|
|
2
|
+
engine.checkVersion("4.0.0-beta.1");
|
|
3
|
+
await engine.pluginManager.register(e => {
|
|
4
|
+
e.pluginManager.addParticleUpdater("tilt", async (container) => {
|
|
5
5
|
const { TiltUpdater } = await import("./TiltUpdater.js");
|
|
6
6
|
return new TiltUpdater(container);
|
|
7
7
|
});
|
|
@@ -2,6 +2,9 @@ import { ValueWithRandom, isNull } from "@tsparticles/engine";
|
|
|
2
2
|
import { TiltDirection } from "../../TiltDirection.js";
|
|
3
3
|
import { TiltAnimation } from "./TiltAnimation.js";
|
|
4
4
|
export class Tilt extends ValueWithRandom {
|
|
5
|
+
animation;
|
|
6
|
+
direction;
|
|
7
|
+
enable;
|
|
5
8
|
constructor() {
|
|
6
9
|
super();
|
|
7
10
|
this.animation = new TiltAnimation();
|
package/cjs/TiltUpdater.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Tilt } from "./Options/Classes/Tilt.js";
|
|
|
3
3
|
import { TiltDirection } from "./TiltDirection.js";
|
|
4
4
|
const maxAngle = 360;
|
|
5
5
|
export class TiltUpdater {
|
|
6
|
+
container;
|
|
6
7
|
constructor(container) {
|
|
7
8
|
this.container = container;
|
|
8
9
|
}
|
|
@@ -39,6 +40,8 @@ export class TiltUpdater {
|
|
|
39
40
|
case TiltDirection.clockwise:
|
|
40
41
|
particle.tilt.status = AnimationStatus.increasing;
|
|
41
42
|
break;
|
|
43
|
+
default:
|
|
44
|
+
break;
|
|
42
45
|
}
|
|
43
46
|
const tiltAnimation = particle.options.tilt?.animation;
|
|
44
47
|
if (tiltAnimation?.enable) {
|
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export async function loadTiltUpdater(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-
|
|
3
|
-
await engine.register(e => {
|
|
4
|
-
e.addParticleUpdater("tilt", async (container) => {
|
|
2
|
+
engine.checkVersion("4.0.0-beta.1");
|
|
3
|
+
await engine.pluginManager.register(e => {
|
|
4
|
+
e.pluginManager.addParticleUpdater("tilt", async (container) => {
|
|
5
5
|
const { TiltUpdater } = await import("./TiltUpdater.js");
|
|
6
6
|
return new TiltUpdater(container);
|
|
7
7
|
});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v4.0.0-
|
|
7
|
+
* v4.0.0-beta.1
|
|
8
8
|
*/
|
|
9
9
|
"use strict";
|
|
10
10
|
/*
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
\**********************************************/
|
|
24
24
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
25
|
|
|
26
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Tilt: () => (/* binding */ Tilt)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _TiltDirection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../TiltDirection.js */ \"./dist/browser/TiltDirection.js\");\n/* harmony import */ var _TiltAnimation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TiltAnimation.js */ \"./dist/browser/Options/Classes/TiltAnimation.js\");\n\n\n\nclass Tilt extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Tilt: () => (/* binding */ Tilt)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _TiltDirection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../TiltDirection.js */ \"./dist/browser/TiltDirection.js\");\n/* harmony import */ var _TiltAnimation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TiltAnimation.js */ \"./dist/browser/Options/Classes/TiltAnimation.js\");\n\n\n\nclass Tilt extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n animation;\n direction;\n enable;\n constructor(){\n super();\n this.animation = new _TiltAnimation_js__WEBPACK_IMPORTED_MODULE_2__.TiltAnimation();\n this.direction = _TiltDirection_js__WEBPACK_IMPORTED_MODULE_1__.TiltDirection.clockwise;\n this.enable = false;\n this.value = 0;\n }\n load(data) {\n super.load(data);\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n this.animation.load(data.animation);\n if (data.direction !== undefined) {\n this.direction = data.direction;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/updater-tilt/./dist/browser/Options/Classes/Tilt.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ },
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
33
33
|
\*******************************************************/
|
|
34
34
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35
35
|
|
|
36
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TiltAnimation: () => (/* binding */ TiltAnimation)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass TiltAnimation {\n
|
|
36
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TiltAnimation: () => (/* binding */ TiltAnimation)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nclass TiltAnimation {\n decay;\n enable;\n speed;\n sync;\n constructor(){\n this.enable = false;\n this.speed = 0;\n this.decay = 0;\n this.sync = false;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.speed !== undefined) {\n this.speed = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.speed);\n }\n if (data.decay !== undefined) {\n this.decay = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.decay);\n }\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/updater-tilt/./dist/browser/Options/Classes/TiltAnimation.js?\n}");
|
|
37
37
|
|
|
38
38
|
/***/ },
|
|
39
39
|
|
|
@@ -43,7 +43,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
43
43
|
\***************************************/
|
|
44
44
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
45
45
|
|
|
46
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TiltDirection: () => (/* binding */ TiltDirection)\n/* harmony export */ });\nvar TiltDirection;\n(function
|
|
46
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TiltDirection: () => (/* binding */ TiltDirection)\n/* harmony export */ });\nvar TiltDirection;\n(function(TiltDirection) {\n TiltDirection[\"clockwise\"] = \"clockwise\";\n TiltDirection[\"counterClockwise\"] = \"counter-clockwise\";\n TiltDirection[\"random\"] = \"random\";\n})(TiltDirection || (TiltDirection = {}));\n\n\n//# sourceURL=webpack://@tsparticles/updater-tilt/./dist/browser/TiltDirection.js?\n}");
|
|
47
47
|
|
|
48
48
|
/***/ },
|
|
49
49
|
|
|
@@ -53,7 +53,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
53
53
|
\*************************************/
|
|
54
54
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
55
55
|
|
|
56
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TiltUpdater: () => (/* binding */ TiltUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _Options_Classes_Tilt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Tilt.js */ \"./dist/browser/Options/Classes/Tilt.js\");\n/* harmony import */ var _TiltDirection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TiltDirection.js */ \"./dist/browser/TiltDirection.js\");\n\n\n\nconst maxAngle = 360;\nclass TiltUpdater {\n
|
|
56
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TiltUpdater: () => (/* binding */ TiltUpdater)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _Options_Classes_Tilt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Options/Classes/Tilt.js */ \"./dist/browser/Options/Classes/Tilt.js\");\n/* harmony import */ var _TiltDirection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TiltDirection.js */ \"./dist/browser/TiltDirection.js\");\n\n\n\nconst maxAngle = 360;\nclass TiltUpdater {\n container;\n constructor(container){\n this.container = container;\n }\n getTransformValues(particle) {\n const tilt = particle.tilt?.enable && particle.tilt;\n return {\n b: tilt ? Math.cos(tilt.value) * tilt.cosDirection : undefined,\n c: tilt ? Math.sin(tilt.value) * tilt.sinDirection : undefined\n };\n }\n init(particle) {\n const tiltOptions = particle.options.tilt;\n if (!tiltOptions) {\n return;\n }\n particle.tilt = {\n enable: tiltOptions.enable,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.degToRad)((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(tiltOptions.value)),\n sinDirection: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() >= _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half ? _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.identity : -_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.identity,\n cosDirection: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() >= _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half ? _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.identity : -_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.identity,\n min: 0,\n max: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.doublePI\n };\n let tiltDirection = tiltOptions.direction;\n if (tiltDirection === _TiltDirection_js__WEBPACK_IMPORTED_MODULE_2__.TiltDirection.random) {\n const index = Math.floor((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.double), minIndex = 0;\n tiltDirection = index > minIndex ? _TiltDirection_js__WEBPACK_IMPORTED_MODULE_2__.TiltDirection.counterClockwise : _TiltDirection_js__WEBPACK_IMPORTED_MODULE_2__.TiltDirection.clockwise;\n }\n switch(tiltDirection){\n case _TiltDirection_js__WEBPACK_IMPORTED_MODULE_2__.TiltDirection.counterClockwise:\n case \"counterClockwise\":\n particle.tilt.status = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AnimationStatus.decreasing;\n break;\n case _TiltDirection_js__WEBPACK_IMPORTED_MODULE_2__.TiltDirection.clockwise:\n particle.tilt.status = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AnimationStatus.increasing;\n break;\n default:\n break;\n }\n const tiltAnimation = particle.options.tilt?.animation;\n if (tiltAnimation?.enable) {\n particle.tilt.decay = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.identity - (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(tiltAnimation.decay);\n particle.tilt.velocity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(tiltAnimation.speed) / maxAngle * this.container.retina.reduceFactor;\n if (!tiltAnimation.sync) {\n particle.tilt.velocity *= (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)();\n }\n }\n }\n isEnabled(particle) {\n const tiltAnimation = particle.options.tilt?.animation;\n return !particle.destroyed && !particle.spawning && !!tiltAnimation?.enable;\n }\n loadOptions(options, ...sources) {\n options.tilt ??= new _Options_Classes_Tilt_js__WEBPACK_IMPORTED_MODULE_1__.Tilt();\n for (const source of sources){\n options.tilt.load(source?.tilt);\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.tilt) {\n return;\n }\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.updateAnimation)(particle, particle.tilt, false, _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.DestroyType.none, delta);\n }\n}\n\n\n//# sourceURL=webpack://@tsparticles/updater-tilt/./dist/browser/TiltUpdater.js?\n}");
|
|
57
57
|
|
|
58
58
|
/***/ }
|
|
59
59
|
|
|
@@ -2,6 +2,9 @@ import { ValueWithRandom, isNull } from "@tsparticles/engine";
|
|
|
2
2
|
import { TiltDirection } from "../../TiltDirection.js";
|
|
3
3
|
import { TiltAnimation } from "./TiltAnimation.js";
|
|
4
4
|
export class Tilt extends ValueWithRandom {
|
|
5
|
+
animation;
|
|
6
|
+
direction;
|
|
7
|
+
enable;
|
|
5
8
|
constructor() {
|
|
6
9
|
super();
|
|
7
10
|
this.animation = new TiltAnimation();
|
package/esm/TiltUpdater.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Tilt } from "./Options/Classes/Tilt.js";
|
|
|
3
3
|
import { TiltDirection } from "./TiltDirection.js";
|
|
4
4
|
const maxAngle = 360;
|
|
5
5
|
export class TiltUpdater {
|
|
6
|
+
container;
|
|
6
7
|
constructor(container) {
|
|
7
8
|
this.container = container;
|
|
8
9
|
}
|
|
@@ -39,6 +40,8 @@ export class TiltUpdater {
|
|
|
39
40
|
case TiltDirection.clockwise:
|
|
40
41
|
particle.tilt.status = AnimationStatus.increasing;
|
|
41
42
|
break;
|
|
43
|
+
default:
|
|
44
|
+
break;
|
|
42
45
|
}
|
|
43
46
|
const tiltAnimation = particle.options.tilt?.animation;
|
|
44
47
|
if (tiltAnimation?.enable) {
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export async function loadTiltUpdater(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-
|
|
3
|
-
await engine.register(e => {
|
|
4
|
-
e.addParticleUpdater("tilt", async (container) => {
|
|
2
|
+
engine.checkVersion("4.0.0-beta.1");
|
|
3
|
+
await engine.pluginManager.register(e => {
|
|
4
|
+
e.pluginManager.addParticleUpdater("tilt", async (container) => {
|
|
5
5
|
const { TiltUpdater } = await import("./TiltUpdater.js");
|
|
6
6
|
return new TiltUpdater(container);
|
|
7
7
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/updater-tilt",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-beta.1",
|
|
4
4
|
"description": "tsParticles particles tilt updater",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"./package.json": "./package.json"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@tsparticles/engine": "4.0.0-
|
|
90
|
+
"@tsparticles/engine": "4.0.0-beta.1"
|
|
91
91
|
},
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"access": "public"
|