@tsparticles/path-spiral 4.0.0-alpha.14 → 4.0.0-alpha.8
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.
- package/893.min.js +2 -0
- package/893.min.js.LICENSE.txt +1 -0
- package/browser/SpiralPathGenerator.js +2 -3
- package/browser/index.js +1 -1
- package/cjs/SpiralPathGenerator.js +2 -3
- package/cjs/index.js +1 -1
- package/dist_browser_SpiralPathGenerator_js.js +3 -3
- package/esm/SpiralPathGenerator.js +2 -3
- package/esm/index.js +1 -1
- package/package.json +2 -2
- package/report.html +1 -1
- package/tsparticles.path.spiral.js +4 -16
- package/tsparticles.path.spiral.min.js +2 -2
- package/tsparticles.path.spiral.min.js.LICENSE.txt +1 -0
- package/umd/SpiralPathGenerator.js +2 -3
- package/umd/index.js +1 -1
- package/699.min.js +0 -1
package/893.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 893.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_path_spiral=this.webpackChunk_tsparticles_path_spiral||[]).push([[893],{893(a,i,e){e.d(i,{SpiralPathGenerator:()=>o});var t,s=e(303);!function(a){a[a.positive=1]="positive",a[a.negative=-1]="negative"}(t||(t={}));const n={maxRadius:{min:10,max:50},angularSpeed:{min:.01,max:.04},radialSpeed:{min:.1,max:.3}};class o{constructor(a){this._container=a,this.options=(0,s.deepExtend)({},n)}generate(a,i){const{options:e}=this;a.spiral??={angle:(0,s.getRandom)()*s.doublePI,radius:0,direction:t.positive,maxRadius:(0,s.getRangeValue)(e.maxRadius),angularSpeed:.01*(0,s.getRangeValue)(e.angularSpeed),radialSpeed:.01*(0,s.getRangeValue)(e.radialSpeed)};const n=a.spiral;n.angle+=n.angularSpeed*i.factor,n.radius+=n.radialSpeed*n.direction*i.factor,n.radius>n.maxRadius&&n.direction===t.positive?(n.radius=n.maxRadius,n.direction=t.negative):n.radius<0&&n.direction===t.negative&&(n.radius=0,n.direction=t.positive);const o=Math.cos(n.angle)*n.radius,r=Math.sin(n.angle)*n.radius;return a.position.x+=o,a.position.y+=r,s.Vector.origin}init(){const a=this._container.actualOptions.particles.move.path.options;this.options.maxRadius=a.maxRadius??this.options.maxRadius,this.options.angularSpeed=a.angularSpeed??this.options.angularSpeed,this.options.radialSpeed=a.radialSpeed??this.options.radialSpeed}reset(a){delete a.spiral}update(){}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Spiral Path v4.0.0-alpha.8 by Matteo Bruni */
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Vector, deepExtend, doublePI, getRandom, getRangeValue, } from "@tsparticles/engine";
|
|
2
2
|
import { SpiralDirection } from "./SpiralDirection.js";
|
|
3
|
-
const minRadius = 0, speedFactor = 0.01
|
|
3
|
+
const minRadius = 0, speedFactor = 0.01;
|
|
4
|
+
const defaultOptions = {
|
|
4
5
|
maxRadius: { min: 10, max: 50 },
|
|
5
6
|
angularSpeed: { min: 0.01, max: 0.04 },
|
|
6
7
|
radialSpeed: { min: 0.1, max: 0.3 },
|
|
7
8
|
};
|
|
8
9
|
export class SpiralPathGenerator {
|
|
9
|
-
options;
|
|
10
|
-
_container;
|
|
11
10
|
constructor(container) {
|
|
12
11
|
this._container = container;
|
|
13
12
|
this.options = deepExtend({}, defaultOptions);
|
package/browser/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const spiralPathName = "spiralPathGenerator";
|
|
2
2
|
export async function loadSpiralPath(engine) {
|
|
3
|
-
engine.checkVersion("4.0.0-alpha.
|
|
3
|
+
engine.checkVersion("4.0.0-alpha.8");
|
|
4
4
|
await engine.register(e => {
|
|
5
5
|
e.addPathGenerator(spiralPathName, async (container) => {
|
|
6
6
|
const { SpiralPathGenerator } = await import("./SpiralPathGenerator.js");
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Vector, deepExtend, doublePI, getRandom, getRangeValue, } from "@tsparticles/engine";
|
|
2
2
|
import { SpiralDirection } from "./SpiralDirection.js";
|
|
3
|
-
const minRadius = 0, speedFactor = 0.01
|
|
3
|
+
const minRadius = 0, speedFactor = 0.01;
|
|
4
|
+
const defaultOptions = {
|
|
4
5
|
maxRadius: { min: 10, max: 50 },
|
|
5
6
|
angularSpeed: { min: 0.01, max: 0.04 },
|
|
6
7
|
radialSpeed: { min: 0.1, max: 0.3 },
|
|
7
8
|
};
|
|
8
9
|
export class SpiralPathGenerator {
|
|
9
|
-
options;
|
|
10
|
-
_container;
|
|
11
10
|
constructor(container) {
|
|
12
11
|
this._container = container;
|
|
13
12
|
this.options = deepExtend({}, defaultOptions);
|
package/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const spiralPathName = "spiralPathGenerator";
|
|
2
2
|
export async function loadSpiralPath(engine) {
|
|
3
|
-
engine.checkVersion("4.0.0-alpha.
|
|
3
|
+
engine.checkVersion("4.0.0-alpha.8");
|
|
4
4
|
await engine.register(e => {
|
|
5
5
|
e.addPathGenerator(spiralPathName, async (container) => {
|
|
6
6
|
const { SpiralPathGenerator } = await import("./SpiralPathGenerator.js");
|
|
@@ -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
|
-
* v4.0.0-alpha.
|
|
7
|
+
* v4.0.0-alpha.8
|
|
8
8
|
*/
|
|
9
9
|
"use strict";
|
|
10
10
|
/*
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
\*****************************************/
|
|
24
24
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
25
|
|
|
26
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SpiralDirection: () => (/* binding */ SpiralDirection)\n/* harmony export */ });\nvar SpiralDirection;\n(function(SpiralDirection) {\n
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SpiralDirection: () => (/* binding */ SpiralDirection)\n/* harmony export */ });\nvar SpiralDirection;\n(function (SpiralDirection) {\n SpiralDirection[SpiralDirection[\"positive\"] = 1] = \"positive\";\n SpiralDirection[SpiralDirection[\"negative\"] = -1] = \"negative\";\n})(SpiralDirection || (SpiralDirection = {}));\n\n//# sourceURL=webpack://@tsparticles/path-spiral/./dist/browser/SpiralDirection.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ },
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
33
33
|
\*********************************************/
|
|
34
34
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35
35
|
|
|
36
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SpiralPathGenerator: () => (/* binding */ SpiralPathGenerator)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _SpiralDirection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpiralDirection.js */ \"./dist/browser/SpiralDirection.js\");\n\n\nconst minRadius = 0
|
|
36
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SpiralPathGenerator: () => (/* binding */ SpiralPathGenerator)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _SpiralDirection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpiralDirection.js */ \"./dist/browser/SpiralDirection.js\");\n\n\nconst minRadius = 0,\n speedFactor = 0.01;\nconst defaultOptions = {\n maxRadius: {\n min: 10,\n max: 50\n },\n angularSpeed: {\n min: 0.01,\n max: 0.04\n },\n radialSpeed: {\n min: 0.1,\n max: 0.3\n }\n};\nclass SpiralPathGenerator {\n constructor(container) {\n this._container = container;\n this.options = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.deepExtend)({}, defaultOptions);\n }\n generate(particle, delta) {\n const {\n options\n } = this;\n particle.spiral ??= {\n angle: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.doublePI,\n radius: minRadius,\n direction: _SpiralDirection_js__WEBPACK_IMPORTED_MODULE_1__.SpiralDirection.positive,\n maxRadius: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(options.maxRadius),\n angularSpeed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(options.angularSpeed) * speedFactor,\n radialSpeed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(options.radialSpeed) * speedFactor\n };\n const spiral = particle.spiral;\n spiral.angle += spiral.angularSpeed * delta.factor;\n spiral.radius += spiral.radialSpeed * spiral.direction * delta.factor;\n if (spiral.radius > spiral.maxRadius && spiral.direction === _SpiralDirection_js__WEBPACK_IMPORTED_MODULE_1__.SpiralDirection.positive) {\n spiral.radius = spiral.maxRadius;\n spiral.direction = _SpiralDirection_js__WEBPACK_IMPORTED_MODULE_1__.SpiralDirection.negative;\n } else if (spiral.radius < minRadius && spiral.direction === _SpiralDirection_js__WEBPACK_IMPORTED_MODULE_1__.SpiralDirection.negative) {\n spiral.radius = minRadius;\n spiral.direction = _SpiralDirection_js__WEBPACK_IMPORTED_MODULE_1__.SpiralDirection.positive;\n }\n const offsetX = Math.cos(spiral.angle) * spiral.radius,\n offsetY = Math.sin(spiral.angle) * spiral.radius;\n particle.position.x += offsetX;\n particle.position.y += offsetY;\n return _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.Vector.origin;\n }\n init() {\n const sourceOptions = this._container.actualOptions.particles.move.path.options;\n this.options.maxRadius = sourceOptions[\"maxRadius\"] ?? this.options.maxRadius;\n this.options.angularSpeed = sourceOptions[\"angularSpeed\"] ?? this.options.angularSpeed;\n this.options.radialSpeed = sourceOptions[\"radialSpeed\"] ?? this.options.radialSpeed;\n }\n reset(particle) {\n delete particle.spiral;\n }\n update() {}\n}\n\n//# sourceURL=webpack://@tsparticles/path-spiral/./dist/browser/SpiralPathGenerator.js?\n}");
|
|
37
37
|
|
|
38
38
|
/***/ }
|
|
39
39
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Vector, deepExtend, doublePI, getRandom, getRangeValue, } from "@tsparticles/engine";
|
|
2
2
|
import { SpiralDirection } from "./SpiralDirection.js";
|
|
3
|
-
const minRadius = 0, speedFactor = 0.01
|
|
3
|
+
const minRadius = 0, speedFactor = 0.01;
|
|
4
|
+
const defaultOptions = {
|
|
4
5
|
maxRadius: { min: 10, max: 50 },
|
|
5
6
|
angularSpeed: { min: 0.01, max: 0.04 },
|
|
6
7
|
radialSpeed: { min: 0.1, max: 0.3 },
|
|
7
8
|
};
|
|
8
9
|
export class SpiralPathGenerator {
|
|
9
|
-
options;
|
|
10
|
-
_container;
|
|
11
10
|
constructor(container) {
|
|
12
11
|
this._container = container;
|
|
13
12
|
this.options = deepExtend({}, defaultOptions);
|
package/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const spiralPathName = "spiralPathGenerator";
|
|
2
2
|
export async function loadSpiralPath(engine) {
|
|
3
|
-
engine.checkVersion("4.0.0-alpha.
|
|
3
|
+
engine.checkVersion("4.0.0-alpha.8");
|
|
4
4
|
await engine.register(e => {
|
|
5
5
|
e.addPathGenerator(spiralPathName, async (container) => {
|
|
6
6
|
const { SpiralPathGenerator } = await import("./SpiralPathGenerator.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/path-spiral",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.8",
|
|
4
4
|
"description": "tsParticles spiral path",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"./package.json": "./package.json"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@tsparticles/engine": "4.0.0-alpha.
|
|
107
|
+
"@tsparticles/engine": "4.0.0-alpha.8"
|
|
108
108
|
},
|
|
109
109
|
"type": "module"
|
|
110
110
|
}
|
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/path-spiral [
|
|
6
|
+
<title>@tsparticles/path-spiral [30 Jan 2026 at 08:56]</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+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
|
|
8
8
|
|
|
9
9
|
<script>
|
|
@@ -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
|
-
* v4.0.0-alpha.
|
|
7
|
+
* v4.0.0-alpha.8
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -34,7 +34,7 @@ return /******/ (() => { // webpackBootstrap
|
|
|
34
34
|
\*******************************/
|
|
35
35
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
36
36
|
|
|
37
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadSpiralPath: () => (/* binding */ loadSpiralPath),\n/* harmony export */ spiralPathName: () => (/* binding */ spiralPathName)\n/* harmony export */ });\nconst spiralPathName = \"spiralPathGenerator\";\nasync function loadSpiralPath(engine) {\n
|
|
37
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadSpiralPath: () => (/* binding */ loadSpiralPath),\n/* harmony export */ spiralPathName: () => (/* binding */ spiralPathName)\n/* harmony export */ });\nconst spiralPathName = \"spiralPathGenerator\";\nasync function loadSpiralPath(engine) {\n engine.checkVersion(\"4.0.0-alpha.8\");\n await engine.register(e => {\n e.addPathGenerator(spiralPathName, async container => {\n const {\n SpiralPathGenerator\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_SpiralPathGenerator_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./SpiralPathGenerator.js */ \"./dist/browser/SpiralPathGenerator.js\"));\n return new SpiralPathGenerator(container);\n });\n });\n}\n\n//# sourceURL=webpack://@tsparticles/path-spiral/./dist/browser/index.js?\n}");
|
|
38
38
|
|
|
39
39
|
/***/ },
|
|
40
40
|
|
|
@@ -118,18 +118,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
118
118
|
/******/ };
|
|
119
119
|
/******/ })();
|
|
120
120
|
/******/
|
|
121
|
-
/******/ /* webpack/runtime/global */
|
|
122
|
-
/******/ (() => {
|
|
123
|
-
/******/ __webpack_require__.g = (function() {
|
|
124
|
-
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
125
|
-
/******/ try {
|
|
126
|
-
/******/ return this || new Function('return this')();
|
|
127
|
-
/******/ } catch (e) {
|
|
128
|
-
/******/ if (typeof window === 'object') return window;
|
|
129
|
-
/******/ }
|
|
130
|
-
/******/ })();
|
|
131
|
-
/******/ })();
|
|
132
|
-
/******/
|
|
133
121
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
134
122
|
/******/ (() => {
|
|
135
123
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
@@ -194,8 +182,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
194
182
|
/******/ /* webpack/runtime/publicPath */
|
|
195
183
|
/******/ (() => {
|
|
196
184
|
/******/ var scriptUrl;
|
|
197
|
-
/******/ if (
|
|
198
|
-
/******/ var document =
|
|
185
|
+
/******/ if (globalThis.importScripts) scriptUrl = globalThis.location + "";
|
|
186
|
+
/******/ var document = globalThis.document;
|
|
199
187
|
/******/ if (!scriptUrl && document) {
|
|
200
188
|
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
|
201
189
|
/******/ scriptUrl = document.currentScript.src;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
(
|
|
1
|
+
/*! For license information please see tsparticles.path.spiral.min.js.LICENSE.txt */
|
|
2
|
+
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],r);else{var t="object"==typeof exports?r(require("@tsparticles/engine")):r(e.window);for(var a in t)("object"==typeof exports?exports:e)[a]=t[a]}}(this,(e=>(()=>{var r,t,a={303(r){r.exports=e}},o={};function i(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={exports:{}};return a[e](t,t.exports,i),t.exports}i.m=a,i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((r,t)=>(i.f[t](e,r),r)),[])),i.u=e=>e+".min.js",i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="@tsparticles/path-spiral:",i.l=(e,a,o,n)=>{if(r[e])r[e].push(a);else{var s,l;if(void 0!==o)for(var p=document.getElementsByTagName("script"),c=0;c<p.length;c++){var u=p[c];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==t+o){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",t+o),s.src=e),r[e]=[a];var d=(t,a)=>{s.onerror=s.onload=null,clearTimeout(f);var o=r[e];if(delete r[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(a))),t)return t(a)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var r=globalThis.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var a=t.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=t[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={659:0};i.f.j=(r,t)=>{var a=i.o(e,r)?e[r]:void 0;if(0!==a)if(a)t.push(a[2]);else{var o=new Promise(((t,o)=>a=e[r]=[t,o]));t.push(a[2]=o);var n=i.p+i.u(r),s=new Error;i.l(n,(t=>{if(i.o(e,r)&&(0!==(a=e[r])&&(e[r]=void 0),a)){var o=t&&("load"===t.type?"missing":t.type),n=t&&t.target&&t.target.src;s.message="Loading chunk "+r+" failed.\n("+o+": "+n+")",s.name="ChunkLoadError",s.type=o,s.request=n,a[1](s)}}),"chunk-"+r,r)}};var r=(r,t)=>{var a,o,[n,s,l]=t,p=0;if(n.some((r=>0!==e[r]))){for(a in s)i.o(s,a)&&(i.m[a]=s[a]);if(l)l(i)}for(r&&r(t);p<n.length;p++)o=n[p],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=this.webpackChunk_tsparticles_path_spiral=this.webpackChunk_tsparticles_path_spiral||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var n={};i.r(n),i.d(n,{loadSpiralPath:()=>l,spiralPathName:()=>s});const s="spiralPathGenerator";async function l(e){e.checkVersion("4.0.0-alpha.8"),await e.register((e=>{e.addPathGenerator(s,(async e=>{const{SpiralPathGenerator:r}=await i.e(893).then(i.bind(i,893));return new r(e)}))}))}return n})()));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Spiral Path v4.0.0-alpha.8 by Matteo Bruni */
|
|
@@ -12,14 +12,13 @@
|
|
|
12
12
|
exports.SpiralPathGenerator = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
14
|
const SpiralDirection_js_1 = require("./SpiralDirection.js");
|
|
15
|
-
const minRadius = 0, speedFactor = 0.01
|
|
15
|
+
const minRadius = 0, speedFactor = 0.01;
|
|
16
|
+
const defaultOptions = {
|
|
16
17
|
maxRadius: { min: 10, max: 50 },
|
|
17
18
|
angularSpeed: { min: 0.01, max: 0.04 },
|
|
18
19
|
radialSpeed: { min: 0.1, max: 0.3 },
|
|
19
20
|
};
|
|
20
21
|
class SpiralPathGenerator {
|
|
21
|
-
options;
|
|
22
|
-
_container;
|
|
23
22
|
constructor(container) {
|
|
24
23
|
this._container = container;
|
|
25
24
|
this.options = (0, engine_1.deepExtend)({}, defaultOptions);
|
package/umd/index.js
CHANGED
|
@@ -47,7 +47,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
47
47
|
exports.loadSpiralPath = loadSpiralPath;
|
|
48
48
|
exports.spiralPathName = "spiralPathGenerator";
|
|
49
49
|
async function loadSpiralPath(engine) {
|
|
50
|
-
engine.checkVersion("4.0.0-alpha.
|
|
50
|
+
engine.checkVersion("4.0.0-alpha.8");
|
|
51
51
|
await engine.register(e => {
|
|
52
52
|
e.addPathGenerator(exports.spiralPathName, async (container) => {
|
|
53
53
|
const { SpiralPathGenerator } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./SpiralPathGenerator.js"))) : new Promise((resolve_1, reject_1) => { require(["./SpiralPathGenerator.js"], resolve_1, reject_1); }).then(__importStar));
|
package/699.min.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(this.webpackChunk_tsparticles_path_spiral=this.webpackChunk_tsparticles_path_spiral||[]).push([[699],{699(a,i,e){e.d(i,{SpiralPathGenerator:()=>d});var t,s,n=e(303);(t=s||(s={}))[t.positive=1]="positive",t[t.negative=-1]="negative";let r={maxRadius:{min:10,max:50},angularSpeed:{min:.01,max:.04},radialSpeed:{min:.1,max:.3}};class d{options;_container;constructor(a){this._container=a,this.options=(0,n.deepExtend)({},r)}generate(a,i){let{options:e}=this;a.spiral??={angle:(0,n.getRandom)()*n.doublePI,radius:0,direction:s.positive,maxRadius:(0,n.getRangeValue)(e.maxRadius),angularSpeed:.01*(0,n.getRangeValue)(e.angularSpeed),radialSpeed:.01*(0,n.getRangeValue)(e.radialSpeed)};let t=a.spiral;t.angle+=t.angularSpeed*i.factor,t.radius+=t.radialSpeed*t.direction*i.factor,t.radius>t.maxRadius&&t.direction===s.positive?(t.radius=t.maxRadius,t.direction=s.negative):t.radius<0&&t.direction===s.negative&&(t.radius=0,t.direction=s.positive);let r=Math.cos(t.angle)*t.radius,d=Math.sin(t.angle)*t.radius;return a.position.x+=r,a.position.y+=d,n.Vector.origin}init(){let a=this._container.actualOptions.particles.move.path.options;this.options.maxRadius=a.maxRadius??this.options.maxRadius,this.options.angularSpeed=a.angularSpeed??this.options.angularSpeed,this.options.radialSpeed=a.radialSpeed??this.options.radialSpeed}reset(a){delete a.spiral}update(){}}}}]);
|