tsparticles-shape-polygon
Advanced tools
Comparing version 2.1.4 to 2.2.0
{ | ||
"name": "tsparticles-shape-polygon", | ||
"version": "2.1.4", | ||
"version": "2.2.0", | ||
"description": "tsParticles polygon shape", | ||
"homepage": "https://particles.js.org/", | ||
"homepage": "https://particles.js.org", | ||
"repository": { | ||
@@ -36,3 +36,3 @@ "type": "git", | ||
], | ||
"author": "Matteo Bruni", | ||
"author": "Matteo Bruni <matteo.bruni@me.com>", | ||
"license": "MIT", | ||
@@ -48,4 +48,4 @@ "bugs": { | ||
"dependencies": { | ||
"tsparticles-engine": "^2.1.4" | ||
"tsparticles-engine": "^2.2.0" | ||
} | ||
} |
@@ -7,3 +7,3 @@ [![banner](https://particles.js.org/images/banner2.png)](https://particles.js.org) | ||
[![npmjs](https://badge.fury.io/js/tsparticles-shape-polygon.svg)](https://www.npmjs.com/package/tsparticles-shape-polygon) | ||
[![npmjs](https://img.shields.io/npm/dt/tsparticles-shape-polygon)](https://www.npmjs.com/package/tsparticles-shape-polygon) | ||
[![npmjs](https://img.shields.io/npm/dt/tsparticles-shape-polygon)](https://www.npmjs.com/package/tsparticles-shape-polygon) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni) | ||
@@ -10,0 +10,0 @@ [tsParticles](https://github.com/matteobruni/tsparticles) additional polygon shape. |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v2.1.4 | ||
* v2.2.0 | ||
*/ | ||
@@ -10,0 +10,0 @@ (function webpackUniversalModuleDefinition(root, factory) { |
@@ -1,2 +0,2 @@ | ||
/*! tsParticles Polygon Shape v2.1.4 by Matteo Bruni */ | ||
/*! For license information please see tsparticles.shape.polygon.min.js.LICENSE.txt */ | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(this,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{loadGenericPolygonShape:()=>r,loadPolygonShape:()=>l,loadTriangleShape:()=>i});class n{draw(e,t,n){const o=this.getCenter(t,n),a=this.getSidesData(t,n),r=a.count.numerator*a.count.denominator,i=a.count.numerator/a.count.denominator,l=180*(i-2)/i,d=Math.PI-Math.PI*l/180;if(e){e.beginPath(),e.translate(o.x,o.y),e.moveTo(0,0);for(let t=0;t<r;t++)e.lineTo(a.length,0),e.translate(a.length,0),e.rotate(d)}}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}}class o extends n{getCenter(e,t){return{x:-t/(this.getSidesCount(e)/3.5),y:-t/.76}}getSidesData(e,t){var n,o;const a=e.shapeData,r=null!==(o=null!==(n=null==a?void 0:a.sides)&&void 0!==n?n:null==a?void 0:a.nb_sides)&&void 0!==o?o:5;return{count:{denominator:1,numerator:r},length:2.66*t/(r/3)}}}class a extends n{getCenter(e,t){return{x:-t,y:t/1.66}}getSidesCount(){return 3}getSidesData(e,t){return{count:{denominator:2,numerator:3},length:2*t}}}async function r(e){await e.addShape("polygon",new o)}async function i(e){await e.addShape("triangle",new a)}async function l(e){await r(e),await i(e)}return t})())); |
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
307177
32
1
80
Updatedtsparticles-engine@^2.2.0