@tsparticles/shape-cards
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
import { drawPath, paths } from "./Utils"; | ||
import { drawPath, paths } from "./Utils.js"; | ||
export class SpadeDrawer { | ||
@@ -3,0 +3,0 @@ draw(context, _particle, radius) { |
@@ -1,2 +0,2 @@ | ||
import { ClubDrawer, DiamondDrawer, HeartDrawer, SpadeDrawer } from "./CardsSuitsDrawers"; | ||
import { ClubDrawer, DiamondDrawer, HeartDrawer, SpadeDrawer } from "./CardsSuitsDrawers.js"; | ||
export async function loadCardsShape(engine, refresh = true) { | ||
@@ -3,0 +3,0 @@ await engine.addShape(["spade", "spades"], new SpadeDrawer(), refresh); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ClubDrawer = exports.DiamondDrawer = exports.HeartDrawer = exports.SpadeDrawer = void 0; | ||
const Utils_1 = require("./Utils"); | ||
const Utils_js_1 = require("./Utils.js"); | ||
class SpadeDrawer { | ||
draw(context, _particle, radius) { | ||
(0, Utils_1.drawPath)(context, radius, Utils_1.paths.spade); | ||
(0, Utils_js_1.drawPath)(context, radius, Utils_js_1.paths.spade); | ||
} | ||
@@ -13,3 +13,3 @@ } | ||
draw(context, _particle, radius) { | ||
(0, Utils_1.drawPath)(context, radius, Utils_1.paths.heart); | ||
(0, Utils_js_1.drawPath)(context, radius, Utils_js_1.paths.heart); | ||
} | ||
@@ -20,3 +20,3 @@ } | ||
draw(context, _particle, radius) { | ||
(0, Utils_1.drawPath)(context, radius, Utils_1.paths.diamond); | ||
(0, Utils_js_1.drawPath)(context, radius, Utils_js_1.paths.diamond); | ||
} | ||
@@ -27,5 +27,5 @@ } | ||
draw(context, _particle, radius) { | ||
(0, Utils_1.drawPath)(context, radius, Utils_1.paths.club); | ||
(0, Utils_js_1.drawPath)(context, radius, Utils_js_1.paths.club); | ||
} | ||
} | ||
exports.ClubDrawer = ClubDrawer; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadCardsShape = void 0; | ||
const CardsSuitsDrawers_1 = require("./CardsSuitsDrawers"); | ||
const CardsSuitsDrawers_js_1 = require("./CardsSuitsDrawers.js"); | ||
async function loadCardsShape(engine, refresh = true) { | ||
await engine.addShape(["spade", "spades"], new CardsSuitsDrawers_1.SpadeDrawer(), refresh); | ||
await engine.addShape(["heart", "hearts"], new CardsSuitsDrawers_1.HeartDrawer(), refresh); | ||
await engine.addShape(["diamond", "diamonds"], new CardsSuitsDrawers_1.DiamondDrawer(), refresh); | ||
await engine.addShape(["club", "clubs"], new CardsSuitsDrawers_1.ClubDrawer(), refresh); | ||
await engine.addShape(["spade", "spades"], new CardsSuitsDrawers_js_1.SpadeDrawer(), refresh); | ||
await engine.addShape(["heart", "hearts"], new CardsSuitsDrawers_js_1.HeartDrawer(), refresh); | ||
await engine.addShape(["diamond", "diamonds"], new CardsSuitsDrawers_js_1.DiamondDrawer(), refresh); | ||
await engine.addShape(["club", "clubs"], new CardsSuitsDrawers_js_1.ClubDrawer(), refresh); | ||
} | ||
exports.loadCardsShape = loadCardsShape; |
@@ -1,2 +0,2 @@ | ||
import { drawPath, paths } from "./Utils"; | ||
import { drawPath, paths } from "./Utils.js"; | ||
export class SpadeDrawer { | ||
@@ -3,0 +3,0 @@ draw(context, _particle, radius) { |
@@ -1,2 +0,2 @@ | ||
import { ClubDrawer, DiamondDrawer, HeartDrawer, SpadeDrawer } from "./CardsSuitsDrawers"; | ||
import { ClubDrawer, DiamondDrawer, HeartDrawer, SpadeDrawer } from "./CardsSuitsDrawers.js"; | ||
export async function loadCardsShape(engine, refresh = true) { | ||
@@ -3,0 +3,0 @@ await engine.addShape(["spade", "spades"], new SpadeDrawer(), refresh); |
{ | ||
"name": "@tsparticles/shape-cards", | ||
"version": "3.0.0-beta.0", | ||
"version": "3.0.0-beta.1", | ||
"description": "tsParticles cards shape", | ||
@@ -84,10 +84,22 @@ "homepage": "https://particles.js.org", | ||
], | ||
"main": "cjs/index.js", | ||
"sideEffects": false, | ||
"jsdelivr": "tsparticles.shape.cards.min.js", | ||
"unpkg": "tsparticles.shape.cards.min.js", | ||
"browser": "browser/index.js", | ||
"main": "cjs/index.js", | ||
"module": "esm/index.js", | ||
"types": "types/index.d.ts", | ||
"sideEffects": false, | ||
"exports": { | ||
".": { | ||
"types": "./types/index.d.ts", | ||
"browser": "./browser/index.js", | ||
"import": "./esm/index.js", | ||
"require": "./cjs/index.js", | ||
"umd": "./umd/index.js", | ||
"default": "./cjs/index.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"dependencies": { | ||
"@tsparticles/engine": "^3.0.0-beta.0" | ||
"@tsparticles/engine": "^3.0.0-beta.1" | ||
}, | ||
@@ -94,0 +106,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v3.0.0-beta.0 | ||
* v3.0.0-beta.1 | ||
*/ | ||
@@ -10,0 +10,0 @@ (function webpackUniversalModuleDefinition(root, factory) { |
@@ -1,1 +0,1 @@ | ||
/*! tsParticles Cards Shape v3.0.0-beta.0 by Matteo Bruni */ | ||
/*! tsParticles Cards Shape v3.0.0-beta.1 by Matteo Bruni */ |
@@ -1,3 +0,3 @@ | ||
import type { ICardsPath, IPath } from "./ICardsPath"; | ||
import type { ICardsPath, IPath } from "./ICardsPath.js"; | ||
export declare function drawPath(ctx: CanvasRenderingContext2D, radius: number, path: IPath): void; | ||
export declare const paths: ICardsPath; |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "./Utils"], factory); | ||
define(["require", "exports", "./Utils.js"], factory); | ||
} | ||
@@ -14,6 +14,6 @@ })(function (require, exports) { | ||
exports.ClubDrawer = exports.DiamondDrawer = exports.HeartDrawer = exports.SpadeDrawer = void 0; | ||
const Utils_1 = require("./Utils"); | ||
const Utils_js_1 = require("./Utils.js"); | ||
class SpadeDrawer { | ||
draw(context, _particle, radius) { | ||
(0, Utils_1.drawPath)(context, radius, Utils_1.paths.spade); | ||
(0, Utils_js_1.drawPath)(context, radius, Utils_js_1.paths.spade); | ||
} | ||
@@ -24,3 +24,3 @@ } | ||
draw(context, _particle, radius) { | ||
(0, Utils_1.drawPath)(context, radius, Utils_1.paths.heart); | ||
(0, Utils_js_1.drawPath)(context, radius, Utils_js_1.paths.heart); | ||
} | ||
@@ -31,3 +31,3 @@ } | ||
draw(context, _particle, radius) { | ||
(0, Utils_1.drawPath)(context, radius, Utils_1.paths.diamond); | ||
(0, Utils_js_1.drawPath)(context, radius, Utils_js_1.paths.diamond); | ||
} | ||
@@ -38,3 +38,3 @@ } | ||
draw(context, _particle, radius) { | ||
(0, Utils_1.drawPath)(context, radius, Utils_1.paths.club); | ||
(0, Utils_js_1.drawPath)(context, radius, Utils_js_1.paths.club); | ||
} | ||
@@ -41,0 +41,0 @@ } |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "./CardsSuitsDrawers"], factory); | ||
define(["require", "exports", "./CardsSuitsDrawers.js"], factory); | ||
} | ||
@@ -14,10 +14,10 @@ })(function (require, exports) { | ||
exports.loadCardsShape = void 0; | ||
const CardsSuitsDrawers_1 = require("./CardsSuitsDrawers"); | ||
const CardsSuitsDrawers_js_1 = require("./CardsSuitsDrawers.js"); | ||
async function loadCardsShape(engine, refresh = true) { | ||
await engine.addShape(["spade", "spades"], new CardsSuitsDrawers_1.SpadeDrawer(), refresh); | ||
await engine.addShape(["heart", "hearts"], new CardsSuitsDrawers_1.HeartDrawer(), refresh); | ||
await engine.addShape(["diamond", "diamonds"], new CardsSuitsDrawers_1.DiamondDrawer(), refresh); | ||
await engine.addShape(["club", "clubs"], new CardsSuitsDrawers_1.ClubDrawer(), refresh); | ||
await engine.addShape(["spade", "spades"], new CardsSuitsDrawers_js_1.SpadeDrawer(), refresh); | ||
await engine.addShape(["heart", "hearts"], new CardsSuitsDrawers_js_1.HeartDrawer(), refresh); | ||
await engine.addShape(["diamond", "diamonds"], new CardsSuitsDrawers_js_1.DiamondDrawer(), refresh); | ||
await engine.addShape(["club", "clubs"], new CardsSuitsDrawers_js_1.ClubDrawer(), refresh); | ||
} | ||
exports.loadCardsShape = loadCardsShape; | ||
}); |
Sorry, the diff of this file is not supported yet
323418
0.15%30
11.11%