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