@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.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![npmjs](https://badge.fury.io/js/@tsparticles/shape-polygon.svg)](https://www.npmjs.com/package/@tsparticles/shape-polygon)
7
7
  [![npmjs](https://img.shields.io/npm/dt/@tsparticles/shape-polygon)](https://www.npmjs.com/package/@tsparticles/shape-polygon) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
8
8
 
9
- [tsParticles](https://github.com/matteobruni/tsparticles) additional polygon shape.
9
+ [tsParticles](https://github.com/tsparticles/tsparticles) additional polygon shape.
10
10
 
11
11
  ## How to use it
12
12
 
@@ -1,4 +1,4 @@
1
- import { PolygonDrawerBase } from "./PolygonDrawerBase";
1
+ import { PolygonDrawerBase } from "./PolygonDrawerBase.js";
2
2
  export class PolygonDrawer extends PolygonDrawerBase {
3
3
  getCenter(particle, radius) {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { PolygonDrawerBase } from "./PolygonDrawerBase";
1
+ import { PolygonDrawerBase } from "./PolygonDrawerBase.js";
2
2
  export class TriangleDrawer extends PolygonDrawerBase {
3
3
  getCenter(particle, radius) {
4
4
  return {
package/browser/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { PolygonDrawer } from "./PolygonDrawer";
2
- import { TriangleDrawer } from "./TriangleDrawer";
1
+ import { PolygonDrawer } from "./PolygonDrawer.js";
2
+ import { TriangleDrawer } from "./TriangleDrawer.js";
3
3
  export async function loadGenericPolygonShape(engine, refresh = true) {
4
4
  await engine.addShape("polygon", new PolygonDrawer(), refresh);
5
5
  }
@@ -0,0 +1 @@
1
+ { "type": "module" }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PolygonDrawer = void 0;
4
- const PolygonDrawerBase_1 = require("./PolygonDrawerBase");
5
- class PolygonDrawer extends PolygonDrawerBase_1.PolygonDrawerBase {
4
+ const PolygonDrawerBase_js_1 = require("./PolygonDrawerBase.js");
5
+ class PolygonDrawer extends PolygonDrawerBase_js_1.PolygonDrawerBase {
6
6
  getCenter(particle, radius) {
7
7
  return {
8
8
  x: -radius / (particle.sides / 3.5),
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TriangleDrawer = void 0;
4
- const PolygonDrawerBase_1 = require("./PolygonDrawerBase");
5
- class TriangleDrawer extends PolygonDrawerBase_1.PolygonDrawerBase {
4
+ const PolygonDrawerBase_js_1 = require("./PolygonDrawerBase.js");
5
+ class TriangleDrawer extends PolygonDrawerBase_js_1.PolygonDrawerBase {
6
6
  getCenter(particle, radius) {
7
7
  return {
8
8
  x: -radius,
package/cjs/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadPolygonShape = exports.loadTriangleShape = exports.loadGenericPolygonShape = void 0;
4
- const PolygonDrawer_1 = require("./PolygonDrawer");
5
- const TriangleDrawer_1 = require("./TriangleDrawer");
4
+ const PolygonDrawer_js_1 = require("./PolygonDrawer.js");
5
+ const TriangleDrawer_js_1 = require("./TriangleDrawer.js");
6
6
  async function loadGenericPolygonShape(engine, refresh = true) {
7
- await engine.addShape("polygon", new PolygonDrawer_1.PolygonDrawer(), refresh);
7
+ await engine.addShape("polygon", new PolygonDrawer_js_1.PolygonDrawer(), refresh);
8
8
  }
9
9
  exports.loadGenericPolygonShape = loadGenericPolygonShape;
10
10
  async function loadTriangleShape(engine, refresh = true) {
11
- await engine.addShape("triangle", new TriangleDrawer_1.TriangleDrawer(), refresh);
11
+ await engine.addShape("triangle", new TriangleDrawer_js_1.TriangleDrawer(), refresh);
12
12
  }
13
13
  exports.loadTriangleShape = loadTriangleShape;
14
14
  async function loadPolygonShape(engine, refresh = true) {
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -1,4 +1,4 @@
1
- import { PolygonDrawerBase } from "./PolygonDrawerBase";
1
+ import { PolygonDrawerBase } from "./PolygonDrawerBase.js";
2
2
  export class PolygonDrawer extends PolygonDrawerBase {
3
3
  getCenter(particle, radius) {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { PolygonDrawerBase } from "./PolygonDrawerBase";
1
+ import { PolygonDrawerBase } from "./PolygonDrawerBase.js";
2
2
  export class TriangleDrawer extends PolygonDrawerBase {
3
3
  getCenter(particle, radius) {
4
4
  return {
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { PolygonDrawer } from "./PolygonDrawer";
2
- import { TriangleDrawer } from "./TriangleDrawer";
1
+ import { PolygonDrawer } from "./PolygonDrawer.js";
2
+ import { TriangleDrawer } from "./TriangleDrawer.js";
3
3
  export async function loadGenericPolygonShape(engine, refresh = true) {
4
4
  await engine.addShape("polygon", new PolygonDrawer(), refresh);
5
5
  }
@@ -0,0 +1 @@
1
+ { "type": "module" }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@tsparticles/shape-polygon",
3
- "version": "3.0.0-beta.0",
3
+ "version": "3.0.0-beta.2",
4
4
  "description": "tsParticles polygon 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/polygon"
10
10
  },
11
11
  "keywords": [
@@ -38,16 +38,28 @@
38
38
  "author": "Matteo Bruni <matteo.bruni@me.com>",
39
39
  "license": "MIT",
40
40
  "bugs": {
41
- "url": "https://github.com/matteobruni/tsparticles/issues"
41
+ "url": "https://github.com/tsparticles/tsparticles/issues"
42
42
  },
43
- "main": "cjs/index.js",
43
+ "sideEffects": false,
44
44
  "jsdelivr": "tsparticles.shape.polygon.min.js",
45
45
  "unpkg": "tsparticles.shape.polygon.min.js",
46
+ "browser": "browser/index.js",
47
+ "main": "cjs/index.js",
46
48
  "module": "esm/index.js",
47
49
  "types": "types/index.d.ts",
48
- "sideEffects": false,
50
+ "exports": {
51
+ ".": {
52
+ "types": "./types/index.d.ts",
53
+ "browser": "./browser/index.js",
54
+ "import": "./esm/index.js",
55
+ "require": "./cjs/index.js",
56
+ "umd": "./umd/index.js",
57
+ "default": "./cjs/index.js"
58
+ },
59
+ "./package.json": "./package.json"
60
+ },
49
61
  "dependencies": {
50
- "@tsparticles/engine": "^3.0.0-beta.0"
62
+ "@tsparticles/engine": "^3.0.0-beta.2"
51
63
  },
52
64
  "publishConfig": {
53
65
  "access": "public"