@tsparticles/updater-orbit 3.6.0-beta.1 → 3.6.0

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.
@@ -1,4 +1,4 @@
1
- import { AnimationOptions, OptionsColor, setRangeValue, } from "@tsparticles/engine";
1
+ import { AnimationOptions, OptionsColor, isNull, setRangeValue, } from "@tsparticles/engine";
2
2
  import { OrbitRotation } from "./OrbitRotation.js";
3
3
  export class Orbit {
4
4
  constructor() {
@@ -9,7 +9,7 @@ export class Orbit {
9
9
  this.width = 1;
10
10
  }
11
11
  load(data) {
12
- if (!data) {
12
+ if (isNull(data)) {
13
13
  return;
14
14
  }
15
15
  this.animation.load(data.animation);
@@ -1,11 +1,11 @@
1
- import { ValueWithRandom } from "@tsparticles/engine";
1
+ import { ValueWithRandom, isNull } from "@tsparticles/engine";
2
2
  export class OrbitRotation extends ValueWithRandom {
3
3
  constructor() {
4
4
  super();
5
5
  this.value = 45;
6
6
  }
7
7
  load(data) {
8
- if (data === undefined) {
8
+ if (isNull(data)) {
9
9
  return;
10
10
  }
11
11
  super.load(data);
@@ -12,7 +12,7 @@ class Orbit {
12
12
  this.width = 1;
13
13
  }
14
14
  load(data) {
15
- if (!data) {
15
+ if ((0, engine_1.isNull)(data)) {
16
16
  return;
17
17
  }
18
18
  this.animation.load(data.animation);
@@ -8,7 +8,7 @@ class OrbitRotation extends engine_1.ValueWithRandom {
8
8
  this.value = 45;
9
9
  }
10
10
  load(data) {
11
- if (data === undefined) {
11
+ if ((0, engine_1.isNull)(data)) {
12
12
  return;
13
13
  }
14
14
  super.load(data);
@@ -1,4 +1,4 @@
1
- import { AnimationOptions, OptionsColor, setRangeValue, } from "@tsparticles/engine";
1
+ import { AnimationOptions, OptionsColor, isNull, setRangeValue, } from "@tsparticles/engine";
2
2
  import { OrbitRotation } from "./OrbitRotation.js";
3
3
  export class Orbit {
4
4
  constructor() {
@@ -9,7 +9,7 @@ export class Orbit {
9
9
  this.width = 1;
10
10
  }
11
11
  load(data) {
12
- if (!data) {
12
+ if (isNull(data)) {
13
13
  return;
14
14
  }
15
15
  this.animation.load(data.animation);
@@ -1,11 +1,11 @@
1
- import { ValueWithRandom } from "@tsparticles/engine";
1
+ import { ValueWithRandom, isNull } from "@tsparticles/engine";
2
2
  export class OrbitRotation extends ValueWithRandom {
3
3
  constructor() {
4
4
  super();
5
5
  this.value = 45;
6
6
  }
7
7
  load(data) {
8
- if (data === undefined) {
8
+ if (isNull(data)) {
9
9
  return;
10
10
  }
11
11
  super.load(data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/updater-orbit",
3
- "version": "3.6.0-beta.1",
3
+ "version": "3.6.0",
4
4
  "description": "tsParticles particles orbit updater",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -101,7 +101,7 @@
101
101
  "./package.json": "./package.json"
102
102
  },
103
103
  "dependencies": {
104
- "@tsparticles/engine": "^3.6.0-beta.1"
104
+ "@tsparticles/engine": "^3.6.0"
105
105
  },
106
106
  "publishConfig": {
107
107
  "access": "public"
package/report.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8"/>
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
6
- <title>@tsparticles/updater-orbit [13 Oct 2024 at 17:31]</title>
6
+ <title>@tsparticles/updater-orbit [19 Nov 2024 at 00:00]</title>
7
7
  <link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt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@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v3.6.0-beta.1
7
+ * v3.6.0
8
8
  */
9
9
  /*
10
10
  * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
@@ -44,7 +44,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
44
44
  \***********************************************/
45
45
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
46
46
 
47
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Orbit: () => (/* binding */ Orbit)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _OrbitRotation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OrbitRotation.js */ \"./dist/browser/Options/Classes/OrbitRotation.js\");\n\n\nclass Orbit {\n constructor() {\n this.animation = new _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AnimationOptions();\n this.enable = false;\n this.opacity = 1;\n this.rotation = new _OrbitRotation_js__WEBPACK_IMPORTED_MODULE_1__.OrbitRotation();\n this.width = 1;\n }\n load(data) {\n if (!data) {\n return;\n }\n this.animation.load(data.animation);\n this.rotation.load(data.rotation);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.opacity !== undefined) {\n this.opacity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.opacity);\n }\n if (data.width !== undefined) {\n this.width = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.width);\n }\n if (data.radius !== undefined) {\n this.radius = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.radius);\n }\n if (data.color !== undefined) {\n this.color = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor.create(this.color, data.color);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-orbit/./dist/browser/Options/Classes/Orbit.js?");
47
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Orbit: () => (/* binding */ Orbit)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _OrbitRotation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OrbitRotation.js */ \"./dist/browser/Options/Classes/OrbitRotation.js\");\n\n\nclass Orbit {\n constructor() {\n this.animation = new _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AnimationOptions();\n this.enable = false;\n this.opacity = 1;\n this.rotation = new _OrbitRotation_js__WEBPACK_IMPORTED_MODULE_1__.OrbitRotation();\n this.width = 1;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n this.animation.load(data.animation);\n this.rotation.load(data.rotation);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.opacity !== undefined) {\n this.opacity = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.opacity);\n }\n if (data.width !== undefined) {\n this.width = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.width);\n }\n if (data.radius !== undefined) {\n this.radius = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.radius);\n }\n if (data.color !== undefined) {\n this.color = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor.create(this.color, data.color);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-orbit/./dist/browser/Options/Classes/Orbit.js?");
48
48
 
49
49
  /***/ }),
50
50
 
@@ -54,7 +54,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
54
54
  \*******************************************************/
55
55
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
56
56
 
57
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OrbitRotation: () => (/* binding */ OrbitRotation)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass OrbitRotation extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.value = 45;\n }\n load(data) {\n if (data === undefined) {\n return;\n }\n super.load(data);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-orbit/./dist/browser/Options/Classes/OrbitRotation.js?");
57
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ OrbitRotation: () => (/* binding */ OrbitRotation)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass OrbitRotation extends _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.ValueWithRandom {\n constructor() {\n super();\n this.value = 45;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n super.load(data);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-orbit/./dist/browser/Options/Classes/OrbitRotation.js?");
58
58
 
59
59
  /***/ }),
60
60
 
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.updater.orbit.min.js.LICENSE.txt */
2
- !function(t,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],o);else{var e="object"==typeof exports?o(require("@tsparticles/engine")):o(t.window);for(var i in e)("object"==typeof exports?exports:t)[i]=e[i]}}(this,(t=>(()=>{var o={303:o=>{o.exports=t}},e={};function i(t){var a=e[t];if(void 0!==a)return a.exports;var r=e[t]={exports:{}};return o[t](r,r.exports,i),r.exports}i.d=(t,o)=>{for(var e in o)i.o(o,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:o[e]})},i.o=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};i.r(a),i.d(a,{loadOrbitUpdater:()=>u});var r,n=i(303);class s extends n.ValueWithRandom{constructor(){super(),this.value=45}load(t){void 0!==t&&super.load(t)}}class l{constructor(){this.animation=new n.AnimationOptions,this.enable=!1,this.opacity=1,this.rotation=new s,this.width=1}load(t){t&&(this.animation.load(t.animation),this.rotation.load(t.rotation),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=(0,n.setRangeValue)(t.opacity)),void 0!==t.width&&(this.width=(0,n.setRangeValue)(t.width)),void 0!==t.radius&&(this.radius=(0,n.setRangeValue)(t.radius)),void 0!==t.color&&(this.color=n.OptionsColor.create(this.color,t.color)))}}!function(t){t.front="front",t.back="back"}(r||(r={}));const d=2*Math.PI,c=.5*Math.PI,b=Math.PI+c;class p{constructor(t){this.container=t}afterDraw(t){const o=t.options.orbit;o?.enable&&this.drawOrbit(t,r.front)}beforeDraw(t){const o=t.options.orbit;o?.enable&&this.drawOrbit(t,r.back)}drawOrbit(t,o){const e=this.container;let i,a;switch(o){case r.back:i=c,a=b;break;case r.front:i=b,a=c;break;default:i=0,a=d}e.canvas.draw((o=>{!function(t,o,e,i,a,r,s,l,d){if(r<=0)return;const c=o.getPosition();e&&(t.strokeStyle=(0,n.getStyleFromHsl)(e,a)),t.lineWidth=r;const b=(0,n.degToRad)(s);t.beginPath(),t.ellipse(c.x,c.y,.5*i,2*i,b,l,d),t.stroke()}(o,t,t.orbitColor??t.getFillColor(),t.retina.orbitRadius??e.retina.orbitRadius??t.getRadius(),t.orbitOpacity??1,t.orbitWidth??1,(t.orbitRotation??0)*e.retina.pixelRatio,i,a)}))}init(t){const o=this.container,e=t.options.orbit;e?.enable&&(t.orbitRotation=(0,n.getRangeValue)(e.rotation.value),t.orbitColor=(0,n.rangeColorToHsl)(e.color),t.retina.orbitRadius=void 0!==e.radius?(0,n.getRangeValue)(e.radius)*o.retina.pixelRatio:void 0,o.retina.orbitRadius=t.retina.orbitRadius,t.orbitAnimationSpeed=e.animation.enable?(0,n.getRangeValue)(e.animation.speed):0,t.orbitWidth=(0,n.getRangeValue)(e.width),t.orbitOpacity=(0,n.getRangeValue)(e.opacity))}isEnabled(t){const o=t.options.orbit?.animation;return!t.destroyed&&!t.spawning&&!!o?.enable}loadOptions(t,...o){t.orbit||(t.orbit=new l);for(const e of o)t.orbit.load(e?.orbit)}update(t,o){this.isEnabled(t)&&(void 0===t.orbitRotation&&(t.orbitRotation=0),t.orbitRotation+=(t.orbitAnimationSpeed??0/d)*o.factor)}}async function u(t,o=!0){await t.addParticleUpdater("orbit",(t=>Promise.resolve(new p(t))),o)}return a})()));
2
+ !function(t,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],o);else{var e="object"==typeof exports?o(require("@tsparticles/engine")):o(t.window);for(var i in e)("object"==typeof exports?exports:t)[i]=e[i]}}(this,(t=>(()=>{var o={303:o=>{o.exports=t}},e={};function i(t){var a=e[t];if(void 0!==a)return a.exports;var r=e[t]={exports:{}};return o[t](r,r.exports,i),r.exports}i.d=(t,o)=>{for(var e in o)i.o(o,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:o[e]})},i.o=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};i.r(a),i.d(a,{loadOrbitUpdater:()=>p});var r,n=i(303);class s extends n.ValueWithRandom{constructor(){super(),this.value=45}load(t){(0,n.isNull)(t)||super.load(t)}}class l{constructor(){this.animation=new n.AnimationOptions,this.enable=!1,this.opacity=1,this.rotation=new s,this.width=1}load(t){(0,n.isNull)(t)||(this.animation.load(t.animation),this.rotation.load(t.rotation),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=(0,n.setRangeValue)(t.opacity)),void 0!==t.width&&(this.width=(0,n.setRangeValue)(t.width)),void 0!==t.radius&&(this.radius=(0,n.setRangeValue)(t.radius)),void 0!==t.color&&(this.color=n.OptionsColor.create(this.color,t.color)))}}!function(t){t.front="front",t.back="back"}(r||(r={}));const d=2*Math.PI,c=.5*Math.PI,b=Math.PI+c;class u{constructor(t){this.container=t}afterDraw(t){const o=t.options.orbit;o?.enable&&this.drawOrbit(t,r.front)}beforeDraw(t){const o=t.options.orbit;o?.enable&&this.drawOrbit(t,r.back)}drawOrbit(t,o){const e=this.container;let i,a;switch(o){case r.back:i=c,a=b;break;case r.front:i=b,a=c;break;default:i=0,a=d}e.canvas.draw((o=>{!function(t,o,e,i,a,r,s,l,d){if(r<=0)return;const c=o.getPosition();e&&(t.strokeStyle=(0,n.getStyleFromHsl)(e,a)),t.lineWidth=r;const b=(0,n.degToRad)(s);t.beginPath(),t.ellipse(c.x,c.y,.5*i,2*i,b,l,d),t.stroke()}(o,t,t.orbitColor??t.getFillColor(),t.retina.orbitRadius??e.retina.orbitRadius??t.getRadius(),t.orbitOpacity??1,t.orbitWidth??1,(t.orbitRotation??0)*e.retina.pixelRatio,i,a)}))}init(t){const o=this.container,e=t.options.orbit;e?.enable&&(t.orbitRotation=(0,n.getRangeValue)(e.rotation.value),t.orbitColor=(0,n.rangeColorToHsl)(e.color),t.retina.orbitRadius=void 0!==e.radius?(0,n.getRangeValue)(e.radius)*o.retina.pixelRatio:void 0,o.retina.orbitRadius=t.retina.orbitRadius,t.orbitAnimationSpeed=e.animation.enable?(0,n.getRangeValue)(e.animation.speed):0,t.orbitWidth=(0,n.getRangeValue)(e.width),t.orbitOpacity=(0,n.getRangeValue)(e.opacity))}isEnabled(t){const o=t.options.orbit?.animation;return!t.destroyed&&!t.spawning&&!!o?.enable}loadOptions(t,...o){t.orbit||(t.orbit=new l);for(const e of o)t.orbit.load(e?.orbit)}update(t,o){this.isEnabled(t)&&(void 0===t.orbitRotation&&(t.orbitRotation=0),t.orbitRotation+=(t.orbitAnimationSpeed??0/d)*o.factor)}}async function p(t,o=!0){await t.addParticleUpdater("orbit",(t=>Promise.resolve(new u(t))),o)}return a})()));
@@ -1 +1 @@
1
- /*! tsParticles Orbit Updater v3.6.0-beta.1 by Matteo Bruni */
1
+ /*! tsParticles Orbit Updater v3.6.0 by Matteo Bruni */
@@ -21,7 +21,7 @@
21
21
  this.width = 1;
22
22
  }
23
23
  load(data) {
24
- if (!data) {
24
+ if ((0, engine_1.isNull)(data)) {
25
25
  return;
26
26
  }
27
27
  this.animation.load(data.animation);
@@ -17,7 +17,7 @@
17
17
  this.value = 45;
18
18
  }
19
19
  load(data) {
20
- if (data === undefined) {
20
+ if ((0, engine_1.isNull)(data)) {
21
21
  return;
22
22
  }
23
23
  super.load(data);