@tsparticles/effect-shadow 4.0.0-alpha.2 → 4.0.0-alpha.20
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/670.min.js +1 -0
- package/browser/ShadowDrawer.js +1 -0
- package/browser/index.js +7 -5
- package/cjs/ShadowDrawer.js +1 -0
- package/cjs/index.js +7 -5
- package/dist_browser_ShadowDrawer_js.js +2 -2
- package/esm/ShadowDrawer.js +1 -0
- package/esm/index.js +7 -5
- package/package.json +2 -2
- package/report.html +3 -3
- package/tsparticles.effect.shadow.js +11 -11
- package/tsparticles.effect.shadow.min.js +2 -2
- package/types/index.d.ts +1 -1
- package/umd/ShadowDrawer.js +1 -0
- package/umd/index.js +7 -5
- package/176.min.js +0 -2
- package/176.min.js.LICENSE.txt +0 -1
- package/tsparticles.effect.shadow.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.20
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -28,16 +28,6 @@ return /******/ (() => { // webpackBootstrap
|
|
|
28
28
|
/******/ "use strict";
|
|
29
29
|
/******/ var __webpack_modules__ = ({
|
|
30
30
|
|
|
31
|
-
/***/ "./dist/browser/index.js"
|
|
32
|
-
/*!*******************************!*\
|
|
33
|
-
!*** ./dist/browser/index.js ***!
|
|
34
|
-
\*******************************/
|
|
35
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
36
|
-
|
|
37
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadShadowEffect: () => (/* binding */ loadShadowEffect)\n/* harmony export */ });\nfunction loadShadowEffect(engine) {\n engine.checkVersion(\"4.0.0-alpha.2\");\n engine.register(async e => {\n const {\n ShadowDrawer\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_ShadowDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ShadowDrawer.js */ \"./dist/browser/ShadowDrawer.js\"));\n e.addEffect(\"shadow\", new ShadowDrawer(e));\n });\n}\n\n//# sourceURL=webpack://@tsparticles/effect-shadow/./dist/browser/index.js?\n}");
|
|
38
|
-
|
|
39
|
-
/***/ },
|
|
40
|
-
|
|
41
31
|
/***/ "@tsparticles/engine"
|
|
42
32
|
/*!*********************************************************************************************************************************!*\
|
|
43
33
|
!*** external {"commonjs":"@tsparticles/engine","commonjs2":"@tsparticles/engine","amd":"@tsparticles/engine","root":"window"} ***!
|
|
@@ -46,6 +36,16 @@ eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpa
|
|
|
46
36
|
|
|
47
37
|
module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
48
38
|
|
|
39
|
+
/***/ },
|
|
40
|
+
|
|
41
|
+
/***/ "./dist/browser/index.js"
|
|
42
|
+
/*!*******************************!*\
|
|
43
|
+
!*** ./dist/browser/index.js ***!
|
|
44
|
+
\*******************************/
|
|
45
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
46
|
+
|
|
47
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadShadowEffect: () => (/* binding */ loadShadowEffect)\n/* harmony export */ });\nasync function loadShadowEffect(engine) {\n engine.checkVersion(\"4.0.0-alpha.20\");\n await engine.register((e)=>{\n e.addEffect(\"shadow\", async ()=>{\n const { ShadowDrawer } = await __webpack_require__.e(/*! import() */ \"dist_browser_ShadowDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ShadowDrawer.js */ \"./dist/browser/ShadowDrawer.js\"));\n return new ShadowDrawer(e);\n });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/effect-shadow/./dist/browser/index.js?\n}");
|
|
48
|
+
|
|
49
49
|
/***/ }
|
|
50
50
|
|
|
51
51
|
/******/ });
|
|
@@ -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}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return i[e](r,r.exports,a),r.exports}a.m=i,a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce((t,r)=>(a.f[r](e,t),t),[])),a.u=e=>""+e+".min.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s={},a.l=(e,t,r,o)=>{if(s[e])return void s[e].push(t);if(void 0!==r)for(var i,n,c=document.getElementsByTagName("script"),p=0;p<c.length;p++){var l=c[p];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")=="@tsparticles/effect-shadow:"+r){i=l;break}}i||(n=!0,(i=document.createElement("script")).charset="utf-8",a.nc&&i.setAttribute("nonce",a.nc),i.setAttribute("data-webpack","@tsparticles/effect-shadow:"+r),i.src=e),s[e]=[t];var u=(t,r)=>{i.onerror=i.onload=null,clearTimeout(f);var o=s[e];if(delete s[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(e=>e(r)),t)return t(r)},f=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),n&&document.head.appendChild(i)},a.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.g.importScripts&&(c=a.g.location+"");var s,c,p=a.g.document;if(!c&&p&&(p.currentScript&&"SCRIPT"===p.currentScript.tagName.toUpperCase()&&(c=p.currentScript.src),!c)){var l=p.getElementsByTagName("script");if(l.length)for(var u=l.length-1;u>-1&&(!c||!/^http(s?):/.test(c));)c=l[u--].src}if(!c)throw Error("Automatic publicPath is not supported in this browser");a.p=c=c.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t={58:0},a.f.j=(e,r)=>{var o=a.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 n=a.p+a.u(e),s=Error();a.l(n,r=>{if(a.o(t,e)&&(0!==(o=t[e])&&(t[e]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;s.message="Loading chunk "+e+` failed.
|
|
2
|
+
(`+i+": "+n+")",s.name="ChunkLoadError",s.type=i,s.request=n,o[1](s)}},"chunk-"+e,e)}},r=(e,r)=>{var o,i,[n,s,c]=r,p=0;if(n.some(e=>0!==t[e])){for(o in s)a.o(s,o)&&(a.m[o]=s[o]);c&&c(a)}for(e&&e(r);p<n.length;p++)i=n[p],a.o(t,i)&&t[i]&&t[i][0](),t[i]=0},(o=this.webpackChunk_tsparticles_effect_shadow=this.webpackChunk_tsparticles_effect_shadow||[]).forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o));var f={};async function d(e){e.checkVersion("4.0.0-alpha.20"),await e.register(e=>{e.addEffect("shadow",async()=>{let{ShadowDrawer:t}=await a.e(670).then(a.bind(a,670));return new t(e)})})}return a.r(f),a.d(f,{loadShadowEffect:()=>d}),f})());
|
package/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type Engine } from "@tsparticles/engine";
|
|
2
|
-
export declare function loadShadowEffect(engine: Engine): void
|
|
2
|
+
export declare function loadShadowEffect(engine: Engine): Promise<void>;
|
package/umd/ShadowDrawer.js
CHANGED
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.loadShadowEffect = loadShadowEffect;
|
|
47
|
-
function loadShadowEffect(engine) {
|
|
48
|
-
engine.checkVersion("4.0.0-alpha.
|
|
49
|
-
engine.register(
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
async function loadShadowEffect(engine) {
|
|
48
|
+
engine.checkVersion("4.0.0-alpha.20");
|
|
49
|
+
await engine.register(e => {
|
|
50
|
+
e.addEffect("shadow", async () => {
|
|
51
|
+
const { ShadowDrawer } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./ShadowDrawer.js"))) : new Promise((resolve_1, reject_1) => { require(["./ShadowDrawer.js"], resolve_1, reject_1); }).then(__importStar));
|
|
52
|
+
return new ShadowDrawer(e);
|
|
53
|
+
});
|
|
52
54
|
});
|
|
53
55
|
}
|
|
54
56
|
});
|
package/176.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 176.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_effect_shadow=this.webpackChunk_tsparticles_effect_shadow||[]).push([[176],{176(o,s,e){e.d(s,{ShadowDrawer:()=>t});var a=e(303);class t{constructor(o){this._engine=o}drawBefore(o){const{particle:s,context:e}=o,{container:t}=s,r=s,d=r.shadowEnabled,h=r.shadowColor,w=r.shadowOffset;d&&h&&(e.shadowBlur=r.shadowBlur??0,e.shadowColor=(0,a.getStyleFromRgb)(h,t.hdr),e.shadowOffsetX=w?.x??0,e.shadowOffsetY=w?.y??0)}particleInit(o,s){const e=s.effectData;if(!e?.enable)return s.shadowBlur=void 0,s.shadowColor=void 0,s.shadowOffset=void 0,void(s.shadowEnabled=!1);const t=a.OptionsColor.create(new a.OptionsColor,e.color);s.shadowColor=(0,a.rangeColorToRgb)(this._engine,t),s.shadowBlur=e.blur,s.shadowOffset=e.offset,s.shadowEnabled=!0}}}}]);
|
package/176.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Shadow Shape v4.0.0-alpha.2 by Matteo Bruni */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Shadow Shape v4.0.0-alpha.2 by Matteo Bruni */
|