tsparticles-shape-polygon
Advanced tools
Comparing version 2.0.0-alpha.6 to 2.0.0-alpha.7
{ | ||
"name": "tsparticles-shape-polygon", | ||
"version": "2.0.0-alpha.6", | ||
"version": "2.0.0-alpha.7", | ||
"description": "tsParticles Polygon shape", | ||
@@ -65,4 +65,4 @@ "homepage": "https://particles.js.org/", | ||
"dependencies": { | ||
"tsparticles-engine": "^2.0.0-alpha.6" | ||
"tsparticles-engine": "^2.0.0-alpha.7" | ||
} | ||
} |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v2.0.0-alpha.6 | ||
* v2.0.0-alpha.7 | ||
*/ | ||
@@ -24,5 +24,68 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/***/ 423: | ||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | ||
/***/ 414: | ||
/***/ ((module) => { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__414__; | ||
/***/ }) | ||
/******/ }); | ||
/************************************************************************/ | ||
/******/ // The module cache | ||
/******/ var __webpack_module_cache__ = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ // Check if module is in cache | ||
/******/ var cachedModule = __webpack_module_cache__[moduleId]; | ||
/******/ if (cachedModule !== undefined) { | ||
/******/ return cachedModule.exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = __webpack_module_cache__[moduleId] = { | ||
/******/ // no module.id needed | ||
/******/ // no module.loaded needed | ||
/******/ exports: {} | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/************************************************************************/ | ||
/******/ /* webpack/runtime/define property getters */ | ||
/******/ (() => { | ||
/******/ // define getter functions for harmony exports | ||
/******/ __webpack_require__.d = (exports, definition) => { | ||
/******/ for(var key in definition) { | ||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
/******/ } | ||
/******/ } | ||
/******/ }; | ||
/******/ })(); | ||
/******/ | ||
/******/ /* webpack/runtime/hasOwnProperty shorthand */ | ||
/******/ (() => { | ||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | ||
/******/ })(); | ||
/******/ | ||
/******/ /* webpack/runtime/make namespace object */ | ||
/******/ (() => { | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = (exports) => { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ })(); | ||
/******/ | ||
/************************************************************************/ | ||
var __webpack_exports__ = {}; | ||
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. | ||
(() => { | ||
// ESM COMPAT FLAG | ||
@@ -33,4 +96,4 @@ __webpack_require__.r(__webpack_exports__); | ||
__webpack_require__.d(__webpack_exports__, { | ||
"loadPolygonShape": () => /* reexport */ loadPolygonShape, | ||
"tsParticles": () => /* reexport */ external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles | ||
"loadPolygonShape": () => (/* reexport */ loadPolygonShape), | ||
"tsParticles": () => (/* reexport */ external_commonjs_tsparticles_engine_commonjs2_tsparticles_engine_amd_tsparticles_engine_root_window_.tsParticles) | ||
}); | ||
@@ -143,73 +206,7 @@ | ||
})(); | ||
/***/ }), | ||
/***/ 414: | ||
/***/ ((module) => { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__414__; | ||
/***/ }) | ||
/******/ }); | ||
/************************************************************************/ | ||
/******/ // The module cache | ||
/******/ var __webpack_module_cache__ = {}; | ||
/******/ | ||
/******/ // The require function | ||
/******/ function __webpack_require__(moduleId) { | ||
/******/ // Check if module is in cache | ||
/******/ if(__webpack_module_cache__[moduleId]) { | ||
/******/ return __webpack_module_cache__[moduleId].exports; | ||
/******/ } | ||
/******/ // Create a new module (and put it into the cache) | ||
/******/ var module = __webpack_module_cache__[moduleId] = { | ||
/******/ // no module.id needed | ||
/******/ // no module.loaded needed | ||
/******/ exports: {} | ||
/******/ }; | ||
/******/ | ||
/******/ // Execute the module function | ||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | ||
/******/ | ||
/******/ // Return the exports of the module | ||
/******/ return module.exports; | ||
/******/ } | ||
/******/ | ||
/************************************************************************/ | ||
/******/ /* webpack/runtime/define property getters */ | ||
/******/ (() => { | ||
/******/ // define getter functions for harmony exports | ||
/******/ __webpack_require__.d = (exports, definition) => { | ||
/******/ for(var key in definition) { | ||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | ||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | ||
/******/ } | ||
/******/ } | ||
/******/ }; | ||
/******/ })(); | ||
/******/ | ||
/******/ /* webpack/runtime/hasOwnProperty shorthand */ | ||
/******/ (() => { | ||
/******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) | ||
/******/ })(); | ||
/******/ | ||
/******/ /* webpack/runtime/make namespace object */ | ||
/******/ (() => { | ||
/******/ // define __esModule on exports | ||
/******/ __webpack_require__.r = (exports) => { | ||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | ||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/******/ } | ||
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/******/ }; | ||
/******/ })(); | ||
/******/ | ||
/************************************************************************/ | ||
/******/ // module exports must be returned from runtime so entry inlining is disabled | ||
/******/ // startup | ||
/******/ // Load entry module and return exports | ||
/******/ return __webpack_require__(423); | ||
/******/ return __webpack_exports__; | ||
/******/ })() | ||
; | ||
}); |
@@ -1,2 +0,2 @@ | ||
/*! tsParticles Polygon Shape v2.0.0-alpha.6 by Matteo Bruni */ | ||
!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 n="object"==typeof exports?t(require("tsparticles-engine")):t(e.window);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(this,(function(e){return(()=>{"use strict";var t={423:(e,t,n)=>{n.r(t),n.d(t,{loadPolygonShape:()=>s,tsParticles:()=>o.tsParticles});var o=n(414);class r{getSidesCount(e){var t,n;const o=e.shapeData;return null!==(n=null!==(t=null==o?void 0:o.sides)&&void 0!==t?t:null==o?void 0:o.nb_sides)&&void 0!==n?n:5}draw(e,t,n){const r=this.getCenter(t,n),i=this.getSidesData(t,n),a=i.count.numerator*i.count.denominator,s=i.count.numerator/i.count.denominator,l=180*(s-2)/s,u=Math.PI-(0,o.deg2rad)(l);if(e){e.beginPath(),e.translate(r.x,r.y),e.moveTo(0,0);for(let t=0;t<a;t++)e.lineTo(i.length,0),e.translate(i.length,0),e.rotate(u)}}}class i extends r{getSidesData(e,t){var n,o;const r=e.shapeData,i=null!==(o=null!==(n=null==r?void 0:r.sides)&&void 0!==n?n:null==r?void 0:r.nb_sides)&&void 0!==o?o:5;return{count:{denominator:1,numerator:i},length:2.66*t/(i/3)}}getCenter(e,t){return{x:-t/(this.getSidesCount(e)/3.5),y:-t/.76}}}class a extends r{getSidesCount(){return 3}getSidesData(e,t){return{count:{denominator:2,numerator:3},length:2*t}}getCenter(e,t){return{x:-t,y:t/1.66}}}function s(e){!function(e){e.addShape("polygon",new i)}(e),function(e){e.addShape("triangle",new a)}(e)}s(o.tsParticles)},414:t=>{t.exports=e}},n={};function o(e){if(n[e])return n[e].exports;var r=n[e]={exports:{}};return t[e](r,r.exports,o),r.exports}return o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o(423)})()})); | ||
/*! tsParticles Polygon Shape v2.0.0-alpha.7 by Matteo Bruni */ | ||
!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 n="object"==typeof exports?t(require("tsparticles-engine")):t(e.window);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(this,(function(e){return(()=>{"use strict";var t={414:t=>{t.exports=e}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{loadPolygonShape:()=>a,tsParticles:()=>e.tsParticles});var e=o(414);class t{getSidesCount(e){var t,n;const o=e.shapeData;return null!==(n=null!==(t=null==o?void 0:o.sides)&&void 0!==t?t:null==o?void 0:o.nb_sides)&&void 0!==n?n:5}draw(t,n,o){const r=this.getCenter(n,o),i=this.getSidesData(n,o),a=i.count.numerator*i.count.denominator,s=i.count.numerator/i.count.denominator,l=180*(s-2)/s,d=Math.PI-(0,e.deg2rad)(l);if(t){t.beginPath(),t.translate(r.x,r.y),t.moveTo(0,0);for(let e=0;e<a;e++)t.lineTo(i.length,0),t.translate(i.length,0),t.rotate(d)}}}class n extends t{getSidesData(e,t){var n,o;const r=e.shapeData,i=null!==(o=null!==(n=null==r?void 0:r.sides)&&void 0!==n?n:null==r?void 0:r.nb_sides)&&void 0!==o?o:5;return{count:{denominator:1,numerator:i},length:2.66*t/(i/3)}}getCenter(e,t){return{x:-t/(this.getSidesCount(e)/3.5),y:-t/.76}}}class i extends t{getSidesCount(){return 3}getSidesData(e,t){return{count:{denominator:2,numerator:3},length:2*t}}getCenter(e,t){return{x:-t,y:t/1.66}}}function a(e){!function(e){e.addShape("polygon",new n)}(e),function(e){e.addShape("triangle",new i)}(e)}a(e.tsParticles)})(),r})()})); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
303616
547