@tsparticles/shape-rounded-rect 3.0.0-beta.1 → 3.0.0-beta.3

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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![npmjs](https://badge.fury.io/js/@tsparticles/shape-rounded-rect.svg)](https://www.npmjs.com/package/@tsparticles/shape-rounded-rect)
7
7
  [![npmjs](https://img.shields.io/npm/dt/@tsparticles/shape-rounded-rect)](https://www.npmjs.com/package/@tsparticles/shape-rounded-rect) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
8
8
 
9
- [tsParticles](https://github.com/matteobruni/tsparticles) additional rounded rectangle shape.
9
+ [tsParticles](https://github.com/tsparticles/tsparticles) additional rounded rectangle shape.
10
10
 
11
11
  ## How to use it
12
12
 
@@ -17,8 +17,8 @@ const fixFactor = Math.sqrt(2), drawRoundedRect = (ctx, info, radius = {
17
17
  ctx.quadraticCurveTo(x, y, x + radius.topLeft, y);
18
18
  };
19
19
  export class RoundedRectDrawer {
20
- draw(context, particle, radius) {
21
- const fixedRadius = radius / fixFactor, fixedDiameter = fixedRadius * 2, borderRadius = particle.borderRadius ?? 5;
20
+ draw(data) {
21
+ const { context, particle, radius } = data, fixedRadius = radius / fixFactor, fixedDiameter = fixedRadius * 2, borderRadius = particle.borderRadius ?? 5;
22
22
  if ("roundRect" in context) {
23
23
  context.roundRect(-fixedRadius, -fixedRadius, fixedDiameter, fixedDiameter, borderRadius);
24
24
  }
@@ -20,8 +20,8 @@ const fixFactor = Math.sqrt(2), drawRoundedRect = (ctx, info, radius = {
20
20
  ctx.quadraticCurveTo(x, y, x + radius.topLeft, y);
21
21
  };
22
22
  class RoundedRectDrawer {
23
- draw(context, particle, radius) {
24
- const fixedRadius = radius / fixFactor, fixedDiameter = fixedRadius * 2, borderRadius = particle.borderRadius ?? 5;
23
+ draw(data) {
24
+ const { context, particle, radius } = data, fixedRadius = radius / fixFactor, fixedDiameter = fixedRadius * 2, borderRadius = particle.borderRadius ?? 5;
25
25
  if ("roundRect" in context) {
26
26
  context.roundRect(-fixedRadius, -fixedRadius, fixedDiameter, fixedDiameter, borderRadius);
27
27
  }
@@ -17,8 +17,8 @@ const fixFactor = Math.sqrt(2), drawRoundedRect = (ctx, info, radius = {
17
17
  ctx.quadraticCurveTo(x, y, x + radius.topLeft, y);
18
18
  };
19
19
  export class RoundedRectDrawer {
20
- draw(context, particle, radius) {
21
- const fixedRadius = radius / fixFactor, fixedDiameter = fixedRadius * 2, borderRadius = particle.borderRadius ?? 5;
20
+ draw(data) {
21
+ const { context, particle, radius } = data, fixedRadius = radius / fixFactor, fixedDiameter = fixedRadius * 2, borderRadius = particle.borderRadius ?? 5;
22
22
  if ("roundRect" in context) {
23
23
  context.roundRect(-fixedRadius, -fixedRadius, fixedDiameter, fixedDiameter, borderRadius);
24
24
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tsparticles/shape-rounded-rect",
3
- "version": "3.0.0-beta.1",
3
+ "version": "3.0.0-beta.3",
4
4
  "description": "tsParticles rounded rect shape",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/matteobruni/tsparticles.git",
8
+ "url": "git+https://github.com/tsparticles/tsparticles.git",
9
9
  "directory": "shapes/rounded-rect"
10
10
  },
11
11
  "keywords": [
@@ -65,7 +65,7 @@
65
65
  "author": "Matteo Bruni <matteo.bruni@me.com>",
66
66
  "license": "MIT",
67
67
  "bugs": {
68
- "url": "https://github.com/matteobruni/tsparticles/issues"
68
+ "url": "https://github.com/tsparticles/tsparticles/issues"
69
69
  },
70
70
  "funding": [
71
71
  {
@@ -100,7 +100,7 @@
100
100
  "./package.json": "./package.json"
101
101
  },
102
102
  "dependencies": {
103
- "@tsparticles/engine": "^3.0.0-beta.1"
103
+ "@tsparticles/engine": "^3.0.0-beta.3"
104
104
  },
105
105
  "publishConfig": {
106
106
  "access": "public"