@tsparticles/shape-cards 4.0.0-beta.11 → 4.0.0-beta.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/browser/browser.js +5 -0
- package/browser/cards/index.js +3 -5
- package/browser/cards/index.lazy.js +9 -0
- package/browser/clubs/index.js +3 -5
- package/browser/clubs/index.lazy.js +9 -0
- package/browser/diamonds/index.js +3 -5
- package/browser/diamonds/index.lazy.js +9 -0
- package/browser/hearts/index.js +3 -5
- package/browser/hearts/index.lazy.js +9 -0
- package/browser/index.js +7 -13
- package/browser/index.lazy.js +13 -0
- package/browser/spades/index.js +3 -5
- package/browser/spades/index.lazy.js +9 -0
- package/browser/suits.js +11 -19
- package/browser/suits.lazy.js +15 -0
- package/cjs/browser.js +5 -0
- package/cjs/cards/index.js +3 -5
- package/cjs/cards/index.lazy.js +9 -0
- package/cjs/clubs/index.js +3 -5
- package/cjs/clubs/index.lazy.js +9 -0
- package/cjs/diamonds/index.js +3 -5
- package/cjs/diamonds/index.lazy.js +9 -0
- package/cjs/hearts/index.js +3 -5
- package/cjs/hearts/index.lazy.js +9 -0
- package/cjs/index.js +7 -13
- package/cjs/index.lazy.js +13 -0
- package/cjs/spades/index.js +3 -5
- package/cjs/spades/index.lazy.js +9 -0
- package/cjs/suits.js +11 -19
- package/cjs/suits.lazy.js +15 -0
- package/esm/browser.js +5 -0
- package/esm/cards/index.js +3 -5
- package/esm/cards/index.lazy.js +9 -0
- package/esm/clubs/index.js +3 -5
- package/esm/clubs/index.lazy.js +9 -0
- package/esm/diamonds/index.js +3 -5
- package/esm/diamonds/index.lazy.js +9 -0
- package/esm/hearts/index.js +3 -5
- package/esm/hearts/index.lazy.js +9 -0
- package/esm/index.js +7 -13
- package/esm/index.lazy.js +13 -0
- package/esm/spades/index.js +3 -5
- package/esm/spades/index.lazy.js +9 -0
- package/esm/suits.js +11 -19
- package/esm/suits.lazy.js +15 -0
- package/package.json +52 -3
- package/report.html +4949 -94
- package/tsparticles.shape.cards.js +381 -369
- package/tsparticles.shape.cards.min.js +1 -2
- package/types/browser.d.ts +1 -0
- package/types/cards/index.lazy.d.ts +2 -0
- package/types/clubs/index.lazy.d.ts +2 -0
- package/types/diamonds/index.lazy.d.ts +2 -0
- package/types/hearts/index.lazy.d.ts +2 -0
- package/types/index.d.ts +0 -2
- package/types/index.lazy.d.ts +2 -0
- package/types/spades/index.lazy.d.ts +2 -0
- package/types/suits.d.ts +0 -4
- package/types/suits.lazy.d.ts +2 -0
- package/192.min.js +0 -1
- package/558.min.js +0 -1
- package/676.min.js +0 -1
- package/712.min.js +0 -1
- package/855.min.js +0 -1
- package/dist_browser_cards_CardDrawer_js.js +0 -60
- package/dist_browser_clubs_ClubDrawer_js.js +0 -50
- package/dist_browser_diamonds_DiamondDrawer_js.js +0 -50
- package/dist_browser_hearts_HeartDrawer_js.js +0 -50
- package/dist_browser_spades_SpadeDrawer_js.js +0 -50
|
@@ -1,387 +1,399 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
/*
|
|
10
|
-
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
11
|
-
* This devtool is neither made for production nor for readable output files.
|
|
12
|
-
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
13
|
-
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
14
|
-
* or disable the default devtool with "devtool: false".
|
|
15
|
-
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
16
|
-
*/
|
|
17
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
18
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
19
|
-
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/path-utils"));
|
|
20
|
-
else if(typeof define === 'function' && define.amd)
|
|
21
|
-
define(["@tsparticles/engine", "@tsparticles/path-utils"], factory);
|
|
22
|
-
else {
|
|
23
|
-
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/path-utils")) : factory(root["window"], root["window"]);
|
|
24
|
-
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
25
|
-
}
|
|
26
|
-
})(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_path_utils__) => {
|
|
27
|
-
return /******/ (() => { // webpackBootstrap
|
|
28
|
-
/******/ "use strict";
|
|
29
|
-
/******/ var __webpack_modules__ = ({
|
|
1
|
+
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
+
/* Shape v4.0.0-beta.15 */
|
|
3
|
+
(function (global, factory) {
|
|
4
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/path-utils'), require('@tsparticles/engine')) :
|
|
5
|
+
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/path-utils', '@tsparticles/engine'], factory) :
|
|
6
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.__tsParticlesInternals = global.__tsParticlesInternals || {}, global.__tsParticlesInternals.shapes = global.__tsParticlesInternals.shapes || {}, global.__tsParticlesInternals.shapes.cards = global.__tsParticlesInternals.shapes.cards || {}), global.__tsParticlesInternals.path.utils, global.__tsParticlesInternals.engine));
|
|
7
|
+
})(this, (function (exports, pathUtils, engine) { 'use strict';
|
|
30
8
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
9
|
+
var SuitType;
|
|
10
|
+
(function (SuitType) {
|
|
11
|
+
SuitType["hearts"] = "hearts";
|
|
12
|
+
SuitType["diamonds"] = "diamonds";
|
|
13
|
+
SuitType["clubs"] = "clubs";
|
|
14
|
+
SuitType["spades"] = "spades";
|
|
15
|
+
})(SuitType || (SuitType = {}));
|
|
36
16
|
|
|
37
|
-
|
|
17
|
+
const eighth = engine.quarter * engine.half, n = engine.half, halfN = n * engine.half, oppositeN = -n, oppositeHalfN = -halfN, eighthN = n * eighth, threeQuarterN = n * engine.threeQuarter;
|
|
18
|
+
const club = {
|
|
19
|
+
half: true,
|
|
20
|
+
segments: [
|
|
21
|
+
{
|
|
22
|
+
type: pathUtils.SegmentType.bezier,
|
|
23
|
+
values: [
|
|
24
|
+
{ x: engine.empty, y: oppositeN },
|
|
25
|
+
{ x: engine.empty, y: oppositeN },
|
|
26
|
+
{ x: halfN, y: oppositeN },
|
|
27
|
+
{ x: halfN, y: oppositeHalfN },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: pathUtils.SegmentType.bezier,
|
|
32
|
+
values: [
|
|
33
|
+
{ x: halfN, y: oppositeHalfN },
|
|
34
|
+
{ x: halfN, y: oppositeHalfN },
|
|
35
|
+
{ x: n, y: oppositeHalfN },
|
|
36
|
+
{ x: n, y: engine.empty },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: pathUtils.SegmentType.bezier,
|
|
41
|
+
values: [
|
|
42
|
+
{ x: n, y: engine.empty },
|
|
43
|
+
{ x: n, y: engine.empty },
|
|
44
|
+
{ x: n, y: halfN },
|
|
45
|
+
{ x: halfN, y: halfN },
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: pathUtils.SegmentType.bezier,
|
|
50
|
+
values: [
|
|
51
|
+
{ x: halfN, y: halfN },
|
|
52
|
+
{ x: halfN, y: halfN },
|
|
53
|
+
{ x: eighthN, y: halfN },
|
|
54
|
+
{ x: eighthN, y: eighthN },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: pathUtils.SegmentType.bezier,
|
|
59
|
+
values: [
|
|
60
|
+
{ x: eighthN, y: eighthN },
|
|
61
|
+
{ x: eighthN, y: halfN },
|
|
62
|
+
{ x: halfN, y: n },
|
|
63
|
+
{ x: halfN, y: n },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: pathUtils.SegmentType.bezier,
|
|
68
|
+
values: [
|
|
69
|
+
{ x: halfN, y: n },
|
|
70
|
+
{ x: halfN, y: n },
|
|
71
|
+
{ x: engine.empty, y: n },
|
|
72
|
+
{ x: engine.empty, y: n },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
};
|
|
77
|
+
const diamond = {
|
|
78
|
+
half: true,
|
|
79
|
+
segments: [
|
|
80
|
+
{
|
|
81
|
+
type: pathUtils.SegmentType.bezier,
|
|
82
|
+
values: [
|
|
83
|
+
{ x: engine.empty, y: n },
|
|
84
|
+
{ x: engine.empty, y: n },
|
|
85
|
+
{ x: threeQuarterN, y: engine.empty },
|
|
86
|
+
{ x: threeQuarterN, y: engine.empty },
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
type: pathUtils.SegmentType.bezier,
|
|
91
|
+
values: [
|
|
92
|
+
{ x: threeQuarterN, y: engine.empty },
|
|
93
|
+
{ x: threeQuarterN, y: engine.empty },
|
|
94
|
+
{ x: engine.empty, y: oppositeN },
|
|
95
|
+
{ x: engine.empty, y: oppositeN },
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
};
|
|
100
|
+
const heart = {
|
|
101
|
+
half: true,
|
|
102
|
+
segments: [
|
|
103
|
+
{
|
|
104
|
+
type: pathUtils.SegmentType.bezier,
|
|
105
|
+
values: [
|
|
106
|
+
{ x: engine.empty, y: n },
|
|
107
|
+
{ x: engine.empty, y: n },
|
|
108
|
+
{ x: n, y: engine.empty },
|
|
109
|
+
{ x: n, y: oppositeHalfN },
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: pathUtils.SegmentType.bezier,
|
|
114
|
+
values: [
|
|
115
|
+
{ x: n, y: oppositeHalfN },
|
|
116
|
+
{ x: n, y: oppositeHalfN },
|
|
117
|
+
{ x: n, y: oppositeN },
|
|
118
|
+
{ x: halfN, y: oppositeN },
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: pathUtils.SegmentType.bezier,
|
|
123
|
+
values: [
|
|
124
|
+
{ x: halfN, y: oppositeN },
|
|
125
|
+
{ x: halfN, y: oppositeN },
|
|
126
|
+
{ x: engine.empty, y: oppositeN },
|
|
127
|
+
{ x: engine.empty, y: oppositeHalfN },
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
};
|
|
132
|
+
const spade = {
|
|
133
|
+
half: true,
|
|
134
|
+
segments: [
|
|
135
|
+
{
|
|
136
|
+
type: pathUtils.SegmentType.bezier,
|
|
137
|
+
values: [
|
|
138
|
+
{ x: engine.empty, y: oppositeN },
|
|
139
|
+
{ x: engine.empty, y: oppositeN },
|
|
140
|
+
{ x: n, y: oppositeHalfN },
|
|
141
|
+
{ x: n, y: engine.empty },
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: pathUtils.SegmentType.bezier,
|
|
146
|
+
values: [
|
|
147
|
+
{ x: n, y: engine.empty },
|
|
148
|
+
{ x: n, y: engine.empty },
|
|
149
|
+
{ x: n, y: halfN },
|
|
150
|
+
{ x: halfN, y: halfN },
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
type: pathUtils.SegmentType.bezier,
|
|
155
|
+
values: [
|
|
156
|
+
{ x: halfN, y: halfN },
|
|
157
|
+
{ x: halfN, y: halfN },
|
|
158
|
+
{ x: eighthN, y: halfN },
|
|
159
|
+
{ x: eighthN, y: eighthN },
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
type: pathUtils.SegmentType.bezier,
|
|
164
|
+
values: [
|
|
165
|
+
{ x: eighthN, y: eighthN },
|
|
166
|
+
{ x: eighthN, y: halfN },
|
|
167
|
+
{ x: halfN, y: n },
|
|
168
|
+
{ x: halfN, y: n },
|
|
169
|
+
],
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
type: pathUtils.SegmentType.bezier,
|
|
173
|
+
values: [
|
|
174
|
+
{ x: halfN, y: n },
|
|
175
|
+
{ x: halfN, y: n },
|
|
176
|
+
{ x: engine.empty, y: n },
|
|
177
|
+
{ x: engine.empty, y: n },
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
};
|
|
182
|
+
const paths = {
|
|
183
|
+
[SuitType.hearts]: heart,
|
|
184
|
+
[SuitType.diamonds]: diamond,
|
|
185
|
+
[SuitType.clubs]: club,
|
|
186
|
+
[SuitType.spades]: spade,
|
|
187
|
+
};
|
|
38
188
|
|
|
39
|
-
|
|
189
|
+
class ClubDrawer {
|
|
190
|
+
draw(data) {
|
|
191
|
+
const { context, radius } = data;
|
|
192
|
+
pathUtils.drawPath(context, radius, paths.clubs);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
40
195
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
196
|
+
async function loadClubsSuitShape(engine) {
|
|
197
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
198
|
+
await engine.pluginManager.register(e => {
|
|
199
|
+
e.pluginManager.addShape(["club", "clubs"], () => Promise.resolve(new ClubDrawer()));
|
|
200
|
+
});
|
|
201
|
+
}
|
|
46
202
|
|
|
47
|
-
|
|
203
|
+
class DiamondDrawer {
|
|
204
|
+
draw(data) {
|
|
205
|
+
const { context, radius } = data;
|
|
206
|
+
pathUtils.drawPath(context, radius, paths.diamonds);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
48
209
|
|
|
49
|
-
|
|
210
|
+
async function loadDiamondsSuitShape(engine) {
|
|
211
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
212
|
+
await engine.pluginManager.register(e => {
|
|
213
|
+
e.pluginManager.addShape(["diamond", "diamonds"], () => Promise.resolve(new DiamondDrawer()));
|
|
214
|
+
});
|
|
215
|
+
}
|
|
50
216
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
217
|
+
class HeartDrawer {
|
|
218
|
+
draw(data) {
|
|
219
|
+
const { context, radius } = data;
|
|
220
|
+
pathUtils.drawPath(context, radius, paths.hearts);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
56
223
|
|
|
57
|
-
|
|
224
|
+
async function loadHeartsSuitShape(engine) {
|
|
225
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
226
|
+
await engine.pluginManager.register(e => {
|
|
227
|
+
e.pluginManager.addShape(["heart", "hearts"], () => Promise.resolve(new HeartDrawer()));
|
|
228
|
+
});
|
|
229
|
+
}
|
|
58
230
|
|
|
59
|
-
|
|
231
|
+
class SpadeDrawer {
|
|
232
|
+
draw(data) {
|
|
233
|
+
const { context, radius } = data;
|
|
234
|
+
pathUtils.drawPath(context, radius, paths.spades);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
60
237
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
238
|
+
async function loadSpadesSuitShape(engine) {
|
|
239
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
240
|
+
await engine.pluginManager.register(e => {
|
|
241
|
+
e.pluginManager.addShape(["spade", "spades"], () => Promise.resolve(new SpadeDrawer()));
|
|
242
|
+
});
|
|
243
|
+
}
|
|
66
244
|
|
|
67
|
-
|
|
245
|
+
async function loadCardSuitsShape(engine) {
|
|
246
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
247
|
+
await Promise.all([
|
|
248
|
+
loadClubsSuitShape(engine),
|
|
249
|
+
loadDiamondsSuitShape(engine),
|
|
250
|
+
loadHeartsSuitShape(engine),
|
|
251
|
+
loadSpadesSuitShape(engine),
|
|
252
|
+
]);
|
|
253
|
+
}
|
|
68
254
|
|
|
69
|
-
|
|
255
|
+
const cardWidthRatio = (engine.double * engine.double) / engine.triple, cardHeightRatio = engine.double, cornerRadiusRatio = 0.2, cornerFontRatio = 0.4, cornerSuitRatio = 0.3, centerSuitRatio = 0.7, cornerPaddingRatio = 0.2, textHorizontalOffsetRatio = 0.25, minRadius = 0, minAngle = 0, suitEdgeBufferFactor = 0.1, fixedCacheKey = 2, cardsCache = new Map(), redSuitColor = { r: 215, g: 20, b: 20 }, blackSuitColor = { r: 18, g: 18, b: 18 };
|
|
256
|
+
function drawRoundedCard(ctx, radius, cardData, hdr, flipped, canvasSettings) {
|
|
257
|
+
if (flipped) {
|
|
258
|
+
drawRoundedCardBack(ctx, radius);
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
const cacheKey = getCacheKey(radius, hdr, cardData), cardWidth = radius * cardWidthRatio, cardHeight = radius * cardHeightRatio, halfWidth = cardWidth * engine.half, halfHeight = cardHeight * engine.half;
|
|
262
|
+
let cachedData = cardsCache.get(cacheKey);
|
|
263
|
+
if (!cachedData) {
|
|
264
|
+
let cacheCanvas, cacheCtx;
|
|
265
|
+
if (typeof OffscreenCanvas === "undefined") {
|
|
266
|
+
cacheCanvas = engine.safeDocument().createElement("canvas");
|
|
267
|
+
cacheCanvas.width = cardWidth;
|
|
268
|
+
cacheCanvas.height = cardHeight;
|
|
269
|
+
cacheCtx = cacheCanvas.getContext("2d", canvasSettings);
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
cacheCanvas = new OffscreenCanvas(cardWidth, cardHeight);
|
|
273
|
+
cacheCtx = cacheCanvas.getContext("2d", canvasSettings);
|
|
274
|
+
}
|
|
275
|
+
if (cacheCtx) {
|
|
276
|
+
cacheCtx.translate(halfWidth, halfHeight);
|
|
277
|
+
drawRoundedCardFront(cacheCtx, radius, cardData, hdr);
|
|
278
|
+
cachedData = cacheCanvas instanceof HTMLCanvasElement ? cacheCanvas : cacheCanvas.transferToImageBitmap();
|
|
279
|
+
cardsCache.set(cacheKey, cachedData);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (cachedData) {
|
|
283
|
+
ctx.drawImage(cachedData, -halfWidth, -halfHeight, cardWidth, cardHeight);
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
drawRoundedCardFront(ctx, radius, cardData, hdr);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
function getCacheKey(radius, hdr, cardData) {
|
|
291
|
+
return `${radius.toFixed(fixedCacheKey)}-${hdr ? "hdr" : "sdr"}-${cardData.suit}-${cardData.value}`;
|
|
292
|
+
}
|
|
293
|
+
function drawRoundedCardBack(ctx, radius) {
|
|
294
|
+
drawCardBody(ctx, radius);
|
|
295
|
+
}
|
|
296
|
+
function drawRoundedCardFront(ctx, radius, cardData, hdr) {
|
|
297
|
+
const { suit, value } = cardData, cardWidth = radius * cardWidthRatio, cardHeight = radius * cardHeightRatio, halfWidth = cardWidth * engine.half, halfHeight = cardHeight * engine.half, cornerPadding = radius * cornerPaddingRatio, cornerFontSize = radius * cornerFontRatio, cornerSuitSize = radius * cornerSuitRatio, centerSuitSize = radius * centerSuitRatio, textOffset = radius * textHorizontalOffsetRatio, suitEdgeBuffer = radius * suitEdgeBufferFactor, isRed = suit === SuitType.hearts || suit === SuitType.diamonds, color = isRed ? engine.getStyleFromRgb(redSuitColor, hdr) : engine.getStyleFromRgb(blackSuitColor, hdr);
|
|
298
|
+
ctx.save();
|
|
299
|
+
drawCardBody(ctx, radius);
|
|
300
|
+
ctx.fillStyle = engine.getStyleFromRgb({ r: 255, g: 255, b: 255 }, hdr);
|
|
301
|
+
ctx.fill();
|
|
302
|
+
ctx.strokeStyle = engine.getStyleFromRgb({ r: 0, g: 0, b: 0 }, hdr);
|
|
303
|
+
ctx.stroke();
|
|
304
|
+
ctx.fillStyle = color;
|
|
305
|
+
ctx.font = `bold ${cornerFontSize.toString()}px Arial, serif`;
|
|
306
|
+
ctx.textAlign = "left";
|
|
307
|
+
ctx.textBaseline = "middle";
|
|
308
|
+
const topLeftX = -halfWidth + cornerPadding + suitEdgeBuffer, topLeftY = -halfHeight + cornerPadding + cornerFontSize * engine.half;
|
|
309
|
+
ctx.save();
|
|
310
|
+
ctx.translate(topLeftX, topLeftY);
|
|
311
|
+
ctx.beginPath();
|
|
312
|
+
pathUtils.drawPath(ctx, cornerSuitSize, paths[suit]);
|
|
313
|
+
ctx.fill();
|
|
314
|
+
ctx.restore();
|
|
315
|
+
ctx.fillText(value, topLeftX + textOffset, topLeftY);
|
|
316
|
+
ctx.save();
|
|
317
|
+
ctx.translate(halfWidth - cornerPadding - suitEdgeBuffer, halfHeight - cornerPadding - cornerFontSize * engine.half);
|
|
318
|
+
ctx.rotate(Math.PI);
|
|
319
|
+
ctx.save();
|
|
320
|
+
ctx.beginPath();
|
|
321
|
+
pathUtils.drawPath(ctx, cornerSuitSize, paths[suit]);
|
|
322
|
+
ctx.fill();
|
|
323
|
+
ctx.restore();
|
|
324
|
+
ctx.fillText(value, engine.originPoint.x + textOffset, engine.originPoint.y);
|
|
325
|
+
ctx.restore();
|
|
326
|
+
ctx.save();
|
|
327
|
+
ctx.beginPath();
|
|
328
|
+
pathUtils.drawPath(ctx, centerSuitSize, paths[suit]);
|
|
329
|
+
ctx.fillStyle = color;
|
|
330
|
+
ctx.fill();
|
|
331
|
+
ctx.restore();
|
|
332
|
+
ctx.beginPath();
|
|
333
|
+
ctx.arc(engine.originPoint.x, engine.originPoint.y, minRadius, minAngle, engine.doublePI, false);
|
|
334
|
+
ctx.closePath();
|
|
335
|
+
ctx.restore();
|
|
336
|
+
}
|
|
337
|
+
function drawCardBody(ctx, radius) {
|
|
338
|
+
const cardWidth = radius * cardWidthRatio, cardHeight = radius * cardHeightRatio, halfWidth = cardWidth * engine.half, halfHeight = cardHeight * engine.half, cornerRadius = radius * cornerRadiusRatio;
|
|
339
|
+
ctx.beginPath();
|
|
340
|
+
ctx.moveTo(-halfWidth + cornerRadius, -halfHeight);
|
|
341
|
+
ctx.lineTo(halfWidth - cornerRadius, -halfHeight);
|
|
342
|
+
ctx.quadraticCurveTo(halfWidth, -halfHeight, halfWidth, -halfHeight + cornerRadius);
|
|
343
|
+
ctx.lineTo(halfWidth, halfHeight - cornerRadius);
|
|
344
|
+
ctx.quadraticCurveTo(halfWidth, halfHeight, halfWidth - cornerRadius, halfHeight);
|
|
345
|
+
ctx.lineTo(-halfWidth + cornerRadius, halfHeight);
|
|
346
|
+
ctx.quadraticCurveTo(-halfWidth, halfHeight, -halfWidth, halfHeight - cornerRadius);
|
|
347
|
+
ctx.lineTo(-halfWidth, -halfHeight + cornerRadius);
|
|
348
|
+
ctx.quadraticCurveTo(-halfWidth, -halfHeight, -halfWidth + cornerRadius, -halfHeight);
|
|
349
|
+
ctx.closePath();
|
|
350
|
+
}
|
|
70
351
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
352
|
+
class CardDrawer {
|
|
353
|
+
_container;
|
|
354
|
+
constructor(container) {
|
|
355
|
+
this._container = container;
|
|
356
|
+
}
|
|
357
|
+
draw(data) {
|
|
358
|
+
const { context, particle, opacity, radius } = data;
|
|
359
|
+
if (!particle.cardData) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
const defaultOpacity = context.globalAlpha, container = this._container;
|
|
363
|
+
context.globalAlpha = opacity;
|
|
364
|
+
drawRoundedCard(context, radius, particle.cardData, container.hdr, particle.isShowingBack(), container.canvas.render.settings);
|
|
365
|
+
context.globalAlpha = defaultOpacity;
|
|
366
|
+
}
|
|
367
|
+
particleInit(_container, particle) {
|
|
368
|
+
const shape = particle.shapeData;
|
|
369
|
+
if (!shape) {
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
particle.cardData = engine.deepExtend({}, shape);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
76
375
|
|
|
77
|
-
|
|
376
|
+
async function loadFullCardsShape(engine) {
|
|
377
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
378
|
+
await engine.pluginManager.register(e => {
|
|
379
|
+
e.pluginManager.addShape(["card"], container => Promise.resolve(new CardDrawer(container)));
|
|
380
|
+
});
|
|
381
|
+
}
|
|
78
382
|
|
|
79
|
-
|
|
383
|
+
async function loadCardsShape(engine) {
|
|
384
|
+
engine.checkVersion("4.0.0-beta.15");
|
|
385
|
+
await Promise.all([
|
|
386
|
+
loadFullCardsShape(engine),
|
|
387
|
+
loadCardSuitsShape(engine),
|
|
388
|
+
]);
|
|
389
|
+
}
|
|
80
390
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
\**************************************/
|
|
85
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
391
|
+
const globalObject = globalThis;
|
|
392
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
393
|
+
globalObject.loadCardsShape = loadCardsShape;
|
|
86
394
|
|
|
87
|
-
|
|
395
|
+
exports.loadCardsShape = loadCardsShape;
|
|
88
396
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
/*!*******************************!*\
|
|
93
|
-
!*** ./dist/browser/index.js ***!
|
|
94
|
-
\*******************************/
|
|
95
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
96
|
-
|
|
97
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadCardSuitsShape: () => (/* reexport safe */ _suits_js__WEBPACK_IMPORTED_MODULE_1__.loadCardSuitsShape),\n/* harmony export */ loadCardsShape: () => (/* binding */ loadCardsShape),\n/* harmony export */ loadClubsSuitShape: () => (/* reexport safe */ _suits_js__WEBPACK_IMPORTED_MODULE_1__.loadClubsSuitShape),\n/* harmony export */ loadDiamondsSuitShape: () => (/* reexport safe */ _suits_js__WEBPACK_IMPORTED_MODULE_1__.loadDiamondsSuitShape),\n/* harmony export */ loadFullCardsShape: () => (/* reexport safe */ _cards_index_js__WEBPACK_IMPORTED_MODULE_0__.loadFullCardsShape),\n/* harmony export */ loadHeartsSuitShape: () => (/* reexport safe */ _suits_js__WEBPACK_IMPORTED_MODULE_1__.loadHeartsSuitShape),\n/* harmony export */ loadSpadesSuitShape: () => (/* reexport safe */ _suits_js__WEBPACK_IMPORTED_MODULE_1__.loadSpadesSuitShape)\n/* harmony export */ });\n/* harmony import */ var _cards_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cards/index.js */ \"./dist/browser/cards/index.js\");\n/* harmony import */ var _suits_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./suits.js */ \"./dist/browser/suits.js\");\nasync function loadCardsShape(engine) {\n engine.checkVersion(\"4.0.0-beta.11\");\n await engine.pluginManager.register(async (e)=>{\n const [{ loadFullCardsShape }, { loadCardSuitsShape }] = await Promise.all([\n Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./cards/index.js */ \"./dist/browser/cards/index.js\")),\n Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./suits.js */ \"./dist/browser/suits.js\"))\n ]);\n await Promise.all([\n loadFullCardsShape(e),\n loadCardSuitsShape(e)\n ]);\n });\n}\n\n\n\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/index.js?\n}");
|
|
98
|
-
|
|
99
|
-
/***/ },
|
|
100
|
-
|
|
101
|
-
/***/ "./dist/browser/spades/index.js"
|
|
102
|
-
/*!**************************************!*\
|
|
103
|
-
!*** ./dist/browser/spades/index.js ***!
|
|
104
|
-
\**************************************/
|
|
105
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
106
|
-
|
|
107
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadSpadesSuitShape: () => (/* binding */ loadSpadesSuitShape)\n/* harmony export */ });\nasync function loadSpadesSuitShape(engine) {\n engine.checkVersion(\"4.0.0-beta.11\");\n await engine.pluginManager.register((e)=>{\n e.pluginManager.addShape([\n \"spade\",\n \"spades\"\n ], async ()=>{\n const { SpadeDrawer } = await __webpack_require__.e(/*! import() */ \"dist_browser_spades_SpadeDrawer_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./SpadeDrawer.js */ \"./dist/browser/spades/SpadeDrawer.js\"));\n return new SpadeDrawer();\n });\n });\n}\n\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/spades/index.js?\n}");
|
|
108
|
-
|
|
109
|
-
/***/ },
|
|
110
|
-
|
|
111
|
-
/***/ "./dist/browser/suits.js"
|
|
112
|
-
/*!*******************************!*\
|
|
113
|
-
!*** ./dist/browser/suits.js ***!
|
|
114
|
-
\*******************************/
|
|
115
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
116
|
-
|
|
117
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadCardSuitsShape: () => (/* binding */ loadCardSuitsShape),\n/* harmony export */ loadClubsSuitShape: () => (/* reexport safe */ _clubs_index_js__WEBPACK_IMPORTED_MODULE_0__.loadClubsSuitShape),\n/* harmony export */ loadDiamondsSuitShape: () => (/* reexport safe */ _diamonds_index_js__WEBPACK_IMPORTED_MODULE_1__.loadDiamondsSuitShape),\n/* harmony export */ loadHeartsSuitShape: () => (/* reexport safe */ _hearts_index_js__WEBPACK_IMPORTED_MODULE_2__.loadHeartsSuitShape),\n/* harmony export */ loadSpadesSuitShape: () => (/* reexport safe */ _spades_index_js__WEBPACK_IMPORTED_MODULE_3__.loadSpadesSuitShape)\n/* harmony export */ });\n/* harmony import */ var _clubs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./clubs/index.js */ \"./dist/browser/clubs/index.js\");\n/* harmony import */ var _diamonds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./diamonds/index.js */ \"./dist/browser/diamonds/index.js\");\n/* harmony import */ var _hearts_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hearts/index.js */ \"./dist/browser/hearts/index.js\");\n/* harmony import */ var _spades_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./spades/index.js */ \"./dist/browser/spades/index.js\");\nasync function loadCardSuitsShape(engine) {\n engine.checkVersion(\"4.0.0-beta.11\");\n await engine.pluginManager.register(async (e)=>{\n const [{ loadClubsSuitShape }, { loadDiamondsSuitShape }, { loadHeartsSuitShape }, { loadSpadesSuitShape }] = await Promise.all([\n Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./clubs/index.js */ \"./dist/browser/clubs/index.js\")),\n Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./diamonds/index.js */ \"./dist/browser/diamonds/index.js\")),\n Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./hearts/index.js */ \"./dist/browser/hearts/index.js\")),\n Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./spades/index.js */ \"./dist/browser/spades/index.js\"))\n ]);\n await Promise.all([\n loadClubsSuitShape(e),\n loadDiamondsSuitShape(e),\n loadHeartsSuitShape(e),\n loadSpadesSuitShape(e)\n ]);\n });\n}\n\n\n\n\n\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/suits.js?\n}");
|
|
118
|
-
|
|
119
|
-
/***/ }
|
|
120
|
-
|
|
121
|
-
/******/ });
|
|
122
|
-
/************************************************************************/
|
|
123
|
-
/******/ // The module cache
|
|
124
|
-
/******/ var __webpack_module_cache__ = {};
|
|
125
|
-
/******/
|
|
126
|
-
/******/ // The require function
|
|
127
|
-
/******/ function __webpack_require__(moduleId) {
|
|
128
|
-
/******/ // Check if module is in cache
|
|
129
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
130
|
-
/******/ if (cachedModule !== undefined) {
|
|
131
|
-
/******/ return cachedModule.exports;
|
|
132
|
-
/******/ }
|
|
133
|
-
/******/ // Create a new module (and put it into the cache)
|
|
134
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
135
|
-
/******/ // no module.id needed
|
|
136
|
-
/******/ // no module.loaded needed
|
|
137
|
-
/******/ exports: {}
|
|
138
|
-
/******/ };
|
|
139
|
-
/******/
|
|
140
|
-
/******/ // Execute the module function
|
|
141
|
-
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
142
|
-
/******/ delete __webpack_module_cache__[moduleId];
|
|
143
|
-
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
|
144
|
-
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
145
|
-
/******/ throw e;
|
|
146
|
-
/******/ }
|
|
147
|
-
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
148
|
-
/******/
|
|
149
|
-
/******/ // Return the exports of the module
|
|
150
|
-
/******/ return module.exports;
|
|
151
|
-
/******/ }
|
|
152
|
-
/******/
|
|
153
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
154
|
-
/******/ __webpack_require__.m = __webpack_modules__;
|
|
155
|
-
/******/
|
|
156
|
-
/************************************************************************/
|
|
157
|
-
/******/ /* webpack/runtime/define property getters */
|
|
158
|
-
/******/ (() => {
|
|
159
|
-
/******/ // define getter functions for harmony exports
|
|
160
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
161
|
-
/******/ for(var key in definition) {
|
|
162
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
163
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
164
|
-
/******/ }
|
|
165
|
-
/******/ }
|
|
166
|
-
/******/ };
|
|
167
|
-
/******/ })();
|
|
168
|
-
/******/
|
|
169
|
-
/******/ /* webpack/runtime/ensure chunk */
|
|
170
|
-
/******/ (() => {
|
|
171
|
-
/******/ __webpack_require__.f = {};
|
|
172
|
-
/******/ // This file contains only the entry chunk.
|
|
173
|
-
/******/ // The chunk loading function for additional chunks
|
|
174
|
-
/******/ __webpack_require__.e = (chunkId) => {
|
|
175
|
-
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
|
|
176
|
-
/******/ __webpack_require__.f[key](chunkId, promises);
|
|
177
|
-
/******/ return promises;
|
|
178
|
-
/******/ }, []));
|
|
179
|
-
/******/ };
|
|
180
|
-
/******/ })();
|
|
181
|
-
/******/
|
|
182
|
-
/******/ /* webpack/runtime/get javascript chunk filename */
|
|
183
|
-
/******/ (() => {
|
|
184
|
-
/******/ // This function allow to reference async chunks
|
|
185
|
-
/******/ __webpack_require__.u = (chunkId) => {
|
|
186
|
-
/******/ // return url for filenames based on template
|
|
187
|
-
/******/ return "" + chunkId + ".js";
|
|
188
|
-
/******/ };
|
|
189
|
-
/******/ })();
|
|
190
|
-
/******/
|
|
191
|
-
/******/ /* webpack/runtime/global */
|
|
192
|
-
/******/ (() => {
|
|
193
|
-
/******/ __webpack_require__.g = (function() {
|
|
194
|
-
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
195
|
-
/******/ try {
|
|
196
|
-
/******/ return this || new Function('return this')();
|
|
197
|
-
/******/ } catch (e) {
|
|
198
|
-
/******/ if (typeof window === 'object') return window;
|
|
199
|
-
/******/ }
|
|
200
|
-
/******/ })();
|
|
201
|
-
/******/ })();
|
|
202
|
-
/******/
|
|
203
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
204
|
-
/******/ (() => {
|
|
205
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
206
|
-
/******/ })();
|
|
207
|
-
/******/
|
|
208
|
-
/******/ /* webpack/runtime/load script */
|
|
209
|
-
/******/ (() => {
|
|
210
|
-
/******/ var inProgress = {};
|
|
211
|
-
/******/ var dataWebpackPrefix = "@tsparticles/shape-cards:";
|
|
212
|
-
/******/ // loadScript function to load a script via script tag
|
|
213
|
-
/******/ __webpack_require__.l = (url, done, key, chunkId) => {
|
|
214
|
-
/******/ if(inProgress[url]) { inProgress[url].push(done); return; }
|
|
215
|
-
/******/ var script, needAttach;
|
|
216
|
-
/******/ if(key !== undefined) {
|
|
217
|
-
/******/ var scripts = document.getElementsByTagName("script");
|
|
218
|
-
/******/ for(var i = 0; i < scripts.length; i++) {
|
|
219
|
-
/******/ var s = scripts[i];
|
|
220
|
-
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
|
|
221
|
-
/******/ }
|
|
222
|
-
/******/ }
|
|
223
|
-
/******/ if(!script) {
|
|
224
|
-
/******/ needAttach = true;
|
|
225
|
-
/******/ script = document.createElement('script');
|
|
226
|
-
/******/
|
|
227
|
-
/******/ script.charset = 'utf-8';
|
|
228
|
-
/******/ if (__webpack_require__.nc) {
|
|
229
|
-
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
|
230
|
-
/******/ }
|
|
231
|
-
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
|
|
232
|
-
/******/
|
|
233
|
-
/******/ script.src = url;
|
|
234
|
-
/******/ }
|
|
235
|
-
/******/ inProgress[url] = [done];
|
|
236
|
-
/******/ var onScriptComplete = (prev, event) => {
|
|
237
|
-
/******/ // avoid mem leaks in IE.
|
|
238
|
-
/******/ script.onerror = script.onload = null;
|
|
239
|
-
/******/ clearTimeout(timeout);
|
|
240
|
-
/******/ var doneFns = inProgress[url];
|
|
241
|
-
/******/ delete inProgress[url];
|
|
242
|
-
/******/ script.parentNode && script.parentNode.removeChild(script);
|
|
243
|
-
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
|
|
244
|
-
/******/ if(prev) return prev(event);
|
|
245
|
-
/******/ }
|
|
246
|
-
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
|
|
247
|
-
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
|
|
248
|
-
/******/ script.onload = onScriptComplete.bind(null, script.onload);
|
|
249
|
-
/******/ needAttach && document.head.appendChild(script);
|
|
250
|
-
/******/ };
|
|
251
|
-
/******/ })();
|
|
252
|
-
/******/
|
|
253
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
254
|
-
/******/ (() => {
|
|
255
|
-
/******/ // define __esModule on exports
|
|
256
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
257
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
258
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
259
|
-
/******/ }
|
|
260
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
261
|
-
/******/ };
|
|
262
|
-
/******/ })();
|
|
263
|
-
/******/
|
|
264
|
-
/******/ /* webpack/runtime/publicPath */
|
|
265
|
-
/******/ (() => {
|
|
266
|
-
/******/ var scriptUrl;
|
|
267
|
-
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
268
|
-
/******/ var document = __webpack_require__.g.document;
|
|
269
|
-
/******/ if (!scriptUrl && document) {
|
|
270
|
-
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
|
271
|
-
/******/ scriptUrl = document.currentScript.src;
|
|
272
|
-
/******/ if (!scriptUrl) {
|
|
273
|
-
/******/ var scripts = document.getElementsByTagName("script");
|
|
274
|
-
/******/ if(scripts.length) {
|
|
275
|
-
/******/ var i = scripts.length - 1;
|
|
276
|
-
/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
|
|
277
|
-
/******/ }
|
|
278
|
-
/******/ }
|
|
279
|
-
/******/ }
|
|
280
|
-
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
|
|
281
|
-
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
|
|
282
|
-
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
|
283
|
-
/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
|
284
|
-
/******/ __webpack_require__.p = scriptUrl;
|
|
285
|
-
/******/ })();
|
|
286
|
-
/******/
|
|
287
|
-
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
288
|
-
/******/ (() => {
|
|
289
|
-
/******/ // no baseURI
|
|
290
|
-
/******/
|
|
291
|
-
/******/ // object to store loaded and loading chunks
|
|
292
|
-
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
293
|
-
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
294
|
-
/******/ var installedChunks = {
|
|
295
|
-
/******/ "tsparticles.shape.cards": 0
|
|
296
|
-
/******/ };
|
|
297
|
-
/******/
|
|
298
|
-
/******/ __webpack_require__.f.j = (chunkId, promises) => {
|
|
299
|
-
/******/ // JSONP chunk loading for javascript
|
|
300
|
-
/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
|
301
|
-
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
|
|
302
|
-
/******/
|
|
303
|
-
/******/ // a Promise means "currently loading".
|
|
304
|
-
/******/ if(installedChunkData) {
|
|
305
|
-
/******/ promises.push(installedChunkData[2]);
|
|
306
|
-
/******/ } else {
|
|
307
|
-
/******/ if(true) { // all chunks have JS
|
|
308
|
-
/******/ // setup Promise in chunk cache
|
|
309
|
-
/******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
|
|
310
|
-
/******/ promises.push(installedChunkData[2] = promise);
|
|
311
|
-
/******/
|
|
312
|
-
/******/ // start chunk loading
|
|
313
|
-
/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
|
|
314
|
-
/******/ // create error before stack unwound to get useful stacktrace later
|
|
315
|
-
/******/ var error = new Error();
|
|
316
|
-
/******/ var loadingEnded = (event) => {
|
|
317
|
-
/******/ if(__webpack_require__.o(installedChunks, chunkId)) {
|
|
318
|
-
/******/ installedChunkData = installedChunks[chunkId];
|
|
319
|
-
/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
|
320
|
-
/******/ if(installedChunkData) {
|
|
321
|
-
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
|
322
|
-
/******/ var realSrc = event && event.target && event.target.src;
|
|
323
|
-
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
|
324
|
-
/******/ error.name = 'ChunkLoadError';
|
|
325
|
-
/******/ error.type = errorType;
|
|
326
|
-
/******/ error.request = realSrc;
|
|
327
|
-
/******/ installedChunkData[1](error);
|
|
328
|
-
/******/ }
|
|
329
|
-
/******/ }
|
|
330
|
-
/******/ };
|
|
331
|
-
/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
|
|
332
|
-
/******/ }
|
|
333
|
-
/******/ }
|
|
334
|
-
/******/ }
|
|
335
|
-
/******/ };
|
|
336
|
-
/******/
|
|
337
|
-
/******/ // no prefetching
|
|
338
|
-
/******/
|
|
339
|
-
/******/ // no preloaded
|
|
340
|
-
/******/
|
|
341
|
-
/******/ // no HMR
|
|
342
|
-
/******/
|
|
343
|
-
/******/ // no HMR manifest
|
|
344
|
-
/******/
|
|
345
|
-
/******/ // no on chunks loaded
|
|
346
|
-
/******/
|
|
347
|
-
/******/ // install a JSONP callback for chunk loading
|
|
348
|
-
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
349
|
-
/******/ var [chunkIds, moreModules, runtime] = data;
|
|
350
|
-
/******/ // add "moreModules" to the modules object,
|
|
351
|
-
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
352
|
-
/******/ var moduleId, chunkId, i = 0;
|
|
353
|
-
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
|
354
|
-
/******/ for(moduleId in moreModules) {
|
|
355
|
-
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
356
|
-
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
357
|
-
/******/ }
|
|
358
|
-
/******/ }
|
|
359
|
-
/******/ if(runtime) var result = runtime(__webpack_require__);
|
|
360
|
-
/******/ }
|
|
361
|
-
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
362
|
-
/******/ for(;i < chunkIds.length; i++) {
|
|
363
|
-
/******/ chunkId = chunkIds[i];
|
|
364
|
-
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
365
|
-
/******/ installedChunks[chunkId][0]();
|
|
366
|
-
/******/ }
|
|
367
|
-
/******/ installedChunks[chunkId] = 0;
|
|
368
|
-
/******/ }
|
|
369
|
-
/******/
|
|
370
|
-
/******/ }
|
|
371
|
-
/******/
|
|
372
|
-
/******/ var chunkLoadingGlobal = this["webpackChunk_tsparticles_shape_cards"] = this["webpackChunk_tsparticles_shape_cards"] || [];
|
|
373
|
-
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
374
|
-
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
375
|
-
/******/ })();
|
|
376
|
-
/******/
|
|
377
|
-
/************************************************************************/
|
|
378
|
-
/******/
|
|
379
|
-
/******/ // startup
|
|
380
|
-
/******/ // Load entry module and return exports
|
|
381
|
-
/******/ // This entry module can't be inlined because the eval devtool is used.
|
|
382
|
-
/******/ var __webpack_exports__ = __webpack_require__("./dist/browser/index.js");
|
|
383
|
-
/******/
|
|
384
|
-
/******/ return __webpack_exports__;
|
|
385
|
-
/******/ })()
|
|
386
|
-
;
|
|
387
|
-
});
|
|
397
|
+
}));
|
|
398
|
+
Object.assign(globalThis.window || globalThis, { loadCardsShape: (globalThis.__tsParticlesInternals.shapes.cards || {}).loadCardsShape });
|
|
399
|
+
delete (globalThis.window || globalThis).tsparticlesInternalExports;
|