@tsparticles/preset-fountain 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 +14 -31
- package/browser/bundle.js +1 -3
- package/browser/index.js +6 -16
- package/browser/options.js +3 -1
- package/browser/package.json +1 -0
- package/cjs/bundle.js +1 -12
- package/cjs/index.js +6 -27
- package/cjs/options.js +3 -1
- package/cjs/package.json +1 -0
- package/esm/bundle.js +1 -3
- package/esm/index.js +6 -16
- package/esm/options.js +3 -1
- package/esm/package.json +1 -0
- package/package.json +12 -16
- package/report.html +5 -5
- package/tsparticles.preset.fountain.bundle.js +3356 -3470
- package/tsparticles.preset.fountain.bundle.min.js +1 -1
- package/tsparticles.preset.fountain.bundle.min.js.LICENSE.txt +1 -8
- package/tsparticles.preset.fountain.js +18 -71
- package/tsparticles.preset.fountain.min.js +1 -1
- package/tsparticles.preset.fountain.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 +7 -17
- package/umd/options.js +3 -1
package/README.md
CHANGED
|
@@ -26,14 +26,15 @@ 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-fountain):
|
|
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/
|
|
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/move-base@2/tsparticles.move.base.min.js"></script>
|
|
32
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/plugin-emitters@2/tsparticles.plugin.emitters.min.js"></script>
|
|
33
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/shape-circle@2/tsparticles.shape.circle.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-opacity@2/tsparticles.updater.opacity.min.js"></script>
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-out-modes@2/tsparticles.updater.out-modes.min.js"></script>
|
|
37
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/updater-size@2/tsparticles.updater.size.min.js"></script>
|
|
37
38
|
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/preset-fountain@2/tsparticles.preset.fountain.min.js"></script>
|
|
38
39
|
```
|
|
39
40
|
|
|
@@ -87,7 +88,7 @@ This sample uses the class component syntax, but you can use hooks as well (if t
|
|
|
87
88
|
|
|
88
89
|
```typescript jsx
|
|
89
90
|
import Particles from "react-particles";
|
|
90
|
-
import type { Engine } from "tsparticles
|
|
91
|
+
import type { Engine } from "@tsparticles/engine";
|
|
91
92
|
import { loadFountainPreset } from "@tsparticles/preset-fountain";
|
|
92
93
|
|
|
93
94
|
export class ParticlesContainer extends React.PureComponent<IProps> {
|
|
@@ -128,7 +129,7 @@ async function particlesInit(engine: Engine): Promise<void> {
|
|
|
128
129
|
### Angular
|
|
129
130
|
|
|
130
131
|
```html
|
|
131
|
-
<
|
|
132
|
+
<ng-particles [id]="id" [options]="particlesOptions" [particlesInit]="particlesInit"></ng-particles>
|
|
132
133
|
```
|
|
133
134
|
|
|
134
135
|
```ts
|
|
@@ -167,39 +168,21 @@ let particlesInit = async (engine) => {
|
|
|
167
168
|
```mermaid
|
|
168
169
|
flowchart TD
|
|
169
170
|
|
|
170
|
-
subgraph m [Movers]
|
|
171
|
-
mb[Base]
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
e[tsParticles Engine] --> m
|
|
175
|
-
|
|
176
171
|
subgraph pl [Plugins]
|
|
177
172
|
ple[Emitters]
|
|
178
173
|
end
|
|
179
174
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
subgraph s [Shapes]
|
|
183
|
-
sc[Circle]
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
e --> s
|
|
175
|
+
bb[tsParticles Basic] --> pl
|
|
187
176
|
|
|
188
177
|
subgraph u [Updaters]
|
|
189
|
-
uc[Color]
|
|
190
178
|
ud[Destroy]
|
|
191
|
-
uop[Opacity]
|
|
192
|
-
uou[Out Modes]
|
|
193
|
-
usi[Size]
|
|
194
179
|
end
|
|
195
180
|
|
|
196
|
-
|
|
181
|
+
bb --> u
|
|
197
182
|
|
|
198
183
|
subgraph pr [Presets]
|
|
199
184
|
prfo[Fountain]
|
|
200
185
|
end
|
|
201
186
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
mb & ple & sc & uc & ud & uop & uou & usi --> prfo
|
|
187
|
+
bb & ple & ud --> prfo
|
|
205
188
|
```
|
package/browser/bundle.js
CHANGED
package/browser/index.js
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
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 { loadDestroyUpdater } from "@tsparticles/updater-destroy";
|
|
5
3
|
import { loadEmittersPlugin } from "@tsparticles/plugin-emitters";
|
|
6
|
-
import { loadOpacityUpdater } from "@tsparticles/updater-opacity";
|
|
7
|
-
import { loadOutModesUpdater } from "@tsparticles/updater-out-modes";
|
|
8
|
-
import { loadSizeUpdater } from "@tsparticles/updater-size";
|
|
9
4
|
import { options } from "./options";
|
|
10
|
-
export async function loadFountainPreset(engine) {
|
|
11
|
-
await
|
|
12
|
-
await
|
|
13
|
-
await
|
|
14
|
-
await
|
|
15
|
-
await loadColorUpdater(engine);
|
|
16
|
-
await loadOpacityUpdater(engine);
|
|
17
|
-
await loadOutModesUpdater(engine);
|
|
18
|
-
await loadSizeUpdater(engine);
|
|
19
|
-
await engine.addPreset("fountain", options);
|
|
5
|
+
export async function loadFountainPreset(engine, refresh = true) {
|
|
6
|
+
await loadBasic(engine, false);
|
|
7
|
+
await loadDestroyUpdater(engine, false);
|
|
8
|
+
await loadEmittersPlugin(engine, false);
|
|
9
|
+
await engine.addPreset("fountain", options, refresh);
|
|
20
10
|
}
|
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.loadFountainPreset = void 0;
|
|
13
4
|
const _1 = require(".");
|
|
14
5
|
Object.defineProperty(exports, "loadFountainPreset", { enumerable: true, get: function () { return _1.loadFountainPreset; } });
|
|
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.loadFountainPreset)(engine_1.tsParticles);
|
|
19
|
-
}))();
|
|
8
|
+
(0, _1.loadFountainPreset)(engine_1.tsParticles);
|
package/cjs/index.js
CHANGED
|
@@ -1,35 +1,14 @@
|
|
|
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.loadFountainPreset = 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 updater_destroy_1 = require("@tsparticles/updater-destroy");
|
|
17
6
|
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
|
|
18
|
-
const updater_opacity_1 = require("@tsparticles/updater-opacity");
|
|
19
|
-
const updater_out_modes_1 = require("@tsparticles/updater-out-modes");
|
|
20
|
-
const updater_size_1 = require("@tsparticles/updater-size");
|
|
21
7
|
const options_1 = require("./options");
|
|
22
|
-
function loadFountainPreset(engine) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
yield (0, plugin_emitters_1.loadEmittersPlugin)(engine);
|
|
28
|
-
yield (0, updater_color_1.loadColorUpdater)(engine);
|
|
29
|
-
yield (0, updater_opacity_1.loadOpacityUpdater)(engine);
|
|
30
|
-
yield (0, updater_out_modes_1.loadOutModesUpdater)(engine);
|
|
31
|
-
yield (0, updater_size_1.loadSizeUpdater)(engine);
|
|
32
|
-
yield engine.addPreset("fountain", options_1.options);
|
|
33
|
-
});
|
|
8
|
+
async function loadFountainPreset(engine, refresh = true) {
|
|
9
|
+
await (0, basic_1.loadBasic)(engine, false);
|
|
10
|
+
await (0, updater_destroy_1.loadDestroyUpdater)(engine, false);
|
|
11
|
+
await (0, plugin_emitters_1.loadEmittersPlugin)(engine, false);
|
|
12
|
+
await engine.addPreset("fountain", options_1.options, refresh);
|
|
34
13
|
}
|
|
35
14
|
exports.loadFountainPreset = loadFountainPreset;
|
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,20 +1,10 @@
|
|
|
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 { loadDestroyUpdater } from "@tsparticles/updater-destroy";
|
|
5
3
|
import { loadEmittersPlugin } from "@tsparticles/plugin-emitters";
|
|
6
|
-
import { loadOpacityUpdater } from "@tsparticles/updater-opacity";
|
|
7
|
-
import { loadOutModesUpdater } from "@tsparticles/updater-out-modes";
|
|
8
|
-
import { loadSizeUpdater } from "@tsparticles/updater-size";
|
|
9
4
|
import { options } from "./options";
|
|
10
|
-
export async function loadFountainPreset(engine) {
|
|
11
|
-
await
|
|
12
|
-
await
|
|
13
|
-
await
|
|
14
|
-
await
|
|
15
|
-
await loadColorUpdater(engine);
|
|
16
|
-
await loadOpacityUpdater(engine);
|
|
17
|
-
await loadOutModesUpdater(engine);
|
|
18
|
-
await loadSizeUpdater(engine);
|
|
19
|
-
await engine.addPreset("fountain", options);
|
|
5
|
+
export async function loadFountainPreset(engine, refresh = true) {
|
|
6
|
+
await loadBasic(engine, false);
|
|
7
|
+
await loadDestroyUpdater(engine, false);
|
|
8
|
+
await loadEmittersPlugin(engine, false);
|
|
9
|
+
await engine.addPreset("fountain", options, refresh);
|
|
20
10
|
}
|
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-fountain",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"description": "tsParticles fountain 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/fountain"
|
|
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,18 +86,10 @@
|
|
|
82
86
|
"unpkg": "tsparticles.preset.fountain.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/
|
|
93
|
-
"@tsparticles/updater-color": "^3.0.0-alpha.1",
|
|
94
|
-
"@tsparticles/updater-destroy": "^3.0.0-alpha.1",
|
|
95
|
-
"@tsparticles/updater-opacity": "^3.0.0-alpha.1",
|
|
96
|
-
"@tsparticles/updater-out-modes": "^3.0.0-alpha.1",
|
|
97
|
-
"@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/plugin-emitters": "^3.0.0-beta.4",
|
|
93
|
+
"@tsparticles/updater-destroy": "^3.0.0-beta.4"
|
|
98
94
|
}
|
|
99
|
-
}
|
|
95
|
+
}
|