@tsparticles/shape-spiral 3.0.0-beta.3 → 3.0.0-beta.4

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.
@@ -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.0.0-beta.3
7
+ * v3.0.0-beta.4
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
@@ -123,9 +123,9 @@ class SpiralDrawer {
123
123
  particleInit(container, particle) {
124
124
  const pixelRatio = container.retina.pixelRatio,
125
125
  shapeData = particle.shapeData;
126
- particle.spiralInnerRadius = (0,engine_root_window_.getRangeValue)(shapeData.innerRadius ?? 1) * pixelRatio;
127
- particle.spiralLineSpacing = (0,engine_root_window_.getRangeValue)(shapeData.lineSpacing ?? 1) * pixelRatio;
128
- particle.spiralWidthFactor = (0,engine_root_window_.getRangeValue)(shapeData.widthFactor ?? 10);
126
+ particle.spiralInnerRadius = (0,engine_root_window_.getRangeValue)(shapeData?.innerRadius ?? 1) * pixelRatio;
127
+ particle.spiralLineSpacing = (0,engine_root_window_.getRangeValue)(shapeData?.lineSpacing ?? 1) * pixelRatio;
128
+ particle.spiralWidthFactor = (0,engine_root_window_.getRangeValue)(shapeData?.widthFactor ?? 10);
129
129
  }
130
130
  }
131
131
  ;// CONCATENATED MODULE: ./dist/browser/index.js
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see tsparticles.shape.spiral.min.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(this,(e=>(()=>{"use strict";var t={533:t=>{t.exports=e}},r={};function i(e){var a=r[e];if(void 0!==a)return a.exports;var n=r[e]={exports:{}};return t[e](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{i.r(a),i.d(a,{loadSpiralShape:()=>r});var e=i(533);class t{draw(e){const{context:t,particle:r,radius:i}=e;if(void 0===r.spiralInnerRadius||void 0===r.spiralLineSpacing||void 0===r.spiralWidthFactor)return;const a=(i-r.spiralInnerRadius)/r.spiralLineSpacing;for(let e=0;e<10*a;e++){const i=e/10,a=r.spiralInnerRadius+r.spiralLineSpacing*i,n={x:a*Math.cos(i),y:a*Math.sin(i)};t.lineTo(n.x,n.y)}}particleInit(t,r){const i=t.retina.pixelRatio,a=r.shapeData;r.spiralInnerRadius=(0,e.getRangeValue)(a.innerRadius??1)*i,r.spiralLineSpacing=(0,e.getRangeValue)(a.lineSpacing??1)*i,r.spiralWidthFactor=(0,e.getRangeValue)(a.widthFactor??10)}}async function r(e,r=!0){await e.addShape("spiral",new t,r)}})(),a})()));
2
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(this,(e=>(()=>{"use strict";var t={533:t=>{t.exports=e}},r={};function i(e){var a=r[e];if(void 0!==a)return a.exports;var n=r[e]={exports:{}};return t[e](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{i.r(a),i.d(a,{loadSpiralShape:()=>r});var e=i(533);class t{draw(e){const{context:t,particle:r,radius:i}=e;if(void 0===r.spiralInnerRadius||void 0===r.spiralLineSpacing||void 0===r.spiralWidthFactor)return;const a=(i-r.spiralInnerRadius)/r.spiralLineSpacing;for(let e=0;e<10*a;e++){const i=e/10,a=r.spiralInnerRadius+r.spiralLineSpacing*i,n={x:a*Math.cos(i),y:a*Math.sin(i)};t.lineTo(n.x,n.y)}}particleInit(t,r){const i=t.retina.pixelRatio,a=r.shapeData;r.spiralInnerRadius=(0,e.getRangeValue)(a?.innerRadius??1)*i,r.spiralLineSpacing=(0,e.getRangeValue)(a?.lineSpacing??1)*i,r.spiralWidthFactor=(0,e.getRangeValue)(a?.widthFactor??10)}}async function r(e,r=!0){await e.addShape("spiral",new t,r)}})(),a})()));
@@ -1 +1 @@
1
- /*! tsParticles Spiral Shape v3.0.0-beta.3 by Matteo Bruni */
1
+ /*! tsParticles Spiral Shape v3.0.0-beta.4 by Matteo Bruni */
@@ -30,9 +30,9 @@
30
30
  }
31
31
  particleInit(container, particle) {
32
32
  const pixelRatio = container.retina.pixelRatio, shapeData = particle.shapeData;
33
- particle.spiralInnerRadius = (0, engine_1.getRangeValue)(shapeData.innerRadius ?? 1) * pixelRatio;
34
- particle.spiralLineSpacing = (0, engine_1.getRangeValue)(shapeData.lineSpacing ?? 1) * pixelRatio;
35
- particle.spiralWidthFactor = (0, engine_1.getRangeValue)(shapeData.widthFactor ?? 10);
33
+ particle.spiralInnerRadius = (0, engine_1.getRangeValue)(shapeData?.innerRadius ?? 1) * pixelRatio;
34
+ particle.spiralLineSpacing = (0, engine_1.getRangeValue)(shapeData?.lineSpacing ?? 1) * pixelRatio;
35
+ particle.spiralWidthFactor = (0, engine_1.getRangeValue)(shapeData?.widthFactor ?? 10);
36
36
  }
37
37
  }
38
38
  exports.SpiralDrawer = SpiralDrawer;