@tsparticles/shape-polygon 3.0.0-beta.0 → 3.0.0-beta.2

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.
@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v3.0.0-beta.0
7
+ * v3.0.0-beta.2
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
@@ -1 +1 @@
1
- /*! tsParticles Polygon Shape v3.0.0-beta.0 by Matteo Bruni */
1
+ /*! tsParticles Polygon Shape v3.0.0-beta.2 by Matteo Bruni */
package/types/ISide.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ISideCount } from "./ISideCount";
1
+ import type { ISideCount } from "./ISideCount.js";
2
2
  export interface ISide {
3
3
  count: ISideCount;
4
4
  length: number;
@@ -1,6 +1,6 @@
1
1
  import type { ICoordinates, Particle } from "@tsparticles/engine";
2
- import type { ISide } from "./ISide";
3
- import { PolygonDrawerBase } from "./PolygonDrawerBase";
2
+ import type { ISide } from "./ISide.js";
3
+ import { PolygonDrawerBase } from "./PolygonDrawerBase.js";
4
4
  export declare class PolygonDrawer extends PolygonDrawerBase {
5
5
  getCenter(particle: Particle, radius: number): ICoordinates;
6
6
  getSidesData(particle: Particle, radius: number): ISide;
@@ -1,5 +1,5 @@
1
1
  import { type ICoordinates, type IShapeDrawer, type Particle } from "@tsparticles/engine";
2
- import type { ISide } from "./ISide";
2
+ import type { ISide } from "./ISide.js";
3
3
  export declare abstract class PolygonDrawerBase implements IShapeDrawer {
4
4
  draw(context: CanvasRenderingContext2D, particle: Particle, radius: number): void;
5
5
  getSidesCount(particle: Particle): number;
@@ -1,6 +1,6 @@
1
1
  import type { ICoordinates, Particle } from "@tsparticles/engine";
2
- import type { ISide } from "./ISide";
3
- import { PolygonDrawerBase } from "./PolygonDrawerBase";
2
+ import type { ISide } from "./ISide.js";
3
+ import { PolygonDrawerBase } from "./PolygonDrawerBase.js";
4
4
  export declare class TriangleDrawer extends PolygonDrawerBase {
5
5
  getCenter(particle: Particle, radius: number): ICoordinates;
6
6
  getSidesCount(): number;
@@ -4,14 +4,14 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "./PolygonDrawerBase"], factory);
7
+ define(["require", "exports", "./PolygonDrawerBase.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.PolygonDrawer = void 0;
13
- const PolygonDrawerBase_1 = require("./PolygonDrawerBase");
14
- class PolygonDrawer extends PolygonDrawerBase_1.PolygonDrawerBase {
13
+ const PolygonDrawerBase_js_1 = require("./PolygonDrawerBase.js");
14
+ class PolygonDrawer extends PolygonDrawerBase_js_1.PolygonDrawerBase {
15
15
  getCenter(particle, radius) {
16
16
  return {
17
17
  x: -radius / (particle.sides / 3.5),
@@ -4,14 +4,14 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "./PolygonDrawerBase"], factory);
7
+ define(["require", "exports", "./PolygonDrawerBase.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.TriangleDrawer = void 0;
13
- const PolygonDrawerBase_1 = require("./PolygonDrawerBase");
14
- class TriangleDrawer extends PolygonDrawerBase_1.PolygonDrawerBase {
13
+ const PolygonDrawerBase_js_1 = require("./PolygonDrawerBase.js");
14
+ class TriangleDrawer extends PolygonDrawerBase_js_1.PolygonDrawerBase {
15
15
  getCenter(particle, radius) {
16
16
  return {
17
17
  x: -radius,
package/umd/index.js CHANGED
@@ -4,20 +4,20 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "./PolygonDrawer", "./TriangleDrawer"], factory);
7
+ define(["require", "exports", "./PolygonDrawer.js", "./TriangleDrawer.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.loadPolygonShape = exports.loadTriangleShape = exports.loadGenericPolygonShape = void 0;
13
- const PolygonDrawer_1 = require("./PolygonDrawer");
14
- const TriangleDrawer_1 = require("./TriangleDrawer");
13
+ const PolygonDrawer_js_1 = require("./PolygonDrawer.js");
14
+ const TriangleDrawer_js_1 = require("./TriangleDrawer.js");
15
15
  async function loadGenericPolygonShape(engine, refresh = true) {
16
- await engine.addShape("polygon", new PolygonDrawer_1.PolygonDrawer(), refresh);
16
+ await engine.addShape("polygon", new PolygonDrawer_js_1.PolygonDrawer(), refresh);
17
17
  }
18
18
  exports.loadGenericPolygonShape = loadGenericPolygonShape;
19
19
  async function loadTriangleShape(engine, refresh = true) {
20
- await engine.addShape("triangle", new TriangleDrawer_1.TriangleDrawer(), refresh);
20
+ await engine.addShape("triangle", new TriangleDrawer_js_1.TriangleDrawer(), refresh);
21
21
  }
22
22
  exports.loadTriangleShape = loadTriangleShape;
23
23
  async function loadPolygonShape(engine, refresh = true) {