@tsparticles/updater-roll 4.0.4 → 4.1.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.
@@ -1,9 +1,9 @@
1
1
  import { initParticle, updateRoll } from "./Utils.js";
2
2
  import { Roll } from "./Options/Classes/Roll.js";
3
3
  export class RollUpdater {
4
- _pluginManager;
4
+ #pluginManager;
5
5
  constructor(pluginManager) {
6
- this._pluginManager = pluginManager;
6
+ this.#pluginManager = pluginManager;
7
7
  }
8
8
  getTransformValues(particle) {
9
9
  const roll = particle.roll?.enable && particle.roll, rollHorizontal = roll && roll.horizontal, rollVertical = roll && roll.vertical;
@@ -13,7 +13,7 @@ export class RollUpdater {
13
13
  };
14
14
  }
15
15
  init(particle) {
16
- initParticle(this._pluginManager, particle);
16
+ initParticle(this.#pluginManager, particle);
17
17
  }
18
18
  isEnabled(particle) {
19
19
  const roll = particle.options.roll;
package/browser/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { RollUpdater } from "./RollUpdater.js";
2
2
  export async function loadRollUpdater(engine) {
3
- engine.checkVersion("4.0.4");
3
+ engine.checkVersion("4.1.0");
4
4
  await engine.pluginManager.register(e => {
5
5
  e.pluginManager.addParticleUpdater("roll", () => {
6
6
  return Promise.resolve(new RollUpdater(e.pluginManager));
@@ -1,5 +1,5 @@
1
1
  export async function loadRollUpdater(engine) {
2
- engine.checkVersion("4.0.4");
2
+ engine.checkVersion("4.1.0");
3
3
  await engine.pluginManager.register(e => {
4
4
  e.pluginManager.addParticleUpdater("roll", async () => {
5
5
  const { RollUpdater } = await import("./RollUpdater.js");
@@ -1,9 +1,9 @@
1
1
  import { initParticle, updateRoll } from "./Utils.js";
2
2
  import { Roll } from "./Options/Classes/Roll.js";
3
3
  export class RollUpdater {
4
- _pluginManager;
4
+ #pluginManager;
5
5
  constructor(pluginManager) {
6
- this._pluginManager = pluginManager;
6
+ this.#pluginManager = pluginManager;
7
7
  }
8
8
  getTransformValues(particle) {
9
9
  const roll = particle.roll?.enable && particle.roll, rollHorizontal = roll && roll.horizontal, rollVertical = roll && roll.vertical;
@@ -13,7 +13,7 @@ export class RollUpdater {
13
13
  };
14
14
  }
15
15
  init(particle) {
16
- initParticle(this._pluginManager, particle);
16
+ initParticle(this.#pluginManager, particle);
17
17
  }
18
18
  isEnabled(particle) {
19
19
  const roll = particle.options.roll;
package/cjs/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { RollUpdater } from "./RollUpdater.js";
2
2
  export async function loadRollUpdater(engine) {
3
- engine.checkVersion("4.0.4");
3
+ engine.checkVersion("4.1.0");
4
4
  await engine.pluginManager.register(e => {
5
5
  e.pluginManager.addParticleUpdater("roll", () => {
6
6
  return Promise.resolve(new RollUpdater(e.pluginManager));
package/cjs/index.lazy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadRollUpdater(engine) {
2
- engine.checkVersion("4.0.4");
2
+ engine.checkVersion("4.1.0");
3
3
  await engine.pluginManager.register(e => {
4
4
  e.pluginManager.addParticleUpdater("roll", async () => {
5
5
  const { RollUpdater } = await import("./RollUpdater.js");
@@ -1,9 +1,9 @@
1
1
  import { initParticle, updateRoll } from "./Utils.js";
2
2
  import { Roll } from "./Options/Classes/Roll.js";
3
3
  export class RollUpdater {
4
- _pluginManager;
4
+ #pluginManager;
5
5
  constructor(pluginManager) {
6
- this._pluginManager = pluginManager;
6
+ this.#pluginManager = pluginManager;
7
7
  }
8
8
  getTransformValues(particle) {
9
9
  const roll = particle.roll?.enable && particle.roll, rollHorizontal = roll && roll.horizontal, rollVertical = roll && roll.vertical;
@@ -13,7 +13,7 @@ export class RollUpdater {
13
13
  };
14
14
  }
15
15
  init(particle) {
16
- initParticle(this._pluginManager, particle);
16
+ initParticle(this.#pluginManager, particle);
17
17
  }
18
18
  isEnabled(particle) {
19
19
  const roll = particle.options.roll;
package/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { RollUpdater } from "./RollUpdater.js";
2
2
  export async function loadRollUpdater(engine) {
3
- engine.checkVersion("4.0.4");
3
+ engine.checkVersion("4.1.0");
4
4
  await engine.pluginManager.register(e => {
5
5
  e.pluginManager.addParticleUpdater("roll", () => {
6
6
  return Promise.resolve(new RollUpdater(e.pluginManager));
package/esm/index.lazy.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export async function loadRollUpdater(engine) {
2
- engine.checkVersion("4.0.4");
2
+ engine.checkVersion("4.1.0");
3
3
  await engine.pluginManager.register(e => {
4
4
  e.pluginManager.addParticleUpdater("roll", async () => {
5
5
  const { RollUpdater } = await import("./RollUpdater.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/updater-roll",
3
- "version": "4.0.4",
3
+ "version": "4.1.0",
4
4
  "description": "tsParticles particles roll 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.4"
96
+ "@tsparticles/engine": "4.1.0"
97
97
  },
98
98
  "publishConfig": {
99
99
  "access": "public"
@@ -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.4 */
2
+ /* Updater v4.1.0 */
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) :
@@ -124,9 +124,9 @@
124
124
  }
125
125
 
126
126
  class RollUpdater {
127
- _pluginManager;
127
+ #pluginManager;
128
128
  constructor(pluginManager) {
129
- this._pluginManager = pluginManager;
129
+ this.#pluginManager = pluginManager;
130
130
  }
131
131
  getTransformValues(particle) {
132
132
  const roll = particle.roll?.enable && particle.roll, rollHorizontal = roll && roll.horizontal, rollVertical = roll && roll.vertical;
@@ -136,7 +136,7 @@
136
136
  };
137
137
  }
138
138
  init(particle) {
139
- initParticle(this._pluginManager, particle);
139
+ initParticle(this.#pluginManager, particle);
140
140
  }
141
141
  isEnabled(particle) {
142
142
  const roll = particle.options.roll;
@@ -157,7 +157,7 @@
157
157
  }
158
158
 
159
159
  async function loadRollUpdater(engine) {
160
- engine.checkVersion("4.0.4");
160
+ engine.checkVersion("4.1.0");
161
161
  await engine.pluginManager.register(e => {
162
162
  e.pluginManager.addParticleUpdater("roll", () => {
163
163
  return Promise.resolve(new RollUpdater(e.pluginManager));
@@ -1 +1 @@
1
- !function(e){e.__tsParticlesInternals=e.__tsParticlesInternals||{},e.__tsParticlesInternals.bundles=e.__tsParticlesInternals.bundles||{},e.__tsParticlesInternals.effects=e.__tsParticlesInternals.effects||{},e.__tsParticlesInternals.engine=e.__tsParticlesInternals.engine||{},e.__tsParticlesInternals.interactions=e.__tsParticlesInternals.interactions||{},e.__tsParticlesInternals.palettes=e.__tsParticlesInternals.palettes||{},e.__tsParticlesInternals.paths=e.__tsParticlesInternals.paths||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins.emittersShapes=e.__tsParticlesInternals.plugins.emittersShapes||{},e.__tsParticlesInternals.presets=e.__tsParticlesInternals.presets||{},e.__tsParticlesInternals.shapes=e.__tsParticlesInternals.shapes||{},e.__tsParticlesInternals.updaters=e.__tsParticlesInternals.updaters||{},e.__tsParticlesInternals.utils=e.__tsParticlesInternals.utils||{},e.__tsParticlesInternals.canvas=e.__tsParticlesInternals.canvas||{},e.__tsParticlesInternals.canvas=e.__tsParticlesInternals.canvas||{},e.__tsParticlesInternals.canvas.utils=e.__tsParticlesInternals.canvas.utils||{},e.__tsParticlesInternals.path=e.__tsParticlesInternals.path||{},e.__tsParticlesInternals.path=e.__tsParticlesInternals.path||{},e.__tsParticlesInternals.path.utils=e.__tsParticlesInternals.path.utils||{};var t="undefined"!=typeof Proxy?function(e){return new Proxy(e,{get:function(e,t){return t in e||(e[t]={}),e[t]}})}:function(e){return e};e.__tsParticlesInternals.bundles=t(e.__tsParticlesInternals.bundles),e.__tsParticlesInternals.effects=t(e.__tsParticlesInternals.effects),e.__tsParticlesInternals.interactions=t(e.__tsParticlesInternals.interactions),e.__tsParticlesInternals.palettes=t(e.__tsParticlesInternals.palettes),e.__tsParticlesInternals.paths=t(e.__tsParticlesInternals.paths),e.__tsParticlesInternals.plugins=t(e.__tsParticlesInternals.plugins),e.__tsParticlesInternals.plugins.emittersShapes=t(e.__tsParticlesInternals.plugins.emittersShapes),e.__tsParticlesInternals.presets=t(e.__tsParticlesInternals.presets),e.__tsParticlesInternals.shapes=t(e.__tsParticlesInternals.shapes),e.__tsParticlesInternals.updaters=t(e.__tsParticlesInternals.updaters),e.__tsParticlesInternals.utils=t(e.__tsParticlesInternals.utils),e.__tsParticlesInternals.canvas=t(e.__tsParticlesInternals.canvas),e.__tsParticlesInternals.path=t(e.__tsParticlesInternals.path),e.tsparticlesInternalExports=e.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).__tsParticlesInternals=e.__tsParticlesInternals||{},e.__tsParticlesInternals.updaters=e.__tsParticlesInternals.updaters||{},e.__tsParticlesInternals.updaters.roll=e.__tsParticlesInternals.updaters.roll||{}),e.__tsParticlesInternals.engine)}(this,function(e,t){"use strict";var s;!function(e){e.both="both",e.horizontal="horizontal",e.vertical="vertical"}(s||(s={}));class l{enable;value;constructor(){this.enable=!1,this.value=0}load(e){t.isNull(e)||(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.value&&(this.value=t.setRangeValue(e.value)))}}class a{backColor;darken;enable;enlighten;mode;speed;constructor(){this.darken=new l,this.enable=!1,this.enlighten=new l,this.mode=s.vertical,this.speed=25}load(e){t.isNull(e)||(void 0!==e.backColor&&(this.backColor=t.OptionsColor.create(this.backColor,e.backColor)),this.darken.load(e.darken),void 0!==e.enable&&(this.enable=e.enable),this.enlighten.load(e.enlighten),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.speed&&(this.speed=t.setRangeValue(e.speed)))}}class n{_pluginManager;constructor(e){this._pluginManager=e}getTransformValues(e){const t=e.roll?.enable&&e.roll,s=t&&t.horizontal,l=t&&t.vertical;return{a:s?Math.cos(t.angle):void 0,d:l?Math.sin(t.angle):void 0}}init(e){!function(e,l){const a=l.options.roll;if(a?.enable)if(l.roll={enable:a.enable,horizontal:a.mode===s.horizontal||a.mode===s.both,vertical:a.mode===s.vertical||a.mode===s.both,angle:t.getRandom()*t.doublePI,speed:t.getRangeValue(a.speed)/360},a.backColor)l.backColor=t.rangeColorToHsl(e,a.backColor);else if(a.darken.enable&&a.enlighten.enable){const e=t.getRandom()>=t.half?t.AlterType.darken:t.AlterType.enlighten;l.roll.alter={type:e,value:t.getRangeValue(e===t.AlterType.darken?a.darken.value:a.enlighten.value)}}else a.darken.enable?l.roll.alter={type:t.AlterType.darken,value:t.getRangeValue(a.darken.value)}:a.enlighten.enable&&(l.roll.alter={type:t.AlterType.enlighten,value:t.getRangeValue(a.enlighten.value)});else l.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this._pluginManager,e)}isEnabled(e){const t=e.options.roll;return!e.destroyed&&!e.spawning&&!!t?.enable}loadOptions(e,...t){e.roll??=new a;for(const s of t)e.roll.load(s?.roll)}update(e,s){this.isEnabled(e)&&function(e,s){const l=e.options.roll,a=e.roll;if(!a||!l?.enable)return;const n=a.speed*s.factor,r=t.doublePI;a.angle+=n,a.angle>r&&(a.angle-=r)}(e,s)}}async function r(e){e.checkVersion("4.0.4"),await e.pluginManager.register(e=>{e.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new n(e.pluginManager)))})}const i=globalThis;i.__tsParticlesInternals=i.__tsParticlesInternals??{},i.loadRollUpdater=r,e.loadRollUpdater=r}),Object.assign(globalThis.window||globalThis,{loadRollUpdater:(globalThis.__tsParticlesInternals.updaters.roll||{}).loadRollUpdater}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
1
+ !function(e){e.__tsParticlesInternals=e.__tsParticlesInternals||{},e.__tsParticlesInternals.bundles=e.__tsParticlesInternals.bundles||{},e.__tsParticlesInternals.effects=e.__tsParticlesInternals.effects||{},e.__tsParticlesInternals.engine=e.__tsParticlesInternals.engine||{},e.__tsParticlesInternals.interactions=e.__tsParticlesInternals.interactions||{},e.__tsParticlesInternals.palettes=e.__tsParticlesInternals.palettes||{},e.__tsParticlesInternals.paths=e.__tsParticlesInternals.paths||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins=e.__tsParticlesInternals.plugins||{},e.__tsParticlesInternals.plugins.emittersShapes=e.__tsParticlesInternals.plugins.emittersShapes||{},e.__tsParticlesInternals.presets=e.__tsParticlesInternals.presets||{},e.__tsParticlesInternals.shapes=e.__tsParticlesInternals.shapes||{},e.__tsParticlesInternals.updaters=e.__tsParticlesInternals.updaters||{},e.__tsParticlesInternals.utils=e.__tsParticlesInternals.utils||{},e.__tsParticlesInternals.canvas=e.__tsParticlesInternals.canvas||{},e.__tsParticlesInternals.canvas=e.__tsParticlesInternals.canvas||{},e.__tsParticlesInternals.canvas.utils=e.__tsParticlesInternals.canvas.utils||{},e.__tsParticlesInternals.path=e.__tsParticlesInternals.path||{},e.__tsParticlesInternals.path=e.__tsParticlesInternals.path||{},e.__tsParticlesInternals.path.utils=e.__tsParticlesInternals.path.utils||{};var t="undefined"!=typeof Proxy?function(e){return new Proxy(e,{get:function(e,t){return t in e||(e[t]={}),e[t]}})}:function(e){return e};e.__tsParticlesInternals.bundles=t(e.__tsParticlesInternals.bundles),e.__tsParticlesInternals.effects=t(e.__tsParticlesInternals.effects),e.__tsParticlesInternals.interactions=t(e.__tsParticlesInternals.interactions),e.__tsParticlesInternals.palettes=t(e.__tsParticlesInternals.palettes),e.__tsParticlesInternals.paths=t(e.__tsParticlesInternals.paths),e.__tsParticlesInternals.plugins=t(e.__tsParticlesInternals.plugins),e.__tsParticlesInternals.plugins.emittersShapes=t(e.__tsParticlesInternals.plugins.emittersShapes),e.__tsParticlesInternals.presets=t(e.__tsParticlesInternals.presets),e.__tsParticlesInternals.shapes=t(e.__tsParticlesInternals.shapes),e.__tsParticlesInternals.updaters=t(e.__tsParticlesInternals.updaters),e.__tsParticlesInternals.utils=t(e.__tsParticlesInternals.utils),e.__tsParticlesInternals.canvas=t(e.__tsParticlesInternals.canvas),e.__tsParticlesInternals.path=t(e.__tsParticlesInternals.path),e.tsparticlesInternalExports=e.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tsparticles/engine")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).__tsParticlesInternals=e.__tsParticlesInternals||{},e.__tsParticlesInternals.updaters=e.__tsParticlesInternals.updaters||{},e.__tsParticlesInternals.updaters.roll=e.__tsParticlesInternals.updaters.roll||{}),e.__tsParticlesInternals.engine)}(this,function(e,t){"use strict";var s;!function(e){e.both="both",e.horizontal="horizontal",e.vertical="vertical"}(s||(s={}));class l{enable;value;constructor(){this.enable=!1,this.value=0}load(e){t.isNull(e)||(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.value&&(this.value=t.setRangeValue(e.value)))}}class a{backColor;darken;enable;enlighten;mode;speed;constructor(){this.darken=new l,this.enable=!1,this.enlighten=new l,this.mode=s.vertical,this.speed=25}load(e){t.isNull(e)||(void 0!==e.backColor&&(this.backColor=t.OptionsColor.create(this.backColor,e.backColor)),this.darken.load(e.darken),void 0!==e.enable&&(this.enable=e.enable),this.enlighten.load(e.enlighten),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.speed&&(this.speed=t.setRangeValue(e.speed)))}}class n{#e;constructor(e){this.#e=e}getTransformValues(e){const t=e.roll?.enable&&e.roll,s=t&&t.horizontal,l=t&&t.vertical;return{a:s?Math.cos(t.angle):void 0,d:l?Math.sin(t.angle):void 0}}init(e){!function(e,l){const a=l.options.roll;if(a?.enable)if(l.roll={enable:a.enable,horizontal:a.mode===s.horizontal||a.mode===s.both,vertical:a.mode===s.vertical||a.mode===s.both,angle:t.getRandom()*t.doublePI,speed:t.getRangeValue(a.speed)/360},a.backColor)l.backColor=t.rangeColorToHsl(e,a.backColor);else if(a.darken.enable&&a.enlighten.enable){const e=t.getRandom()>=t.half?t.AlterType.darken:t.AlterType.enlighten;l.roll.alter={type:e,value:t.getRangeValue(e===t.AlterType.darken?a.darken.value:a.enlighten.value)}}else a.darken.enable?l.roll.alter={type:t.AlterType.darken,value:t.getRangeValue(a.darken.value)}:a.enlighten.enable&&(l.roll.alter={type:t.AlterType.enlighten,value:t.getRangeValue(a.enlighten.value)});else l.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#e,e)}isEnabled(e){const t=e.options.roll;return!e.destroyed&&!e.spawning&&!!t?.enable}loadOptions(e,...t){e.roll??=new a;for(const s of t)e.roll.load(s?.roll)}update(e,s){this.isEnabled(e)&&function(e,s){const l=e.options.roll,a=e.roll;if(!a||!l?.enable)return;const n=a.speed*s.factor,r=t.doublePI;a.angle+=n,a.angle>r&&(a.angle-=r)}(e,s)}}async function r(e){e.checkVersion("4.1.0"),await e.pluginManager.register(e=>{e.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new n(e.pluginManager)))})}const i=globalThis;i.__tsParticlesInternals=i.__tsParticlesInternals??{},i.loadRollUpdater=r,e.loadRollUpdater=r}),Object.assign(globalThis.window||globalThis,{loadRollUpdater:(globalThis.__tsParticlesInternals.updaters.roll||{}).loadRollUpdater}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
@@ -1,7 +1,7 @@
1
1
  import { type IDelta, type IParticleTransformValues, type IParticleUpdater, type Particle, type PluginManager, type RecursivePartial } from "@tsparticles/engine";
2
2
  import type { IRollParticlesOptions, RollParticle, RollParticlesOptions } from "./Types.js";
3
3
  export declare class RollUpdater implements IParticleUpdater {
4
- private readonly _pluginManager;
4
+ #private;
5
5
  constructor(pluginManager: PluginManager);
6
6
  getTransformValues(particle: Particle): Partial<IParticleTransformValues>;
7
7
  init(particle: RollParticle): void;
package/types/Types.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { type IParticlesOptions, type Particle, type ParticlesOptions } from "@tsparticles/engine";
2
2
  import type { IRoll } from "./Options/Interfaces/IRoll.js";
3
3
  import type { Roll } from "./Options/Classes/Roll.js";
4
- export type RollParticle = Particle & {
5
- options: RollParticlesOptions;
6
- };
7
4
  export type RollParticlesOptions = ParticlesOptions & {
8
5
  roll?: Roll;
9
6
  };
10
7
  export type IRollParticlesOptions = IParticlesOptions & {
11
8
  roll?: IRoll;
12
9
  };
10
+ export type RollParticle = Particle & {
11
+ options: RollParticlesOptions;
12
+ };