@tsparticles/shape-spiral 4.0.0-alpha.1 → 4.0.0-alpha.15
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/930.min.js +1 -0
- package/browser/SpiralDrawer.js +0 -3
- package/browser/index.js +7 -5
- package/cjs/SpiralDrawer.js +0 -3
- package/cjs/index.js +7 -5
- package/dist_browser_SpiralDrawer_js.js +3 -3
- package/esm/SpiralDrawer.js +0 -3
- package/esm/index.js +7 -5
- package/package.json +2 -2
- package/report.html +3 -3
- package/tsparticles.shape.spiral.js +2 -2
- package/tsparticles.shape.spiral.min.js +2 -2
- package/types/SpiralDrawer.d.ts +0 -1
- package/types/index.d.ts +1 -1
- package/umd/SpiralDrawer.js +0 -3
- package/umd/index.js +7 -5
- package/536.min.js +0 -2
- package/536.min.js.LICENSE.txt +0 -1
- package/tsparticles.shape.spiral.min.js.LICENSE.txt +0 -1
|
@@ -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.15
|
|
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 */ loadSpiralShape: () => (/* binding */ loadSpiralShape)\n/* harmony export */ });\
|
|
37
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadSpiralShape: () => (/* binding */ loadSpiralShape)\n/* harmony export */ });\nasync function loadSpiralShape(engine) {\n engine.checkVersion(\"4.0.0-alpha.15\");\n await engine.register((e)=>{\n e.addShape([\n \"spiral\"\n ], async ()=>{\n const { SpiralDrawer } = await __webpack_require__.e(/*! import() */ \"dist_browser_SpiralDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./SpiralDrawer.js */ \"./dist/browser/SpiralDrawer.js\"));\n return new SpiralDrawer();\n });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/shape-spiral/./dist/browser/index.js?\n}");
|
|
38
38
|
|
|
39
39
|
/***/ },
|
|
40
40
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
!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 r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,e=>(()=>{"use strict";var t,r,o,i={303(t){t.exports=e}},a={};function n(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return i[e](r,r.exports,n),r.exports}n.m=i,n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>""+e+".min.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s={},n.l=(e,t,r,o)=>{if(s[e])return void s[e].push(t);if(void 0!==r)for(var i,a,p=document.getElementsByTagName("script"),l=0;l<p.length;l++){var c=p[l];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")=="@tsparticles/shape-spiral:"+r){i=c;break}}i||(a=!0,(i=document.createElement("script")).charset="utf-8",n.nc&&i.setAttribute("nonce",n.nc),i.setAttribute("data-webpack","@tsparticles/shape-spiral:"+r),i.src=e),s[e]=[t];var u=(t,r)=>{i.onerror=i.onload=null,clearTimeout(d);var o=s[e];if(delete s[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(e=>e(r)),t)return t(r)},d=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),a&&document.head.appendChild(i)},n.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.g.importScripts&&(p=n.g.location+"");var s,p,l=n.g.document;if(!p&&l&&(l.currentScript&&"SCRIPT"===l.currentScript.tagName.toUpperCase()&&(p=l.currentScript.src),!p)){var c=l.getElementsByTagName("script");if(c.length)for(var u=c.length-1;u>-1&&(!p||!/^http(s?):/.test(p));)p=c[u--].src}if(!p)throw Error("Automatic publicPath is not supported in this browser");n.p=p=p.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t={291:0},n.f.j=(e,r)=>{var o=n.o(t,e)?t[e]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise((r,i)=>o=t[e]=[r,i]);r.push(o[2]=i);var a=n.p+n.u(e),s=Error();n.l(a,r=>{if(n.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+e+` failed.
|
|
2
|
+
(`+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,o[1](s)}},"chunk-"+e,e)}},r=(e,r)=>{var o,i,[a,s,p]=r,l=0;if(a.some(e=>0!==t[e])){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);p&&p(n)}for(e&&e(r);l<a.length;l++)i=a[l],n.o(t,i)&&t[i]&&t[i][0](),t[i]=0},(o=this.webpackChunk_tsparticles_shape_spiral=this.webpackChunk_tsparticles_shape_spiral||[]).forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o));var d={};async function f(e){e.checkVersion("4.0.0-alpha.15"),await e.register(e=>{e.addShape(["spiral"],async()=>{let{SpiralDrawer:e}=await n.e(930).then(n.bind(n,930));return new e})})}return n.r(d),n.d(d,{loadSpiralShape:()=>f}),d})());
|
package/types/SpiralDrawer.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type Container, type IShapeDrawData, type IShapeDrawer } from "@tsparticles/engine";
|
|
2
2
|
import type { SpiralParticle } from "./SpiralParticle.js";
|
|
3
3
|
export declare class SpiralDrawer implements IShapeDrawer<SpiralParticle> {
|
|
4
|
-
readonly validTypes: readonly ["spiral"];
|
|
5
4
|
draw(data: IShapeDrawData<SpiralParticle>): void;
|
|
6
5
|
particleInit(container: Container, particle: SpiralParticle): void;
|
|
7
6
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type Engine } from "@tsparticles/engine";
|
|
2
|
-
export declare function loadSpiralShape(engine: Engine): void
|
|
2
|
+
export declare function loadSpiralShape(engine: Engine): Promise<void>;
|
package/umd/SpiralDrawer.js
CHANGED
|
@@ -14,9 +14,6 @@
|
|
|
14
14
|
const Utils_js_1 = require("./Utils.js");
|
|
15
15
|
const defaultInnerRadius = 1, defaultLineSpacing = 1, defaultWidthFactor = 10;
|
|
16
16
|
class SpiralDrawer {
|
|
17
|
-
constructor() {
|
|
18
|
-
this.validTypes = ["spiral"];
|
|
19
|
-
}
|
|
20
17
|
draw(data) {
|
|
21
18
|
(0, Utils_js_1.drawSpiral)(data);
|
|
22
19
|
}
|
package/umd/index.js
CHANGED
|
@@ -44,11 +44,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
44
44
|
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
46
|
exports.loadSpiralShape = loadSpiralShape;
|
|
47
|
-
function loadSpiralShape(engine) {
|
|
48
|
-
engine.checkVersion("4.0.0-alpha.
|
|
49
|
-
engine.register(
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
async function loadSpiralShape(engine) {
|
|
48
|
+
engine.checkVersion("4.0.0-alpha.15");
|
|
49
|
+
await engine.register(e => {
|
|
50
|
+
e.addShape(["spiral"], async () => {
|
|
51
|
+
const { SpiralDrawer } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./SpiralDrawer.js"))) : new Promise((resolve_1, reject_1) => { require(["./SpiralDrawer.js"], resolve_1, reject_1); }).then(__importStar));
|
|
52
|
+
return new SpiralDrawer();
|
|
53
|
+
});
|
|
52
54
|
});
|
|
53
55
|
}
|
|
54
56
|
});
|
package/536.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 536.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_shape_spiral=this.webpackChunk_tsparticles_shape_spiral||[]).push([[536],{536(a,i,s){s.d(i,{SpiralDrawer:()=>r});var n=s(303);class r{constructor(){this.validTypes=["spiral"]}draw(a){!function(a){const{context:i,particle:s,radius:n}=a;if(void 0===s.spiralInnerRadius||void 0===s.spiralLineSpacing||void 0===s.spiralWidthFactor)return;const r=(n-s.spiralInnerRadius)/s.spiralLineSpacing;for(let a=0;a<10*r;a++){const n=a/10,r=s.spiralInnerRadius+s.spiralLineSpacing*n,e={x:r*Math.cos(n),y:r*Math.sin(n)};i.lineTo(e.x,e.y)}}(a)}particleInit(a,i){const s=a.retina.pixelRatio,r=i.shapeData;i.spiralInnerRadius=(0,n.getRangeValue)(r?.innerRadius??1)*s,i.spiralLineSpacing=(0,n.getRangeValue)(r?.lineSpacing??1)*s,i.spiralWidthFactor=(0,n.getRangeValue)(r?.widthFactor??10)}}}}]);
|
package/536.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Spiral Shape v4.0.0-alpha.1 by Matteo Bruni */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Spiral Shape v4.0.0-alpha.1 by Matteo Bruni */
|