@tsparticles/updater-tilt 4.0.2 → 4.0.3
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/browser/index.js +1 -1
- package/browser/index.lazy.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.lazy.js +1 -1
- package/esm/index.js +1 -1
- package/esm/index.lazy.js +1 -1
- package/package.json +2 -2
- package/report.html +1 -1
- package/tsparticles.updater.tilt.js +2 -2
- package/tsparticles.updater.tilt.min.js +1 -1
package/browser/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TiltUpdater } from "./TiltUpdater.js";
|
|
2
2
|
export async function loadTiltUpdater(engine) {
|
|
3
|
-
engine.checkVersion("4.0.
|
|
3
|
+
engine.checkVersion("4.0.3");
|
|
4
4
|
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addParticleUpdater("tilt", container => {
|
|
6
6
|
return Promise.resolve(new TiltUpdater(container));
|
package/browser/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadTiltUpdater(engine) {
|
|
2
|
-
engine.checkVersion("4.0.
|
|
2
|
+
engine.checkVersion("4.0.3");
|
|
3
3
|
await engine.pluginManager.register(e => {
|
|
4
4
|
e.pluginManager.addParticleUpdater("tilt", async (container) => {
|
|
5
5
|
const { TiltUpdater } = await import("./TiltUpdater.js");
|
package/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TiltUpdater } from "./TiltUpdater.js";
|
|
2
2
|
export async function loadTiltUpdater(engine) {
|
|
3
|
-
engine.checkVersion("4.0.
|
|
3
|
+
engine.checkVersion("4.0.3");
|
|
4
4
|
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addParticleUpdater("tilt", container => {
|
|
6
6
|
return Promise.resolve(new TiltUpdater(container));
|
package/cjs/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadTiltUpdater(engine) {
|
|
2
|
-
engine.checkVersion("4.0.
|
|
2
|
+
engine.checkVersion("4.0.3");
|
|
3
3
|
await engine.pluginManager.register(e => {
|
|
4
4
|
e.pluginManager.addParticleUpdater("tilt", async (container) => {
|
|
5
5
|
const { TiltUpdater } = await import("./TiltUpdater.js");
|
package/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TiltUpdater } from "./TiltUpdater.js";
|
|
2
2
|
export async function loadTiltUpdater(engine) {
|
|
3
|
-
engine.checkVersion("4.0.
|
|
3
|
+
engine.checkVersion("4.0.3");
|
|
4
4
|
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addParticleUpdater("tilt", container => {
|
|
6
6
|
return Promise.resolve(new TiltUpdater(container));
|
package/esm/index.lazy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export async function loadTiltUpdater(engine) {
|
|
2
|
-
engine.checkVersion("4.0.
|
|
2
|
+
engine.checkVersion("4.0.3");
|
|
3
3
|
await engine.pluginManager.register(e => {
|
|
4
4
|
e.pluginManager.addParticleUpdater("tilt", async (container) => {
|
|
5
5
|
const { TiltUpdater } = await import("./TiltUpdater.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/updater-tilt",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "tsParticles particles tilt updater",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"./package.json": "./package.json"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
|
-
"@tsparticles/engine": "4.0.
|
|
96
|
+
"@tsparticles/engine": "4.0.3"
|
|
97
97
|
},
|
|
98
98
|
"publishConfig": {
|
|
99
99
|
"access": "public"
|
package/report.html
CHANGED
|
@@ -4930,7 +4930,7 @@ var drawChart = (function (exports) {
|
|
|
4930
4930
|
</script>
|
|
4931
4931
|
<script>
|
|
4932
4932
|
/*<!--*/
|
|
4933
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.updater.tilt.js","children":[{"name":"dist/browser","children":[{"uid":"
|
|
4933
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"tsparticles.updater.tilt.js","children":[{"name":"dist/browser","children":[{"uid":"0dc10471-1","name":"TiltDirection.js"},{"name":"Options/Classes","children":[{"uid":"0dc10471-3","name":"TiltAnimation.js"},{"uid":"0dc10471-5","name":"Tilt.js"}]},{"uid":"0dc10471-7","name":"TiltUpdater.js"},{"uid":"0dc10471-9","name":"index.js"},{"uid":"0dc10471-11","name":"browser.js"}]}]}],"isRoot":true},"nodeParts":{"0dc10471-1":{"renderedLength":260,"gzipLength":0,"brotliLength":0,"metaUid":"0dc10471-0"},"0dc10471-3":{"renderedLength":793,"gzipLength":0,"brotliLength":0,"metaUid":"0dc10471-2"},"0dc10471-5":{"renderedLength":727,"gzipLength":0,"brotliLength":0,"metaUid":"0dc10471-4"},"0dc10471-7":{"renderedLength":2918,"gzipLength":0,"brotliLength":0,"metaUid":"0dc10471-6"},"0dc10471-9":{"renderedLength":305,"gzipLength":0,"brotliLength":0,"metaUid":"0dc10471-8"},"0dc10471-11":{"renderedLength":173,"gzipLength":0,"brotliLength":0,"metaUid":"0dc10471-10"}},"nodeMetas":{"0dc10471-0":{"id":"/dist/browser/TiltDirection.js","moduleParts":{"tsparticles.updater.tilt.js":"0dc10471-1"},"imported":[],"importedBy":[{"uid":"0dc10471-6"},{"uid":"0dc10471-4"}]},"0dc10471-2":{"id":"/dist/browser/Options/Classes/TiltAnimation.js","moduleParts":{"tsparticles.updater.tilt.js":"0dc10471-3"},"imported":[{"uid":"0dc10471-12"}],"importedBy":[{"uid":"0dc10471-4"}]},"0dc10471-4":{"id":"/dist/browser/Options/Classes/Tilt.js","moduleParts":{"tsparticles.updater.tilt.js":"0dc10471-5"},"imported":[{"uid":"0dc10471-12"},{"uid":"0dc10471-0"},{"uid":"0dc10471-2"}],"importedBy":[{"uid":"0dc10471-6"}]},"0dc10471-6":{"id":"/dist/browser/TiltUpdater.js","moduleParts":{"tsparticles.updater.tilt.js":"0dc10471-7"},"imported":[{"uid":"0dc10471-12"},{"uid":"0dc10471-4"},{"uid":"0dc10471-0"}],"importedBy":[{"uid":"0dc10471-8"}]},"0dc10471-8":{"id":"/dist/browser/index.js","moduleParts":{"tsparticles.updater.tilt.js":"0dc10471-9"},"imported":[{"uid":"0dc10471-6"}],"importedBy":[{"uid":"0dc10471-10"}]},"0dc10471-10":{"id":"/dist/browser/browser.js","moduleParts":{"tsparticles.updater.tilt.js":"0dc10471-11"},"imported":[{"uid":"0dc10471-8"}],"importedBy":[],"isEntry":true},"0dc10471-12":{"id":"@tsparticles/engine","moduleParts":{},"imported":[],"importedBy":[{"uid":"0dc10471-6"},{"uid":"0dc10471-4"},{"uid":"0dc10471-2"}],"isExternal":true}},"env":{"rollup":"4.60.4"},"options":{"gzip":false,"brotli":false,"sourcemap":false}};
|
|
4934
4934
|
|
|
4935
4935
|
const run = () => {
|
|
4936
4936
|
const width = window.innerWidth;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
-
/* Updater v4.0.
|
|
2
|
+
/* Updater v4.0.3 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/engine')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/engine'], factory) :
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
async function loadTiltUpdater(engine) {
|
|
140
|
-
engine.checkVersion("4.0.
|
|
140
|
+
engine.checkVersion("4.0.3");
|
|
141
141
|
await engine.pluginManager.register(e => {
|
|
142
142
|
e.pluginManager.addParticleUpdater("tilt", container => {
|
|
143
143
|
return Promise.resolve(new TiltUpdater(container));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var s="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,s){return s in t||(t[s]={}),t[s]}})}:function(t){return t};t.__tsParticlesInternals.bundles=s(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=s(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=s(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=s(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=s(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=s(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=s(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=s(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=s(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=s(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=s(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=s(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=s(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.updaters.tilt=t.__tsParticlesInternals.updaters.tilt||{}),t.__tsParticlesInternals.engine)}(this,function(t,s){"use strict";var e;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(e||(e={}));class n{decay;enable;speed;sync;constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){s.isNull(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=s.setRangeValue(t.speed)),void 0!==t.decay&&(this.decay=s.setRangeValue(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class a extends s.ValueWithRandom{animation;direction;enable;constructor(){super(),this.animation=new n,this.direction=e.clockwise,this.enable=!1,this.value=0}load(t){super.load(t),s.isNull(t)||(this.animation.load(t.animation),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.enable&&(this.enable=t.enable))}}class l{container;constructor(t){this.container=t}getTransformValues(t){const s=t.tilt?.enable&&t.tilt;return{b:s?Math.cos(s.value)*s.cosDirection:void 0,c:s?Math.sin(s.value)*s.sinDirection:void 0}}init(t){const n=t.options.tilt;if(!n)return;t.tilt={enable:n.enable,value:s.degToRad(s.getRangeValue(n.value)),sinDirection:s.getRandom()>=s.half?s.identity:-s.identity,cosDirection:s.getRandom()>=s.half?s.identity:-s.identity,min:0,max:s.doublePI};let a=n.direction;if(a===e.random){a=Math.floor(s.getRandom()*s.double)>0?e.counterClockwise:e.clockwise}switch(a){case e.counterClockwise:case"counterClockwise":t.tilt.status=s.AnimationStatus.decreasing;break;case e.clockwise:t.tilt.status=s.AnimationStatus.increasing}const l=t.options.tilt?.animation;l?.enable&&(t.tilt.decay=s.identity-s.getRangeValue(l.decay),t.tilt.velocity=s.getRangeValue(l.speed)/360*this.container.retina.reduceFactor,l.sync||(t.tilt.velocity*=s.getRandom()))}isEnabled(t){const s=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!s?.enable}loadOptions(t,...s){t.tilt??=new a;for(const e of s)t.tilt.load(e?.tilt)}update(t,e){this.isEnabled(t)&&t.tilt&&s.updateAnimation(t,t.tilt,!1,s.DestroyType.none,e)}}async function i(t){t.checkVersion("4.0.
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var s="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,s){return s in t||(t[s]={}),t[s]}})}:function(t){return t};t.__tsParticlesInternals.bundles=s(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=s(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=s(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=s(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=s(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=s(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=s(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=s(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=s(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=s(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=s(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=s(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=s(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.updaters.tilt=t.__tsParticlesInternals.updaters.tilt||{}),t.__tsParticlesInternals.engine)}(this,function(t,s){"use strict";var e;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(e||(e={}));class n{decay;enable;speed;sync;constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){s.isNull(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=s.setRangeValue(t.speed)),void 0!==t.decay&&(this.decay=s.setRangeValue(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class a extends s.ValueWithRandom{animation;direction;enable;constructor(){super(),this.animation=new n,this.direction=e.clockwise,this.enable=!1,this.value=0}load(t){super.load(t),s.isNull(t)||(this.animation.load(t.animation),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.enable&&(this.enable=t.enable))}}class l{container;constructor(t){this.container=t}getTransformValues(t){const s=t.tilt?.enable&&t.tilt;return{b:s?Math.cos(s.value)*s.cosDirection:void 0,c:s?Math.sin(s.value)*s.sinDirection:void 0}}init(t){const n=t.options.tilt;if(!n)return;t.tilt={enable:n.enable,value:s.degToRad(s.getRangeValue(n.value)),sinDirection:s.getRandom()>=s.half?s.identity:-s.identity,cosDirection:s.getRandom()>=s.half?s.identity:-s.identity,min:0,max:s.doublePI};let a=n.direction;if(a===e.random){a=Math.floor(s.getRandom()*s.double)>0?e.counterClockwise:e.clockwise}switch(a){case e.counterClockwise:case"counterClockwise":t.tilt.status=s.AnimationStatus.decreasing;break;case e.clockwise:t.tilt.status=s.AnimationStatus.increasing}const l=t.options.tilt?.animation;l?.enable&&(t.tilt.decay=s.identity-s.getRangeValue(l.decay),t.tilt.velocity=s.getRangeValue(l.speed)/360*this.container.retina.reduceFactor,l.sync||(t.tilt.velocity*=s.getRandom()))}isEnabled(t){const s=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!s?.enable}loadOptions(t,...s){t.tilt??=new a;for(const e of s)t.tilt.load(e?.tilt)}update(t,e){this.isEnabled(t)&&t.tilt&&s.updateAnimation(t,t.tilt,!1,s.DestroyType.none,e)}}async function i(t){t.checkVersion("4.0.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new l(t)))})}const r=globalThis;r.__tsParticlesInternals=r.__tsParticlesInternals??{},r.loadTiltUpdater=i,t.loadTiltUpdater=i}),Object.assign(globalThis.window||globalThis,{loadTiltUpdater:(globalThis.__tsParticlesInternals.updaters.tilt||{}).loadTiltUpdater}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|