@tsparticles/updater-tilt 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-tilt.svg)](https://www.npmjs.com/package/@tsparticles/updater-tilt)
7
7
  [![npmjs](https://img.shields.io/npm/dt/@tsparticles/updater-tilt)](https://www.npmjs.com/package/@tsparticles/updater-tilt) [![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 tilt animations.
9
+ [tsParticles](https://github.com/tsparticles/tsparticles) updater plugin for tilt animations.
10
10
 
11
11
  ## How to use it
12
12
 
@@ -1,5 +1,5 @@
1
1
  import { ValueWithRandom } from "@tsparticles/engine";
2
- import { TiltAnimation } from "./TiltAnimation";
2
+ import { TiltAnimation } from "./TiltAnimation.js";
3
3
  export class Tilt extends ValueWithRandom {
4
4
  constructor() {
5
5
  super();
@@ -1,6 +1,6 @@
1
1
  import { getRandom, getRangeValue, } from "@tsparticles/engine";
2
- import { Tilt } from "./Options/Classes/Tilt";
3
- import { updateTilt } from "./Utils";
2
+ import { Tilt } from "./Options/Classes/Tilt.js";
3
+ import { updateTilt } from "./Utils.js";
4
4
  export class TiltUpdater {
5
5
  constructor(container) {
6
6
  this.container = container;
package/browser/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { TiltUpdater } from "./TiltUpdater";
1
+ import { TiltUpdater } from "./TiltUpdater.js";
2
2
  export async function loadTiltUpdater(engine, refresh = true) {
3
3
  await engine.addParticleUpdater("tilt", (container) => new TiltUpdater(container), refresh);
4
4
  }
@@ -0,0 +1 @@
1
+ { "type": "module" }
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Tilt = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const TiltAnimation_1 = require("./TiltAnimation");
5
+ const TiltAnimation_js_1 = require("./TiltAnimation.js");
6
6
  class Tilt extends engine_1.ValueWithRandom {
7
7
  constructor() {
8
8
  super();
9
- this.animation = new TiltAnimation_1.TiltAnimation();
9
+ this.animation = new TiltAnimation_js_1.TiltAnimation();
10
10
  this.direction = "clockwise";
11
11
  this.enable = false;
12
12
  this.value = 0;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TiltUpdater = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const Tilt_1 = require("./Options/Classes/Tilt");
6
- const Utils_1 = require("./Utils");
5
+ const Tilt_js_1 = require("./Options/Classes/Tilt.js");
6
+ const Utils_js_1 = require("./Utils.js");
7
7
  class TiltUpdater {
8
8
  constructor(container) {
9
9
  this.container = container;
@@ -55,7 +55,7 @@ class TiltUpdater {
55
55
  }
56
56
  loadOptions(options, ...sources) {
57
57
  if (!options.tilt) {
58
- options.tilt = new Tilt_1.Tilt();
58
+ options.tilt = new Tilt_js_1.Tilt();
59
59
  }
60
60
  for (const source of sources) {
61
61
  options.tilt.load(source?.tilt);
@@ -65,7 +65,7 @@ class TiltUpdater {
65
65
  if (!this.isEnabled(particle)) {
66
66
  return;
67
67
  }
68
- (0, Utils_1.updateTilt)(particle, delta);
68
+ (0, Utils_js_1.updateTilt)(particle, delta);
69
69
  }
70
70
  }
71
71
  exports.TiltUpdater = TiltUpdater;
package/cjs/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadTiltUpdater = void 0;
4
- const TiltUpdater_1 = require("./TiltUpdater");
4
+ const TiltUpdater_js_1 = require("./TiltUpdater.js");
5
5
  async function loadTiltUpdater(engine, refresh = true) {
6
- await engine.addParticleUpdater("tilt", (container) => new TiltUpdater_1.TiltUpdater(container), refresh);
6
+ await engine.addParticleUpdater("tilt", (container) => new TiltUpdater_js_1.TiltUpdater(container), refresh);
7
7
  }
8
8
  exports.loadTiltUpdater = loadTiltUpdater;
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -1,5 +1,5 @@
1
1
  import { ValueWithRandom } from "@tsparticles/engine";
2
- import { TiltAnimation } from "./TiltAnimation";
2
+ import { TiltAnimation } from "./TiltAnimation.js";
3
3
  export class Tilt extends ValueWithRandom {
4
4
  constructor() {
5
5
  super();
@@ -1,6 +1,6 @@
1
1
  import { getRandom, getRangeValue, } from "@tsparticles/engine";
2
- import { Tilt } from "./Options/Classes/Tilt";
3
- import { updateTilt } from "./Utils";
2
+ import { Tilt } from "./Options/Classes/Tilt.js";
3
+ import { updateTilt } from "./Utils.js";
4
4
  export class TiltUpdater {
5
5
  constructor(container) {
6
6
  this.container = container;
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { TiltUpdater } from "./TiltUpdater";
1
+ import { TiltUpdater } from "./TiltUpdater.js";
2
2
  export async function loadTiltUpdater(engine, refresh = true) {
3
3
  await engine.addParticleUpdater("tilt", (container) => new TiltUpdater(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-tilt",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "tsParticles particles tilt 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/tilt"
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.tilt.min.js",
73
73
  "unpkg": "tsparticles.updater.tilt.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"