@tsparticles/confetti 4.1.0 → 4.1.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/browser/bundle.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { confetti } from "./index.js";
2
+ import { tsParticles } from "@tsparticles/engine";
2
3
  export * from "./index.js";
3
4
  export * from "@tsparticles/engine";
4
5
  const globalObject = globalThis;
5
- globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
6
6
  globalObject.confetti = confetti;
7
+ globalObject.tsParticles = tsParticles;
@@ -17,7 +17,7 @@ import { loadWobbleUpdater } from "@tsparticles/updater-wobble";
17
17
  import { setConfetti } from "./utils.js";
18
18
  let initPromise = null;
19
19
  async function doInitPlugins(engine) {
20
- engine.checkVersion("4.1.0");
20
+ engine.checkVersion("4.1.2");
21
21
  await engine.pluginManager.register(async (e) => {
22
22
  await Promise.all([
23
23
  loadBasic(e),
@@ -90,5 +90,5 @@ confetti.create = async (canvas, options = {}) => {
90
90
  confetti.init = async () => {
91
91
  await initPlugins(tsParticles);
92
92
  };
93
- confetti.version = "4.1.0";
93
+ confetti.version = "4.1.2";
94
94
  globalThis.confetti = confetti;
@@ -2,7 +2,7 @@ import { isString, tsParticles } from "@tsparticles/engine/lazy";
2
2
  import { setConfetti } from "./utils.js";
3
3
  let initPromise = null;
4
4
  async function doInitPlugins(engine) {
5
- engine.checkVersion("4.1.0");
5
+ engine.checkVersion("4.1.2");
6
6
  await engine.pluginManager.register(async (e) => {
7
7
  const [{ loadBasic }, { loadEmittersPluginSimple }, { loadMotionPlugin }, { loadCardSuitsShape }, { loadEmojiShape }, { loadHeartShape }, { loadImageShape }, { loadPolygonShape }, { loadSquareShape }, { loadStarShape }, { loadRotateUpdater }, { loadLifeUpdater }, { loadRollUpdater }, { loadTiltUpdater }, { loadWobbleUpdater },] = await Promise.all([
8
8
  import("@tsparticles/basic/lazy"),
@@ -92,5 +92,5 @@ confetti.create = async (canvas, options = {}) => {
92
92
  confetti.init = async () => {
93
93
  await initPlugins(tsParticles);
94
94
  };
95
- confetti.version = "4.1.0";
95
+ confetti.version = "4.1.2";
96
96
  globalThis.confetti = confetti;
package/browser/utils.js CHANGED
@@ -175,8 +175,8 @@ export function convertOptions(actualOptions, params, opacitySpeed) {
175
175
  random: true,
176
176
  straight: false,
177
177
  outModes: {
178
- default: "none",
179
- bottom: "destroy",
178
+ top: "none",
179
+ default: "destroy",
180
180
  },
181
181
  },
182
182
  rotate: {
@@ -251,7 +251,7 @@ export function convertOptions(actualOptions, params, opacitySpeed) {
251
251
  export async function setConfetti(engine, params) {
252
252
  const actualOptions = new ConfettiOptions();
253
253
  actualOptions.load(params.options);
254
- const fpsLimit = 120, fpsLimitFactor = 3.6, opacitySpeed = (actualOptions.ticks * millisecondsToSeconds) / (fpsLimitFactor * millisecondsToSeconds * fpsLimit);
254
+ const fpsLimit = 120, fpsLimitFactor = 3.6, opacitySpeed = (fpsLimitFactor * fpsLimit * millisecondsToSeconds) / (actualOptions.ticks * millisecondsToSeconds);
255
255
  let containerOrPromise = ids.get(params.id);
256
256
  if (containerOrPromise instanceof Promise) {
257
257
  await containerOrPromise;
package/cjs/bundle.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { confetti } from "./index.js";
2
+ import { tsParticles } from "@tsparticles/engine";
2
3
  export * from "./index.js";
3
4
  export * from "@tsparticles/engine";
4
5
  const globalObject = globalThis;
5
- globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
6
6
  globalObject.confetti = confetti;
7
+ globalObject.tsParticles = tsParticles;
package/cjs/confetti.js CHANGED
@@ -17,7 +17,7 @@ import { loadWobbleUpdater } from "@tsparticles/updater-wobble";
17
17
  import { setConfetti } from "./utils.js";
18
18
  let initPromise = null;
19
19
  async function doInitPlugins(engine) {
20
- engine.checkVersion("4.1.0");
20
+ engine.checkVersion("4.1.2");
21
21
  await engine.pluginManager.register(async (e) => {
22
22
  await Promise.all([
23
23
  loadBasic(e),
@@ -90,5 +90,5 @@ confetti.create = async (canvas, options = {}) => {
90
90
  confetti.init = async () => {
91
91
  await initPlugins(tsParticles);
92
92
  };
93
- confetti.version = "4.1.0";
93
+ confetti.version = "4.1.2";
94
94
  globalThis.confetti = confetti;
@@ -2,7 +2,7 @@ import { isString, tsParticles } from "@tsparticles/engine/lazy";
2
2
  import { setConfetti } from "./utils.js";
3
3
  let initPromise = null;
4
4
  async function doInitPlugins(engine) {
5
- engine.checkVersion("4.1.0");
5
+ engine.checkVersion("4.1.2");
6
6
  await engine.pluginManager.register(async (e) => {
7
7
  const [{ loadBasic }, { loadEmittersPluginSimple }, { loadMotionPlugin }, { loadCardSuitsShape }, { loadEmojiShape }, { loadHeartShape }, { loadImageShape }, { loadPolygonShape }, { loadSquareShape }, { loadStarShape }, { loadRotateUpdater }, { loadLifeUpdater }, { loadRollUpdater }, { loadTiltUpdater }, { loadWobbleUpdater },] = await Promise.all([
8
8
  import("@tsparticles/basic/lazy"),
@@ -92,5 +92,5 @@ confetti.create = async (canvas, options = {}) => {
92
92
  confetti.init = async () => {
93
93
  await initPlugins(tsParticles);
94
94
  };
95
- confetti.version = "4.1.0";
95
+ confetti.version = "4.1.2";
96
96
  globalThis.confetti = confetti;
package/cjs/utils.js CHANGED
@@ -175,8 +175,8 @@ export function convertOptions(actualOptions, params, opacitySpeed) {
175
175
  random: true,
176
176
  straight: false,
177
177
  outModes: {
178
- default: "none",
179
- bottom: "destroy",
178
+ top: "none",
179
+ default: "destroy",
180
180
  },
181
181
  },
182
182
  rotate: {
@@ -251,7 +251,7 @@ export function convertOptions(actualOptions, params, opacitySpeed) {
251
251
  export async function setConfetti(engine, params) {
252
252
  const actualOptions = new ConfettiOptions();
253
253
  actualOptions.load(params.options);
254
- const fpsLimit = 120, fpsLimitFactor = 3.6, opacitySpeed = (actualOptions.ticks * millisecondsToSeconds) / (fpsLimitFactor * millisecondsToSeconds * fpsLimit);
254
+ const fpsLimit = 120, fpsLimitFactor = 3.6, opacitySpeed = (fpsLimitFactor * fpsLimit * millisecondsToSeconds) / (actualOptions.ticks * millisecondsToSeconds);
255
255
  let containerOrPromise = ids.get(params.id);
256
256
  if (containerOrPromise instanceof Promise) {
257
257
  await containerOrPromise;
package/esm/bundle.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { confetti } from "./index.js";
2
+ import { tsParticles } from "@tsparticles/engine";
2
3
  export * from "./index.js";
3
4
  export * from "@tsparticles/engine";
4
5
  const globalObject = globalThis;
5
- globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
6
6
  globalObject.confetti = confetti;
7
+ globalObject.tsParticles = tsParticles;
package/esm/confetti.js CHANGED
@@ -17,7 +17,7 @@ import { loadWobbleUpdater } from "@tsparticles/updater-wobble";
17
17
  import { setConfetti } from "./utils.js";
18
18
  let initPromise = null;
19
19
  async function doInitPlugins(engine) {
20
- engine.checkVersion("4.1.0");
20
+ engine.checkVersion("4.1.2");
21
21
  await engine.pluginManager.register(async (e) => {
22
22
  await Promise.all([
23
23
  loadBasic(e),
@@ -90,5 +90,5 @@ confetti.create = async (canvas, options = {}) => {
90
90
  confetti.init = async () => {
91
91
  await initPlugins(tsParticles);
92
92
  };
93
- confetti.version = "4.1.0";
93
+ confetti.version = "4.1.2";
94
94
  globalThis.confetti = confetti;
@@ -2,7 +2,7 @@ import { isString, tsParticles } from "@tsparticles/engine/lazy";
2
2
  import { setConfetti } from "./utils.js";
3
3
  let initPromise = null;
4
4
  async function doInitPlugins(engine) {
5
- engine.checkVersion("4.1.0");
5
+ engine.checkVersion("4.1.2");
6
6
  await engine.pluginManager.register(async (e) => {
7
7
  const [{ loadBasic }, { loadEmittersPluginSimple }, { loadMotionPlugin }, { loadCardSuitsShape }, { loadEmojiShape }, { loadHeartShape }, { loadImageShape }, { loadPolygonShape }, { loadSquareShape }, { loadStarShape }, { loadRotateUpdater }, { loadLifeUpdater }, { loadRollUpdater }, { loadTiltUpdater }, { loadWobbleUpdater },] = await Promise.all([
8
8
  import("@tsparticles/basic/lazy"),
@@ -92,5 +92,5 @@ confetti.create = async (canvas, options = {}) => {
92
92
  confetti.init = async () => {
93
93
  await initPlugins(tsParticles);
94
94
  };
95
- confetti.version = "4.1.0";
95
+ confetti.version = "4.1.2";
96
96
  globalThis.confetti = confetti;
package/esm/utils.js CHANGED
@@ -175,8 +175,8 @@ export function convertOptions(actualOptions, params, opacitySpeed) {
175
175
  random: true,
176
176
  straight: false,
177
177
  outModes: {
178
- default: "none",
179
- bottom: "destroy",
178
+ top: "none",
179
+ default: "destroy",
180
180
  },
181
181
  },
182
182
  rotate: {
@@ -251,7 +251,7 @@ export function convertOptions(actualOptions, params, opacitySpeed) {
251
251
  export async function setConfetti(engine, params) {
252
252
  const actualOptions = new ConfettiOptions();
253
253
  actualOptions.load(params.options);
254
- const fpsLimit = 120, fpsLimitFactor = 3.6, opacitySpeed = (actualOptions.ticks * millisecondsToSeconds) / (fpsLimitFactor * millisecondsToSeconds * fpsLimit);
254
+ const fpsLimit = 120, fpsLimitFactor = 3.6, opacitySpeed = (fpsLimitFactor * fpsLimit * millisecondsToSeconds) / (actualOptions.ticks * millisecondsToSeconds);
255
255
  let containerOrPromise = ids.get(params.id);
256
256
  if (containerOrPromise instanceof Promise) {
257
257
  await containerOrPromise;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/confetti",
3
- "version": "4.1.0",
3
+ "version": "4.1.2",
4
4
  "description": "Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -105,22 +105,22 @@
105
105
  "./package.json": "./package.json"
106
106
  },
107
107
  "dependencies": {
108
- "@tsparticles/basic": "4.1.0",
109
- "@tsparticles/engine": "4.1.0",
110
- "@tsparticles/plugin-emitters": "4.1.0",
111
- "@tsparticles/plugin-motion": "4.1.0",
112
- "@tsparticles/shape-cards": "4.1.0",
113
- "@tsparticles/shape-emoji": "4.1.0",
114
- "@tsparticles/shape-heart": "4.1.0",
115
- "@tsparticles/shape-image": "4.1.0",
116
- "@tsparticles/shape-polygon": "4.1.0",
117
- "@tsparticles/shape-square": "4.1.0",
118
- "@tsparticles/shape-star": "4.1.0",
119
- "@tsparticles/updater-life": "4.1.0",
120
- "@tsparticles/updater-roll": "4.1.0",
121
- "@tsparticles/updater-rotate": "4.1.0",
122
- "@tsparticles/updater-tilt": "4.1.0",
123
- "@tsparticles/updater-wobble": "4.1.0"
108
+ "@tsparticles/basic": "4.1.2",
109
+ "@tsparticles/engine": "4.1.2",
110
+ "@tsparticles/plugin-emitters": "4.1.2",
111
+ "@tsparticles/plugin-motion": "4.1.2",
112
+ "@tsparticles/shape-cards": "4.1.2",
113
+ "@tsparticles/shape-emoji": "4.1.2",
114
+ "@tsparticles/shape-heart": "4.1.2",
115
+ "@tsparticles/shape-image": "4.1.2",
116
+ "@tsparticles/shape-polygon": "4.1.2",
117
+ "@tsparticles/shape-square": "4.1.2",
118
+ "@tsparticles/shape-star": "4.1.2",
119
+ "@tsparticles/updater-life": "4.1.2",
120
+ "@tsparticles/updater-roll": "4.1.2",
121
+ "@tsparticles/updater-rotate": "4.1.2",
122
+ "@tsparticles/updater-tilt": "4.1.2",
123
+ "@tsparticles/updater-wobble": "4.1.2"
124
124
  },
125
125
  "publishConfig": {
126
126
  "access": "public"