@tsparticles/plugin-emitters-shape-circle 4.0.0-alpha.2 → 4.0.0-alpha.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.
- package/868.min.js +2 -0
- package/868.min.js.LICENSE.txt +1 -0
- package/browser/EmittersCircleShape.js +2 -2
- package/browser/index.js +6 -3
- package/cjs/EmittersCircleShape.js +2 -2
- package/cjs/index.js +6 -3
- package/dist_browser_EmittersCircleShapeGenerator_js.js +2 -2
- package/esm/EmittersCircleShape.js +2 -2
- package/esm/index.js +6 -3
- package/package.json +3 -3
- package/report.html +1 -1
- package/tsparticles.plugin.emitters.shape.circle.js +4 -16
- package/tsparticles.plugin.emitters.shape.circle.min.js +1 -1
- package/tsparticles.plugin.emitters.shape.circle.min.js.LICENSE.txt +1 -1
- package/umd/EmittersCircleShape.js +6 -6
- package/umd/index.js +6 -3
- package/430.min.js +0 -2
- package/430.min.js.LICENSE.txt +0 -1
package/868.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 868.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_plugin_emitters_shape_circle=this.webpackChunk_tsparticles_plugin_emitters_shape_circle||[]).push([[868],{868(t,e,a){a.d(e,{EmittersCircleShapeGenerator:()=>h});var r=a(526),s=a(303);class i extends r.EmitterShapeBase{constructor(t,e,a,r){super(t,e,a,r)}async init(){}randomPosition(){const t=this.size,e=this.fill,a=this.position,[r,i]=[t.width*s.half,t.height*s.half],h=((t,e)=>{const a=(0,s.getRandom)()*s.quarter,r=Math.atan(e/t*Math.tan(s.doublePI*a)),i=(0,s.getRandom)();return i<s.quarter?r:i<s.double*s.quarter?Math.PI-r:i<s.double*s.quarter+s.quarter?Math.PI+r:-r})(r,i),n=(l=h,(c=r)*(u=i)/Math.sqrt((u*Math.cos(l))**2+(c*Math.sin(l))**2)),o=e?n*Math.sqrt((0,s.getRandom)()):n;var c,u,l;return{position:{x:a.x+o*Math.cos(h),y:a.y+o*Math.sin(h)}}}}class h{generate(t,e,a,r){return new i(t,e,a,r)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Emitters Shape Circle Plugin v4.0.0-alpha.4 by Matteo Bruni */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmitterShapeBase } from "@tsparticles/plugin-emitters";
|
|
2
|
-
import { getRandom } from "@tsparticles/engine";
|
|
3
|
-
const
|
|
2
|
+
import { double, doublePI, getRandom, half, quarter } from "@tsparticles/engine";
|
|
3
|
+
const squareExp = 2;
|
|
4
4
|
export class EmittersCircleShape extends EmitterShapeBase {
|
|
5
5
|
constructor(position, size, fill, options) {
|
|
6
6
|
super(position, size, fill, options);
|
package/browser/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export function loadEmittersShapeCircle(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-alpha.
|
|
3
|
-
engine.register(async (
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.4");
|
|
3
|
+
engine.register(async (e) => {
|
|
4
|
+
if (!e.addEmitterShapeGenerator) {
|
|
5
|
+
throw new Error("tsParticles emitters plugin missing or initialized after shapes");
|
|
6
|
+
}
|
|
4
7
|
const { EmittersCircleShapeGenerator } = await import("./EmittersCircleShapeGenerator.js");
|
|
5
|
-
|
|
8
|
+
e.addEmitterShapeGenerator("circle", new EmittersCircleShapeGenerator());
|
|
6
9
|
});
|
|
7
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmitterShapeBase } from "@tsparticles/plugin-emitters";
|
|
2
|
-
import { getRandom } from "@tsparticles/engine";
|
|
3
|
-
const
|
|
2
|
+
import { double, doublePI, getRandom, half, quarter } from "@tsparticles/engine";
|
|
3
|
+
const squareExp = 2;
|
|
4
4
|
export class EmittersCircleShape extends EmitterShapeBase {
|
|
5
5
|
constructor(position, size, fill, options) {
|
|
6
6
|
super(position, size, fill, options);
|
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export function loadEmittersShapeCircle(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-alpha.
|
|
3
|
-
engine.register(async (
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.4");
|
|
3
|
+
engine.register(async (e) => {
|
|
4
|
+
if (!e.addEmitterShapeGenerator) {
|
|
5
|
+
throw new Error("tsParticles emitters plugin missing or initialized after shapes");
|
|
6
|
+
}
|
|
4
7
|
const { EmittersCircleShapeGenerator } = await import("./EmittersCircleShapeGenerator.js");
|
|
5
|
-
|
|
8
|
+
e.addEmitterShapeGenerator("circle", new EmittersCircleShapeGenerator());
|
|
6
9
|
});
|
|
7
10
|
}
|
|
@@ -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.4
|
|
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 */ EmittersCircleShape: () => (/* binding */ EmittersCircleShape)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/plugin-emitters */ \"@tsparticles/plugin-emitters\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\n\nconst
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EmittersCircleShape: () => (/* binding */ EmittersCircleShape)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/plugin-emitters */ \"@tsparticles/plugin-emitters\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\n\nconst squareExp = 2;\nclass EmittersCircleShape extends _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_0__.EmitterShapeBase {\n constructor(position, size, fill, options) {\n super(position, size, fill, options);\n }\n async init() {}\n randomPosition() {\n const size = this.size,\n fill = this.fill,\n position = this.position,\n generateTheta = (x, y) => {\n const u = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.getRandom)() * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.quarter,\n theta = Math.atan(y / x * Math.tan(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.doublePI * u)),\n v = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.getRandom)();\n if (v < _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.quarter) {\n return theta;\n } else if (v < _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.double * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.quarter) {\n return Math.PI - theta;\n } else if (v < _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.double * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.quarter + _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.quarter) {\n return Math.PI + theta;\n } else {\n return -theta;\n }\n },\n radius = (x, y, theta) => x * y / Math.sqrt((y * Math.cos(theta)) ** squareExp + (x * Math.sin(theta)) ** squareExp),\n [a, b] = [size.width * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.half, size.height * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.half],\n randomTheta = generateTheta(a, b),\n maxRadius = radius(a, b, randomTheta),\n randomRadius = fill ? maxRadius * Math.sqrt((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_1__.getRandom)()) : maxRadius;\n return {\n position: {\n x: position.x + randomRadius * Math.cos(randomTheta),\n y: position.y + randomRadius * Math.sin(randomTheta)\n }\n };\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-circle/./dist/browser/EmittersCircleShape.js?\n}");
|
|
27
27
|
|
|
28
28
|
/***/ },
|
|
29
29
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EmitterShapeBase } from "@tsparticles/plugin-emitters";
|
|
2
|
-
import { getRandom } from "@tsparticles/engine";
|
|
3
|
-
const
|
|
2
|
+
import { double, doublePI, getRandom, half, quarter } from "@tsparticles/engine";
|
|
3
|
+
const squareExp = 2;
|
|
4
4
|
export class EmittersCircleShape extends EmitterShapeBase {
|
|
5
5
|
constructor(position, size, fill, options) {
|
|
6
6
|
super(position, size, fill, options);
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export function loadEmittersShapeCircle(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-alpha.
|
|
3
|
-
engine.register(async (
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.4");
|
|
3
|
+
engine.register(async (e) => {
|
|
4
|
+
if (!e.addEmitterShapeGenerator) {
|
|
5
|
+
throw new Error("tsParticles emitters plugin missing or initialized after shapes");
|
|
6
|
+
}
|
|
4
7
|
const { EmittersCircleShapeGenerator } = await import("./EmittersCircleShapeGenerator.js");
|
|
5
|
-
|
|
8
|
+
e.addEmitterShapeGenerator("circle", new EmittersCircleShapeGenerator());
|
|
6
9
|
});
|
|
7
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-emitters-shape-circle",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.4",
|
|
4
4
|
"description": "tsParticles emitters shape circle plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
"./package.json": "./package.json"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@tsparticles/engine": "4.0.0-alpha.
|
|
104
|
-
"@tsparticles/plugin-emitters": "4.0.0-alpha.
|
|
103
|
+
"@tsparticles/engine": "4.0.0-alpha.4",
|
|
104
|
+
"@tsparticles/plugin-emitters": "4.0.0-alpha.4"
|
|
105
105
|
},
|
|
106
106
|
"publishConfig": {
|
|
107
107
|
"access": "public"
|
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/plugin-emitters-shape-circle [
|
|
6
|
+
<title>@tsparticles/plugin-emitters-shape-circle [21 Jan 2026 at 14:47]</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.4
|
|
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 */ loadEmittersShapeCircle: () => (/* binding */ loadEmittersShapeCircle)\n/* harmony export */ });\nfunction loadEmittersShapeCircle(engine) {\n engine.checkVersion(\"4.0.0-alpha.
|
|
37
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadEmittersShapeCircle: () => (/* binding */ loadEmittersShapeCircle)\n/* harmony export */ });\nfunction loadEmittersShapeCircle(engine) {\n engine.checkVersion(\"4.0.0-alpha.4\");\n engine.register(async e => {\n if (!e.addEmitterShapeGenerator) {\n throw new Error(\"tsParticles emitters plugin missing or initialized after shapes\");\n }\n const {\n EmittersCircleShapeGenerator\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_EmittersCircleShapeGenerator_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./EmittersCircleShapeGenerator.js */ \"./dist/browser/EmittersCircleShapeGenerator.js\"));\n e.addEmitterShapeGenerator(\"circle\", new EmittersCircleShapeGenerator());\n });\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-emitters-shape-circle/./dist/browser/index.js?\n}");
|
|
38
38
|
|
|
39
39
|
/***/ },
|
|
40
40
|
|
|
@@ -128,18 +128,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters__;
|
|
|
128
128
|
/******/ };
|
|
129
129
|
/******/ })();
|
|
130
130
|
/******/
|
|
131
|
-
/******/ /* webpack/runtime/global */
|
|
132
|
-
/******/ (() => {
|
|
133
|
-
/******/ __webpack_require__.g = (function() {
|
|
134
|
-
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
135
|
-
/******/ try {
|
|
136
|
-
/******/ return this || new Function('return this')();
|
|
137
|
-
/******/ } catch (e) {
|
|
138
|
-
/******/ if (typeof window === 'object') return window;
|
|
139
|
-
/******/ }
|
|
140
|
-
/******/ })();
|
|
141
|
-
/******/ })();
|
|
142
|
-
/******/
|
|
143
131
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
144
132
|
/******/ (() => {
|
|
145
133
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
@@ -204,8 +192,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters__;
|
|
|
204
192
|
/******/ /* webpack/runtime/publicPath */
|
|
205
193
|
/******/ (() => {
|
|
206
194
|
/******/ var scriptUrl;
|
|
207
|
-
/******/ if (
|
|
208
|
-
/******/ var document =
|
|
195
|
+
/******/ if (globalThis.importScripts) scriptUrl = globalThis.location + "";
|
|
196
|
+
/******/ var document = globalThis.document;
|
|
209
197
|
/******/ if (!scriptUrl && document) {
|
|
210
198
|
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
|
211
199
|
/******/ scriptUrl = document.currentScript.src;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.plugin.emitters.shape.circle.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,
|
|
2
|
+
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("@tsparticles/plugin-emitters"),require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/plugin-emitters","@tsparticles/engine"],r);else{var t="object"==typeof exports?r(require("@tsparticles/plugin-emitters"),require("@tsparticles/engine")):r(e.window,e.window);for(var i in t)("object"==typeof exports?exports:e)[i]=t[i]}}(this,((e,r)=>(()=>{var t,i,o={303(e){e.exports=r},526(r){r.exports=e}},a={};function n(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={exports:{}};return o[e](t,t.exports,n),t.exports}n.m=o,n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((r,t)=>(n.f[t](e,r),r)),[])),n.u=e=>e+".min.js",n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},i="@tsparticles/plugin-emitters-shape-circle:",n.l=(e,r,o,a)=>{if(t[e])t[e].push(r);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")==i+o){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",i+o),s.src=e),t[e]=[r];var d=(r,i)=>{s.onerror=s.onload=null,clearTimeout(f);var o=t[e];if(delete t[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(i))),r)return r(i)},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)}},n.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 i=t.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=t[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={938:0};n.f.j=(r,t)=>{var i=n.o(e,r)?e[r]:void 0;if(0!==i)if(i)t.push(i[2]);else{var o=new Promise(((t,o)=>i=e[r]=[t,o]));t.push(i[2]=o);var a=n.p+n.u(r),s=new Error;n.l(a,(t=>{if(n.o(e,r)&&(0!==(i=e[r])&&(e[r]=void 0),i)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;s.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+r,r)}};var r=(r,t)=>{var i,o,[a,s,l]=t,p=0;if(a.some((r=>0!==e[r]))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(l)l(n)}for(r&&r(t);p<a.length;p++)o=a[p],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=this.webpackChunk_tsparticles_plugin_emitters_shape_circle=this.webpackChunk_tsparticles_plugin_emitters_shape_circle||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var s={};function l(e){e.checkVersion("4.0.0-alpha.4"),e.register((async e=>{if(!e.addEmitterShapeGenerator)throw new Error("tsParticles emitters plugin missing or initialized after shapes");const{EmittersCircleShapeGenerator:r}=await n.e(868).then(n.bind(n,868));e.addEmitterShapeGenerator("circle",new r)}))}return n.r(s),n.d(s,{loadEmittersShapeCircle:()=>l}),s})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Emitters Shape Circle Plugin v4.0.0-alpha.
|
|
1
|
+
/*! tsParticles Emitters Shape Circle Plugin v4.0.0-alpha.4 by Matteo Bruni */
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
exports.EmittersCircleShape = void 0;
|
|
13
13
|
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
|
|
14
14
|
const engine_1 = require("@tsparticles/engine");
|
|
15
|
-
const
|
|
15
|
+
const squareExp = 2;
|
|
16
16
|
class EmittersCircleShape extends plugin_emitters_1.EmitterShapeBase {
|
|
17
17
|
constructor(position, size, fill, options) {
|
|
18
18
|
super(position, size, fill, options);
|
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
}
|
|
22
22
|
randomPosition() {
|
|
23
23
|
const size = this.size, fill = this.fill, position = this.position, generateTheta = (x, y) => {
|
|
24
|
-
const u = (0, engine_1.getRandom)() * quarter, theta = Math.atan((y / x) * Math.tan(doublePI * u)), v = (0, engine_1.getRandom)();
|
|
25
|
-
if (v < quarter) {
|
|
24
|
+
const u = (0, engine_1.getRandom)() * engine_1.quarter, theta = Math.atan((y / x) * Math.tan(engine_1.doublePI * u)), v = (0, engine_1.getRandom)();
|
|
25
|
+
if (v < engine_1.quarter) {
|
|
26
26
|
return theta;
|
|
27
27
|
}
|
|
28
|
-
else if (v < double * quarter) {
|
|
28
|
+
else if (v < engine_1.double * engine_1.quarter) {
|
|
29
29
|
return Math.PI - theta;
|
|
30
30
|
}
|
|
31
|
-
else if (v < double * quarter + quarter) {
|
|
31
|
+
else if (v < engine_1.double * engine_1.quarter + engine_1.quarter) {
|
|
32
32
|
return Math.PI + theta;
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
35
|
return -theta;
|
|
36
36
|
}
|
|
37
|
-
}, radius = (x, y, theta) => (x * y) / Math.sqrt((y * Math.cos(theta)) ** squareExp + (x * Math.sin(theta)) ** squareExp), [a, b] = [size.width * half, size.height * half], randomTheta = generateTheta(a, b), maxRadius = radius(a, b, randomTheta), randomRadius = fill ? maxRadius * Math.sqrt((0, engine_1.getRandom)()) : maxRadius;
|
|
37
|
+
}, radius = (x, y, theta) => (x * y) / Math.sqrt((y * Math.cos(theta)) ** squareExp + (x * Math.sin(theta)) ** squareExp), [a, b] = [size.width * engine_1.half, size.height * engine_1.half], randomTheta = generateTheta(a, b), maxRadius = radius(a, b, randomTheta), randomRadius = fill ? maxRadius * Math.sqrt((0, engine_1.getRandom)()) : maxRadius;
|
|
38
38
|
return {
|
|
39
39
|
position: {
|
|
40
40
|
x: position.x + randomRadius * Math.cos(randomTheta),
|
package/umd/index.js
CHANGED
|
@@ -45,10 +45,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
46
|
exports.loadEmittersShapeCircle = loadEmittersShapeCircle;
|
|
47
47
|
function loadEmittersShapeCircle(engine) {
|
|
48
|
-
engine.checkVersion("4.0.0-alpha.
|
|
49
|
-
engine.register(async (
|
|
48
|
+
engine.checkVersion("4.0.0-alpha.4");
|
|
49
|
+
engine.register(async (e) => {
|
|
50
|
+
if (!e.addEmitterShapeGenerator) {
|
|
51
|
+
throw new Error("tsParticles emitters plugin missing or initialized after shapes");
|
|
52
|
+
}
|
|
50
53
|
const { EmittersCircleShapeGenerator } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./EmittersCircleShapeGenerator.js"))) : new Promise((resolve_1, reject_1) => { require(["./EmittersCircleShapeGenerator.js"], resolve_1, reject_1); }).then(__importStar));
|
|
51
|
-
|
|
54
|
+
e.addEmitterShapeGenerator("circle", new EmittersCircleShapeGenerator());
|
|
52
55
|
});
|
|
53
56
|
}
|
|
54
57
|
});
|
package/430.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 430.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_plugin_emitters_shape_circle=this.webpackChunk_tsparticles_plugin_emitters_shape_circle||[]).push([[430],{430(t,s,e){e.d(s,{EmittersCircleShapeGenerator:()=>c});var a=e(526),i=e(303);const n=.25,h=2*Math.PI;class r extends a.EmitterShapeBase{constructor(t,s,e,a){super(t,s,e,a)}async init(){}randomPosition(){const t=this.size,s=this.fill,e=this.position,[a,r]=[.5*t.width,.5*t.height],c=((t,s)=>{const e=(0,i.getRandom)()*n,a=Math.atan(s/t*Math.tan(h*e)),r=(0,i.getRandom)();return r<n?a:r<.5?Math.PI-a:r<.75?Math.PI+a:-a})(a,r),o=(u=c,(l=a)*(M=r)/Math.sqrt((M*Math.cos(u))**2+(l*Math.sin(u))**2)),p=s?o*Math.sqrt((0,i.getRandom)()):o;var l,M,u;return{position:{x:e.x+p*Math.cos(c),y:e.y+p*Math.sin(c)}}}}class c{generate(t,s,e,a){return new r(t,s,e,a)}}}}]);
|
package/430.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Emitters Shape Circle Plugin v4.0.0-alpha.2 by Matteo Bruni */
|