@tsparticles/pjs 4.0.0-beta.9 → 4.0.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 +88 -20
- package/browser/browser.js +5 -0
- package/browser/bundle.js +4 -0
- package/browser/index.js +4 -7
- package/browser/index.lazy.js +18 -0
- package/cjs/browser.js +5 -0
- package/cjs/bundle.js +4 -0
- package/cjs/index.js +4 -7
- package/cjs/index.lazy.js +18 -0
- package/esm/browser.js +5 -0
- package/esm/bundle.js +4 -0
- package/esm/index.js +4 -7
- package/esm/index.lazy.js +18 -0
- package/package.json +4 -4
- package/report.html +4949 -94
- package/tsparticles.pjs.bundle.js +14911 -977
- package/tsparticles.pjs.bundle.min.js +1 -2
- package/tsparticles.pjs.js +376 -186
- package/tsparticles.pjs.min.js +1 -1
- package/types/browser.d.ts +1 -0
- package/types/index.lazy.d.ts +8 -0
- package/types/marcbruederlin/Particles.d.ts +2 -3
- package/1241.min.js +0 -1
- package/1441.min.js +0 -2
- package/1521.min.js +0 -1
- package/1523.min.js +0 -1
- package/1581.min.js +0 -1
- package/1583.min.js +0 -1
- package/1680.min.js +0 -1
- package/1684.min.js +0 -1
- package/1712.min.js +0 -1
- package/1723.min.js +0 -1
- package/175.min.js +0 -1
- package/1807.min.js +0 -1
- package/1879.min.js +0 -1
- package/1887.min.js +0 -1
- package/1924.min.js +0 -1
- package/2049.min.js +0 -1
- package/2066.min.js +0 -1
- package/2127.min.js +0 -1
- package/2191.min.js +0 -1
- package/2270.min.js +0 -1
- package/2319.min.js +0 -1
- package/2344.min.js +0 -1
- package/2438.min.js +0 -1
- package/2556.min.js +0 -1
- package/2575.min.js +0 -1
- package/2602.min.js +0 -1
- package/2631.min.js +0 -1
- package/2697.min.js +0 -1
- package/2760.min.js +0 -1
- package/2827.min.js +0 -1
- package/3047.min.js +0 -1
- package/3073.min.js +0 -1
- package/3376.min.js +0 -1
- package/3384.min.js +0 -1
- package/3443.min.js +0 -1
- package/3544.min.js +0 -1
- package/3583.min.js +0 -1
- package/3683.min.js +0 -2
- package/3685.min.js +0 -1
- package/3729.min.js +0 -1
- package/374.min.js +0 -1
- package/382.min.js +0 -1
- package/4.min.js +0 -1
- package/4067.min.js +0 -1
- package/4068.min.js +0 -1
- package/4077.min.js +0 -1
- package/4086.min.js +0 -1
- package/4153.min.js +0 -1
- package/4186.min.js +0 -1
- package/4217.min.js +0 -1
- package/4291.min.js +0 -1
- package/4427.min.js +0 -1
- package/4519.min.js +0 -1
- package/4568.min.js +0 -1
- package/4582.min.js +0 -1
- package/4626.min.js +0 -1
- package/4657.min.js +0 -1
- package/4862.min.js +0 -1
- package/4912.min.js +0 -1
- package/5048.min.js +0 -1
- package/5162.min.js +0 -1
- package/5294.min.js +0 -1
- package/5344.min.js +0 -1
- package/5406.min.js +0 -1
- package/541.min.js +0 -1
- package/5445.min.js +0 -1
- package/5629.min.js +0 -1
- package/5757.min.js +0 -1
- package/5936.min.js +0 -1
- package/6055.min.js +0 -1
- package/6099.min.js +0 -1
- package/6171.min.js +0 -1
- package/6192.min.js +0 -1
- package/6207.min.js +0 -1
- package/6281.min.js +0 -1
- package/6379.min.js +0 -1
- package/6380.min.js +0 -1
- package/6420.min.js +0 -1
- package/6466.min.js +0 -1
- package/6477.min.js +0 -1
- package/648.min.js +0 -1
- package/6549.min.js +0 -1
- package/6704.min.js +0 -1
- package/6715.min.js +0 -1
- package/6798.min.js +0 -1
- package/6943.min.js +0 -1
- package/6972.min.js +0 -1
- package/6996.min.js +0 -1
- package/7162.min.js +0 -1
- package/7175.min.js +0 -1
- package/7213.min.js +0 -1
- package/7259.min.js +0 -1
- package/7316.min.js +0 -1
- package/7563.min.js +0 -1
- package/7711.min.js +0 -1
- package/7757.min.js +0 -1
- package/7775.min.js +0 -1
- package/7792.min.js +0 -1
- package/7912.min.js +0 -1
- package/805.min.js +0 -1
- package/8161.min.js +0 -1
- package/8192.min.js +0 -1
- package/8292.min.js +0 -1
- package/8331.min.js +0 -1
- package/8386.min.js +0 -1
- package/8459.min.js +0 -1
- package/8523.min.js +0 -1
- package/8607.min.js +0 -1
- package/8656.min.js +0 -1
- package/8731.min.js +0 -1
- package/8855.min.js +0 -1
- package/9007.min.js +0 -1
- package/9154.min.js +0 -1
- package/9407.min.js +0 -1
- package/9434.min.js +0 -1
- package/9470.min.js +0 -1
- package/9618.min.js +0 -1
- package/9674.min.js +0 -1
- package/9726.min.js +0 -1
- package/9835.min.js +0 -1
- package/9907.min.js +0 -1
- package/basic_dist_browser_index_js.js +0 -30
- package/engine_dist_browser_Core_Container_js.js +0 -100
- package/full_dist_browser_index_js.js +0 -30
- package/interactions_external_attract_dist_browser_Attractor_js.js +0 -140
- package/interactions_external_attract_dist_browser_index_js.js +0 -40
- package/interactions_external_bounce_dist_browser_Bouncer_js.js +0 -140
- package/interactions_external_bounce_dist_browser_index_js.js +0 -40
- package/interactions_external_bubble_dist_browser_Bubbler_js.js +0 -150
- package/interactions_external_bubble_dist_browser_index_js.js +0 -60
- package/interactions_external_connect_dist_browser_Connector_js.js +0 -160
- package/interactions_external_connect_dist_browser_index_js.js +0 -50
- package/interactions_external_drag_dist_browser_Dragger_js.js +0 -130
- package/interactions_external_drag_dist_browser_index_js.js +0 -40
- package/interactions_external_grab_dist_browser_Grabber_js.js +0 -160
- package/interactions_external_grab_dist_browser_index_js.js +0 -50
- package/interactions_external_parallax_dist_browser_Parallaxer_js.js +0 -130
- package/interactions_external_parallax_dist_browser_index_js.js +0 -40
- package/interactions_external_pause_dist_browser_Pauser_js.js +0 -130
- package/interactions_external_pause_dist_browser_index_js.js +0 -30
- package/interactions_external_push_dist_browser_Pusher_js.js +0 -130
- package/interactions_external_push_dist_browser_index_js.js +0 -40
- package/interactions_external_remove_dist_browser_Remover_js.js +0 -130
- package/interactions_external_remove_dist_browser_index_js.js +0 -40
- package/interactions_external_repulse_dist_browser_Repulser_js.js +0 -130
- package/interactions_external_repulse_dist_browser_index_js.js +0 -60
- package/interactions_external_slow_dist_browser_Slower_js.js +0 -130
- package/interactions_external_slow_dist_browser_index_js.js +0 -40
- package/interactions_external_trail_dist_browser_TrailMaker_js.js +0 -130
- package/interactions_external_trail_dist_browser_index_js.js +0 -70
- package/interactions_particles_attract_dist_browser_Attractor_js.js +0 -140
- package/interactions_particles_attract_dist_browser_index_js.js +0 -30
- package/interactions_particles_collisions_dist_browser_Collider_js.js +0 -210
- package/interactions_particles_collisions_dist_browser_OverlapPluginInstance_js.js +0 -30
- package/interactions_particles_collisions_dist_browser_OverlapPlugin_js.js +0 -30
- package/interactions_particles_collisions_dist_browser_index_js.js +0 -30
- package/interactions_particles_links_dist_browser_LinkInstance_js.js +0 -40
- package/interactions_particles_links_dist_browser_Linker_js.js +0 -140
- package/interactions_particles_links_dist_browser_LinksPlugin_js.js +0 -30
- package/interactions_particles_links_dist_browser_index_js.js +0 -60
- package/plugins_absorbers_dist_browser_AbsorberInstance_js.js +0 -70
- package/plugins_absorbers_dist_browser_AbsorbersInstancesManager_js.js +0 -30
- package/plugins_absorbers_dist_browser_AbsorbersInteractor_js.js +0 -170
- package/plugins_absorbers_dist_browser_AbsorbersPluginInstance_js.js +0 -30
- package/plugins_absorbers_dist_browser_AbsorbersPlugin_js.js +0 -70
- package/plugins_absorbers_dist_browser_getAbsorbersInstancesManager_js.js +0 -30
- package/plugins_absorbers_dist_browser_index_js.js +0 -50
- package/plugins_colors_hex_dist_browser_HexColorManager_js.js +0 -30
- package/plugins_colors_hex_dist_browser_index_js.js +0 -30
- package/plugins_colors_hsl_dist_browser_HslColorManager_js.js +0 -30
- package/plugins_colors_hsl_dist_browser_index_js.js +0 -30
- package/plugins_colors_rgb_dist_browser_RgbColorManager_js.js +0 -30
- package/plugins_colors_rgb_dist_browser_index_js.js +0 -30
- package/plugins_easings_quad_dist_browser_easingsFunctions_js.js +0 -30
- package/plugins_easings_quad_dist_browser_index_js.js +0 -30
- package/plugins_emittersShapes_circle_dist_browser_EmittersCircleShapeGenerator_js.js +0 -100
- package/plugins_emittersShapes_circle_dist_browser_index_js.js +0 -30
- package/plugins_emittersShapes_square_dist_browser_EmittersSquareShapeGenerator_js.js +0 -100
- package/plugins_emittersShapes_square_dist_browser_index_js.js +0 -30
- package/plugins_emitters_dist_browser_EmitterInstance_js.js +0 -30
- package/plugins_emitters_dist_browser_EmittersInstancesManager_js.js +0 -100
- package/plugins_emitters_dist_browser_EmittersInteractor_js.js +0 -210
- package/plugins_emitters_dist_browser_EmittersPluginInstance_js.js +0 -30
- package/plugins_emitters_dist_browser_EmittersPlugin_js.js +0 -100
- package/plugins_emitters_dist_browser_ShapeManager_js.js +0 -30
- package/plugins_emitters_dist_browser_addEmittersShapesManager_js.js +0 -30
- package/plugins_emitters_dist_browser_getEmittersInstancesManager_js.js +0 -30
- package/plugins_emitters_dist_browser_index_js.js +0 -80
- package/plugins_interactivity_dist_browser_InteractivityPluginInstance_js.js +0 -50
- package/plugins_interactivity_dist_browser_InteractivityPlugin_js.js +0 -70
- package/plugins_interactivity_dist_browser_index_js.js +0 -120
- package/plugins_move_dist_browser_MovePluginInstance_js.js +0 -40
- package/plugins_move_dist_browser_MovePlugin_js.js +0 -30
- package/plugins_move_dist_browser_index_js.js +0 -30
- package/plugins_responsive_dist_browser_ResponsivePluginInstance_js.js +0 -30
- package/plugins_responsive_dist_browser_ResponsivePlugin_js.js +0 -50
- package/plugins_responsive_dist_browser_index_js.js +0 -30
- package/shapes_circle_dist_browser_CircleDrawer_js.js +0 -40
- package/shapes_circle_dist_browser_index_js.js +0 -30
- package/shapes_emoji_dist_browser_EmojiDrawer_js.js +0 -50
- package/shapes_emoji_dist_browser_index_js.js +0 -40
- package/shapes_image_dist_browser_GifUtils_Utils_js.js +0 -70
- package/shapes_image_dist_browser_ImageDrawer_js.js +0 -30
- package/shapes_image_dist_browser_ImagePreloaderInstance_js.js +0 -30
- package/shapes_image_dist_browser_ImagePreloader_js.js +0 -40
- package/shapes_image_dist_browser_index_js.js +0 -40
- package/shapes_line_dist_browser_LineDrawer_js.js +0 -40
- package/shapes_line_dist_browser_index_js.js +0 -30
- package/shapes_polygon_dist_browser_PolygonDrawer_js.js +0 -50
- package/shapes_polygon_dist_browser_TriangleDrawer_js.js +0 -50
- package/shapes_polygon_dist_browser_index_js.js +0 -30
- package/shapes_square_dist_browser_SquareDrawer_js.js +0 -40
- package/shapes_square_dist_browser_index_js.js +0 -30
- package/shapes_star_dist_browser_StarDrawer_js.js +0 -40
- package/shapes_star_dist_browser_index_js.js +0 -30
- package/shapes_text_dist_browser_TextDrawer_js.js +0 -50
- package/shapes_text_dist_browser_index_js.js +0 -40
- package/slim_dist_browser_index_js.js +0 -30
- package/updaters_destroy_dist_browser_DestroyUpdater_js.js +0 -100
- package/updaters_destroy_dist_browser_index_js.js +0 -30
- package/updaters_fillColor_dist_browser_FillColorUpdater_js.js +0 -30
- package/updaters_fillColor_dist_browser_index_js.js +0 -30
- package/updaters_life_dist_browser_LifeUpdater_js.js +0 -70
- package/updaters_life_dist_browser_index_js.js +0 -30
- package/updaters_opacity_dist_browser_OpacityUpdater_js.js +0 -30
- package/updaters_opacity_dist_browser_index_js.js +0 -30
- package/updaters_outModes_dist_browser_OutOfCanvasUpdater_js.js +0 -80
- package/updaters_outModes_dist_browser_index_js.js +0 -30
- package/updaters_roll_dist_browser_RollUpdater_js.js +0 -70
- package/updaters_roll_dist_browser_index_js.js +0 -30
- package/updaters_rotate_dist_browser_RotateUpdater_js.js +0 -50
- package/updaters_rotate_dist_browser_index_js.js +0 -30
- package/updaters_size_dist_browser_SizeUpdater_js.js +0 -30
- package/updaters_size_dist_browser_index_js.js +0 -30
- package/updaters_strokeColor_dist_browser_StrokeColorUpdater_js.js +0 -30
- package/updaters_strokeColor_dist_browser_index_js.js +0 -30
- package/updaters_tilt_dist_browser_TiltUpdater_js.js +0 -60
- package/updaters_tilt_dist_browser_index_js.js +0 -30
- package/updaters_twinkle_dist_browser_TwinkleUpdater_js.js +0 -60
- package/updaters_twinkle_dist_browser_index_js.js +0 -30
- package/updaters_wobble_dist_browser_WobbleUpdater_js.js +0 -60
- package/updaters_wobble_dist_browser_index_js.js +0 -30
package/README.md
CHANGED
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
# tsParticles Particles.js Compatibility Package
|
|
4
4
|
|
|
5
|
-
[](https://www.jsdelivr.com/package/npm/@tsparticles/pjs) [](https://www.npmjs.com/package/@tsparticles/pjs) [](https://www.npmjs.com/package/@tsparticles/pjs) [](https://github.com/sponsors/matteobruni)
|
|
6
6
|
|
|
7
7
|
[tsParticles](https://github.com/tsparticles/tsparticles) particles.js compatibility library.
|
|
8
8
|
|
|
9
|
+
> [!WARNING]
|
|
10
|
+
> This package is legacy compatibility glue for particles.js-style APIs.
|
|
11
|
+
> It is considered obsolete, and it may be removed in v5.
|
|
12
|
+
> Prefer direct `tsParticles` APIs for new code.
|
|
13
|
+
|
|
9
14
|
**Included Packages**
|
|
10
15
|
|
|
11
16
|
- [tsparticles (and all its dependencies)](https://github.com/tsparticles/tsparticles/tree/main/bundles/full)
|
|
@@ -35,26 +40,69 @@ bp --> ce
|
|
|
35
40
|
bp --> p
|
|
36
41
|
```
|
|
37
42
|
|
|
38
|
-
##
|
|
43
|
+
## Exposed API
|
|
44
|
+
|
|
45
|
+
The package exports only one API from its main entrypoint:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import { initPjs } from "@tsparticles/pjs";
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Signature:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
initPjs(engine: Engine): Promise<void>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`initPjs` does not return compatibility objects directly.
|
|
58
|
+
It initializes compatibility and populates global objects.
|
|
39
59
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
60
|
+
## Installation
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pnpm add @tsparticles/pjs @tsparticles/engine
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## How it works
|
|
67
|
+
|
|
68
|
+
Calling `initPjs(engine)` performs these steps:
|
|
69
|
+
|
|
70
|
+
1. Checks runtime version compatibility.
|
|
71
|
+
2. Registers required plugins (`tsparticles` full bundle + responsive plugin).
|
|
72
|
+
3. Creates and exposes legacy globals:
|
|
73
|
+
- `globalThis.particlesJS`
|
|
74
|
+
- `globalThis.pJSDom`
|
|
75
|
+
- `globalThis.Particles`
|
|
76
|
+
|
|
77
|
+
After initialization, you can use particles.js-compatible APIs.
|
|
43
78
|
|
|
44
79
|
## How to use it
|
|
45
80
|
|
|
81
|
+
### ESM / TypeScript
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
import { tsParticles } from "@tsparticles/engine";
|
|
85
|
+
import { initPjs } from "@tsparticles/pjs";
|
|
86
|
+
|
|
87
|
+
await initPjs(tsParticles);
|
|
88
|
+
|
|
89
|
+
await globalThis.particlesJS("tsparticles", {
|
|
90
|
+
/* particles.js-style options */
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
46
94
|
### CDN / Vanilla JS / jQuery
|
|
47
95
|
|
|
48
|
-
The CDN/Vanilla version
|
|
96
|
+
The CDN/Vanilla JS version has two files:
|
|
49
97
|
|
|
50
98
|
- One is a bundle file with all the scripts included in a single file
|
|
51
|
-
- One
|
|
99
|
+
- One includes only `initPjs`, where dependencies must be loaded manually
|
|
100
|
+
|
|
101
|
+
After loading the bundle, call `initPjs(tsParticles)` once, then use legacy globals.
|
|
52
102
|
|
|
53
103
|
#### Bundle
|
|
54
104
|
|
|
55
|
-
|
|
56
|
-
You need to call initPjs function awaiting it like in the samples, after that the `particlesJS` instance,
|
|
57
|
-
or the `Particles` object are ready to be used in the same way.
|
|
105
|
+
Use the bundle when you want a single script with all required dependencies.
|
|
58
106
|
|
|
59
107
|
#### Not Bundle
|
|
60
108
|
|
|
@@ -63,7 +111,7 @@ specified in the **Included Packages** section.
|
|
|
63
111
|
|
|
64
112
|
### Usage
|
|
65
113
|
|
|
66
|
-
|
|
114
|
+
Using `particlesJS` compatibility:
|
|
67
115
|
|
|
68
116
|
```javascript
|
|
69
117
|
(async engine => {
|
|
@@ -75,15 +123,11 @@ Once the scripts are loaded you can set up `particlesJS` like this:
|
|
|
75
123
|
})(tsParticles);
|
|
76
124
|
```
|
|
77
125
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
Here you can use ParticlesJS options.
|
|
81
|
-
|
|
82
|
-
### Alternative Usage
|
|
126
|
+
Using `Particles` compatibility:
|
|
83
127
|
|
|
84
128
|
```javascript
|
|
85
129
|
(async engine => {
|
|
86
|
-
initPjs(engine);
|
|
130
|
+
await initPjs(engine);
|
|
87
131
|
|
|
88
132
|
Particles.init({
|
|
89
133
|
/* options */
|
|
@@ -91,6 +135,22 @@ Here you can use ParticlesJS options.
|
|
|
91
135
|
})(tsParticles);
|
|
92
136
|
```
|
|
93
137
|
|
|
138
|
+
## Compatibility globals (after `initPjs`)
|
|
139
|
+
|
|
140
|
+
| Global | Description | Modern equivalent |
|
|
141
|
+
| ------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
142
|
+
| `particlesJS` | particles.js-compatible loader function (plus `.load` and `.setOnClickHandler`) | `tsParticles.load`, `tsParticles.loadJSON`, `tsParticles.setOnClickHandler` |
|
|
143
|
+
| `pJSDom` | array of loaded containers | `tsParticles.dom` |
|
|
144
|
+
| `Particles` | `marcbruederlin/particles.js` style wrapper (`init`, `pauseAnimation`, `resumeAnimation`, `destroy`) | direct `tsParticles.load` + container methods |
|
|
145
|
+
|
|
146
|
+
If you need explicit references in TS/JS code:
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
const particlesJSCompat = globalThis.particlesJS;
|
|
150
|
+
const pJSDomCompat = globalThis.pJSDom;
|
|
151
|
+
const particlesCompat = globalThis.Particles;
|
|
152
|
+
```
|
|
153
|
+
|
|
94
154
|
#### Particles Options (only for Particles.init)
|
|
95
155
|
|
|
96
156
|
| Option | Type | Default | Description |
|
|
@@ -119,11 +179,19 @@ Here you can use ParticlesJS options.
|
|
|
119
179
|
| `resumeAnimation` | Continues the particle animation |
|
|
120
180
|
| `destroy` | Destroys the plugin |
|
|
121
181
|
|
|
182
|
+
## Deprecation status
|
|
183
|
+
|
|
184
|
+
- `particlesJS`, `pJSDom`, and `Particles` are deprecated compatibility APIs.
|
|
185
|
+
- This package is obsolete and maintained for legacy integration only.
|
|
186
|
+
- It may be removed in v5, so migration to direct `tsParticles` APIs is strongly recommended.
|
|
187
|
+
|
|
188
|
+
See migration guide: [`markdown/pjsMigration.md`](../../markdown/pjsMigration.md)
|
|
189
|
+
|
|
122
190
|
## Common pitfalls
|
|
123
191
|
|
|
124
|
-
- Calling
|
|
125
|
-
-
|
|
126
|
-
-
|
|
192
|
+
- Calling legacy globals before awaiting `initPjs(...)`
|
|
193
|
+
- Expecting `initPjs` to return `particlesJS`/`Particles` directly
|
|
194
|
+
- Mixing new `tsParticles` and legacy particles.js options in one config object
|
|
127
195
|
|
|
128
196
|
## Related docs
|
|
129
197
|
|
package/browser/bundle.js
CHANGED
package/browser/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { MBParticles } from "./marcbruederlin/Particles.js";
|
|
2
2
|
import { initParticlesJS } from "./VincentGarreau/particles.js";
|
|
3
|
+
import { loadFull } from "tsparticles";
|
|
4
|
+
import { loadResponsivePlugin } from "@tsparticles/plugin-responsive";
|
|
3
5
|
const initPjs = async (engine) => {
|
|
4
|
-
engine.checkVersion("4.0.0
|
|
6
|
+
engine.checkVersion("4.0.0");
|
|
5
7
|
await engine.pluginManager.register(async (e) => {
|
|
6
|
-
|
|
7
|
-
import("tsparticles"),
|
|
8
|
-
import("@tsparticles/plugin-responsive"),
|
|
9
|
-
]);
|
|
10
|
-
await loadFull(e);
|
|
11
|
-
await loadResponsivePlugin(e);
|
|
8
|
+
await Promise.all([loadFull(e), loadResponsivePlugin(e)]);
|
|
12
9
|
});
|
|
13
10
|
const { particlesJS, pJSDom } = initParticlesJS(engine);
|
|
14
11
|
globalThis.particlesJS = particlesJS;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MBParticles } from "./marcbruederlin/Particles.js";
|
|
2
|
+
import { initParticlesJS } from "./VincentGarreau/particles.js";
|
|
3
|
+
const initPjs = async (engine) => {
|
|
4
|
+
engine.checkVersion("4.0.0");
|
|
5
|
+
await engine.pluginManager.register(async (e) => {
|
|
6
|
+
const [{ loadFull }, { loadResponsivePlugin },] = await Promise.all([
|
|
7
|
+
import("tsparticles"),
|
|
8
|
+
import("@tsparticles/plugin-responsive"),
|
|
9
|
+
]);
|
|
10
|
+
await loadFull(e);
|
|
11
|
+
await loadResponsivePlugin(e);
|
|
12
|
+
});
|
|
13
|
+
const { particlesJS, pJSDom } = initParticlesJS(engine);
|
|
14
|
+
globalThis.particlesJS = particlesJS;
|
|
15
|
+
globalThis.pJSDom = pJSDom;
|
|
16
|
+
globalThis.Particles = MBParticles;
|
|
17
|
+
};
|
|
18
|
+
export { initPjs };
|
package/cjs/browser.js
ADDED
package/cjs/bundle.js
CHANGED
package/cjs/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { MBParticles } from "./marcbruederlin/Particles.js";
|
|
2
2
|
import { initParticlesJS } from "./VincentGarreau/particles.js";
|
|
3
|
+
import { loadFull } from "tsparticles";
|
|
4
|
+
import { loadResponsivePlugin } from "@tsparticles/plugin-responsive";
|
|
3
5
|
const initPjs = async (engine) => {
|
|
4
|
-
engine.checkVersion("4.0.0
|
|
6
|
+
engine.checkVersion("4.0.0");
|
|
5
7
|
await engine.pluginManager.register(async (e) => {
|
|
6
|
-
|
|
7
|
-
import("tsparticles"),
|
|
8
|
-
import("@tsparticles/plugin-responsive"),
|
|
9
|
-
]);
|
|
10
|
-
await loadFull(e);
|
|
11
|
-
await loadResponsivePlugin(e);
|
|
8
|
+
await Promise.all([loadFull(e), loadResponsivePlugin(e)]);
|
|
12
9
|
});
|
|
13
10
|
const { particlesJS, pJSDom } = initParticlesJS(engine);
|
|
14
11
|
globalThis.particlesJS = particlesJS;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MBParticles } from "./marcbruederlin/Particles.js";
|
|
2
|
+
import { initParticlesJS } from "./VincentGarreau/particles.js";
|
|
3
|
+
const initPjs = async (engine) => {
|
|
4
|
+
engine.checkVersion("4.0.0");
|
|
5
|
+
await engine.pluginManager.register(async (e) => {
|
|
6
|
+
const [{ loadFull }, { loadResponsivePlugin },] = await Promise.all([
|
|
7
|
+
import("tsparticles"),
|
|
8
|
+
import("@tsparticles/plugin-responsive"),
|
|
9
|
+
]);
|
|
10
|
+
await loadFull(e);
|
|
11
|
+
await loadResponsivePlugin(e);
|
|
12
|
+
});
|
|
13
|
+
const { particlesJS, pJSDom } = initParticlesJS(engine);
|
|
14
|
+
globalThis.particlesJS = particlesJS;
|
|
15
|
+
globalThis.pJSDom = pJSDom;
|
|
16
|
+
globalThis.Particles = MBParticles;
|
|
17
|
+
};
|
|
18
|
+
export { initPjs };
|
package/esm/browser.js
ADDED
package/esm/bundle.js
CHANGED
package/esm/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { MBParticles } from "./marcbruederlin/Particles.js";
|
|
2
2
|
import { initParticlesJS } from "./VincentGarreau/particles.js";
|
|
3
|
+
import { loadFull } from "tsparticles";
|
|
4
|
+
import { loadResponsivePlugin } from "@tsparticles/plugin-responsive";
|
|
3
5
|
const initPjs = async (engine) => {
|
|
4
|
-
engine.checkVersion("4.0.0
|
|
6
|
+
engine.checkVersion("4.0.0");
|
|
5
7
|
await engine.pluginManager.register(async (e) => {
|
|
6
|
-
|
|
7
|
-
import("tsparticles"),
|
|
8
|
-
import("@tsparticles/plugin-responsive"),
|
|
9
|
-
]);
|
|
10
|
-
await loadFull(e);
|
|
11
|
-
await loadResponsivePlugin(e);
|
|
8
|
+
await Promise.all([loadFull(e), loadResponsivePlugin(e)]);
|
|
12
9
|
});
|
|
13
10
|
const { particlesJS, pJSDom } = initParticlesJS(engine);
|
|
14
11
|
globalThis.particlesJS = particlesJS;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MBParticles } from "./marcbruederlin/Particles.js";
|
|
2
|
+
import { initParticlesJS } from "./VincentGarreau/particles.js";
|
|
3
|
+
const initPjs = async (engine) => {
|
|
4
|
+
engine.checkVersion("4.0.0");
|
|
5
|
+
await engine.pluginManager.register(async (e) => {
|
|
6
|
+
const [{ loadFull }, { loadResponsivePlugin },] = await Promise.all([
|
|
7
|
+
import("tsparticles"),
|
|
8
|
+
import("@tsparticles/plugin-responsive"),
|
|
9
|
+
]);
|
|
10
|
+
await loadFull(e);
|
|
11
|
+
await loadResponsivePlugin(e);
|
|
12
|
+
});
|
|
13
|
+
const { particlesJS, pJSDom } = initParticlesJS(engine);
|
|
14
|
+
globalThis.particlesJS = particlesJS;
|
|
15
|
+
globalThis.pJSDom = pJSDom;
|
|
16
|
+
globalThis.Particles = MBParticles;
|
|
17
|
+
};
|
|
18
|
+
export { initPjs };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/pjs",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -98,9 +98,9 @@
|
|
|
98
98
|
"./package.json": "./package.json"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@tsparticles/engine": "4.0.0
|
|
102
|
-
"@tsparticles/plugin-responsive": "4.0.0
|
|
103
|
-
"tsparticles": "4.0.0
|
|
101
|
+
"@tsparticles/engine": "4.0.0",
|
|
102
|
+
"@tsparticles/plugin-responsive": "4.0.0",
|
|
103
|
+
"tsparticles": "4.0.0"
|
|
104
104
|
},
|
|
105
105
|
"publishConfig": {
|
|
106
106
|
"access": "public"
|