@tsparticles/palette-foam-and-bubbles 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 CHANGED
@@ -1,10 +1,10 @@
1
1
  [![banner](https://particles.js.org/images/banner3.png)](https://particles.js.org)
2
2
 
3
- # tsParticles Foam & Bubbles Palette
3
+ # tsParticles FoamAndBubbles Palette
4
4
 
5
- [![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/palette-foam-and-bubbles/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/palette-foam-and-bubbles) [![npmjs](https://badge.fury.io/js/@tsparticles/palette-foam-and-bubbles.svg)](https://www.npmjs.com/package/@tsparticles/palette-foam-and-bubbles) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/palette-foam-and-bubbles)](https://www.npmjs.com/package/@tsparticles/palette-foam-and-bubbles) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
5
+ [![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/palette-foamAndBubbles/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/palette-foamAndBubbles) [![npmjs](https://badge.fury.io/js/%40tsparticles%2Fpalette-foamAndBubbles.svg)](https://www.npmjs.com/package/@tsparticles/palette-foamAndBubbles) [![npmjs](https://img.shields.io/npm/dt/%40tsparticles%2Fpalette-coloredSmokeAmber)](https://www.npmjs.com/package/@tsparticles/palette-foamAndBubbles) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni)
6
6
 
7
- [tsParticles](https://github.com/tsparticles/tsparticles) palette for foam & bubbles.
7
+ [tsParticles](https://github.com/tsparticles/tsparticles) palette for colored smoke amber.
8
8
 
9
9
  [![Discord](https://particles.js.org/images/discord.png)](https://discord.gg/hACwv45Hme) [![Telegram](https://particles.js.org/images/telegram.png)](https://t.me/tsparticles)
10
10
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  ## Sample
14
14
 
15
- [![demo](https://raw.githubusercontent.com/tsparticles/palettes/main/palettes/foamAndBubbles/images/sample.png)](https://particles.js.org/samples/palettes/foam-and-bubbles)
15
+ [![demo](https://raw.githubusercontent.com/tsparticles/palettes/main/palettes/water/foamAndBubbles/images/sample.png)](https://particles.js.org/samples/palettes/foamAndBubbles)
16
16
 
17
17
  ## Colors
18
18
 
@@ -64,15 +64,18 @@
64
64
  ## Quick checklist
65
65
 
66
66
  1. Install `@tsparticles/engine` (or use the CDN bundle below)
67
- 2. Call the package loader function(s) before `tsParticles.load(...)`
68
- 3. Apply the package options in your `tsParticles.load(...)` config
67
+ 2. Load a base package (for example `@tsparticles/basic`) and call `loadFoamAndBubblesPalette` before `tsParticles.load(...)`
68
+ 3. Apply the palette plus a minimal particles configuration in your options
69
+
70
+ A palette defines colors, not complete behavior, so pair it with a runtime package and particle options.
69
71
 
70
72
  ## How to use it
71
73
 
72
74
  ### CDN / Vanilla JS / jQuery
73
75
 
74
76
  ```html
75
- <script src="https://cdn.jsdelivr.net/npm/@tsparticles/palette-foam-and-bubbles@3/tsparticles.palette.foam-and-bubbles.bundle.min.js"></script>
77
+ <script src="https://cdn.jsdelivr.net/npm/@tsparticles/basic@4/tsparticles.basic.bundle.min.js"></script>
78
+ <script src="https://cdn.jsdelivr.net/npm/@tsparticles/palette-foamAndBubbles@4/tsparticles.palette-coloredSmokeAmber.min.js"></script>
76
79
  ```
77
80
 
78
81
  ### Usage
@@ -80,16 +83,28 @@
80
83
  Once the scripts are loaded you can set up `tsParticles` like this:
81
84
 
82
85
  ```javascript
83
- (async () => {
84
- await loadFoamAndBubblesPalette(tsParticles);
86
+ (async engine => {
87
+ await loadBasic(engine);
88
+ await loadFoamAndBubblesPalette(engine);
85
89
 
86
- await tsParticles.load({
87
- id: "tsparticles",
88
- options: {
89
- palette: "foam-and-bubbles",
90
+ const options = {
91
+ particles: {
92
+ number: { value: 200 },
93
+ shape: { type: "circle" },
94
+ size: { value: { min: 10, max: 15 } },
95
+ move: {
96
+ enable: true,
97
+ speed: 2,
98
+ },
90
99
  },
100
+ palette: "foamAndBubbles",
101
+ };
102
+
103
+ await engine.load({
104
+ id: "tsparticles",
105
+ options,
91
106
  });
92
- })();
107
+ })(tsParticles);
93
108
  ```
94
109
 
95
110
  #### Customization
@@ -97,47 +112,11 @@ Once the scripts are loaded you can set up `tsParticles` like this:
97
112
  **Important ⚠️**
98
113
  You can override all the options defining the properties like in any standard `tsParticles` installation.
99
114
 
100
- ```javascript
101
- tsParticles.load({
102
- id: "tsparticles",
103
- options: {
104
- particles: {
105
- shape: {
106
- type: "square", // starting from v2, this require the square shape script
107
- },
108
- },
109
- palette: "foam-and-bubbles",
110
- },
111
- });
112
- ```
113
-
114
- Like in the sample above, the circles will be replaced by squares.
115
-
116
115
  ### Frameworks with a tsParticles component library
117
116
 
118
- Checkout the documentation in the component library repository and call the `loadFoamAndBubblesPalette` function instead of `loadFull`, `loadSlim` or similar functions.
119
-
120
- The options shown above are valid for all the component libraries.
121
-
122
- ## Common pitfalls
123
-
124
- - Calling `tsParticles.load(...)` before `loadFoamAndBubblesPalette(...)`
125
- - Verify required peer packages before enabling advanced options
126
- - Change one option group at a time to isolate regressions quickly
117
+ Checkout the documentation in the component library repository and call the `loadFoamAndBubblesPalette` function.
127
118
 
128
119
  ## Related docs
129
120
 
130
121
  - Presets and palettes catalog: <https://github.com/tsparticles/palettes>
131
122
  - Main docs: <https://particles.js.org/docs/>
132
-
133
- ---
134
-
135
- ```mermaid
136
- flowchart TD
137
-
138
- subgraph pr [Palettes]
139
- pafoamAndBubbles[Foam & Bubbles]
140
- end
141
-
142
- e[tsParticles Engine] --> pafoamAndBubbles
143
- ```
@@ -0,0 +1,5 @@
1
+ import { loadFoamAndBubblesPalette } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadFoamAndBubblesPalette = loadFoamAndBubblesPalette;
5
+ export * from "./index.js";
package/browser/index.js CHANGED
@@ -1,7 +1,7 @@
1
+ import { options } from "./options.js";
1
2
  const paletteName = "foam-and-bubbles";
2
3
  export async function loadFoamAndBubblesPalette(engine) {
3
- await engine.pluginManager.register(async (e) => {
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 = "foam-and-bubbles";
2
+ export async function loadFoamAndBubblesPalette(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 { loadFoamAndBubblesPalette } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadFoamAndBubblesPalette = loadFoamAndBubblesPalette;
5
+ export * from "./index.js";
package/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
+ import { options } from "./options.js";
1
2
  const paletteName = "foam-and-bubbles";
2
3
  export async function loadFoamAndBubblesPalette(engine) {
3
- await engine.pluginManager.register(async (e) => {
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 = "foam-and-bubbles";
2
+ export async function loadFoamAndBubblesPalette(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 { loadFoamAndBubblesPalette } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadFoamAndBubblesPalette = loadFoamAndBubblesPalette;
5
+ export * from "./index.js";
package/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
+ import { options } from "./options.js";
1
2
  const paletteName = "foam-and-bubbles";
2
3
  export async function loadFoamAndBubblesPalette(engine) {
3
- await engine.pluginManager.register(async (e) => {
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 = "foam-and-bubbles";
2
+ export async function loadFoamAndBubblesPalette(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,11 +1,11 @@
1
1
  {
2
2
  "name": "@tsparticles/palette-foam-and-bubbles",
3
- "version": "4.0.0-beta.0",
3
+ "version": "4.0.0-beta.15",
4
4
  "description": "tsParticles foam & bubbles palette",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/tsparticles/palettes.git",
8
+ "url": "git+https://github.com/tsparticles/tsparticles.git",
9
9
  "directory": "palettes/water/foamAndBubbles"
10
10
  },
11
11
  "keywords": [
@@ -81,8 +81,7 @@
81
81
  "url": "https://www.buymeacoffee.com/matteobruni"
82
82
  }
83
83
  ],
84
- "jsdelivr": "tsparticles.palette.foam-and-bubbles.min.js",
85
- "unpkg": "tsparticles.palette.foam-and-bubbles.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": "^4.0.0-beta.11"
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
  }