@tsparticles/interaction-particles-attract
Advanced tools
Comparing version 3.7.0 to 3.7.1
import { assertValidVersion } from "@tsparticles/engine"; | ||
import { Attractor } from "./Attractor.js"; | ||
export async function loadParticlesAttractInteraction(engine, refresh = true) { | ||
assertValidVersion(engine, "3.7.0"); | ||
assertValidVersion(engine, "3.7.1"); | ||
await engine.addInteractor("particlesAttract", container => { | ||
@@ -6,0 +6,0 @@ return Promise.resolve(new Attractor(container)); |
@@ -7,3 +7,3 @@ "use strict"; | ||
async function loadParticlesAttractInteraction(engine, refresh = true) { | ||
(0, engine_1.assertValidVersion)(engine, "3.7.0"); | ||
(0, engine_1.assertValidVersion)(engine, "3.7.1"); | ||
await engine.addInteractor("particlesAttract", container => { | ||
@@ -10,0 +10,0 @@ return Promise.resolve(new Attractor_js_1.Attractor(container)); |
import { assertValidVersion } from "@tsparticles/engine"; | ||
import { Attractor } from "./Attractor.js"; | ||
export async function loadParticlesAttractInteraction(engine, refresh = true) { | ||
assertValidVersion(engine, "3.7.0"); | ||
assertValidVersion(engine, "3.7.1"); | ||
await engine.addInteractor("particlesAttract", container => { | ||
@@ -6,0 +6,0 @@ return Promise.resolve(new Attractor(container)); |
{ | ||
"name": "@tsparticles/interaction-particles-attract", | ||
"version": "3.7.0", | ||
"version": "3.7.1", | ||
"description": "tsParticles attract particles interaction", | ||
@@ -90,3 +90,3 @@ "homepage": "https://particles.js.org", | ||
"dependencies": { | ||
"@tsparticles/engine": "3.7.0" | ||
"@tsparticles/engine": "3.7.1" | ||
}, | ||
@@ -93,0 +93,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v3.7.0 | ||
* v3.7.1 | ||
*/ | ||
@@ -48,3 +48,3 @@ /* | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadParticlesAttractInteraction: () => (/* binding */ loadParticlesAttractInteraction)\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 _Attractor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Attractor.js */ \"./dist/browser/Attractor.js\");\n\n\nasync function loadParticlesAttractInteraction(engine, refresh = true) {\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.assertValidVersion)(engine, \"3.7.0\");\n await engine.addInteractor(\"particlesAttract\", container => {\n return Promise.resolve(new _Attractor_js__WEBPACK_IMPORTED_MODULE_1__.Attractor(container));\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-particles-attract/./dist/browser/index.js?"); | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadParticlesAttractInteraction: () => (/* binding */ loadParticlesAttractInteraction)\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 _Attractor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Attractor.js */ \"./dist/browser/Attractor.js\");\n\n\nasync function loadParticlesAttractInteraction(engine, refresh = true) {\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.assertValidVersion)(engine, \"3.7.1\");\n await engine.addInteractor(\"particlesAttract\", container => {\n return Promise.resolve(new _Attractor_js__WEBPACK_IMPORTED_MODULE_1__.Attractor(container));\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/interaction-particles-attract/./dist/browser/index.js?"); | ||
@@ -51,0 +51,0 @@ /***/ }), |
/*! For license information please see tsparticles.interaction.particles.attract.min.js.LICENSE.txt */ | ||
!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 o="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(this,(e=>(()=>{var t={303:t=>{t.exports=e}},o={};function r(e){var a=o[e];if(void 0!==a)return a.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};r.r(a),r.d(a,{loadParticlesAttractInteraction:()=>s});var i=r(303);class n extends i.ParticlesInteractorBase{constructor(e){super(e)}clear(){}init(){}interact(e){const t=this.container;void 0===e.attractDistance&&(e.attractDistance=(0,i.getRangeValue)(e.options.move.attract.distance)*t.retina.pixelRatio);const o=e.attractDistance,r=e.getPosition(),a=t.particles.quadTree.queryCircle(r,o);for(const t of a){if(e===t||!t.options.move.attract.enable||t.destroyed||t.spawning)continue;const o=t.getPosition(),{dx:a,dy:n}=(0,i.getDistances)(r,o),s=e.options.move.attract.rotate,c=a/(1e3*s.x),l=n/(1e3*s.y),p=t.size.value/e.size.value,d=1/p;e.velocity.x-=c*p,e.velocity.y-=l*p,t.velocity.x+=c*d,t.velocity.y+=l*d}}isEnabled(e){return e.options.move.attract.enable}reset(){}}async function s(e,t=!0){(0,i.assertValidVersion)(e,"3.7.0"),await e.addInteractor("particlesAttract",(e=>Promise.resolve(new n(e))),t)}return a})())); | ||
!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 o="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(this,(e=>(()=>{var t={303:t=>{t.exports=e}},o={};function r(e){var a=o[e];if(void 0!==a)return a.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};r.r(a),r.d(a,{loadParticlesAttractInteraction:()=>s});var i=r(303);class n extends i.ParticlesInteractorBase{constructor(e){super(e)}clear(){}init(){}interact(e){const t=this.container;void 0===e.attractDistance&&(e.attractDistance=(0,i.getRangeValue)(e.options.move.attract.distance)*t.retina.pixelRatio);const o=e.attractDistance,r=e.getPosition(),a=t.particles.quadTree.queryCircle(r,o);for(const t of a){if(e===t||!t.options.move.attract.enable||t.destroyed||t.spawning)continue;const o=t.getPosition(),{dx:a,dy:n}=(0,i.getDistances)(r,o),s=e.options.move.attract.rotate,c=a/(1e3*s.x),l=n/(1e3*s.y),p=t.size.value/e.size.value,d=1/p;e.velocity.x-=c*p,e.velocity.y-=l*p,t.velocity.x+=c*d,t.velocity.y+=l*d}}isEnabled(e){return e.options.move.attract.enable}reset(){}}async function s(e,t=!0){(0,i.assertValidVersion)(e,"3.7.1"),await e.addInteractor("particlesAttract",(e=>Promise.resolve(new n(e))),t)}return a})())); |
@@ -1,1 +0,1 @@ | ||
/*! tsParticles Attract Particles Interaction v3.7.0 by Matteo Bruni */ | ||
/*! tsParticles Attract Particles Interaction v3.7.1 by Matteo Bruni */ |
@@ -16,3 +16,3 @@ (function (factory) { | ||
async function loadParticlesAttractInteraction(engine, refresh = true) { | ||
(0, engine_1.assertValidVersion)(engine, "3.7.0"); | ||
(0, engine_1.assertValidVersion)(engine, "3.7.1"); | ||
await engine.addInteractor("particlesAttract", container => { | ||
@@ -19,0 +19,0 @@ return Promise.resolve(new Attractor_js_1.Attractor(container)); |
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
+ Added@tsparticles/engine@3.7.1(transitive)
- Removed@tsparticles/engine@3.7.0(transitive)
Updated@tsparticles/engine@3.7.1