@tsparticles/preset-firefly 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 +15 -39
- package/browser/bundle.js +1 -3
- package/browser/index.js +5 -15
- package/browser/package.json +1 -0
- package/cjs/bundle.js +1 -12
- package/cjs/index.js +5 -26
- package/cjs/package.json +1 -0
- package/esm/bundle.js +1 -3
- package/esm/index.js +5 -15
- package/esm/package.json +1 -0
- package/package.json +11 -15
- package/report.html +5 -5
- package/tsparticles.preset.firefly.bundle.js +2612 -2613
- package/tsparticles.preset.firefly.bundle.min.js +1 -1
- package/tsparticles.preset.firefly.bundle.min.js.LICENSE.txt +1 -8
- package/tsparticles.preset.firefly.js +16 -71
- package/tsparticles.preset.firefly.min.js +1 -1
- package/tsparticles.preset.firefly.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 +6 -16
package/README.md
CHANGED
|
@@ -26,15 +26,16 @@ Once installed you need one more script to be included in your page (or you can
|
|
|
26
26
|
from [jsDelivr](https://www.jsdelivr.com/package/npm/@tsparticles/preset-firefly):
|
|
27
27
|
|
|
28
28
|
```html
|
|
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/
|
|
29
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/engine@2/tsparticles.engine.min.js"></script>
|
|
30
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/basic@2/tsparticles.basic.min.js"></script>
|
|
31
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/interaction-external-trail@2/tsparticles.interaction.external.trail.min.js"></script>
|
|
32
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/move-base@2/tsparticles.move.base.min.js"></script>
|
|
33
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/plugin-emitters@2/tsparticles.plugin.emitters.min.js"></script>
|
|
34
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/shape-circle@2/tsparticles.shape.circle.min.js"></script>
|
|
35
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-color@2/tsparticles.updater.color.min.js"></script>
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-life@2/tsparticles.updater.life.min.js"></script>
|
|
37
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-opacity@2/tsparticles.updater.opacity.min.js"></script>
|
|
38
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-size@2/tsparticles.updater.size.min.js"></script>
|
|
38
39
|
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/preset-firefly@2/tsparticles.preset.firefly.min.js"></script>
|
|
39
40
|
```
|
|
40
41
|
|
|
@@ -82,13 +83,13 @@ Like in the sample above, the circles will be replaced by squares.
|
|
|
82
83
|
|
|
83
84
|
### React.js / Preact / react-particles
|
|
84
85
|
|
|
85
|
-
_The syntax for `React.js`, `Preact` and
|
|
86
|
+
_The syntax for `React.js`, `Preact` and `react-particles` is the same_.
|
|
86
87
|
|
|
87
88
|
This sample uses the class component syntax, but you can use hooks as well (if the library supports it).
|
|
88
89
|
|
|
89
90
|
```typescript jsx
|
|
90
91
|
import Particles from "react-particles";
|
|
91
|
-
import type { Engine } from "tsparticles
|
|
92
|
+
import type { Engine } from "@tsparticles/engine";
|
|
92
93
|
import { loadFireflyPreset } from "@tsparticles/preset-firefly";
|
|
93
94
|
|
|
94
95
|
export class ParticlesContainer extends React.PureComponent<IProps> {
|
|
@@ -129,7 +130,7 @@ async function particlesInit(engine: Engine): Promise<void> {
|
|
|
129
130
|
### Angular
|
|
130
131
|
|
|
131
132
|
```html
|
|
132
|
-
<
|
|
133
|
+
<ng-particles [id]="id" [options]="particlesOptions" [particlesInit]="particlesInit"></ng-particles>
|
|
133
134
|
```
|
|
134
135
|
|
|
135
136
|
```ts
|
|
@@ -176,36 +177,11 @@ end
|
|
|
176
177
|
|
|
177
178
|
end
|
|
178
179
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
e[tsParticles Engine] --> i
|
|
182
|
-
|
|
183
|
-
subgraph m [Movers]
|
|
184
|
-
mb[Base]
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
e --> m
|
|
188
|
-
|
|
189
|
-
subgraph s [Shapes]
|
|
190
|
-
sc[Circle]
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
e --> s
|
|
194
|
-
|
|
195
|
-
subgraph u [Updaters]
|
|
196
|
-
uc[Color]
|
|
197
|
-
uop[Opacity]
|
|
198
|
-
uou[Out Modes]
|
|
199
|
-
usi[Size]
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
e --> u
|
|
180
|
+
bb[tsParticles Basic] --> i
|
|
203
181
|
|
|
204
182
|
subgraph pr [Presets]
|
|
205
183
|
prff[Firefly]
|
|
206
184
|
end
|
|
207
185
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
iet & mb & sc & uc & uop & uou & usi --> prff
|
|
186
|
+
bb & iet --> prff
|
|
211
187
|
```
|
package/browser/bundle.js
CHANGED
package/browser/index.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { loadCircleShape } from "@tsparticles/shape-circle";
|
|
3
|
-
import { loadColorUpdater } from "@tsparticles/updater-color";
|
|
1
|
+
import { loadBasic } from "@tsparticles/basic";
|
|
4
2
|
import { loadExternalTrailInteraction } from "@tsparticles/interaction-external-trail";
|
|
5
|
-
import { loadLifeUpdater } from "@tsparticles/updater-life";
|
|
6
|
-
import { loadOpacityUpdater } from "@tsparticles/updater-opacity";
|
|
7
|
-
import { loadSizeUpdater } from "@tsparticles/updater-size";
|
|
8
3
|
import { options } from "./options";
|
|
9
|
-
export async function loadFireflyPreset(engine) {
|
|
10
|
-
await
|
|
11
|
-
await loadExternalTrailInteraction(engine);
|
|
12
|
-
await
|
|
13
|
-
await loadColorUpdater(engine);
|
|
14
|
-
await loadLifeUpdater(engine);
|
|
15
|
-
await loadOpacityUpdater(engine);
|
|
16
|
-
await loadSizeUpdater(engine);
|
|
17
|
-
await engine.addPreset("firefly", options);
|
|
4
|
+
export async function loadFireflyPreset(engine, refresh = true) {
|
|
5
|
+
await loadBasic(engine, false);
|
|
6
|
+
await loadExternalTrailInteraction(engine, false);
|
|
7
|
+
await engine.addPreset("firefly", options, refresh);
|
|
18
8
|
}
|
|
@@ -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.loadFireflyPreset = void 0;
|
|
13
4
|
const _1 = require(".");
|
|
14
5
|
Object.defineProperty(exports, "loadFireflyPreset", { enumerable: true, get: function () { return _1.loadFireflyPreset; } });
|
|
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.loadFireflyPreset)(engine_1.tsParticles);
|
|
19
|
-
}))();
|
|
8
|
+
(0, _1.loadFireflyPreset)(engine_1.tsParticles);
|
package/cjs/index.js
CHANGED
|
@@ -1,33 +1,12 @@
|
|
|
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.loadFireflyPreset = void 0;
|
|
13
|
-
const
|
|
14
|
-
const shape_circle_1 = require("@tsparticles/shape-circle");
|
|
15
|
-
const updater_color_1 = require("@tsparticles/updater-color");
|
|
4
|
+
const basic_1 = require("@tsparticles/basic");
|
|
16
5
|
const interaction_external_trail_1 = require("@tsparticles/interaction-external-trail");
|
|
17
|
-
const updater_life_1 = require("@tsparticles/updater-life");
|
|
18
|
-
const updater_opacity_1 = require("@tsparticles/updater-opacity");
|
|
19
|
-
const updater_size_1 = require("@tsparticles/updater-size");
|
|
20
6
|
const options_1 = require("./options");
|
|
21
|
-
function loadFireflyPreset(engine) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
yield (0, shape_circle_1.loadCircleShape)(engine);
|
|
26
|
-
yield (0, updater_color_1.loadColorUpdater)(engine);
|
|
27
|
-
yield (0, updater_life_1.loadLifeUpdater)(engine);
|
|
28
|
-
yield (0, updater_opacity_1.loadOpacityUpdater)(engine);
|
|
29
|
-
yield (0, updater_size_1.loadSizeUpdater)(engine);
|
|
30
|
-
yield engine.addPreset("firefly", options_1.options);
|
|
31
|
-
});
|
|
7
|
+
async function loadFireflyPreset(engine, refresh = true) {
|
|
8
|
+
await (0, basic_1.loadBasic)(engine, false);
|
|
9
|
+
await (0, interaction_external_trail_1.loadExternalTrailInteraction)(engine, false);
|
|
10
|
+
await engine.addPreset("firefly", options_1.options, refresh);
|
|
32
11
|
}
|
|
33
12
|
exports.loadFireflyPreset = loadFireflyPreset;
|
package/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|
package/esm/bundle.js
CHANGED
package/esm/index.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { loadCircleShape } from "@tsparticles/shape-circle";
|
|
3
|
-
import { loadColorUpdater } from "@tsparticles/updater-color";
|
|
1
|
+
import { loadBasic } from "@tsparticles/basic";
|
|
4
2
|
import { loadExternalTrailInteraction } from "@tsparticles/interaction-external-trail";
|
|
5
|
-
import { loadLifeUpdater } from "@tsparticles/updater-life";
|
|
6
|
-
import { loadOpacityUpdater } from "@tsparticles/updater-opacity";
|
|
7
|
-
import { loadSizeUpdater } from "@tsparticles/updater-size";
|
|
8
3
|
import { options } from "./options";
|
|
9
|
-
export async function loadFireflyPreset(engine) {
|
|
10
|
-
await
|
|
11
|
-
await loadExternalTrailInteraction(engine);
|
|
12
|
-
await
|
|
13
|
-
await loadColorUpdater(engine);
|
|
14
|
-
await loadLifeUpdater(engine);
|
|
15
|
-
await loadOpacityUpdater(engine);
|
|
16
|
-
await loadSizeUpdater(engine);
|
|
17
|
-
await engine.addPreset("firefly", options);
|
|
4
|
+
export async function loadFireflyPreset(engine, refresh = true) {
|
|
5
|
+
await loadBasic(engine, false);
|
|
6
|
+
await loadExternalTrailInteraction(engine, false);
|
|
7
|
+
await engine.addPreset("firefly", options, refresh);
|
|
18
8
|
}
|
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-firefly",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"description": "tsParticles firefly 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/firefly"
|
|
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,17 +86,9 @@
|
|
|
82
86
|
"unpkg": "tsparticles.preset.firefly.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/
|
|
92
|
-
"@tsparticles/shape-circle": "^3.0.0-alpha.1",
|
|
93
|
-
"@tsparticles/updater-color": "^3.0.0-alpha.1",
|
|
94
|
-
"@tsparticles/updater-life": "^3.0.0-alpha.1",
|
|
95
|
-
"@tsparticles/updater-opacity": "^3.0.0-alpha.1",
|
|
96
|
-
"@tsparticles/updater-size": "^3.0.0-alpha.1"
|
|
90
|
+
"@tsparticles/basic": "^3.0.0-beta.4",
|
|
91
|
+
"@tsparticles/engine": "^3.0.0-beta.4",
|
|
92
|
+
"@tsparticles/interaction-external-trail": "^3.0.0-beta.4"
|
|
97
93
|
}
|
|
98
|
-
}
|
|
94
|
+
}
|