@tsparticles/updater-roll 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-roll.svg)](https://www.npmjs.com/package/@tsparticles/updater-roll)
7
7
  [![npmjs](https://img.shields.io/npm/dt/@tsparticles/updater-roll)](https://www.npmjs.com/package/@tsparticles/updater-roll) [![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 roll animations.
9
+ [tsParticles](https://github.com/tsparticles/tsparticles) updater plugin for roll animations.
10
10
 
11
11
  ## How to use it
12
12
 
@@ -1,5 +1,5 @@
1
1
  import { OptionsColor, setRangeValue, } from "@tsparticles/engine";
2
- import { RollLight } from "./RollLight";
2
+ import { RollLight } from "./RollLight.js";
3
3
  export class Roll {
4
4
  constructor() {
5
5
  this.darken = new RollLight();
@@ -1,5 +1,5 @@
1
- import { initParticle, updateRoll } from "./Utils";
2
- import { Roll } from "./Options/Classes/Roll";
1
+ import { initParticle, updateRoll } from "./Utils.js";
2
+ import { Roll } from "./Options/Classes/Roll.js";
3
3
  export class RollUpdater {
4
4
  getTransformValues(particle) {
5
5
  const roll = particle.roll?.enable && particle.roll, rollHorizontal = roll && roll.horizontal, rollVertical = roll && roll.vertical;
package/browser/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { RollUpdater } from "./RollUpdater";
1
+ import { RollUpdater } from "./RollUpdater.js";
2
2
  export async function loadRollUpdater(engine, refresh = true) {
3
3
  await engine.addParticleUpdater("roll", () => new RollUpdater(), refresh);
4
4
  }
@@ -0,0 +1 @@
1
+ { "type": "module" }
@@ -2,12 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Roll = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const RollLight_1 = require("./RollLight");
5
+ const RollLight_js_1 = require("./RollLight.js");
6
6
  class Roll {
7
7
  constructor() {
8
- this.darken = new RollLight_1.RollLight();
8
+ this.darken = new RollLight_js_1.RollLight();
9
9
  this.enable = false;
10
- this.enlighten = new RollLight_1.RollLight();
10
+ this.enlighten = new RollLight_js_1.RollLight();
11
11
  this.mode = "vertical";
12
12
  this.speed = 25;
13
13
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RollUpdater = void 0;
4
- const Utils_1 = require("./Utils");
5
- const Roll_1 = require("./Options/Classes/Roll");
4
+ const Utils_js_1 = require("./Utils.js");
5
+ const Roll_js_1 = require("./Options/Classes/Roll.js");
6
6
  class RollUpdater {
7
7
  getTransformValues(particle) {
8
8
  const roll = particle.roll?.enable && particle.roll, rollHorizontal = roll && roll.horizontal, rollVertical = roll && roll.vertical;
@@ -12,7 +12,7 @@ class RollUpdater {
12
12
  };
13
13
  }
14
14
  init(particle) {
15
- (0, Utils_1.initParticle)(particle);
15
+ (0, Utils_js_1.initParticle)(particle);
16
16
  }
17
17
  isEnabled(particle) {
18
18
  const roll = particle.options.roll;
@@ -20,7 +20,7 @@ class RollUpdater {
20
20
  }
21
21
  loadOptions(options, ...sources) {
22
22
  if (!options.roll) {
23
- options.roll = new Roll_1.Roll();
23
+ options.roll = new Roll_js_1.Roll();
24
24
  }
25
25
  for (const source of sources) {
26
26
  options.roll.load(source?.roll);
@@ -30,7 +30,7 @@ class RollUpdater {
30
30
  if (!this.isEnabled(particle)) {
31
31
  return;
32
32
  }
33
- (0, Utils_1.updateRoll)(particle, delta);
33
+ (0, Utils_js_1.updateRoll)(particle, delta);
34
34
  }
35
35
  }
36
36
  exports.RollUpdater = RollUpdater;
package/cjs/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadRollUpdater = void 0;
4
- const RollUpdater_1 = require("./RollUpdater");
4
+ const RollUpdater_js_1 = require("./RollUpdater.js");
5
5
  async function loadRollUpdater(engine, refresh = true) {
6
- await engine.addParticleUpdater("roll", () => new RollUpdater_1.RollUpdater(), refresh);
6
+ await engine.addParticleUpdater("roll", () => new RollUpdater_js_1.RollUpdater(), refresh);
7
7
  }
8
8
  exports.loadRollUpdater = loadRollUpdater;
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -1,5 +1,5 @@
1
1
  import { OptionsColor, setRangeValue, } from "@tsparticles/engine";
2
- import { RollLight } from "./RollLight";
2
+ import { RollLight } from "./RollLight.js";
3
3
  export class Roll {
4
4
  constructor() {
5
5
  this.darken = new RollLight();
@@ -1,5 +1,5 @@
1
- import { initParticle, updateRoll } from "./Utils";
2
- import { Roll } from "./Options/Classes/Roll";
1
+ import { initParticle, updateRoll } from "./Utils.js";
2
+ import { Roll } from "./Options/Classes/Roll.js";
3
3
  export class RollUpdater {
4
4
  getTransformValues(particle) {
5
5
  const roll = particle.roll?.enable && particle.roll, rollHorizontal = roll && roll.horizontal, rollVertical = roll && roll.vertical;
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { RollUpdater } from "./RollUpdater";
1
+ import { RollUpdater } from "./RollUpdater.js";
2
2
  export async function loadRollUpdater(engine, refresh = true) {
3
3
  await engine.addParticleUpdater("roll", () => new RollUpdater(), refresh);
4
4
  }
@@ -0,0 +1 @@
1
+ { "type": "module" }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tsparticles/updater-roll",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "tsParticles particles roll 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/roll"
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.roll.min.js",
73
73
  "unpkg": "tsparticles.updater.roll.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"