@tsparticles/shape-cards 3.9.1 → 4.0.0-alpha.0
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/30.min.js +2 -0
- package/30.min.js.LICENSE.txt +1 -0
- package/50.min.js +2 -0
- package/50.min.js.LICENSE.txt +1 -0
- package/568.min.js +2 -0
- package/568.min.js.LICENSE.txt +1 -0
- package/810.min.js +2 -0
- package/810.min.js.LICENSE.txt +1 -0
- package/browser/Utils.js +1 -1
- package/browser/{ClubDrawer.js → clubs/ClubDrawer.js} +1 -1
- package/browser/clubs/index.js +7 -0
- package/browser/{DiamondDrawer.js → diamonds/DiamondDrawer.js} +1 -1
- package/browser/diamonds/index.js +7 -0
- package/{esm → browser/hearts}/HeartDrawer.js +1 -1
- package/browser/hearts/index.js +7 -0
- package/browser/index.js +13 -10
- package/{esm → browser/spades}/SpadeDrawer.js +1 -1
- package/browser/spades/index.js +7 -0
- package/cjs/ICardsPath.js +1 -2
- package/cjs/Utils.js +3 -7
- package/{esm → cjs/clubs}/ClubDrawer.js +1 -1
- package/cjs/clubs/index.js +7 -0
- package/{esm → cjs/diamonds}/DiamondDrawer.js +1 -1
- package/cjs/diamonds/index.js +7 -0
- package/{browser → cjs/hearts}/HeartDrawer.js +1 -1
- package/cjs/hearts/index.js +7 -0
- package/cjs/index.js +13 -13
- package/{browser → cjs/spades}/SpadeDrawer.js +1 -1
- package/cjs/spades/index.js +7 -0
- package/dist_browser_clubs_ClubDrawer_js.js +40 -0
- package/dist_browser_diamonds_DiamondDrawer_js.js +40 -0
- package/dist_browser_hearts_HeartDrawer_js.js +40 -0
- package/dist_browser_spades_SpadeDrawer_js.js +40 -0
- package/esm/Utils.js +1 -1
- package/esm/clubs/ClubDrawer.js +9 -0
- package/esm/clubs/index.js +7 -0
- package/esm/diamonds/DiamondDrawer.js +9 -0
- package/esm/diamonds/index.js +7 -0
- package/esm/hearts/HeartDrawer.js +9 -0
- package/esm/hearts/index.js +7 -0
- package/esm/index.js +13 -10
- package/esm/spades/SpadeDrawer.js +9 -0
- package/esm/spades/index.js +7 -0
- package/package.json +4 -3
- package/report.html +5 -4
- package/tsparticles.shape.cards.js +235 -44
- package/tsparticles.shape.cards.min.js +1 -1
- package/tsparticles.shape.cards.min.js.LICENSE.txt +1 -1
- package/types/clubs/index.d.ts +2 -0
- package/types/diamonds/index.d.ts +2 -0
- package/types/hearts/index.d.ts +2 -0
- package/types/index.d.ts +5 -1
- package/types/spades/index.d.ts +2 -0
- package/umd/Utils.js +1 -1
- package/umd/{ClubDrawer.js → clubs/ClubDrawer.js} +2 -2
- package/umd/clubs/index.js +54 -0
- package/umd/{DiamondDrawer.js → diamonds/DiamondDrawer.js} +2 -2
- package/umd/diamonds/index.js +54 -0
- package/umd/{HeartDrawer.js → hearts/HeartDrawer.js} +2 -2
- package/umd/hearts/index.js +54 -0
- package/umd/index.js +51 -11
- package/umd/{SpadeDrawer.js → spades/SpadeDrawer.js} +2 -2
- package/umd/spades/index.js +54 -0
- package/cjs/ClubDrawer.js +0 -13
- package/cjs/DiamondDrawer.js +0 -13
- package/cjs/HeartDrawer.js +0 -13
- package/cjs/SpadeDrawer.js +0 -13
- /package/types/{ClubDrawer.d.ts → clubs/ClubDrawer.d.ts} +0 -0
- /package/types/{DiamondDrawer.d.ts → diamonds/DiamondDrawer.d.ts} +0 -0
- /package/types/{HeartDrawer.d.ts → hearts/HeartDrawer.d.ts} +0 -0
- /package/types/{SpadeDrawer.d.ts → spades/SpadeDrawer.d.ts} +0 -0
package/30.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 30.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_shape_cards=this.webpackChunk_tsparticles_shape_cards||[]).push([[30],{30(e,s,x){x.d(s,{DiamondDrawer:()=>a});var y=x(324);class a{constructor(){this.validTypes=["diamond","diamonds"]}draw(e){(0,y.k)(e,y.f.diamond)}}},324(e,s,x){function y(e,s){if(!s.segments.length||!s.segments[0].values.length)return;const{context:x,radius:y}=e;x.moveTo(s.segments[0].values[0].x*y,s.segments[0].values[0].y*y);for(const e of s.segments)x.bezierCurveTo(e.values[1].x*y,e.values[1].y*y,e.values[2].x*y,e.values[2].y*y,e.values[3].x*y,e.values[3].y*y);for(let e=s.segments.length-1;e>=0;e--){const a=s.segments[e];x.bezierCurveTo(-a.values[2].x*y,a.values[2].y*y,-a.values[1].x*y,a.values[1].y*y,-a.values[0].x*y,a.values[0].y*y)}}x.d(s,{f:()=>u,k:()=>y});const a=.5,u={heart:{segments:[{values:[{x:0,y:a},{x:0,y:a},{x:a,y:0},{x:a,y:-a/2}]},{values:[{x:a,y:-a/2},{x:a,y:-a/2},{x:a,y:-a},{x:a/2,y:-a}]},{values:[{x:a/2,y:-a},{x:a/2,y:-a},{x:0,y:-a},{x:0,y:-a/2}]}]},diamond:{segments:[{values:[{x:0,y:a},{x:0,y:a},{x:.375,y:0},{x:.375,y:0}]},{values:[{x:.375,y:0},{x:.375,y:0},{x:0,y:-a},{x:0,y:-a}]}]},club:{segments:[{values:[{x:0,y:-a},{x:0,y:-a},{x:a/2,y:-a},{x:a/2,y:-a/2}]},{values:[{x:a/2,y:-a/2},{x:a/2,y:-a/2},{x:a,y:-a/2},{x:a,y:0}]},{values:[{x:a,y:0},{x:a,y:0},{x:a,y:a/2},{x:a/2,y:a/2}]},{values:[{x:a/2,y:a/2},{x:a/2,y:a/2},{x:a/8,y:a/2},{x:a/8,y:a/8}]},{values:[{x:a/8,y:a/8},{x:a/8,y:a/2},{x:a/2,y:a},{x:a/2,y:a}]},{values:[{x:a/2,y:a},{x:a/2,y:a},{x:0,y:a},{x:0,y:a}]}]},spade:{segments:[{values:[{x:0,y:-a},{x:0,y:-a},{x:a,y:-a/2},{x:a,y:0}]},{values:[{x:a,y:0},{x:a,y:0},{x:a,y:a/2},{x:a/2,y:a/2}]},{values:[{x:a/2,y:a/2},{x:a/2,y:a/2},{x:a/8,y:a/2},{x:a/8,y:a/8}]},{values:[{x:a/8,y:a/8},{x:a/8,y:a/2},{x:a/2,y:a},{x:a/2,y:a}]},{values:[{x:a/2,y:a},{x:a/2,y:a},{x:0,y:a},{x:0,y:a}]}]}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Cards Shape v4.0.0-alpha.0 by Matteo Bruni */
|
package/50.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 50.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_shape_cards=this.webpackChunk_tsparticles_shape_cards||[]).push([[50],{50(e,s,x){x.d(s,{HeartDrawer:()=>a});var y=x(324);class a{constructor(){this.validTypes=["heart","hearts"]}draw(e){(0,y.k)(e,y.f.heart)}}},324(e,s,x){function y(e,s){if(!s.segments.length||!s.segments[0].values.length)return;const{context:x,radius:y}=e;x.moveTo(s.segments[0].values[0].x*y,s.segments[0].values[0].y*y);for(const e of s.segments)x.bezierCurveTo(e.values[1].x*y,e.values[1].y*y,e.values[2].x*y,e.values[2].y*y,e.values[3].x*y,e.values[3].y*y);for(let e=s.segments.length-1;e>=0;e--){const a=s.segments[e];x.bezierCurveTo(-a.values[2].x*y,a.values[2].y*y,-a.values[1].x*y,a.values[1].y*y,-a.values[0].x*y,a.values[0].y*y)}}x.d(s,{f:()=>u,k:()=>y});const a=.5,u={heart:{segments:[{values:[{x:0,y:a},{x:0,y:a},{x:a,y:0},{x:a,y:-a/2}]},{values:[{x:a,y:-a/2},{x:a,y:-a/2},{x:a,y:-a},{x:a/2,y:-a}]},{values:[{x:a/2,y:-a},{x:a/2,y:-a},{x:0,y:-a},{x:0,y:-a/2}]}]},diamond:{segments:[{values:[{x:0,y:a},{x:0,y:a},{x:.375,y:0},{x:.375,y:0}]},{values:[{x:.375,y:0},{x:.375,y:0},{x:0,y:-a},{x:0,y:-a}]}]},club:{segments:[{values:[{x:0,y:-a},{x:0,y:-a},{x:a/2,y:-a},{x:a/2,y:-a/2}]},{values:[{x:a/2,y:-a/2},{x:a/2,y:-a/2},{x:a,y:-a/2},{x:a,y:0}]},{values:[{x:a,y:0},{x:a,y:0},{x:a,y:a/2},{x:a/2,y:a/2}]},{values:[{x:a/2,y:a/2},{x:a/2,y:a/2},{x:a/8,y:a/2},{x:a/8,y:a/8}]},{values:[{x:a/8,y:a/8},{x:a/8,y:a/2},{x:a/2,y:a},{x:a/2,y:a}]},{values:[{x:a/2,y:a},{x:a/2,y:a},{x:0,y:a},{x:0,y:a}]}]},spade:{segments:[{values:[{x:0,y:-a},{x:0,y:-a},{x:a,y:-a/2},{x:a,y:0}]},{values:[{x:a,y:0},{x:a,y:0},{x:a,y:a/2},{x:a/2,y:a/2}]},{values:[{x:a/2,y:a/2},{x:a/2,y:a/2},{x:a/8,y:a/2},{x:a/8,y:a/8}]},{values:[{x:a/8,y:a/8},{x:a/8,y:a/2},{x:a/2,y:a},{x:a/2,y:a}]},{values:[{x:a/2,y:a},{x:a/2,y:a},{x:0,y:a},{x:0,y:a}]}]}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Cards Shape v4.0.0-alpha.0 by Matteo Bruni */
|
package/568.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 568.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_shape_cards=this.webpackChunk_tsparticles_shape_cards||[]).push([[568],{324(e,s,x){function y(e,s){if(!s.segments.length||!s.segments[0].values.length)return;const{context:x,radius:y}=e;x.moveTo(s.segments[0].values[0].x*y,s.segments[0].values[0].y*y);for(const e of s.segments)x.bezierCurveTo(e.values[1].x*y,e.values[1].y*y,e.values[2].x*y,e.values[2].y*y,e.values[3].x*y,e.values[3].y*y);for(let e=s.segments.length-1;e>=0;e--){const a=s.segments[e];x.bezierCurveTo(-a.values[2].x*y,a.values[2].y*y,-a.values[1].x*y,a.values[1].y*y,-a.values[0].x*y,a.values[0].y*y)}}x.d(s,{f:()=>u,k:()=>y});const a=.5,u={heart:{segments:[{values:[{x:0,y:a},{x:0,y:a},{x:a,y:0},{x:a,y:-a/2}]},{values:[{x:a,y:-a/2},{x:a,y:-a/2},{x:a,y:-a},{x:a/2,y:-a}]},{values:[{x:a/2,y:-a},{x:a/2,y:-a},{x:0,y:-a},{x:0,y:-a/2}]}]},diamond:{segments:[{values:[{x:0,y:a},{x:0,y:a},{x:.375,y:0},{x:.375,y:0}]},{values:[{x:.375,y:0},{x:.375,y:0},{x:0,y:-a},{x:0,y:-a}]}]},club:{segments:[{values:[{x:0,y:-a},{x:0,y:-a},{x:a/2,y:-a},{x:a/2,y:-a/2}]},{values:[{x:a/2,y:-a/2},{x:a/2,y:-a/2},{x:a,y:-a/2},{x:a,y:0}]},{values:[{x:a,y:0},{x:a,y:0},{x:a,y:a/2},{x:a/2,y:a/2}]},{values:[{x:a/2,y:a/2},{x:a/2,y:a/2},{x:a/8,y:a/2},{x:a/8,y:a/8}]},{values:[{x:a/8,y:a/8},{x:a/8,y:a/2},{x:a/2,y:a},{x:a/2,y:a}]},{values:[{x:a/2,y:a},{x:a/2,y:a},{x:0,y:a},{x:0,y:a}]}]},spade:{segments:[{values:[{x:0,y:-a},{x:0,y:-a},{x:a,y:-a/2},{x:a,y:0}]},{values:[{x:a,y:0},{x:a,y:0},{x:a,y:a/2},{x:a/2,y:a/2}]},{values:[{x:a/2,y:a/2},{x:a/2,y:a/2},{x:a/8,y:a/2},{x:a/8,y:a/8}]},{values:[{x:a/8,y:a/8},{x:a/8,y:a/2},{x:a/2,y:a},{x:a/2,y:a}]},{values:[{x:a/2,y:a},{x:a/2,y:a},{x:0,y:a},{x:0,y:a}]}]}}},568(e,s,x){x.d(s,{SpadeDrawer:()=>a});var y=x(324);class a{constructor(){this.validTypes=["spade","spades"]}draw(e){(0,y.k)(e,y.f.spade)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Cards Shape v4.0.0-alpha.0 by Matteo Bruni */
|
package/810.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 810.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_shape_cards=this.webpackChunk_tsparticles_shape_cards||[]).push([[810],{324(e,s,x){function y(e,s){if(!s.segments.length||!s.segments[0].values.length)return;const{context:x,radius:y}=e;x.moveTo(s.segments[0].values[0].x*y,s.segments[0].values[0].y*y);for(const e of s.segments)x.bezierCurveTo(e.values[1].x*y,e.values[1].y*y,e.values[2].x*y,e.values[2].y*y,e.values[3].x*y,e.values[3].y*y);for(let e=s.segments.length-1;e>=0;e--){const a=s.segments[e];x.bezierCurveTo(-a.values[2].x*y,a.values[2].y*y,-a.values[1].x*y,a.values[1].y*y,-a.values[0].x*y,a.values[0].y*y)}}x.d(s,{f:()=>u,k:()=>y});const a=.5,u={heart:{segments:[{values:[{x:0,y:a},{x:0,y:a},{x:a,y:0},{x:a,y:-a/2}]},{values:[{x:a,y:-a/2},{x:a,y:-a/2},{x:a,y:-a},{x:a/2,y:-a}]},{values:[{x:a/2,y:-a},{x:a/2,y:-a},{x:0,y:-a},{x:0,y:-a/2}]}]},diamond:{segments:[{values:[{x:0,y:a},{x:0,y:a},{x:.375,y:0},{x:.375,y:0}]},{values:[{x:.375,y:0},{x:.375,y:0},{x:0,y:-a},{x:0,y:-a}]}]},club:{segments:[{values:[{x:0,y:-a},{x:0,y:-a},{x:a/2,y:-a},{x:a/2,y:-a/2}]},{values:[{x:a/2,y:-a/2},{x:a/2,y:-a/2},{x:a,y:-a/2},{x:a,y:0}]},{values:[{x:a,y:0},{x:a,y:0},{x:a,y:a/2},{x:a/2,y:a/2}]},{values:[{x:a/2,y:a/2},{x:a/2,y:a/2},{x:a/8,y:a/2},{x:a/8,y:a/8}]},{values:[{x:a/8,y:a/8},{x:a/8,y:a/2},{x:a/2,y:a},{x:a/2,y:a}]},{values:[{x:a/2,y:a},{x:a/2,y:a},{x:0,y:a},{x:0,y:a}]}]},spade:{segments:[{values:[{x:0,y:-a},{x:0,y:-a},{x:a,y:-a/2},{x:a,y:0}]},{values:[{x:a,y:0},{x:a,y:0},{x:a,y:a/2},{x:a/2,y:a/2}]},{values:[{x:a/2,y:a/2},{x:a/2,y:a/2},{x:a/8,y:a/2},{x:a/8,y:a/8}]},{values:[{x:a/8,y:a/8},{x:a/8,y:a/2},{x:a/2,y:a},{x:a/2,y:a}]},{values:[{x:a/2,y:a},{x:a/2,y:a},{x:0,y:a},{x:0,y:a}]}]}}},810(e,s,x){x.d(s,{ClubDrawer:()=>a});var y=x(324);class a{constructor(){this.validTypes=["club","clubs"]}draw(e){(0,y.k)(e,y.f.club)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Cards Shape v4.0.0-alpha.0 by Matteo Bruni */
|
package/browser/Utils.js
CHANGED
|
@@ -12,7 +12,7 @@ export function drawPath(data, path) {
|
|
|
12
12
|
context.bezierCurveTo(-segment.values[2].x * radius, segment.values[2].y * radius, -segment.values[1].x * radius, segment.values[1].y * radius, -segment.values[0].x * radius, segment.values[0].y * radius);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
const n =
|
|
15
|
+
const n = 0.5;
|
|
16
16
|
export const paths = {
|
|
17
17
|
heart: {
|
|
18
18
|
segments: [
|
package/browser/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
await engine.addShape(new ClubDrawer(), refresh);
|
|
1
|
+
export function loadCardsShape(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.0");
|
|
3
|
+
engine.register(async (e) => {
|
|
4
|
+
const { loadClubsCardsShape } = await import("./clubs/index.js"), { loadDiamondsCardsShape } = await import("./diamonds/index.js"), { loadHeartsCardsShape } = await import("./hearts/index.js"), { loadSpadesCardsShape } = await import("./spades/index.js");
|
|
5
|
+
loadClubsCardsShape(e);
|
|
6
|
+
loadDiamondsCardsShape(e);
|
|
7
|
+
loadHeartsCardsShape(e);
|
|
8
|
+
loadSpadesCardsShape(e);
|
|
9
|
+
});
|
|
11
10
|
}
|
|
11
|
+
export * from "./clubs/index.js";
|
|
12
|
+
export * from "./diamonds/index.js";
|
|
13
|
+
export * from "./hearts/index.js";
|
|
14
|
+
export * from "./spades/index.js";
|
package/cjs/ICardsPath.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/cjs/Utils.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.paths = void 0;
|
|
4
|
-
exports.drawPath = drawPath;
|
|
5
|
-
function drawPath(data, path) {
|
|
1
|
+
export function drawPath(data, path) {
|
|
6
2
|
if (!path.segments.length || !path.segments[0].values.length) {
|
|
7
3
|
return;
|
|
8
4
|
}
|
|
@@ -16,8 +12,8 @@ function drawPath(data, path) {
|
|
|
16
12
|
context.bezierCurveTo(-segment.values[2].x * radius, segment.values[2].y * radius, -segment.values[1].x * radius, segment.values[1].y * radius, -segment.values[0].x * radius, segment.values[0].y * radius);
|
|
17
13
|
}
|
|
18
14
|
}
|
|
19
|
-
const n =
|
|
20
|
-
|
|
15
|
+
const n = 0.5;
|
|
16
|
+
export const paths = {
|
|
21
17
|
heart: {
|
|
22
18
|
segments: [
|
|
23
19
|
{
|
package/cjs/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
await engine.addShape(new SpadeDrawer_js_1.SpadeDrawer(), refresh);
|
|
11
|
-
await engine.addShape(new HeartDrawer_js_1.HeartDrawer(), refresh);
|
|
12
|
-
await engine.addShape(new DiamondDrawer_js_1.DiamondDrawer(), refresh);
|
|
13
|
-
await engine.addShape(new ClubDrawer_js_1.ClubDrawer(), refresh);
|
|
1
|
+
export function loadCardsShape(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.0");
|
|
3
|
+
engine.register(async (e) => {
|
|
4
|
+
const { loadClubsCardsShape } = await import("./clubs/index.js"), { loadDiamondsCardsShape } = await import("./diamonds/index.js"), { loadHeartsCardsShape } = await import("./hearts/index.js"), { loadSpadesCardsShape } = await import("./spades/index.js");
|
|
5
|
+
loadClubsCardsShape(e);
|
|
6
|
+
loadDiamondsCardsShape(e);
|
|
7
|
+
loadHeartsCardsShape(e);
|
|
8
|
+
loadSpadesCardsShape(e);
|
|
9
|
+
});
|
|
14
10
|
}
|
|
11
|
+
export * from "./clubs/index.js";
|
|
12
|
+
export * from "./diamonds/index.js";
|
|
13
|
+
export * from "./hearts/index.js";
|
|
14
|
+
export * from "./spades/index.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v4.0.0-alpha.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_shape_cards"] = this["webpackChunk_tsparticles_shape_cards"] || []).push([["dist_browser_clubs_ClubDrawer_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "./dist/browser/Utils.js"
|
|
21
|
+
/*!*******************************!*\
|
|
22
|
+
!*** ./dist/browser/Utils.js ***!
|
|
23
|
+
\*******************************/
|
|
24
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
|
+
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawPath: () => (/* binding */ drawPath),\n/* harmony export */ paths: () => (/* binding */ paths)\n/* harmony export */ });\nfunction drawPath(data, path) {\n if (!path.segments.length || !path.segments[0].values.length) {\n return;\n }\n const {\n context,\n radius\n } = data;\n context.moveTo(path.segments[0].values[0].x * radius, path.segments[0].values[0].y * radius);\n for (const segment of path.segments) {\n context.bezierCurveTo(segment.values[1].x * radius, segment.values[1].y * radius, segment.values[2].x * radius, segment.values[2].y * radius, segment.values[3].x * radius, segment.values[3].y * radius);\n }\n for (let i = path.segments.length - 1; i >= 0; i--) {\n const segment = path.segments[i];\n context.bezierCurveTo(-segment.values[2].x * radius, segment.values[2].y * radius, -segment.values[1].x * radius, segment.values[1].y * radius, -segment.values[0].x * radius, segment.values[0].y * radius);\n }\n}\nconst n = 0.5;\nconst paths = {\n heart: {\n segments: [{\n values: [{\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: -n / 2\n }]\n }, {\n values: [{\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }]\n }, {\n values: [{\n x: n / 2,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n / 2\n }]\n }]\n },\n diamond: {\n segments: [{\n values: [{\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 3 * n / 4,\n y: 0\n }, {\n x: 3 * n / 4,\n y: 0\n }]\n }, {\n values: [{\n x: 3 * n / 4,\n y: 0\n }, {\n x: 3 * n / 4,\n y: 0\n }, {\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }]\n }]\n },\n club: {\n segments: [{\n values: [{\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }, {\n x: n / 2,\n y: -n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: -n / 2\n }, {\n x: n / 2,\n y: -n / 2\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: 0\n }]\n }, {\n values: [{\n x: n,\n y: 0\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 8\n }]\n }, {\n values: [{\n x: n / 8,\n y: n / 8\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }]\n }, {\n values: [{\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }]\n }]\n },\n spade: {\n segments: [{\n values: [{\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: 0\n }]\n }, {\n values: [{\n x: n,\n y: 0\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 8\n }]\n }, {\n values: [{\n x: n / 8,\n y: n / 8\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }]\n }, {\n values: [{\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }]\n }]\n }\n};\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/Utils.js?\n}");
|
|
27
|
+
|
|
28
|
+
/***/ },
|
|
29
|
+
|
|
30
|
+
/***/ "./dist/browser/clubs/ClubDrawer.js"
|
|
31
|
+
/*!******************************************!*\
|
|
32
|
+
!*** ./dist/browser/clubs/ClubDrawer.js ***!
|
|
33
|
+
\******************************************/
|
|
34
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35
|
+
|
|
36
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ClubDrawer: () => (/* binding */ ClubDrawer)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils.js */ \"./dist/browser/Utils.js\");\n\nclass ClubDrawer {\n constructor() {\n this.validTypes = [\"club\", \"clubs\"];\n }\n draw(data) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.drawPath)(data, _Utils_js__WEBPACK_IMPORTED_MODULE_0__.paths.club);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/clubs/ClubDrawer.js?\n}");
|
|
37
|
+
|
|
38
|
+
/***/ }
|
|
39
|
+
|
|
40
|
+
}]);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v4.0.0-alpha.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_shape_cards"] = this["webpackChunk_tsparticles_shape_cards"] || []).push([["dist_browser_diamonds_DiamondDrawer_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "./dist/browser/Utils.js"
|
|
21
|
+
/*!*******************************!*\
|
|
22
|
+
!*** ./dist/browser/Utils.js ***!
|
|
23
|
+
\*******************************/
|
|
24
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
|
+
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawPath: () => (/* binding */ drawPath),\n/* harmony export */ paths: () => (/* binding */ paths)\n/* harmony export */ });\nfunction drawPath(data, path) {\n if (!path.segments.length || !path.segments[0].values.length) {\n return;\n }\n const {\n context,\n radius\n } = data;\n context.moveTo(path.segments[0].values[0].x * radius, path.segments[0].values[0].y * radius);\n for (const segment of path.segments) {\n context.bezierCurveTo(segment.values[1].x * radius, segment.values[1].y * radius, segment.values[2].x * radius, segment.values[2].y * radius, segment.values[3].x * radius, segment.values[3].y * radius);\n }\n for (let i = path.segments.length - 1; i >= 0; i--) {\n const segment = path.segments[i];\n context.bezierCurveTo(-segment.values[2].x * radius, segment.values[2].y * radius, -segment.values[1].x * radius, segment.values[1].y * radius, -segment.values[0].x * radius, segment.values[0].y * radius);\n }\n}\nconst n = 0.5;\nconst paths = {\n heart: {\n segments: [{\n values: [{\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: -n / 2\n }]\n }, {\n values: [{\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }]\n }, {\n values: [{\n x: n / 2,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n / 2\n }]\n }]\n },\n diamond: {\n segments: [{\n values: [{\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 3 * n / 4,\n y: 0\n }, {\n x: 3 * n / 4,\n y: 0\n }]\n }, {\n values: [{\n x: 3 * n / 4,\n y: 0\n }, {\n x: 3 * n / 4,\n y: 0\n }, {\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }]\n }]\n },\n club: {\n segments: [{\n values: [{\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }, {\n x: n / 2,\n y: -n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: -n / 2\n }, {\n x: n / 2,\n y: -n / 2\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: 0\n }]\n }, {\n values: [{\n x: n,\n y: 0\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 8\n }]\n }, {\n values: [{\n x: n / 8,\n y: n / 8\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }]\n }, {\n values: [{\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }]\n }]\n },\n spade: {\n segments: [{\n values: [{\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: 0\n }]\n }, {\n values: [{\n x: n,\n y: 0\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 8\n }]\n }, {\n values: [{\n x: n / 8,\n y: n / 8\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }]\n }, {\n values: [{\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }]\n }]\n }\n};\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/Utils.js?\n}");
|
|
27
|
+
|
|
28
|
+
/***/ },
|
|
29
|
+
|
|
30
|
+
/***/ "./dist/browser/diamonds/DiamondDrawer.js"
|
|
31
|
+
/*!************************************************!*\
|
|
32
|
+
!*** ./dist/browser/diamonds/DiamondDrawer.js ***!
|
|
33
|
+
\************************************************/
|
|
34
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35
|
+
|
|
36
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DiamondDrawer: () => (/* binding */ DiamondDrawer)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils.js */ \"./dist/browser/Utils.js\");\n\nclass DiamondDrawer {\n constructor() {\n this.validTypes = [\"diamond\", \"diamonds\"];\n }\n draw(data) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.drawPath)(data, _Utils_js__WEBPACK_IMPORTED_MODULE_0__.paths.diamond);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/diamonds/DiamondDrawer.js?\n}");
|
|
37
|
+
|
|
38
|
+
/***/ }
|
|
39
|
+
|
|
40
|
+
}]);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v4.0.0-alpha.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_shape_cards"] = this["webpackChunk_tsparticles_shape_cards"] || []).push([["dist_browser_hearts_HeartDrawer_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "./dist/browser/Utils.js"
|
|
21
|
+
/*!*******************************!*\
|
|
22
|
+
!*** ./dist/browser/Utils.js ***!
|
|
23
|
+
\*******************************/
|
|
24
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
|
+
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawPath: () => (/* binding */ drawPath),\n/* harmony export */ paths: () => (/* binding */ paths)\n/* harmony export */ });\nfunction drawPath(data, path) {\n if (!path.segments.length || !path.segments[0].values.length) {\n return;\n }\n const {\n context,\n radius\n } = data;\n context.moveTo(path.segments[0].values[0].x * radius, path.segments[0].values[0].y * radius);\n for (const segment of path.segments) {\n context.bezierCurveTo(segment.values[1].x * radius, segment.values[1].y * radius, segment.values[2].x * radius, segment.values[2].y * radius, segment.values[3].x * radius, segment.values[3].y * radius);\n }\n for (let i = path.segments.length - 1; i >= 0; i--) {\n const segment = path.segments[i];\n context.bezierCurveTo(-segment.values[2].x * radius, segment.values[2].y * radius, -segment.values[1].x * radius, segment.values[1].y * radius, -segment.values[0].x * radius, segment.values[0].y * radius);\n }\n}\nconst n = 0.5;\nconst paths = {\n heart: {\n segments: [{\n values: [{\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: -n / 2\n }]\n }, {\n values: [{\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }]\n }, {\n values: [{\n x: n / 2,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n / 2\n }]\n }]\n },\n diamond: {\n segments: [{\n values: [{\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 3 * n / 4,\n y: 0\n }, {\n x: 3 * n / 4,\n y: 0\n }]\n }, {\n values: [{\n x: 3 * n / 4,\n y: 0\n }, {\n x: 3 * n / 4,\n y: 0\n }, {\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }]\n }]\n },\n club: {\n segments: [{\n values: [{\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }, {\n x: n / 2,\n y: -n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: -n / 2\n }, {\n x: n / 2,\n y: -n / 2\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: 0\n }]\n }, {\n values: [{\n x: n,\n y: 0\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 8\n }]\n }, {\n values: [{\n x: n / 8,\n y: n / 8\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }]\n }, {\n values: [{\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }]\n }]\n },\n spade: {\n segments: [{\n values: [{\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: 0\n }]\n }, {\n values: [{\n x: n,\n y: 0\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 8\n }]\n }, {\n values: [{\n x: n / 8,\n y: n / 8\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }]\n }, {\n values: [{\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }]\n }]\n }\n};\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/Utils.js?\n}");
|
|
27
|
+
|
|
28
|
+
/***/ },
|
|
29
|
+
|
|
30
|
+
/***/ "./dist/browser/hearts/HeartDrawer.js"
|
|
31
|
+
/*!********************************************!*\
|
|
32
|
+
!*** ./dist/browser/hearts/HeartDrawer.js ***!
|
|
33
|
+
\********************************************/
|
|
34
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35
|
+
|
|
36
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ HeartDrawer: () => (/* binding */ HeartDrawer)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils.js */ \"./dist/browser/Utils.js\");\n\nclass HeartDrawer {\n constructor() {\n this.validTypes = [\"heart\", \"hearts\"];\n }\n draw(data) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.drawPath)(data, _Utils_js__WEBPACK_IMPORTED_MODULE_0__.paths.heart);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/hearts/HeartDrawer.js?\n}");
|
|
37
|
+
|
|
38
|
+
/***/ }
|
|
39
|
+
|
|
40
|
+
}]);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v4.0.0-alpha.0
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_shape_cards"] = this["webpackChunk_tsparticles_shape_cards"] || []).push([["dist_browser_spades_SpadeDrawer_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "./dist/browser/Utils.js"
|
|
21
|
+
/*!*******************************!*\
|
|
22
|
+
!*** ./dist/browser/Utils.js ***!
|
|
23
|
+
\*******************************/
|
|
24
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
|
+
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ drawPath: () => (/* binding */ drawPath),\n/* harmony export */ paths: () => (/* binding */ paths)\n/* harmony export */ });\nfunction drawPath(data, path) {\n if (!path.segments.length || !path.segments[0].values.length) {\n return;\n }\n const {\n context,\n radius\n } = data;\n context.moveTo(path.segments[0].values[0].x * radius, path.segments[0].values[0].y * radius);\n for (const segment of path.segments) {\n context.bezierCurveTo(segment.values[1].x * radius, segment.values[1].y * radius, segment.values[2].x * radius, segment.values[2].y * radius, segment.values[3].x * radius, segment.values[3].y * radius);\n }\n for (let i = path.segments.length - 1; i >= 0; i--) {\n const segment = path.segments[i];\n context.bezierCurveTo(-segment.values[2].x * radius, segment.values[2].y * radius, -segment.values[1].x * radius, segment.values[1].y * radius, -segment.values[0].x * radius, segment.values[0].y * radius);\n }\n}\nconst n = 0.5;\nconst paths = {\n heart: {\n segments: [{\n values: [{\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: -n / 2\n }]\n }, {\n values: [{\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }]\n }, {\n values: [{\n x: n / 2,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n / 2\n }]\n }]\n },\n diamond: {\n segments: [{\n values: [{\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 3 * n / 4,\n y: 0\n }, {\n x: 3 * n / 4,\n y: 0\n }]\n }, {\n values: [{\n x: 3 * n / 4,\n y: 0\n }, {\n x: 3 * n / 4,\n y: 0\n }, {\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }]\n }]\n },\n club: {\n segments: [{\n values: [{\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: n / 2,\n y: -n\n }, {\n x: n / 2,\n y: -n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: -n / 2\n }, {\n x: n / 2,\n y: -n / 2\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: 0\n }]\n }, {\n values: [{\n x: n,\n y: 0\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 8\n }]\n }, {\n values: [{\n x: n / 8,\n y: n / 8\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }]\n }, {\n values: [{\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }]\n }]\n },\n spade: {\n segments: [{\n values: [{\n x: 0,\n y: -n\n }, {\n x: 0,\n y: -n\n }, {\n x: n,\n y: -n / 2\n }, {\n x: n,\n y: 0\n }]\n }, {\n values: [{\n x: n,\n y: 0\n }, {\n x: n,\n y: 0\n }, {\n x: n,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }]\n }, {\n values: [{\n x: n / 2,\n y: n / 2\n }, {\n x: n / 2,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 8,\n y: n / 8\n }]\n }, {\n values: [{\n x: n / 8,\n y: n / 8\n }, {\n x: n / 8,\n y: n / 2\n }, {\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }]\n }, {\n values: [{\n x: n / 2,\n y: n\n }, {\n x: n / 2,\n y: n\n }, {\n x: 0,\n y: n\n }, {\n x: 0,\n y: n\n }]\n }]\n }\n};\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/Utils.js?\n}");
|
|
27
|
+
|
|
28
|
+
/***/ },
|
|
29
|
+
|
|
30
|
+
/***/ "./dist/browser/spades/SpadeDrawer.js"
|
|
31
|
+
/*!********************************************!*\
|
|
32
|
+
!*** ./dist/browser/spades/SpadeDrawer.js ***!
|
|
33
|
+
\********************************************/
|
|
34
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35
|
+
|
|
36
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ SpadeDrawer: () => (/* binding */ SpadeDrawer)\n/* harmony export */ });\n/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Utils.js */ \"./dist/browser/Utils.js\");\n\nclass SpadeDrawer {\n constructor() {\n this.validTypes = [\"spade\", \"spades\"];\n }\n draw(data) {\n (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__.drawPath)(data, _Utils_js__WEBPACK_IMPORTED_MODULE_0__.paths.spade);\n }\n}\n\n//# sourceURL=webpack://@tsparticles/shape-cards/./dist/browser/spades/SpadeDrawer.js?\n}");
|
|
37
|
+
|
|
38
|
+
/***/ }
|
|
39
|
+
|
|
40
|
+
}]);
|
package/esm/Utils.js
CHANGED
|
@@ -12,7 +12,7 @@ export function drawPath(data, path) {
|
|
|
12
12
|
context.bezierCurveTo(-segment.values[2].x * radius, segment.values[2].y * radius, -segment.values[1].x * radius, segment.values[1].y * radius, -segment.values[0].x * radius, segment.values[0].y * radius);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
const n =
|
|
15
|
+
const n = 0.5;
|
|
16
16
|
export const paths = {
|
|
17
17
|
heart: {
|
|
18
18
|
segments: [
|
package/esm/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
await engine.addShape(new ClubDrawer(), refresh);
|
|
1
|
+
export function loadCardsShape(engine) {
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.0");
|
|
3
|
+
engine.register(async (e) => {
|
|
4
|
+
const { loadClubsCardsShape } = await import("./clubs/index.js"), { loadDiamondsCardsShape } = await import("./diamonds/index.js"), { loadHeartsCardsShape } = await import("./hearts/index.js"), { loadSpadesCardsShape } = await import("./spades/index.js");
|
|
5
|
+
loadClubsCardsShape(e);
|
|
6
|
+
loadDiamondsCardsShape(e);
|
|
7
|
+
loadHeartsCardsShape(e);
|
|
8
|
+
loadSpadesCardsShape(e);
|
|
9
|
+
});
|
|
11
10
|
}
|
|
11
|
+
export * from "./clubs/index.js";
|
|
12
|
+
export * from "./diamonds/index.js";
|
|
13
|
+
export * from "./hearts/index.js";
|
|
14
|
+
export * from "./spades/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/shape-cards",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.0",
|
|
4
4
|
"description": "tsParticles cards shape",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -100,9 +100,10 @@
|
|
|
100
100
|
"./package.json": "./package.json"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@tsparticles/engine": "
|
|
103
|
+
"@tsparticles/engine": "4.0.0-alpha.0"
|
|
104
104
|
},
|
|
105
105
|
"publishConfig": {
|
|
106
106
|
"access": "public"
|
|
107
|
-
}
|
|
107
|
+
},
|
|
108
|
+
"type": "module"
|
|
108
109
|
}
|