@tsparticles/updater-orbit 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-orbit.svg)](https://www.npmjs.com/package/@tsparticles/updater-orbit)
7
7
  [![npmjs](https://img.shields.io/npm/dt/@tsparticles/updater-orbit)](https://www.npmjs.com/package/@tsparticles/updater-orbit) [![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 orbit animations.
9
+ [tsParticles](https://github.com/tsparticles/tsparticles) updater plugin for orbit animations.
10
10
 
11
11
  ## How to use it
12
12
 
@@ -1,5 +1,5 @@
1
1
  import { AnimationOptions, OptionsColor, setRangeValue, } from "@tsparticles/engine";
2
- import { OrbitRotation } from "./OrbitRotation";
2
+ import { OrbitRotation } from "./OrbitRotation.js";
3
3
  export class Orbit {
4
4
  constructor() {
5
5
  this.animation = new AnimationOptions();
@@ -1,6 +1,6 @@
1
1
  import { getRangeValue, rangeColorToHsl, } from "@tsparticles/engine";
2
- import { Orbit } from "./Options/Classes/Orbit";
3
- import { drawEllipse } from "./Utils";
2
+ import { Orbit } from "./Options/Classes/Orbit.js";
3
+ import { drawEllipse } from "./Utils.js";
4
4
  export class OrbitUpdater {
5
5
  constructor(container) {
6
6
  this.container = container;
package/browser/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { OrbitUpdater } from "./OrbitUpdater";
1
+ import { OrbitUpdater } from "./OrbitUpdater.js";
2
2
  export async function loadOrbitUpdater(engine, refresh = true) {
3
3
  await engine.addParticleUpdater("orbit", (container) => new OrbitUpdater(container), refresh);
4
4
  }
@@ -0,0 +1 @@
1
+ { "type": "module" }
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Orbit = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const OrbitRotation_1 = require("./OrbitRotation");
5
+ const OrbitRotation_js_1 = require("./OrbitRotation.js");
6
6
  class Orbit {
7
7
  constructor() {
8
8
  this.animation = new engine_1.AnimationOptions();
9
9
  this.enable = false;
10
10
  this.opacity = 1;
11
- this.rotation = new OrbitRotation_1.OrbitRotation();
11
+ this.rotation = new OrbitRotation_js_1.OrbitRotation();
12
12
  this.width = 1;
13
13
  }
14
14
  load(data) {
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OrbitUpdater = void 0;
4
4
  const engine_1 = require("@tsparticles/engine");
5
- const Orbit_1 = require("./Options/Classes/Orbit");
6
- const Utils_1 = require("./Utils");
5
+ const Orbit_js_1 = require("./Options/Classes/Orbit.js");
6
+ const Utils_js_1 = require("./Utils.js");
7
7
  class OrbitUpdater {
8
8
  constructor(container) {
9
9
  this.container = container;
@@ -37,7 +37,7 @@ class OrbitUpdater {
37
37
  end = 2 * Math.PI;
38
38
  }
39
39
  container.canvas.draw((ctx) => {
40
- (0, Utils_1.drawEllipse)(ctx, particle, particle.orbitColor ?? particle.getFillColor(), particle.retina.orbitRadius ?? container.retina.orbitRadius ?? particle.getRadius(), particle.orbitOpacity ?? 1, particle.orbitWidth ?? 1, (particle.orbitRotation ?? 0) * container.retina.pixelRatio, start, end);
40
+ (0, Utils_js_1.drawEllipse)(ctx, particle, particle.orbitColor ?? particle.getFillColor(), particle.retina.orbitRadius ?? container.retina.orbitRadius ?? particle.getRadius(), particle.orbitOpacity ?? 1, particle.orbitWidth ?? 1, (particle.orbitRotation ?? 0) * container.retina.pixelRatio, start, end);
41
41
  });
42
42
  }
43
43
  init(particle) {
@@ -62,7 +62,7 @@ class OrbitUpdater {
62
62
  }
63
63
  loadOptions(options, ...sources) {
64
64
  if (!options.orbit) {
65
- options.orbit = new Orbit_1.Orbit();
65
+ options.orbit = new Orbit_js_1.Orbit();
66
66
  }
67
67
  for (const source of sources) {
68
68
  options.orbit.load(source?.orbit);
package/cjs/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadOrbitUpdater = void 0;
4
- const OrbitUpdater_1 = require("./OrbitUpdater");
4
+ const OrbitUpdater_js_1 = require("./OrbitUpdater.js");
5
5
  async function loadOrbitUpdater(engine, refresh = true) {
6
- await engine.addParticleUpdater("orbit", (container) => new OrbitUpdater_1.OrbitUpdater(container), refresh);
6
+ await engine.addParticleUpdater("orbit", (container) => new OrbitUpdater_js_1.OrbitUpdater(container), refresh);
7
7
  }
8
8
  exports.loadOrbitUpdater = loadOrbitUpdater;
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -1,5 +1,5 @@
1
1
  import { AnimationOptions, OptionsColor, setRangeValue, } from "@tsparticles/engine";
2
- import { OrbitRotation } from "./OrbitRotation";
2
+ import { OrbitRotation } from "./OrbitRotation.js";
3
3
  export class Orbit {
4
4
  constructor() {
5
5
  this.animation = new AnimationOptions();
@@ -1,6 +1,6 @@
1
1
  import { getRangeValue, rangeColorToHsl, } from "@tsparticles/engine";
2
- import { Orbit } from "./Options/Classes/Orbit";
3
- import { drawEllipse } from "./Utils";
2
+ import { Orbit } from "./Options/Classes/Orbit.js";
3
+ import { drawEllipse } from "./Utils.js";
4
4
  export class OrbitUpdater {
5
5
  constructor(container) {
6
6
  this.container = container;
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { OrbitUpdater } from "./OrbitUpdater";
1
+ import { OrbitUpdater } from "./OrbitUpdater.js";
2
2
  export async function loadOrbitUpdater(engine, refresh = true) {
3
3
  await engine.addParticleUpdater("orbit", (container) => new OrbitUpdater(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-orbit",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "tsParticles particles orbit 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/orbit"
10
10
  },
11
11
  "keywords": [
@@ -66,7 +66,7 @@
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
71
  "funding": [
72
72
  {
@@ -82,14 +82,26 @@
82
82
  "url": "https://www.buymeacoffee.com/matteobruni"
83
83
  }
84
84
  ],
85
- "main": "cjs/index.js",
85
+ "sideEffects": false,
86
86
  "jsdelivr": "tsparticles.updater.orbit.min.js",
87
87
  "unpkg": "tsparticles.updater.orbit.min.js",
88
+ "browser": "browser/index.js",
89
+ "main": "cjs/index.js",
88
90
  "module": "esm/index.js",
89
91
  "types": "types/index.d.ts",
90
- "sideEffects": false,
92
+ "exports": {
93
+ ".": {
94
+ "types": "./types/index.d.ts",
95
+ "browser": "./browser/index.js",
96
+ "import": "./esm/index.js",
97
+ "require": "./cjs/index.js",
98
+ "umd": "./umd/index.js",
99
+ "default": "./cjs/index.js"
100
+ },
101
+ "./package.json": "./package.json"
102
+ },
91
103
  "dependencies": {
92
- "@tsparticles/engine": "^3.0.0-beta.0"
104
+ "@tsparticles/engine": "^3.0.0-beta.2"
93
105
  },
94
106
  "publishConfig": {
95
107
  "access": "public"