@tsparticles/stencil 4.1.2 → 4.2.0
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 +13 -0
- package/dist/cjs/{Container-BB03Liy1.js → Container-CGxn4Tv3.js} +693 -1038
- package/dist/cjs/{index-WCJ4NcqE.js → index-7q-LddLf.js} +57 -160
- package/dist/cjs/{index-B2lLThjb.js → index-BjS63OiI.js} +95 -5
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/stencil-particles.cjs.entry.js +23 -6
- package/dist/cjs/tsparticlesstencil.cjs.js +2 -2
- package/dist/collection/components/stencil-particles/stencil-particles.js +83 -4
- package/dist/esm/{Container-C5hHCYio.js → Container-BWWTh10Z.js} +693 -1038
- package/dist/esm/{index-DKFk70aj.js → index-PhwiK2_P.js} +95 -6
- package/dist/esm/{index-DYnEUqIm.js → index-aPxdqzSw.js} +57 -160
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/stencil-particles.entry.js +23 -6
- package/dist/esm/tsparticlesstencil.js +3 -3
- package/dist/tsparticlesstencil/index.esm.js +1 -1
- package/dist/tsparticlesstencil/p-FNL2LsWF.js +1 -0
- package/dist/tsparticlesstencil/p-PBQ5N1xQ.js +1 -0
- package/dist/tsparticlesstencil/p-PhwiK2_P.js +2 -0
- package/dist/tsparticlesstencil/p-e16c4912.entry.js +1 -0
- package/dist/tsparticlesstencil/tsparticlesstencil.esm.js +1 -1
- package/dist/types/components/stencil-particles/stencil-particles.d.ts +6 -2
- package/dist/types/components.d.ts +24 -2
- package/package.json +8 -7
- package/dist/tsparticlesstencil/p-4488fb9d.entry.js +0 -1
- package/dist/tsparticlesstencil/p-C8gVqIeD.js +0 -1
- package/dist/tsparticlesstencil/p-DKFk70aj.js +0 -2
- package/dist/tsparticlesstencil/p-h0XxhONB.js +0 -1
package/README.md
CHANGED
|
@@ -66,6 +66,19 @@ You can also load options from URL:
|
|
|
66
66
|
- `options`: inline particles options (`ISourceOptions`)
|
|
67
67
|
- `url`: path/url to a JSON options file
|
|
68
68
|
- `init`: async callback used to register plugins on the same engine instance used by the component
|
|
69
|
+
- `theme`: theme name to apply (requires `@tsparticles/plugin-themes` to be loaded in `init`; without the plugin, the prop is a safe no-op)
|
|
70
|
+
|
|
71
|
+
## Events
|
|
72
|
+
|
|
73
|
+
- `particlesLoaded`: emitted when the particles container has been successfully initialized
|
|
74
|
+
|
|
75
|
+
### Reactive behavior
|
|
76
|
+
|
|
77
|
+
The component reloads particles when `container-id`, `options`, or `url` props change. Changes to `theme` apply the theme via `loadTheme` without a full reload.
|
|
78
|
+
|
|
79
|
+
### Cleanup
|
|
80
|
+
|
|
81
|
+
When the component is removed from the DOM, the particles container is automatically destroyed, stopping all animations and freeing resources.
|
|
69
82
|
|
|
70
83
|
## Monorepo references
|
|
71
84
|
|