@tsparticles/shape-heart
Advanced tools
Comparing version 3.0.0-beta.2 to 3.0.0-beta.3
export class HeartDrawer { | ||
draw(context, _particle, radius) { | ||
draw(data) { | ||
const { context, radius } = data; | ||
const x = -radius, y = -radius; | ||
@@ -4,0 +5,0 @@ context.moveTo(x, y + radius / 2); |
@@ -5,3 +5,4 @@ "use strict"; | ||
class HeartDrawer { | ||
draw(context, _particle, radius) { | ||
draw(data) { | ||
const { context, radius } = data; | ||
const x = -radius, y = -radius; | ||
@@ -8,0 +9,0 @@ context.moveTo(x, y + radius / 2); |
export class HeartDrawer { | ||
draw(context, _particle, radius) { | ||
draw(data) { | ||
const { context, radius } = data; | ||
const x = -radius, y = -radius; | ||
@@ -4,0 +5,0 @@ context.moveTo(x, y + radius / 2); |
{ | ||
"name": "@tsparticles/shape-heart", | ||
"version": "3.0.0-beta.2", | ||
"version": "3.0.0-beta.3", | ||
"description": "tsParticles heart shape", | ||
@@ -103,3 +103,3 @@ "homepage": "https://particles.js.org", | ||
"dependencies": { | ||
"@tsparticles/engine": "^3.0.0-beta.2" | ||
"@tsparticles/engine": "^3.0.0-beta.3" | ||
}, | ||
@@ -106,0 +106,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v3.0.0-beta.2 | ||
* v3.0.0-beta.3 | ||
*/ | ||
@@ -66,3 +66,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
class HeartDrawer { | ||
draw(context, _particle, radius) { | ||
draw(data) { | ||
const { | ||
context, | ||
radius | ||
} = data; | ||
const x = -radius, | ||
@@ -69,0 +73,0 @@ y = -radius; |
/*! For license information please see tsparticles.shape.heart.min.js.LICENSE.txt */ | ||
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,(()=>(()=>{"use strict";var e={d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{loadHeartShape:()=>r});class t{draw(e,o,t){const r=-t,a=-t;e.moveTo(r,a+t/2),e.quadraticCurveTo(r,a,r+t/2,a),e.quadraticCurveTo(r+t,a,r+t,a+t/2),e.quadraticCurveTo(r+t,a,r+3*t/2,a),e.quadraticCurveTo(r+2*t,a,r+2*t,a+t/2),e.quadraticCurveTo(r+2*t,a+t,r+3*t/2,a+3*t/2),e.lineTo(r+t,a+2*t),e.lineTo(r+t/2,a+3*t/2),e.quadraticCurveTo(r,a+t,r,a+t/2)}}async function r(e,o=!0){await e.addShape("heart",new t,o)}return o})())); | ||
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,(()=>(()=>{"use strict";var e={d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{loadHeartShape:()=>r});class t{draw(e){const{context:o,radius:t}=e,r=-t,a=-t;o.moveTo(r,a+t/2),o.quadraticCurveTo(r,a,r+t/2,a),o.quadraticCurveTo(r+t,a,r+t,a+t/2),o.quadraticCurveTo(r+t,a,r+3*t/2,a),o.quadraticCurveTo(r+2*t,a,r+2*t,a+t/2),o.quadraticCurveTo(r+2*t,a+t,r+3*t/2,a+3*t/2),o.lineTo(r+t,a+2*t),o.lineTo(r+t/2,a+3*t/2),o.quadraticCurveTo(r,a+t,r,a+t/2)}}async function r(e,o=!0){await e.addShape("heart",new t,o)}return o})())); |
@@ -1,1 +0,1 @@ | ||
/*! tsParticles Heart Shape v3.0.0-beta.2 by Matteo Bruni */ | ||
/*! tsParticles Heart Shape v3.0.0-beta.3 by Matteo Bruni */ |
@@ -1,4 +0,4 @@ | ||
import type { IParticle, IShapeDrawer } from "@tsparticles/engine"; | ||
import type { IShapeDrawData, IShapeDrawer } from "@tsparticles/engine"; | ||
export declare class HeartDrawer implements IShapeDrawer { | ||
draw(context: CanvasRenderingContext2D, _particle: IParticle, radius: number): void; | ||
draw(data: IShapeDrawData): void; | ||
} |
@@ -14,3 +14,4 @@ (function (factory) { | ||
class HeartDrawer { | ||
draw(context, _particle, radius) { | ||
draw(data) { | ||
const { context, radius } = data; | ||
const x = -radius, y = -radius; | ||
@@ -17,0 +18,0 @@ context.moveTo(x, y + radius / 2); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
292589
206