@tsparticles/shape-path 3.0.0-alpha.0 → 3.0.0-beta.0

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
@@ -2,9 +2,9 @@
2
2
 
3
3
  # tsParticles Path Shape
4
4
 
5
- [![jsDelivr](https://data.jsdelivr.com/v1/package/npm/tsparticles-shape-path/badge)](https://www.jsdelivr.com/package/npm/tsparticles-shape-path)
6
- [![npmjs](https://badge.fury.io/js/tsparticles-shape-path.svg)](https://www.npmjs.com/package/tsparticles-shape-path)
7
- [![npmjs](https://img.shields.io/npm/dt/tsparticles-shape-path)](https://www.npmjs.com/package/tsparticles-shape-path) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
5
+ [![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/shape-path/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/shape-path)
6
+ [![npmjs](https://badge.fury.io/js/@tsparticles/shape-path.svg)](https://www.npmjs.com/package/@tsparticles/shape-path)
7
+ [![npmjs](https://img.shields.io/npm/dt/@tsparticles/shape-path)](https://www.npmjs.com/package/@tsparticles/shape-path) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
8
8
 
9
9
  [tsParticles](https://github.com/matteobruni/tsparticles) additional path shape.
10
10
 
@@ -26,7 +26,7 @@ Once the scripts are loaded you can set up `tsParticles` and the shape like this
26
26
 
27
27
  ```javascript
28
28
  (async () => {
29
- await loadPathShape();
29
+ await loadPathShape(tsParticles);
30
30
 
31
31
  await tsParticles.load({
32
32
  id: "tsparticles",
@@ -43,29 +43,33 @@ Once the scripts are loaded you can set up `tsParticles` and the shape like this
43
43
  This package is compatible also with ES or CommonJS modules, firstly this needs to be installed, like this:
44
44
 
45
45
  ```shell
46
- $ npm install tsparticles-shape-path
46
+ $ npm install @tsparticles/shape-path
47
47
  ```
48
48
 
49
49
  or
50
50
 
51
51
  ```shell
52
- $ yarn add tsparticles-shape-path
52
+ $ yarn add @tsparticles/shape-path
53
53
  ```
54
54
 
55
55
  Then you need to import it in the app, like this:
56
56
 
57
57
  ```javascript
58
- const { tsParticles } = require("tsparticles-engine");
59
- const { loadPathShape } = require("tsparticles-shape-path");
58
+ const { tsParticles } = require("@tsparticles/engine");
59
+ const { loadPathShape } = require("@tsparticles/shape-path");
60
60
 
61
- loadPathShape(tsParticles);
61
+ (async () => {
62
+ await loadPathShape(tsParticles);
63
+ })();
62
64
  ```
63
65
 
64
66
  or
65
67
 
66
68
  ```javascript
67
- import { tsParticles } from "tsparticles-engine";
68
- import { loadPathShape } from "tsparticles-shape-path";
69
+ import { tsParticles } from "@tsparticles/engine";
70
+ import { loadPathShape } from "@tsparticles/shape-path";
69
71
 
70
- loadPathShape(tsParticles);
72
+ (async () => {
73
+ await loadPathShape(tsParticles);
74
+ })();
71
75
  ```
package/browser/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { PathDrawer } from "./PathDrawer";
2
- export async function loadPathShape(engine) {
3
- await engine.addShape("path", new PathDrawer());
2
+ export async function loadPathShape(engine, refresh = true) {
3
+ await engine.addShape("path", new PathDrawer(), refresh);
4
4
  }
package/cjs/index.js CHANGED
@@ -1,19 +1,8 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.loadPathShape = void 0;
13
4
  const PathDrawer_1 = require("./PathDrawer");
14
- function loadPathShape(engine) {
15
- return __awaiter(this, void 0, void 0, function* () {
16
- yield engine.addShape("path", new PathDrawer_1.PathDrawer());
17
- });
5
+ async function loadPathShape(engine, refresh = true) {
6
+ await engine.addShape("path", new PathDrawer_1.PathDrawer(), refresh);
18
7
  }
19
8
  exports.loadPathShape = loadPathShape;
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { PathDrawer } from "./PathDrawer";
2
- export async function loadPathShape(engine) {
3
- await engine.addShape("path", new PathDrawer());
2
+ export async function loadPathShape(engine, refresh = true) {
3
+ await engine.addShape("path", new PathDrawer(), refresh);
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/shape-path",
3
- "version": "3.0.0-alpha.0",
3
+ "version": "3.0.0-beta.0",
4
4
  "description": "tsParticles path shape",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -72,6 +72,10 @@
72
72
  "type": "github",
73
73
  "url": "https://github.com/sponsors/matteobruni"
74
74
  },
75
+ {
76
+ "type": "github",
77
+ "url": "https://github.com/sponsors/tsparticles"
78
+ },
75
79
  {
76
80
  "type": "buymeacoffee",
77
81
  "url": "https://www.buymeacoffee.com/matteobruni"
@@ -82,10 +86,11 @@
82
86
  "unpkg": "tsparticles.shape.path.min.js",
83
87
  "module": "esm/index.js",
84
88
  "types": "types/index.d.ts",
89
+ "sideEffects": false,
90
+ "dependencies": {
91
+ "@tsparticles/engine": "^3.0.0-beta.0"
92
+ },
85
93
  "publishConfig": {
86
94
  "access": "public"
87
- },
88
- "dependencies": {
89
- "@tsparticles/engine": "^3.0.0-alpha.0"
90
95
  }
91
- }
96
+ }