@tsparticles/shape-polygon 3.0.0-beta.2 → 3.0.0-beta.4
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/PolygonDrawerBase.js +3 -3
- package/cjs/PolygonDrawerBase.js +2 -2
- package/esm/PolygonDrawerBase.js +3 -3
- package/package.json +3 -3
- package/report.html +4 -22
- package/tsparticles.shape.polygon.js +8 -3
- package/tsparticles.shape.polygon.min.js +1 -1
- package/tsparticles.shape.polygon.min.js.LICENSE.txt +1 -1
- package/types/PolygonDrawerBase.d.ts +2 -2
- package/umd/PolygonDrawerBase.js +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getRangeValue } from "@tsparticles/engine";
|
|
1
|
+
import { getRangeValue, } from "@tsparticles/engine";
|
|
2
2
|
export class PolygonDrawerBase {
|
|
3
|
-
draw(
|
|
4
|
-
const start = this.getCenter(particle, radius), side = this.getSidesData(particle, radius), sideCount = side.count.numerator * side.count.denominator, decimalSides = side.count.numerator / side.count.denominator, interiorAngleDegrees = (180 * (decimalSides - 2)) / decimalSides, interiorAngle = Math.PI - (Math.PI * interiorAngleDegrees) / 180;
|
|
3
|
+
draw(data) {
|
|
4
|
+
const { context, particle, radius } = data, start = this.getCenter(particle, radius), side = this.getSidesData(particle, radius), sideCount = side.count.numerator * side.count.denominator, decimalSides = side.count.numerator / side.count.denominator, interiorAngleDegrees = (180 * (decimalSides - 2)) / decimalSides, interiorAngle = Math.PI - (Math.PI * interiorAngleDegrees) / 180;
|
|
5
5
|
if (!context) {
|
|
6
6
|
return;
|
|
7
7
|
}
|
package/cjs/PolygonDrawerBase.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PolygonDrawerBase = void 0;
|
|
4
4
|
const engine_1 = require("@tsparticles/engine");
|
|
5
5
|
class PolygonDrawerBase {
|
|
6
|
-
draw(
|
|
7
|
-
const start = this.getCenter(particle, radius), side = this.getSidesData(particle, radius), sideCount = side.count.numerator * side.count.denominator, decimalSides = side.count.numerator / side.count.denominator, interiorAngleDegrees = (180 * (decimalSides - 2)) / decimalSides, interiorAngle = Math.PI - (Math.PI * interiorAngleDegrees) / 180;
|
|
6
|
+
draw(data) {
|
|
7
|
+
const { context, particle, radius } = data, start = this.getCenter(particle, radius), side = this.getSidesData(particle, radius), sideCount = side.count.numerator * side.count.denominator, decimalSides = side.count.numerator / side.count.denominator, interiorAngleDegrees = (180 * (decimalSides - 2)) / decimalSides, interiorAngle = Math.PI - (Math.PI * interiorAngleDegrees) / 180;
|
|
8
8
|
if (!context) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
package/esm/PolygonDrawerBase.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getRangeValue } from "@tsparticles/engine";
|
|
1
|
+
import { getRangeValue, } from "@tsparticles/engine";
|
|
2
2
|
export class PolygonDrawerBase {
|
|
3
|
-
draw(
|
|
4
|
-
const start = this.getCenter(particle, radius), side = this.getSidesData(particle, radius), sideCount = side.count.numerator * side.count.denominator, decimalSides = side.count.numerator / side.count.denominator, interiorAngleDegrees = (180 * (decimalSides - 2)) / decimalSides, interiorAngle = Math.PI - (Math.PI * interiorAngleDegrees) / 180;
|
|
3
|
+
draw(data) {
|
|
4
|
+
const { context, particle, radius } = data, start = this.getCenter(particle, radius), side = this.getSidesData(particle, radius), sideCount = side.count.numerator * side.count.denominator, decimalSides = side.count.numerator / side.count.denominator, interiorAngleDegrees = (180 * (decimalSides - 2)) / decimalSides, interiorAngle = Math.PI - (Math.PI * interiorAngleDegrees) / 180;
|
|
5
5
|
if (!context) {
|
|
6
6
|
return;
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/shape-polygon",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.4",
|
|
4
4
|
"description": "tsParticles polygon shape",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"css3",
|
|
34
34
|
"animated",
|
|
35
35
|
"background",
|
|
36
|
-
"
|
|
36
|
+
"tsparticles-shape"
|
|
37
37
|
],
|
|
38
38
|
"author": "Matteo Bruni <matteo.bruni@me.com>",
|
|
39
39
|
"license": "MIT",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"./package.json": "./package.json"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@tsparticles/engine": "^3.0.0-beta.
|
|
62
|
+
"@tsparticles/engine": "^3.0.0-beta.4"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|