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