@tsparticles/palette-fireworks-multicolor 4.0.0-beta.0 → 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.
- package/README.md +30 -51
- package/browser/browser.js +5 -0
- package/browser/index.js +2 -2
- package/browser/index.lazy.js +7 -0
- package/cjs/browser.js +5 -0
- package/cjs/index.js +2 -2
- package/cjs/index.lazy.js +7 -0
- package/esm/browser.js +5 -0
- package/esm/index.js +2 -2
- package/esm/index.lazy.js +7 -0
- package/package.json +18 -9
- package/report.html +4949 -94
- package/tsparticles.palette.palette-multicolor.js +46 -0
- package/tsparticles.palette.palette-multicolor.min.js +1 -0
- package/types/browser.d.ts +1 -0
- package/types/index.lazy.d.ts +2 -0
- package/428.min.js +0 -1
- package/dist_browser_options_js.js +0 -30
- package/tsparticles.palette.palette-fireworks-multicolor.js +0 -307
- package/tsparticles.palette.palette-fireworks-multicolor.min.js +0 -2
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[](https://particles.js.org)
|
|
2
2
|
|
|
3
|
-
# tsParticles
|
|
3
|
+
# tsParticles Multicolor Palette
|
|
4
4
|
|
|
5
|
-
[](https://www.jsdelivr.com/package/npm/@tsparticles/palette-multicolor) [](https://www.npmjs.com/package/@tsparticles/palette-multicolor) [](https://www.npmjs.com/package/@tsparticles/palette-multicolor) [](https://github.com/sponsors/matteobruni)
|
|
6
6
|
|
|
7
|
-
[tsParticles](https://github.com/tsparticles/tsparticles) palette for
|
|
7
|
+
[tsParticles](https://github.com/tsparticles/tsparticles) palette for colored smoke amber.
|
|
8
8
|
|
|
9
9
|
[](https://discord.gg/hACwv45Hme) [](https://t.me/tsparticles)
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
## Sample
|
|
14
14
|
|
|
15
|
-
[](https://particles.js.org/samples/palettes/multicolor)
|
|
16
16
|
|
|
17
17
|
## Colors
|
|
18
18
|
|
|
@@ -76,15 +76,18 @@
|
|
|
76
76
|
## Quick checklist
|
|
77
77
|
|
|
78
78
|
1. Install `@tsparticles/engine` (or use the CDN bundle below)
|
|
79
|
-
2.
|
|
80
|
-
3. Apply the
|
|
79
|
+
2. Load a base package (for example `@tsparticles/basic`) and call `loadMulticolorPalette` before `tsParticles.load(...)`
|
|
80
|
+
3. Apply the palette plus a minimal particles configuration in your options
|
|
81
|
+
|
|
82
|
+
A palette defines colors, not complete behavior, so pair it with a runtime package and particle options.
|
|
81
83
|
|
|
82
84
|
## How to use it
|
|
83
85
|
|
|
84
86
|
### CDN / Vanilla JS / jQuery
|
|
85
87
|
|
|
86
88
|
```html
|
|
87
|
-
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/
|
|
89
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/basic@4/tsparticles.basic.bundle.min.js"></script>
|
|
90
|
+
<script src="https://cdn.jsdelivr.net/npm/@tsparticles/palette-multicolor@4/tsparticles.palette-coloredSmokeAmber.min.js"></script>
|
|
88
91
|
```
|
|
89
92
|
|
|
90
93
|
### Usage
|
|
@@ -92,16 +95,28 @@
|
|
|
92
95
|
Once the scripts are loaded you can set up `tsParticles` like this:
|
|
93
96
|
|
|
94
97
|
```javascript
|
|
95
|
-
(async
|
|
96
|
-
await
|
|
98
|
+
(async engine => {
|
|
99
|
+
await loadBasic(engine);
|
|
100
|
+
await loadMulticolorPalette(engine);
|
|
97
101
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
const options = {
|
|
103
|
+
particles: {
|
|
104
|
+
number: { value: 200 },
|
|
105
|
+
shape: { type: "circle" },
|
|
106
|
+
size: { value: { min: 10, max: 15 } },
|
|
107
|
+
move: {
|
|
108
|
+
enable: true,
|
|
109
|
+
speed: 2,
|
|
110
|
+
},
|
|
102
111
|
},
|
|
112
|
+
palette: "multicolor",
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
await engine.load({
|
|
116
|
+
id: "tsparticles",
|
|
117
|
+
options,
|
|
103
118
|
});
|
|
104
|
-
})();
|
|
119
|
+
})(tsParticles);
|
|
105
120
|
```
|
|
106
121
|
|
|
107
122
|
#### Customization
|
|
@@ -109,47 +124,11 @@ Once the scripts are loaded you can set up `tsParticles` like this:
|
|
|
109
124
|
**Important ⚠️**
|
|
110
125
|
You can override all the options defining the properties like in any standard `tsParticles` installation.
|
|
111
126
|
|
|
112
|
-
```javascript
|
|
113
|
-
tsParticles.load({
|
|
114
|
-
id: "tsparticles",
|
|
115
|
-
options: {
|
|
116
|
-
particles: {
|
|
117
|
-
shape: {
|
|
118
|
-
type: "square", // starting from v2, this require the square shape script
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
palette: "fireworks-multicolor",
|
|
122
|
-
},
|
|
123
|
-
});
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
Like in the sample above, the circles will be replaced by squares.
|
|
127
|
-
|
|
128
127
|
### Frameworks with a tsParticles component library
|
|
129
128
|
|
|
130
|
-
Checkout the documentation in the component library repository and call the `
|
|
131
|
-
|
|
132
|
-
The options shown above are valid for all the component libraries.
|
|
133
|
-
|
|
134
|
-
## Common pitfalls
|
|
135
|
-
|
|
136
|
-
- Calling `tsParticles.load(...)` before `loadFireworksMulticolorPalette(...)`
|
|
137
|
-
- Verify required peer packages before enabling advanced options
|
|
138
|
-
- Change one option group at a time to isolate regressions quickly
|
|
129
|
+
Checkout the documentation in the component library repository and call the `loadMulticolorPalette` function.
|
|
139
130
|
|
|
140
131
|
## Related docs
|
|
141
132
|
|
|
142
133
|
- Presets and palettes catalog: <https://github.com/tsparticles/palettes>
|
|
143
134
|
- Main docs: <https://particles.js.org/docs/>
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
```mermaid
|
|
148
|
-
flowchart TD
|
|
149
|
-
|
|
150
|
-
subgraph pr [Palettes]
|
|
151
|
-
pafireworksMulticolor[Fireworks Multicolor]
|
|
152
|
-
end
|
|
153
|
-
|
|
154
|
-
e[tsParticles Engine] --> pafireworksMulticolor
|
|
155
|
-
```
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { loadFireworksMulticolorPalette } from "./index.js";
|
|
2
|
+
const globalObject = globalThis;
|
|
3
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
4
|
+
globalObject.loadFireworksMulticolorPalette = loadFireworksMulticolorPalette;
|
|
5
|
+
export * from "./index.js";
|
package/browser/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { options } from "./options.js";
|
|
1
2
|
const paletteName = "fireworks-multicolor";
|
|
2
3
|
export async function loadFireworksMulticolorPalette(engine) {
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const { options } = await import("./options.js");
|
|
4
|
+
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addPalette(paletteName, options);
|
|
6
6
|
});
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const paletteName = "fireworks-multicolor";
|
|
2
|
+
export async function loadFireworksMulticolorPalette(engine) {
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const { options } = await import("./options.js");
|
|
5
|
+
e.pluginManager.addPalette(paletteName, options);
|
|
6
|
+
});
|
|
7
|
+
}
|
package/cjs/browser.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { loadFireworksMulticolorPalette } from "./index.js";
|
|
2
|
+
const globalObject = globalThis;
|
|
3
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
4
|
+
globalObject.loadFireworksMulticolorPalette = loadFireworksMulticolorPalette;
|
|
5
|
+
export * from "./index.js";
|
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { options } from "./options.js";
|
|
1
2
|
const paletteName = "fireworks-multicolor";
|
|
2
3
|
export async function loadFireworksMulticolorPalette(engine) {
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const { options } = await import("./options.js");
|
|
4
|
+
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addPalette(paletteName, options);
|
|
6
6
|
});
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const paletteName = "fireworks-multicolor";
|
|
2
|
+
export async function loadFireworksMulticolorPalette(engine) {
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const { options } = await import("./options.js");
|
|
5
|
+
e.pluginManager.addPalette(paletteName, options);
|
|
6
|
+
});
|
|
7
|
+
}
|
package/esm/browser.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { loadFireworksMulticolorPalette } from "./index.js";
|
|
2
|
+
const globalObject = globalThis;
|
|
3
|
+
globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
|
|
4
|
+
globalObject.loadFireworksMulticolorPalette = loadFireworksMulticolorPalette;
|
|
5
|
+
export * from "./index.js";
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { options } from "./options.js";
|
|
1
2
|
const paletteName = "fireworks-multicolor";
|
|
2
3
|
export async function loadFireworksMulticolorPalette(engine) {
|
|
3
|
-
await engine.pluginManager.register(
|
|
4
|
-
const { options } = await import("./options.js");
|
|
4
|
+
await engine.pluginManager.register(e => {
|
|
5
5
|
e.pluginManager.addPalette(paletteName, options);
|
|
6
6
|
});
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const paletteName = "fireworks-multicolor";
|
|
2
|
+
export async function loadFireworksMulticolorPalette(engine) {
|
|
3
|
+
await engine.pluginManager.register(async (e) => {
|
|
4
|
+
const { options } = await import("./options.js");
|
|
5
|
+
e.pluginManager.addPalette(paletteName, options);
|
|
6
|
+
});
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/palette-fireworks-multicolor",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.15",
|
|
4
4
|
"description": "tsParticles fireworks - multicolor palette",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/tsparticles/
|
|
9
|
-
"directory": "palettes/fireworks/
|
|
8
|
+
"url": "git+https://github.com/tsparticles/tsparticles.git",
|
|
9
|
+
"directory": "palettes/fireworks/multicolor"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [
|
|
12
12
|
"front-end",
|
|
@@ -81,8 +81,7 @@
|
|
|
81
81
|
"url": "https://www.buymeacoffee.com/matteobruni"
|
|
82
82
|
}
|
|
83
83
|
],
|
|
84
|
-
"
|
|
85
|
-
"unpkg": "tsparticles.palette.fireworks-multicolor.min.js",
|
|
84
|
+
"sideEffects": false,
|
|
86
85
|
"browser": "browser/index.js",
|
|
87
86
|
"main": "cjs/index.js",
|
|
88
87
|
"module": "esm/index.js",
|
|
@@ -96,13 +95,23 @@
|
|
|
96
95
|
"umd": "./umd/index.js",
|
|
97
96
|
"default": "./cjs/index.js"
|
|
98
97
|
},
|
|
99
|
-
"./package.json": "./package.json"
|
|
98
|
+
"./package.json": "./package.json",
|
|
99
|
+
"./lazy": {
|
|
100
|
+
"types": "./types/index.lazy.d.ts",
|
|
101
|
+
"browser": "./browser/index.lazy.js",
|
|
102
|
+
"import": "./esm/index.lazy.js",
|
|
103
|
+
"require": "./cjs/index.lazy.js",
|
|
104
|
+
"umd": "./umd/index.lazy.js",
|
|
105
|
+
"default": "./cjs/index.lazy.js"
|
|
106
|
+
}
|
|
100
107
|
},
|
|
101
108
|
"dependencies": {
|
|
102
|
-
"@tsparticles/engine": "
|
|
109
|
+
"@tsparticles/engine": "4.0.0-beta.15"
|
|
103
110
|
},
|
|
111
|
+
"type": "module",
|
|
112
|
+
"jsdelivr": "tsparticles.palette-colored-smoke-amber.min.js",
|
|
113
|
+
"unpkg": "tsparticles.palette-colored-smoke-amber.min.js",
|
|
104
114
|
"publishConfig": {
|
|
105
115
|
"access": "public"
|
|
106
|
-
}
|
|
107
|
-
"type": "module"
|
|
116
|
+
}
|
|
108
117
|
}
|