@tsparticles/shape-rounded-polygon 4.0.0-beta.12 → 4.0.0-beta.15

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.
@@ -1,4 +1,4 @@
1
- import { getRangeValue, } from "@tsparticles/engine";
1
+ import { getRangeValue } from "@tsparticles/engine";
2
2
  import { polygon, roundedPath } from "./Utils.js";
3
3
  const defaultSides = 5, defaultRadius = 5;
4
4
  export class RoundedPolygonDrawer {
@@ -0,0 +1,5 @@
1
+ import { loadRoundedPolygonShape } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadRoundedPolygonShape = loadRoundedPolygonShape;
5
+ export * from "./index.js";
package/browser/index.js CHANGED
@@ -1,9 +1,7 @@
1
+ import { RoundedPolygonDrawer } from "./RoundedPolygonDrawer.js";
1
2
  export async function loadRoundedPolygonShape(engine) {
2
- engine.checkVersion("4.0.0-beta.12");
3
+ engine.checkVersion("4.0.0-beta.15");
3
4
  await engine.pluginManager.register(e => {
4
- e.pluginManager.addShape(["rounded-polygon"], async () => {
5
- const { RoundedPolygonDrawer } = await import("./RoundedPolygonDrawer.js");
6
- return new RoundedPolygonDrawer();
7
- });
5
+ e.pluginManager.addShape(["rounded-polygon"], () => Promise.resolve(new RoundedPolygonDrawer()));
8
6
  });
9
7
  }
@@ -0,0 +1,7 @@
1
+ export async function loadRoundedPolygonShape(engine) {
2
+ engine.checkVersion("4.0.0-beta.15");
3
+ await engine.pluginManager.register(async (e) => {
4
+ const { RoundedPolygonDrawer } = await import("./RoundedPolygonDrawer.js");
5
+ e.pluginManager.addShape(["rounded-polygon"], () => Promise.resolve(new RoundedPolygonDrawer()));
6
+ });
7
+ }
@@ -1,4 +1,4 @@
1
- import { getRangeValue, } from "@tsparticles/engine";
1
+ import { getRangeValue } from "@tsparticles/engine";
2
2
  import { polygon, roundedPath } from "./Utils.js";
3
3
  const defaultSides = 5, defaultRadius = 5;
4
4
  export class RoundedPolygonDrawer {
package/cjs/browser.js ADDED
@@ -0,0 +1,5 @@
1
+ import { loadRoundedPolygonShape } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadRoundedPolygonShape = loadRoundedPolygonShape;
5
+ export * from "./index.js";
package/cjs/index.js CHANGED
@@ -1,9 +1,7 @@
1
+ import { RoundedPolygonDrawer } from "./RoundedPolygonDrawer.js";
1
2
  export async function loadRoundedPolygonShape(engine) {
2
- engine.checkVersion("4.0.0-beta.12");
3
+ engine.checkVersion("4.0.0-beta.15");
3
4
  await engine.pluginManager.register(e => {
4
- e.pluginManager.addShape(["rounded-polygon"], async () => {
5
- const { RoundedPolygonDrawer } = await import("./RoundedPolygonDrawer.js");
6
- return new RoundedPolygonDrawer();
7
- });
5
+ e.pluginManager.addShape(["rounded-polygon"], () => Promise.resolve(new RoundedPolygonDrawer()));
8
6
  });
9
7
  }
@@ -0,0 +1,7 @@
1
+ export async function loadRoundedPolygonShape(engine) {
2
+ engine.checkVersion("4.0.0-beta.15");
3
+ await engine.pluginManager.register(async (e) => {
4
+ const { RoundedPolygonDrawer } = await import("./RoundedPolygonDrawer.js");
5
+ e.pluginManager.addShape(["rounded-polygon"], () => Promise.resolve(new RoundedPolygonDrawer()));
6
+ });
7
+ }
@@ -1,4 +1,4 @@
1
- import { getRangeValue, } from "@tsparticles/engine";
1
+ import { getRangeValue } from "@tsparticles/engine";
2
2
  import { polygon, roundedPath } from "./Utils.js";
3
3
  const defaultSides = 5, defaultRadius = 5;
4
4
  export class RoundedPolygonDrawer {
package/esm/browser.js ADDED
@@ -0,0 +1,5 @@
1
+ import { loadRoundedPolygonShape } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadRoundedPolygonShape = loadRoundedPolygonShape;
5
+ export * from "./index.js";
package/esm/index.js CHANGED
@@ -1,9 +1,7 @@
1
+ import { RoundedPolygonDrawer } from "./RoundedPolygonDrawer.js";
1
2
  export async function loadRoundedPolygonShape(engine) {
2
- engine.checkVersion("4.0.0-beta.12");
3
+ engine.checkVersion("4.0.0-beta.15");
3
4
  await engine.pluginManager.register(e => {
4
- e.pluginManager.addShape(["rounded-polygon"], async () => {
5
- const { RoundedPolygonDrawer } = await import("./RoundedPolygonDrawer.js");
6
- return new RoundedPolygonDrawer();
7
- });
5
+ e.pluginManager.addShape(["rounded-polygon"], () => Promise.resolve(new RoundedPolygonDrawer()));
8
6
  });
9
7
  }
@@ -0,0 +1,7 @@
1
+ export async function loadRoundedPolygonShape(engine) {
2
+ engine.checkVersion("4.0.0-beta.15");
3
+ await engine.pluginManager.register(async (e) => {
4
+ const { RoundedPolygonDrawer } = await import("./RoundedPolygonDrawer.js");
5
+ e.pluginManager.addShape(["rounded-polygon"], () => Promise.resolve(new RoundedPolygonDrawer()));
6
+ });
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/shape-rounded-polygon",
3
- "version": "4.0.0-beta.12",
3
+ "version": "4.0.0-beta.15",
4
4
  "description": "tsParticles rounded polygon shape",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -55,10 +55,17 @@
55
55
  "require": "./cjs/index.js",
56
56
  "default": "./esm/index.js"
57
57
  },
58
+ "./lazy": {
59
+ "types": "./types/index.lazy.d.ts",
60
+ "browser": "./browser/index.lazy.js",
61
+ "import": "./esm/index.lazy.js",
62
+ "require": "./cjs/index.lazy.js",
63
+ "default": "./esm/index.lazy.js"
64
+ },
58
65
  "./package.json": "./package.json"
59
66
  },
60
67
  "peerDependencies": {
61
- "@tsparticles/engine": "4.0.0-beta.12"
68
+ "@tsparticles/engine": "4.0.0-beta.15"
62
69
  },
63
70
  "publishConfig": {
64
71
  "access": "public"