@tsparticles/preset-fireworks 3.0.0-alpha.1 → 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 +21 -32
- package/browser/bundle.js +1 -3
- package/browser/index.js +12 -22
- package/browser/options.js +3 -1
- package/browser/package.json +1 -0
- package/cjs/bundle.js +1 -12
- package/cjs/index.js +12 -33
- package/cjs/options.js +3 -1
- package/cjs/package.json +1 -0
- package/esm/bundle.js +1 -3
- package/esm/index.js +12 -22
- package/esm/options.js +3 -1
- package/esm/package.json +1 -0
- package/package.json +17 -21
- package/report.html +5 -5
- package/tsparticles.preset.fireworks.bundle.js +3560 -3650
- package/tsparticles.preset.fireworks.bundle.min.js +1 -1
- package/tsparticles.preset.fireworks.bundle.min.js.LICENSE.txt +1 -8
- package/tsparticles.preset.fireworks.js +29 -82
- package/tsparticles.preset.fireworks.min.js +1 -1
- package/tsparticles.preset.fireworks.min.js.LICENSE.txt +1 -8
- package/types/index.d.ts +1 -1
- package/types/options.d.ts +1 -1
- package/umd/bundle.js +1 -3
- package/umd/index.js +13 -23
- package/umd/options.js +3 -1
package/README.md
CHANGED
|
@@ -25,18 +25,19 @@ Once installed you need one more script to be included in your page (or you can
|
|
|
25
25
|
from [jsDelivr](https://www.jsdelivr.com/package/npm/@tsparticles/preset-fireworks):
|
|
26
26
|
|
|
27
27
|
```html
|
|
28
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
29
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
30
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
31
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
32
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
33
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
34
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
35
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
36
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
37
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
38
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
39
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
|
28
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/engine@2/tsparticles.engine.min.js"></script>
|
|
29
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/basic@2/tsparticles.basic.min.js"></script>
|
|
30
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/move-base@2/tsparticles.move.base.min.js"></script>
|
|
31
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/plugin-emitters@2/tsparticles.plugin.emitters.min.js"></script>
|
|
32
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/shape-circle@2/tsparticles.shape.circle.min.js"></script>
|
|
33
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/shape-line@2/tsparticles.shape.line.min.js"></script>
|
|
34
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-color@2/tsparticles.updater.color.min.js"></script>
|
|
35
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-life@2/tsparticles.updater.life.min.js"></script>
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-opacity@2/tsparticles.updater.opacity.min.js"></script>
|
|
37
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-out-modes@2/tsparticles.updater.out-modes.min.js"></script>
|
|
38
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-rotate@2/tsparticles.updater.angle.min.js"></script>
|
|
39
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-size@2/tsparticles.updater.size.min.js"></script>
|
|
40
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-stroke-color@2/tsparticles.updater.stroke-color.min.js"></script>
|
|
40
41
|
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/preset-fireworks@2/tsparticles.preset.fireworks.min.js"></script>
|
|
41
42
|
```
|
|
42
43
|
|
|
@@ -90,7 +91,7 @@ This sample uses the class component syntax, but you can use hooks as well (if t
|
|
|
90
91
|
|
|
91
92
|
```typescript jsx
|
|
92
93
|
import Particles from "react-particles";
|
|
93
|
-
import type { Engine } from "tsparticles
|
|
94
|
+
import type { Engine } from "@tsparticles/engine";
|
|
94
95
|
import { loadFireworksPreset } from "@tsparticles/preset-fireworks";
|
|
95
96
|
|
|
96
97
|
export class ParticlesContainer extends React.PureComponent<IProps> {
|
|
@@ -131,7 +132,7 @@ async function particlesInit(engine: Engine): Promise<void> {
|
|
|
131
132
|
### Angular
|
|
132
133
|
|
|
133
134
|
```html
|
|
134
|
-
<
|
|
135
|
+
<ng-particles [id]="id" [options]="particlesOptions" [particlesInit]="particlesInit"></ng-particles>
|
|
135
136
|
```
|
|
136
137
|
|
|
137
138
|
```ts
|
|
@@ -170,43 +171,31 @@ let particlesInit = async (engine) => {
|
|
|
170
171
|
```mermaid
|
|
171
172
|
flowchart TD
|
|
172
173
|
|
|
173
|
-
subgraph m [Movers]
|
|
174
|
-
mb[Base]
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
e[tsParticles Engine] --> m
|
|
178
|
-
|
|
179
174
|
subgraph pl [Plugins]
|
|
180
175
|
ple[Emitters]
|
|
176
|
+
pls[Sounds]
|
|
181
177
|
end
|
|
182
178
|
|
|
183
|
-
|
|
179
|
+
bb[tsParticles Basic] --> pl
|
|
184
180
|
|
|
185
181
|
subgraph s [Shapes]
|
|
186
|
-
sc[Circle]
|
|
187
182
|
sl[Line]
|
|
188
183
|
end
|
|
189
184
|
|
|
190
|
-
|
|
185
|
+
bb --> s
|
|
191
186
|
|
|
192
187
|
subgraph u [Updaters]
|
|
193
|
-
ua[Angle]
|
|
194
|
-
uc[Color]
|
|
195
188
|
ud[Destroy]
|
|
196
189
|
ul[Life]
|
|
197
|
-
|
|
198
|
-
uou[Out Modes]
|
|
199
|
-
usi[Size]
|
|
190
|
+
ur[Rotate]
|
|
200
191
|
ust[Stroke Color]
|
|
201
192
|
end
|
|
202
193
|
|
|
203
|
-
|
|
194
|
+
bb --> u
|
|
204
195
|
|
|
205
196
|
subgraph pr [Presets]
|
|
206
197
|
prfw[Fireworks]
|
|
207
198
|
end
|
|
208
199
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
mb & ple & sc & sl & ua & uc & ud & ul & uop & uou & usi & ust --> prfw
|
|
200
|
+
bb & ple & pls & sl & ud & ul & ur & ust --> prfw
|
|
212
201
|
```
|
package/browser/bundle.js
CHANGED
package/browser/index.js
CHANGED
|
@@ -1,30 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { loadBaseMover } from "@tsparticles/move-base";
|
|
3
|
-
import { loadCircleShape } from "@tsparticles/shape-circle";
|
|
4
|
-
import { loadColorUpdater } from "@tsparticles/updater-color";
|
|
1
|
+
import { loadBasic } from "@tsparticles/basic";
|
|
5
2
|
import { loadDestroyUpdater } from "@tsparticles/updater-destroy";
|
|
6
3
|
import { loadEmittersPlugin } from "@tsparticles/plugin-emitters";
|
|
7
4
|
import { loadLifeUpdater } from "@tsparticles/updater-life";
|
|
8
5
|
import { loadLineShape } from "@tsparticles/shape-line";
|
|
9
|
-
import {
|
|
10
|
-
import { loadOutModesUpdater } from "@tsparticles/updater-out-modes";
|
|
11
|
-
import { loadSizeUpdater } from "@tsparticles/updater-size";
|
|
6
|
+
import { loadRotateUpdater } from "@tsparticles/updater-rotate";
|
|
12
7
|
import { loadSoundsPlugin } from "@tsparticles/plugin-sounds";
|
|
13
8
|
import { loadStrokeColorUpdater } from "@tsparticles/updater-stroke-color";
|
|
14
9
|
import { options } from "./options";
|
|
15
|
-
export async function loadFireworksPreset(engine) {
|
|
16
|
-
await
|
|
17
|
-
await loadEmittersPlugin(engine);
|
|
18
|
-
await loadSoundsPlugin(engine);
|
|
19
|
-
await
|
|
20
|
-
await
|
|
21
|
-
await
|
|
22
|
-
await
|
|
23
|
-
await
|
|
24
|
-
await
|
|
25
|
-
await loadOpacityUpdater(engine);
|
|
26
|
-
await loadOutModesUpdater(engine);
|
|
27
|
-
await loadSizeUpdater(engine);
|
|
28
|
-
await loadStrokeColorUpdater(engine);
|
|
29
|
-
await engine.addPreset("fireworks", options);
|
|
10
|
+
export async function loadFireworksPreset(engine, refresh = true) {
|
|
11
|
+
await loadBasic(engine, false);
|
|
12
|
+
await loadEmittersPlugin(engine, false);
|
|
13
|
+
await loadSoundsPlugin(engine, false);
|
|
14
|
+
await loadLineShape(engine, false);
|
|
15
|
+
await loadRotateUpdater(engine, false);
|
|
16
|
+
await loadDestroyUpdater(engine, false);
|
|
17
|
+
await loadLifeUpdater(engine, false);
|
|
18
|
+
await loadStrokeColorUpdater(engine, false);
|
|
19
|
+
await engine.addPreset("fireworks", options, refresh);
|
|
30
20
|
}
|
package/browser/options.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "module" }
|
package/cjs/bundle.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.tsParticles = exports.loadFireworksPreset = void 0;
|
|
13
4
|
const _1 = require(".");
|
|
14
5
|
Object.defineProperty(exports, "loadFireworksPreset", { enumerable: true, get: function () { return _1.loadFireworksPreset; } });
|
|
15
6
|
const engine_1 = require("@tsparticles/engine");
|
|
16
7
|
Object.defineProperty(exports, "tsParticles", { enumerable: true, get: function () { return engine_1.tsParticles; } });
|
|
17
|
-
(
|
|
18
|
-
yield (0, _1.loadFireworksPreset)(engine_1.tsParticles);
|
|
19
|
-
}))();
|
|
8
|
+
(0, _1.loadFireworksPreset)(engine_1.tsParticles);
|
package/cjs/index.js
CHANGED
|
@@ -1,45 +1,24 @@
|
|
|
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.loadFireworksPreset = void 0;
|
|
13
|
-
const
|
|
14
|
-
const move_base_1 = require("@tsparticles/move-base");
|
|
15
|
-
const shape_circle_1 = require("@tsparticles/shape-circle");
|
|
16
|
-
const updater_color_1 = require("@tsparticles/updater-color");
|
|
4
|
+
const basic_1 = require("@tsparticles/basic");
|
|
17
5
|
const updater_destroy_1 = require("@tsparticles/updater-destroy");
|
|
18
6
|
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
|
|
19
7
|
const updater_life_1 = require("@tsparticles/updater-life");
|
|
20
8
|
const shape_line_1 = require("@tsparticles/shape-line");
|
|
21
|
-
const
|
|
22
|
-
const updater_out_modes_1 = require("@tsparticles/updater-out-modes");
|
|
23
|
-
const updater_size_1 = require("@tsparticles/updater-size");
|
|
9
|
+
const updater_rotate_1 = require("@tsparticles/updater-rotate");
|
|
24
10
|
const plugin_sounds_1 = require("@tsparticles/plugin-sounds");
|
|
25
11
|
const updater_stroke_color_1 = require("@tsparticles/updater-stroke-color");
|
|
26
12
|
const options_1 = require("./options");
|
|
27
|
-
function loadFireworksPreset(engine) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
yield (0, updater_life_1.loadLifeUpdater)(engine);
|
|
38
|
-
yield (0, updater_opacity_1.loadOpacityUpdater)(engine);
|
|
39
|
-
yield (0, updater_out_modes_1.loadOutModesUpdater)(engine);
|
|
40
|
-
yield (0, updater_size_1.loadSizeUpdater)(engine);
|
|
41
|
-
yield (0, updater_stroke_color_1.loadStrokeColorUpdater)(engine);
|
|
42
|
-
yield engine.addPreset("fireworks", options_1.options);
|
|
43
|
-
});
|
|
13
|
+
async function loadFireworksPreset(engine, refresh = true) {
|
|
14
|
+
await (0, basic_1.loadBasic)(engine, false);
|
|
15
|
+
await (0, plugin_emitters_1.loadEmittersPlugin)(engine, false);
|
|
16
|
+
await (0, plugin_sounds_1.loadSoundsPlugin)(engine, false);
|
|
17
|
+
await (0, shape_line_1.loadLineShape)(engine, false);
|
|
18
|
+
await (0, updater_rotate_1.loadRotateUpdater)(engine, false);
|
|
19
|
+
await (0, updater_destroy_1.loadDestroyUpdater)(engine, false);
|
|
20
|
+
await (0, updater_life_1.loadLifeUpdater)(engine, false);
|
|
21
|
+
await (0, updater_stroke_color_1.loadStrokeColorUpdater)(engine, false);
|
|
22
|
+
await engine.addPreset("fireworks", options_1.options, refresh);
|
|
44
23
|
}
|
|
45
24
|
exports.loadFireworksPreset = loadFireworksPreset;
|
package/cjs/options.js
CHANGED
package/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|
package/esm/bundle.js
CHANGED
package/esm/index.js
CHANGED
|
@@ -1,30 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { loadBaseMover } from "@tsparticles/move-base";
|
|
3
|
-
import { loadCircleShape } from "@tsparticles/shape-circle";
|
|
4
|
-
import { loadColorUpdater } from "@tsparticles/updater-color";
|
|
1
|
+
import { loadBasic } from "@tsparticles/basic";
|
|
5
2
|
import { loadDestroyUpdater } from "@tsparticles/updater-destroy";
|
|
6
3
|
import { loadEmittersPlugin } from "@tsparticles/plugin-emitters";
|
|
7
4
|
import { loadLifeUpdater } from "@tsparticles/updater-life";
|
|
8
5
|
import { loadLineShape } from "@tsparticles/shape-line";
|
|
9
|
-
import {
|
|
10
|
-
import { loadOutModesUpdater } from "@tsparticles/updater-out-modes";
|
|
11
|
-
import { loadSizeUpdater } from "@tsparticles/updater-size";
|
|
6
|
+
import { loadRotateUpdater } from "@tsparticles/updater-rotate";
|
|
12
7
|
import { loadSoundsPlugin } from "@tsparticles/plugin-sounds";
|
|
13
8
|
import { loadStrokeColorUpdater } from "@tsparticles/updater-stroke-color";
|
|
14
9
|
import { options } from "./options";
|
|
15
|
-
export async function loadFireworksPreset(engine) {
|
|
16
|
-
await
|
|
17
|
-
await loadEmittersPlugin(engine);
|
|
18
|
-
await loadSoundsPlugin(engine);
|
|
19
|
-
await
|
|
20
|
-
await
|
|
21
|
-
await
|
|
22
|
-
await
|
|
23
|
-
await
|
|
24
|
-
await
|
|
25
|
-
await loadOpacityUpdater(engine);
|
|
26
|
-
await loadOutModesUpdater(engine);
|
|
27
|
-
await loadSizeUpdater(engine);
|
|
28
|
-
await loadStrokeColorUpdater(engine);
|
|
29
|
-
await engine.addPreset("fireworks", options);
|
|
10
|
+
export async function loadFireworksPreset(engine, refresh = true) {
|
|
11
|
+
await loadBasic(engine, false);
|
|
12
|
+
await loadEmittersPlugin(engine, false);
|
|
13
|
+
await loadSoundsPlugin(engine, false);
|
|
14
|
+
await loadLineShape(engine, false);
|
|
15
|
+
await loadRotateUpdater(engine, false);
|
|
16
|
+
await loadDestroyUpdater(engine, false);
|
|
17
|
+
await loadLifeUpdater(engine, false);
|
|
18
|
+
await loadStrokeColorUpdater(engine, false);
|
|
19
|
+
await engine.addPreset("fireworks", options, refresh);
|
|
30
20
|
}
|
package/esm/options.js
CHANGED
package/esm/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "module" }
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/preset-fireworks",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"description": "tsParticles fireworks preset",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/
|
|
8
|
+
"url": "git+https://github.com/tsparticles/presets.git",
|
|
9
9
|
"directory": "presets/fireworks"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
@@ -65,13 +65,17 @@
|
|
|
65
65
|
"author": "Matteo Bruni <matteo.bruni@me.com>",
|
|
66
66
|
"license": "MIT",
|
|
67
67
|
"bugs": {
|
|
68
|
-
"url": "https://github.com/
|
|
68
|
+
"url": "https://github.com/tsparticles/presets/issues"
|
|
69
69
|
},
|
|
70
70
|
"funding": [
|
|
71
71
|
{
|
|
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,23 +86,15 @@
|
|
|
82
86
|
"unpkg": "tsparticles.preset.fireworks.min.js",
|
|
83
87
|
"module": "esm/index.js",
|
|
84
88
|
"types": "types/index.d.ts",
|
|
85
|
-
"publishConfig": {
|
|
86
|
-
"access": "public"
|
|
87
|
-
},
|
|
88
89
|
"dependencies": {
|
|
89
|
-
"@tsparticles/
|
|
90
|
-
"@tsparticles/
|
|
91
|
-
"@tsparticles/plugin-emitters": "^3.0.0-
|
|
92
|
-
"@tsparticles/plugin-sounds": "^3.0.0-
|
|
93
|
-
"@tsparticles/shape-
|
|
94
|
-
"@tsparticles/
|
|
95
|
-
"@tsparticles/updater-
|
|
96
|
-
"@tsparticles/updater-
|
|
97
|
-
"@tsparticles/updater-
|
|
98
|
-
"@tsparticles/updater-life": "^3.0.0-alpha.1",
|
|
99
|
-
"@tsparticles/updater-opacity": "^3.0.0-alpha.1",
|
|
100
|
-
"@tsparticles/updater-out-modes": "^3.0.0-alpha.1",
|
|
101
|
-
"@tsparticles/updater-size": "^3.0.0-alpha.1",
|
|
102
|
-
"@tsparticles/updater-stroke-color": "^3.0.0-alpha.1"
|
|
90
|
+
"@tsparticles/basic": "^3.0.0-beta.4",
|
|
91
|
+
"@tsparticles/engine": "^3.0.0-beta.4",
|
|
92
|
+
"@tsparticles/plugin-emitters": "^3.0.0-beta.4",
|
|
93
|
+
"@tsparticles/plugin-sounds": "^3.0.0-beta.4",
|
|
94
|
+
"@tsparticles/shape-line": "^3.0.0-beta.4",
|
|
95
|
+
"@tsparticles/updater-destroy": "^3.0.0-beta.4",
|
|
96
|
+
"@tsparticles/updater-life": "^3.0.0-beta.4",
|
|
97
|
+
"@tsparticles/updater-rotate": "^3.0.0-beta.4",
|
|
98
|
+
"@tsparticles/updater-stroke-color": "^3.0.0-beta.4"
|
|
103
99
|
}
|
|
104
|
-
}
|
|
100
|
+
}
|