@tsparticles/updater-destroy 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 CHANGED
@@ -6,7 +6,7 @@
6
6
  [![npmjs](https://badge.fury.io/js/@tsparticles/updater-destroy.svg)](https://www.npmjs.com/package/@tsparticles/updater-destroy)
7
7
  [![npmjs](https://img.shields.io/npm/dt/@tsparticles/updater-destroy)](https://www.npmjs.com/package/@tsparticles/updater-destroy) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
8
8
 
9
- [tsParticles](https://github.com/matteobruni/tsparticles) updater plugin for destroy animations.
9
+ [tsParticles](https://github.com/tsparticles/tsparticles) updater plugin for destroy animations.
10
10
 
11
11
  ## How to use it
12
12
 
@@ -1,6 +1,6 @@
1
1
  import { getRangeValue, } from "@tsparticles/engine";
2
- import { Destroy } from "./Options/Classes/Destroy";
3
- import { split } from "./Utils";
2
+ import { Destroy } from "./Options/Classes/Destroy.js";
3
+ import { split } from "./Utils.js";
4
4
  export class DestroyUpdater {
5
5
  constructor(engine, container) {
6
6
  this.engine = engine;
@@ -1,5 +1,5 @@
1
- import { DestroyBounds } from "./DestroyBounds";
2
- import { Split } from "./Split";
1
+ import { DestroyBounds } from "./DestroyBounds.js";
2
+ import { Split } from "./Split.js";
3
3
  export class Destroy {
4
4
  constructor() {
5
5
  this.bounds = new DestroyBounds();
@@ -1,6 +1,6 @@
1
1
  import { OptionsColor, deepExtend, executeOnSingleOrMultiple, } from "@tsparticles/engine";
2
- import { SplitFactor } from "./SplitFactor";
3
- import { SplitRate } from "./SplitRate";
2
+ import { SplitFactor } from "./SplitFactor.js";
3
+ import { SplitRate } from "./SplitRate.js";
4
4
  export class Split {
5
5
  constructor() {
6
6
  this.count = 1;
package/browser/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { DestroyUpdater } from "./DestroyUpdater";
1
+ import { DestroyUpdater } from "./DestroyUpdater.js";
2
2
  export async function loadDestroyUpdater(engine, refresh = true) {
3
3
  await engine.addParticleUpdater("destroy", (container) => new DestroyUpdater(engine, container), refresh);
4
4
  }
@@ -0,0 +1 @@
1
+ { "type": "module" }
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DestroyUpdater = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const Destroy_1 = require("./Options/Classes/Destroy");
6
- const Utils_1 = require("./Utils");
5
+ const Destroy_js_1 = require("./Options/Classes/Destroy.js");
6
+ const Utils_js_1 = require("./Utils.js");
7
7
  class DestroyUpdater {
8
8
  constructor(engine, container) {
9
9
  this.engine = engine;
@@ -38,7 +38,7 @@ class DestroyUpdater {
38
38
  }
39
39
  loadOptions(options, ...sources) {
40
40
  if (!options.destroy) {
41
- options.destroy = new Destroy_1.Destroy();
41
+ options.destroy = new Destroy_js_1.Destroy();
42
42
  }
43
43
  for (const source of sources) {
44
44
  options.destroy.load(source?.destroy);
@@ -50,7 +50,7 @@ class DestroyUpdater {
50
50
  }
51
51
  const destroyOptions = particle.options.destroy;
52
52
  if (destroyOptions && destroyOptions.mode === "split") {
53
- (0, Utils_1.split)(this.engine, this.container, particle);
53
+ (0, Utils_js_1.split)(this.engine, this.container, particle);
54
54
  }
55
55
  }
56
56
  update(particle) {
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Destroy = void 0;
4
- const DestroyBounds_1 = require("./DestroyBounds");
5
- const Split_1 = require("./Split");
4
+ const DestroyBounds_js_1 = require("./DestroyBounds.js");
5
+ const Split_js_1 = require("./Split.js");
6
6
  class Destroy {
7
7
  constructor() {
8
- this.bounds = new DestroyBounds_1.DestroyBounds();
8
+ this.bounds = new DestroyBounds_js_1.DestroyBounds();
9
9
  this.mode = "none";
10
- this.split = new Split_1.Split();
10
+ this.split = new Split_js_1.Split();
11
11
  }
12
12
  load(data) {
13
13
  if (!data) {
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Split = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const SplitFactor_1 = require("./SplitFactor");
6
- const SplitRate_1 = require("./SplitRate");
5
+ const SplitFactor_js_1 = require("./SplitFactor.js");
6
+ const SplitRate_js_1 = require("./SplitRate.js");
7
7
  class Split {
8
8
  constructor() {
9
9
  this.count = 1;
10
- this.factor = new SplitFactor_1.SplitFactor();
11
- this.rate = new SplitRate_1.SplitRate();
10
+ this.factor = new SplitFactor_js_1.SplitFactor();
11
+ this.rate = new SplitRate_js_1.SplitRate();
12
12
  this.sizeOffset = true;
13
13
  }
14
14
  load(data) {
package/cjs/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadDestroyUpdater = void 0;
4
- const DestroyUpdater_1 = require("./DestroyUpdater");
4
+ const DestroyUpdater_js_1 = require("./DestroyUpdater.js");
5
5
  async function loadDestroyUpdater(engine, refresh = true) {
6
- await engine.addParticleUpdater("destroy", (container) => new DestroyUpdater_1.DestroyUpdater(engine, container), refresh);
6
+ await engine.addParticleUpdater("destroy", (container) => new DestroyUpdater_js_1.DestroyUpdater(engine, container), refresh);
7
7
  }
8
8
  exports.loadDestroyUpdater = loadDestroyUpdater;
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -1,6 +1,6 @@
1
1
  import { getRangeValue, } from "@tsparticles/engine";
2
- import { Destroy } from "./Options/Classes/Destroy";
3
- import { split } from "./Utils";
2
+ import { Destroy } from "./Options/Classes/Destroy.js";
3
+ import { split } from "./Utils.js";
4
4
  export class DestroyUpdater {
5
5
  constructor(engine, container) {
6
6
  this.engine = engine;
@@ -1,5 +1,5 @@
1
- import { DestroyBounds } from "./DestroyBounds";
2
- import { Split } from "./Split";
1
+ import { DestroyBounds } from "./DestroyBounds.js";
2
+ import { Split } from "./Split.js";
3
3
  export class Destroy {
4
4
  constructor() {
5
5
  this.bounds = new DestroyBounds();
@@ -1,6 +1,6 @@
1
1
  import { OptionsColor, deepExtend, executeOnSingleOrMultiple, } from "@tsparticles/engine";
2
- import { SplitFactor } from "./SplitFactor";
3
- import { SplitRate } from "./SplitRate";
2
+ import { SplitFactor } from "./SplitFactor.js";
3
+ import { SplitRate } from "./SplitRate.js";
4
4
  export class Split {
5
5
  constructor() {
6
6
  this.count = 1;
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { DestroyUpdater } from "./DestroyUpdater";
1
+ import { DestroyUpdater } from "./DestroyUpdater.js";
2
2
  export async function loadDestroyUpdater(engine, refresh = true) {
3
3
  await engine.addParticleUpdater("destroy", (container) => new DestroyUpdater(engine, container), refresh);
4
4
  }
@@ -0,0 +1 @@
1
+ { "type": "module" }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tsparticles/updater-destroy",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "tsParticles particles destroy updater",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/matteobruni/tsparticles.git",
8
+ "url": "git+https://github.com/tsparticles/tsparticles.git",
9
9
  "directory": "updaters/destroy"
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/matteobruni/tsparticles/issues"
69
+ "url": "https://github.com/tsparticles/tsparticles/issues"
70
70
  },
71
- "main": "cjs/index.js",
71
+ "sideEffects": false,
72
72
  "jsdelivr": "tsparticles.updater.destroy.min.js",
73
73
  "unpkg": "tsparticles.updater.destroy.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
- "sideEffects": false,
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.0"
90
+ "@tsparticles/engine": "^3.0.0-beta.2"
79
91
  },
80
92
  "publishConfig": {
81
93
  "access": "public"