@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 +1 -1
- package/browser/Options/Classes/Orbit.js +1 -1
- package/browser/OrbitUpdater.js +2 -2
- package/browser/index.js +1 -1
- package/browser/package.json +1 -0
- package/cjs/Options/Classes/Orbit.js +2 -2
- package/cjs/OrbitUpdater.js +4 -4
- package/cjs/index.js +2 -2
- package/cjs/package.json +1 -0
- package/esm/Options/Classes/Orbit.js +1 -1
- package/esm/OrbitUpdater.js +2 -2
- package/esm/index.js +1 -1
- package/esm/package.json +1 -0
- package/package.json +18 -6
- package/report.html +23 -5
- package/tsparticles.updater.orbit.js +1 -1
- package/tsparticles.updater.orbit.min.js.LICENSE.txt +1 -1
- package/types/Options/Classes/Orbit.d.ts +2 -2
- package/types/OrbitUpdater.d.ts +2 -2
- package/types/Types.d.ts +2 -2
- package/umd/Options/Classes/Orbit.js +3 -3
- package/umd/OrbitUpdater.js +5 -5
- package/umd/index.js +3 -3
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@tsparticles/updater-orbit)
|
|
7
7
|
[](https://www.npmjs.com/package/@tsparticles/updater-orbit) [](https://github.com/sponsors/matteobruni)
|
|
8
8
|
|
|
9
|
-
[tsParticles](https://github.com/
|
|
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();
|
package/browser/OrbitUpdater.js
CHANGED
|
@@ -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
|
@@ -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
|
|
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
|
|
11
|
+
this.rotation = new OrbitRotation_js_1.OrbitRotation();
|
|
12
12
|
this.width = 1;
|
|
13
13
|
}
|
|
14
14
|
load(data) {
|
package/cjs/OrbitUpdater.js
CHANGED
|
@@ -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
|
|
6
|
-
const
|
|
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,
|
|
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
|
|
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
|
|
4
|
+
const OrbitUpdater_js_1 = require("./OrbitUpdater.js");
|
|
5
5
|
async function loadOrbitUpdater(engine, refresh = true) {
|
|
6
|
-
await engine.addParticleUpdater("orbit", (container) => new
|
|
6
|
+
await engine.addParticleUpdater("orbit", (container) => new OrbitUpdater_js_1.OrbitUpdater(container), refresh);
|
|
7
7
|
}
|
|
8
8
|
exports.loadOrbitUpdater = loadOrbitUpdater;
|
package/cjs/package.json
ADDED
|
@@ -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();
|
package/esm/OrbitUpdater.js
CHANGED
|
@@ -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
package/esm/package.json
ADDED
|
@@ -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.
|
|
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/
|
|
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/
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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.
|
|
104
|
+
"@tsparticles/engine": "^3.0.0-beta.2"
|
|
93
105
|
},
|
|
94
106
|
"publishConfig": {
|
|
95
107
|
"access": "public"
|