@tsparticles/palette-heat-duality 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 Heat Duality Palette
3
+ # tsParticles HeatDuality Palette
4
4
 
5
- [![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/palette-heat-duality/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/palette-heat-duality) [![npmjs](https://badge.fury.io/js/@tsparticles/palette-heat-duality.svg)](https://www.npmjs.com/package/@tsparticles/palette-heat-duality) [![npmjs](https://img.shields.io/npm/dt/@tsparticles/palette-heat-duality)](https://www.npmjs.com/package/@tsparticles/palette-heat-duality) [![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-heatDuality/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/palette-heatDuality) [![npmjs](https://badge.fury.io/js/%40tsparticles%2Fpalette-heatDuality.svg)](https://www.npmjs.com/package/@tsparticles/palette-heatDuality) [![npmjs](https://img.shields.io/npm/dt/%40tsparticles%2Fpalette-coloredSmokeAmber)](https://www.npmjs.com/package/@tsparticles/palette-heatDuality) [![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 heat duality.
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/heatDuality/images/sample.png)](https://particles.js.org/samples/palettes/heat-duality)
15
+ [![demo](https://raw.githubusercontent.com/tsparticles/palettes/main/palettes/atmospheric/heatDuality/images/sample.png)](https://particles.js.org/samples/palettes/heatDuality)
16
16
 
17
17
  ## Colors
18
18
 
@@ -46,15 +46,18 @@
46
46
  ## Quick checklist
47
47
 
48
48
  1. Install `@tsparticles/engine` (or use the CDN bundle below)
49
- 2. Call the package loader function(s) before `tsParticles.load(...)`
50
- 3. Apply the package options in your `tsParticles.load(...)` config
49
+ 2. Load a base package (for example `@tsparticles/basic`) and call `loadHeatDualityPalette` before `tsParticles.load(...)`
50
+ 3. Apply the palette plus a minimal particles configuration in your options
51
+
52
+ A palette defines colors, not complete behavior, so pair it with a runtime package and particle options.
51
53
 
52
54
  ## How to use it
53
55
 
54
56
  ### CDN / Vanilla JS / jQuery
55
57
 
56
58
  ```html
57
- <script src="https://cdn.jsdelivr.net/npm/@tsparticles/palette-heat-duality@3/tsparticles.palette.heat-duality.bundle.min.js"></script>
59
+ <script src="https://cdn.jsdelivr.net/npm/@tsparticles/basic@4/tsparticles.basic.bundle.min.js"></script>
60
+ <script src="https://cdn.jsdelivr.net/npm/@tsparticles/palette-heatDuality@4/tsparticles.palette-coloredSmokeAmber.min.js"></script>
58
61
  ```
59
62
 
60
63
  ### Usage
@@ -62,16 +65,28 @@
62
65
  Once the scripts are loaded you can set up `tsParticles` like this:
63
66
 
64
67
  ```javascript
65
- (async () => {
66
- await loadHeatDualityPalette(tsParticles);
68
+ (async engine => {
69
+ await loadBasic(engine);
70
+ await loadHeatDualityPalette(engine);
67
71
 
68
- await tsParticles.load({
69
- id: "tsparticles",
70
- options: {
71
- palette: "heat-duality",
72
+ const options = {
73
+ particles: {
74
+ number: { value: 200 },
75
+ shape: { type: "circle" },
76
+ size: { value: { min: 10, max: 15 } },
77
+ move: {
78
+ enable: true,
79
+ speed: 2,
80
+ },
72
81
  },
82
+ palette: "heatDuality",
83
+ };
84
+
85
+ await engine.load({
86
+ id: "tsparticles",
87
+ options,
73
88
  });
74
- })();
89
+ })(tsParticles);
75
90
  ```
76
91
 
77
92
  #### Customization
@@ -79,47 +94,11 @@ Once the scripts are loaded you can set up `tsParticles` like this:
79
94
  **Important ⚠️**
80
95
  You can override all the options defining the properties like in any standard `tsParticles` installation.
81
96
 
82
- ```javascript
83
- tsParticles.load({
84
- id: "tsparticles",
85
- options: {
86
- particles: {
87
- shape: {
88
- type: "square", // starting from v2, this require the square shape script
89
- },
90
- },
91
- palette: "heat-duality",
92
- },
93
- });
94
- ```
95
-
96
- Like in the sample above, the circles will be replaced by squares.
97
-
98
97
  ### Frameworks with a tsParticles component library
99
98
 
100
- Checkout the documentation in the component library repository and call the `loadHeatDualityPalette` function instead of `loadFull`, `loadSlim` or similar functions.
101
-
102
- The options shown above are valid for all the component libraries.
103
-
104
- ## Common pitfalls
105
-
106
- - Calling `tsParticles.load(...)` before `loadHeatDualityPalette(...)`
107
- - Verify required peer packages before enabling advanced options
108
- - Change one option group at a time to isolate regressions quickly
99
+ Checkout the documentation in the component library repository and call the `loadHeatDualityPalette` function.
109
100
 
110
101
  ## Related docs
111
102
 
112
103
  - Presets and palettes catalog: <https://github.com/tsparticles/palettes>
113
104
  - Main docs: <https://particles.js.org/docs/>
114
-
115
- ---
116
-
117
- ```mermaid
118
- flowchart TD
119
-
120
- subgraph pr [Palettes]
121
- paheatDuality[Heat Duality]
122
- end
123
-
124
- e[tsParticles Engine] --> paheatDuality
125
- ```
@@ -0,0 +1,5 @@
1
+ import { loadHeatDualityPalette } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadHeatDualityPalette = loadHeatDualityPalette;
5
+ export * from "./index.js";
package/browser/index.js CHANGED
@@ -1,7 +1,7 @@
1
+ import { options } from "./options.js";
1
2
  const paletteName = "heat-duality";
2
3
  export async function loadHeatDualityPalette(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 = "heat-duality";
2
+ export async function loadHeatDualityPalette(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 { loadHeatDualityPalette } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadHeatDualityPalette = loadHeatDualityPalette;
5
+ export * from "./index.js";
package/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
+ import { options } from "./options.js";
1
2
  const paletteName = "heat-duality";
2
3
  export async function loadHeatDualityPalette(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 = "heat-duality";
2
+ export async function loadHeatDualityPalette(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 { loadHeatDualityPalette } from "./index.js";
2
+ const globalObject = globalThis;
3
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
4
+ globalObject.loadHeatDualityPalette = loadHeatDualityPalette;
5
+ export * from "./index.js";
package/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
+ import { options } from "./options.js";
1
2
  const paletteName = "heat-duality";
2
3
  export async function loadHeatDualityPalette(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 = "heat-duality";
2
+ export async function loadHeatDualityPalette(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-heat-duality",
3
- "version": "4.0.0-beta.0",
3
+ "version": "4.0.0-beta.15",
4
4
  "description": "tsParticles heat duality 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/atmospheric/heatDuality"
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.heat-duality.min.js",
85
- "unpkg": "tsparticles.palette.heat-duality.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
  }