diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 078199393b0..6df0ec6f6b1 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -25,7 +25,7 @@ jobs: fetch-depth: 0 - name: Derive SHAs for nx affected - uses: nrwl/nx-set-shas@v4 + uses: nrwl/nx-set-shas@v5 - uses: actions/setup-node@v6 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e888a72c51..bab98c7aabd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +### Bug Fixes + +- improved cannon and interactivity events ([b836a59](https://github.com/tsparticles/tsparticles/commit/b836a59e90afdc68b6307e8d37898e71b5881a21)) +- improved cannon options loading ([8cfcc50](https://github.com/tsparticles/tsparticles/commit/8cfcc50f4375582b73ff79569a097aea8464c8c7)) +- improved cannon vector draw ([5d55e8f](https://github.com/tsparticles/tsparticles/commit/5d55e8f22aa34939ac96a58ef9e1eb478f33e9f6)) + +### Features + +- added cannon external interaction ([e133ab3](https://github.com/tsparticles/tsparticles/commit/e133ab35835b6411c0da1b151b046a36bcfd9ee1)) + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) ### Bug Fixes diff --git a/README.md b/README.md index 6de2e0efbdf..22a80c16f30 100644 --- a/README.md +++ b/README.md @@ -98,8 +98,6 @@ React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Riot.j - [Migrating from Particles.js](#migrating-from-particlesjs) - [Plugins/Customizations](#pluginscustomizations) - [Dependency Graph](#dependency-graph) - - [Sponsors](#sponsors) - - [Huge thanks to JetBrains for the 2020-2022 Open Source Licenses!](#huge-thanks-to-jetbrains-for-the-2020-2022-open-source-licenses) --- @@ -989,22 +987,3 @@ flowchart TD bundle-full --> bundle-all ``` - ---- - -

- - JetBrains - - - JetBrains - -

- -## Sponsors - -### JetBrains - -Huge thanks to [JetBrains](https://www.jetbrains.com/?from=tsParticles) for the 2020-2022 Open Source Licenses! - -[JetBrains WebStorm](https://www.jetbrains.com/webstorm/?from=tsParticles) is used to maintain this project. diff --git a/bundles/all/CHANGELOG.md b/bundles/all/CHANGELOG.md index 3f2c507d484..4ce68f2c01f 100644 --- a/bundles/all/CHANGELOG.md +++ b/bundles/all/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +### Features + +- added cannon external interaction ([e133ab3](https://github.com/tsparticles/tsparticles/commit/e133ab35835b6411c0da1b151b046a36bcfd9ee1)) + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/all diff --git a/bundles/all/package.dist.json b/bundles/all/package.dist.json index 97266920351..1b78af01206 100644 --- a/bundles/all/package.dist.json +++ b/bundles/all/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/all", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "repository": { @@ -99,82 +99,83 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/effect-bubble": "4.0.0-beta.0", - "@tsparticles/effect-particles": "4.0.0-beta.0", - "@tsparticles/effect-shadow": "4.0.0-beta.0", - "@tsparticles/effect-trail": "4.0.0-beta.0", - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/interaction-external-particle": "4.0.0-beta.0", - "@tsparticles/interaction-external-pop": "4.0.0-beta.0", - "@tsparticles/interaction-light": "4.0.0-beta.0", - "@tsparticles/interaction-particles-repulse": "4.0.0-beta.0", - "@tsparticles/path-branches": "4.0.0-beta.0", - "@tsparticles/path-brownian": "4.0.0-beta.0", - "@tsparticles/path-curl-noise": "4.0.0-beta.0", - "@tsparticles/path-curves": "4.0.0-beta.0", - "@tsparticles/path-fractal-noise": "4.0.0-beta.0", - "@tsparticles/path-grid": "4.0.0-beta.0", - "@tsparticles/path-levy": "4.0.0-beta.0", - "@tsparticles/path-perlin-noise": "4.0.0-beta.0", - "@tsparticles/path-polygon": "4.0.0-beta.0", - "@tsparticles/path-random": "4.0.0-beta.0", - "@tsparticles/path-simplex-noise": "4.0.0-beta.0", - "@tsparticles/path-spiral": "4.0.0-beta.0", - "@tsparticles/path-svg": "4.0.0-beta.0", - "@tsparticles/path-zig-zag": "4.0.0-beta.0", - "@tsparticles/plugin-background-mask": "4.0.0-beta.0", - "@tsparticles/plugin-blend": "4.0.0-beta.0", - "@tsparticles/plugin-canvas-mask": "4.0.0-beta.0", - "@tsparticles/plugin-easing-back": "4.0.0-beta.0", - "@tsparticles/plugin-easing-bounce": "4.0.0-beta.0", - "@tsparticles/plugin-easing-circ": "4.0.0-beta.0", - "@tsparticles/plugin-easing-cubic": "4.0.0-beta.0", - "@tsparticles/plugin-easing-elastic": "4.0.0-beta.0", - "@tsparticles/plugin-easing-expo": "4.0.0-beta.0", - "@tsparticles/plugin-easing-gaussian": "4.0.0-beta.0", - "@tsparticles/plugin-easing-linear": "4.0.0-beta.0", - "@tsparticles/plugin-easing-quart": "4.0.0-beta.0", - "@tsparticles/plugin-easing-quint": "4.0.0-beta.0", - "@tsparticles/plugin-easing-sigmoid": "4.0.0-beta.0", - "@tsparticles/plugin-easing-sine": "4.0.0-beta.0", - "@tsparticles/plugin-easing-smoothstep": "4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-canvas": "4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-path": "4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-polygon": "4.0.0-beta.0", - "@tsparticles/plugin-export-image": "4.0.0-beta.0", - "@tsparticles/plugin-export-json": "4.0.0-beta.0", - "@tsparticles/plugin-export-video": "4.0.0-beta.0", - "@tsparticles/plugin-hsv-color": "4.0.0-beta.0", - "@tsparticles/plugin-hwb-color": "4.0.0-beta.0", - "@tsparticles/plugin-infection": "4.0.0-beta.0", - "@tsparticles/plugin-lab-color": "4.0.0-beta.0", - "@tsparticles/plugin-lch-color": "4.0.0-beta.0", - "@tsparticles/plugin-manual-particles": "4.0.0-beta.0", - "@tsparticles/plugin-motion": "4.0.0-beta.0", - "@tsparticles/plugin-named-color": "4.0.0-beta.0", - "@tsparticles/plugin-oklab-color": "4.0.0-beta.0", - "@tsparticles/plugin-oklch-color": "4.0.0-beta.0", - "@tsparticles/plugin-poisson-disc": "4.0.0-beta.0", - "@tsparticles/plugin-polygon-mask": "4.0.0-beta.0", - "@tsparticles/plugin-responsive": "4.0.0-beta.0", - "@tsparticles/plugin-sounds": "4.0.0-beta.0", - "@tsparticles/plugin-themes": "4.0.0-beta.0", - "@tsparticles/plugin-trail": "4.0.0-beta.0", - "@tsparticles/plugin-zoom": "4.0.0-beta.0", - "@tsparticles/shape-arrow": "4.0.0-beta.0", - "@tsparticles/shape-cards": "4.0.0-beta.0", - "@tsparticles/shape-cog": "4.0.0-beta.0", - "@tsparticles/shape-heart": "4.0.0-beta.0", - "@tsparticles/shape-infinity": "4.0.0-beta.0", - "@tsparticles/shape-matrix": "4.0.0-beta.0", - "@tsparticles/shape-path": "4.0.0-beta.0", - "@tsparticles/shape-rounded-polygon": "4.0.0-beta.0", - "@tsparticles/shape-rounded-rect": "4.0.0-beta.0", - "@tsparticles/shape-spiral": "4.0.0-beta.0", - "@tsparticles/shape-squircle": "4.0.0-beta.0", - "@tsparticles/updater-gradient": "4.0.0-beta.0", - "@tsparticles/updater-orbit": "4.0.0-beta.0", - "tsparticles": "4.0.0-beta.0" + "@tsparticles/effect-bubble": "4.0.0-beta.1", + "@tsparticles/effect-particles": "4.0.0-beta.1", + "@tsparticles/effect-shadow": "4.0.0-beta.1", + "@tsparticles/effect-trail": "4.0.0-beta.1", + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/interaction-external-cannon": "4.0.0-beta.1", + "@tsparticles/interaction-external-particle": "4.0.0-beta.1", + "@tsparticles/interaction-external-pop": "4.0.0-beta.1", + "@tsparticles/interaction-light": "4.0.0-beta.1", + "@tsparticles/interaction-particles-repulse": "4.0.0-beta.1", + "@tsparticles/path-branches": "4.0.0-beta.1", + "@tsparticles/path-brownian": "4.0.0-beta.1", + "@tsparticles/path-curl-noise": "4.0.0-beta.1", + "@tsparticles/path-curves": "4.0.0-beta.1", + "@tsparticles/path-fractal-noise": "4.0.0-beta.1", + "@tsparticles/path-grid": "4.0.0-beta.1", + "@tsparticles/path-levy": "4.0.0-beta.1", + "@tsparticles/path-perlin-noise": "4.0.0-beta.1", + "@tsparticles/path-polygon": "4.0.0-beta.1", + "@tsparticles/path-random": "4.0.0-beta.1", + "@tsparticles/path-simplex-noise": "4.0.0-beta.1", + "@tsparticles/path-spiral": "4.0.0-beta.1", + "@tsparticles/path-svg": "4.0.0-beta.1", + "@tsparticles/path-zig-zag": "4.0.0-beta.1", + "@tsparticles/plugin-background-mask": "4.0.0-beta.1", + "@tsparticles/plugin-blend": "4.0.0-beta.1", + "@tsparticles/plugin-canvas-mask": "4.0.0-beta.1", + "@tsparticles/plugin-easing-back": "4.0.0-beta.1", + "@tsparticles/plugin-easing-bounce": "4.0.0-beta.1", + "@tsparticles/plugin-easing-circ": "4.0.0-beta.1", + "@tsparticles/plugin-easing-cubic": "4.0.0-beta.1", + "@tsparticles/plugin-easing-elastic": "4.0.0-beta.1", + "@tsparticles/plugin-easing-expo": "4.0.0-beta.1", + "@tsparticles/plugin-easing-gaussian": "4.0.0-beta.1", + "@tsparticles/plugin-easing-linear": "4.0.0-beta.1", + "@tsparticles/plugin-easing-quart": "4.0.0-beta.1", + "@tsparticles/plugin-easing-quint": "4.0.0-beta.1", + "@tsparticles/plugin-easing-sigmoid": "4.0.0-beta.1", + "@tsparticles/plugin-easing-sine": "4.0.0-beta.1", + "@tsparticles/plugin-easing-smoothstep": "4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-canvas": "4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-path": "4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-polygon": "4.0.0-beta.1", + "@tsparticles/plugin-export-image": "4.0.0-beta.1", + "@tsparticles/plugin-export-json": "4.0.0-beta.1", + "@tsparticles/plugin-export-video": "4.0.0-beta.1", + "@tsparticles/plugin-hsv-color": "4.0.0-beta.1", + "@tsparticles/plugin-hwb-color": "4.0.0-beta.1", + "@tsparticles/plugin-infection": "4.0.0-beta.1", + "@tsparticles/plugin-lab-color": "4.0.0-beta.1", + "@tsparticles/plugin-lch-color": "4.0.0-beta.1", + "@tsparticles/plugin-manual-particles": "4.0.0-beta.1", + "@tsparticles/plugin-motion": "4.0.0-beta.1", + "@tsparticles/plugin-named-color": "4.0.0-beta.1", + "@tsparticles/plugin-oklab-color": "4.0.0-beta.1", + "@tsparticles/plugin-oklch-color": "4.0.0-beta.1", + "@tsparticles/plugin-poisson-disc": "4.0.0-beta.1", + "@tsparticles/plugin-polygon-mask": "4.0.0-beta.1", + "@tsparticles/plugin-responsive": "4.0.0-beta.1", + "@tsparticles/plugin-sounds": "4.0.0-beta.1", + "@tsparticles/plugin-themes": "4.0.0-beta.1", + "@tsparticles/plugin-trail": "4.0.0-beta.1", + "@tsparticles/plugin-zoom": "4.0.0-beta.1", + "@tsparticles/shape-arrow": "4.0.0-beta.1", + "@tsparticles/shape-cards": "4.0.0-beta.1", + "@tsparticles/shape-cog": "4.0.0-beta.1", + "@tsparticles/shape-heart": "4.0.0-beta.1", + "@tsparticles/shape-infinity": "4.0.0-beta.1", + "@tsparticles/shape-matrix": "4.0.0-beta.1", + "@tsparticles/shape-path": "4.0.0-beta.1", + "@tsparticles/shape-rounded-polygon": "4.0.0-beta.1", + "@tsparticles/shape-rounded-rect": "4.0.0-beta.1", + "@tsparticles/shape-spiral": "4.0.0-beta.1", + "@tsparticles/shape-squircle": "4.0.0-beta.1", + "@tsparticles/updater-gradient": "4.0.0-beta.1", + "@tsparticles/updater-orbit": "4.0.0-beta.1", + "tsparticles": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/bundles/all/package.json b/bundles/all/package.json index 86a4db7feaa..8d5ba91b45c 100644 --- a/bundles/all/package.json +++ b/bundles/all/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/all", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "scripts": { @@ -107,82 +107,83 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/effect-bubble": "workspace:4.0.0-beta.0", - "@tsparticles/effect-particles": "workspace:4.0.0-beta.0", - "@tsparticles/effect-shadow": "workspace:4.0.0-beta.0", - "@tsparticles/effect-trail": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-particle": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-pop": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-light": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-particles-repulse": "workspace:4.0.0-beta.0", - "@tsparticles/path-branches": "workspace:4.0.0-beta.0", - "@tsparticles/path-brownian": "workspace:4.0.0-beta.0", - "@tsparticles/path-curl-noise": "workspace:4.0.0-beta.0", - "@tsparticles/path-curves": "workspace:4.0.0-beta.0", - "@tsparticles/path-fractal-noise": "workspace:4.0.0-beta.0", - "@tsparticles/path-grid": "workspace:4.0.0-beta.0", - "@tsparticles/path-levy": "workspace:4.0.0-beta.0", - "@tsparticles/path-perlin-noise": "workspace:4.0.0-beta.0", - "@tsparticles/path-polygon": "workspace:4.0.0-beta.0", - "@tsparticles/path-random": "workspace:4.0.0-beta.0", - "@tsparticles/path-simplex-noise": "workspace:4.0.0-beta.0", - "@tsparticles/path-spiral": "workspace:4.0.0-beta.0", - "@tsparticles/path-svg": "workspace:4.0.0-beta.0", - "@tsparticles/path-zig-zag": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-background-mask": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-blend": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-canvas-mask": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-back": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-bounce": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-circ": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-cubic": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-elastic": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-expo": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-gaussian": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-linear": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-quart": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-quint": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-sigmoid": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-sine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-smoothstep": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-canvas": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-path": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-polygon": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-export-image": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-export-json": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-export-video": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-hsv-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-hwb-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-infection": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-lab-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-lch-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-manual-particles": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-motion": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-named-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-oklab-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-oklch-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-poisson-disc": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-polygon-mask": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-responsive": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-sounds": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-themes": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-trail": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-zoom": "workspace:4.0.0-beta.0", - "@tsparticles/shape-arrow": "workspace:4.0.0-beta.0", - "@tsparticles/shape-cards": "workspace:4.0.0-beta.0", - "@tsparticles/shape-cog": "workspace:4.0.0-beta.0", - "@tsparticles/shape-heart": "workspace:4.0.0-beta.0", - "@tsparticles/shape-infinity": "workspace:4.0.0-beta.0", - "@tsparticles/shape-matrix": "workspace:4.0.0-beta.0", - "@tsparticles/shape-path": "workspace:4.0.0-beta.0", - "@tsparticles/shape-rounded-polygon": "workspace:4.0.0-beta.0", - "@tsparticles/shape-rounded-rect": "workspace:4.0.0-beta.0", - "@tsparticles/shape-spiral": "workspace:4.0.0-beta.0", - "@tsparticles/shape-squircle": "workspace:4.0.0-beta.0", - "@tsparticles/updater-gradient": "workspace:4.0.0-beta.0", - "@tsparticles/updater-orbit": "workspace:4.0.0-beta.0", - "tsparticles": "workspace:4.0.0-beta.0" + "@tsparticles/effect-bubble": "workspace:4.0.0-beta.1", + "@tsparticles/effect-particles": "workspace:4.0.0-beta.1", + "@tsparticles/effect-shadow": "workspace:4.0.0-beta.1", + "@tsparticles/effect-trail": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-cannon": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-particle": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-pop": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-light": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-particles-repulse": "workspace:4.0.0-beta.1", + "@tsparticles/path-branches": "workspace:4.0.0-beta.1", + "@tsparticles/path-brownian": "workspace:4.0.0-beta.1", + "@tsparticles/path-curl-noise": "workspace:4.0.0-beta.1", + "@tsparticles/path-curves": "workspace:4.0.0-beta.1", + "@tsparticles/path-fractal-noise": "workspace:4.0.0-beta.1", + "@tsparticles/path-grid": "workspace:4.0.0-beta.1", + "@tsparticles/path-levy": "workspace:4.0.0-beta.1", + "@tsparticles/path-perlin-noise": "workspace:4.0.0-beta.1", + "@tsparticles/path-polygon": "workspace:4.0.0-beta.1", + "@tsparticles/path-random": "workspace:4.0.0-beta.1", + "@tsparticles/path-simplex-noise": "workspace:4.0.0-beta.1", + "@tsparticles/path-spiral": "workspace:4.0.0-beta.1", + "@tsparticles/path-svg": "workspace:4.0.0-beta.1", + "@tsparticles/path-zig-zag": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-background-mask": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-blend": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-canvas-mask": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-back": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-bounce": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-circ": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-cubic": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-elastic": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-expo": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-gaussian": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-linear": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-quart": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-quint": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-sigmoid": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-sine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-smoothstep": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-canvas": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-path": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-polygon": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-export-image": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-export-json": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-export-video": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-hsv-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-hwb-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-infection": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-lab-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-lch-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-manual-particles": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-motion": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-named-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-oklab-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-oklch-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-poisson-disc": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-polygon-mask": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-responsive": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-sounds": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-themes": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-trail": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-zoom": "workspace:4.0.0-beta.1", + "@tsparticles/shape-arrow": "workspace:4.0.0-beta.1", + "@tsparticles/shape-cards": "workspace:4.0.0-beta.1", + "@tsparticles/shape-cog": "workspace:4.0.0-beta.1", + "@tsparticles/shape-heart": "workspace:4.0.0-beta.1", + "@tsparticles/shape-infinity": "workspace:4.0.0-beta.1", + "@tsparticles/shape-matrix": "workspace:4.0.0-beta.1", + "@tsparticles/shape-path": "workspace:4.0.0-beta.1", + "@tsparticles/shape-rounded-polygon": "workspace:4.0.0-beta.1", + "@tsparticles/shape-rounded-rect": "workspace:4.0.0-beta.1", + "@tsparticles/shape-spiral": "workspace:4.0.0-beta.1", + "@tsparticles/shape-squircle": "workspace:4.0.0-beta.1", + "@tsparticles/updater-gradient": "workspace:4.0.0-beta.1", + "@tsparticles/updater-orbit": "workspace:4.0.0-beta.1", + "tsparticles": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/bundles/all/src/index.ts b/bundles/all/src/index.ts index 4bc18ca4cce..0c4cd8af1ef 100644 --- a/bundles/all/src/index.ts +++ b/bundles/all/src/index.ts @@ -13,7 +13,7 @@ declare const __VERSION__: string; export async function loadAll(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const [ { loadFull }, @@ -57,6 +57,7 @@ export async function loadAll(engine: Engine): Promise { { loadExportJSONPlugin }, { loadExportVideoPlugin }, + { loadExternalCannonInteraction }, { loadExternalParticleInteraction }, { loadExternalPopInteraction }, { loadLightInteraction }, @@ -143,6 +144,7 @@ export async function loadAll(engine: Engine): Promise { import("@tsparticles/plugin-export-json"), import("@tsparticles/plugin-export-video"), + import("@tsparticles/interaction-external-cannon"), import("@tsparticles/interaction-external-particle"), import("@tsparticles/interaction-external-pop"), import("@tsparticles/interaction-light"), @@ -193,6 +195,7 @@ export async function loadAll(engine: Engine): Promise { await loadFull(e); await Promise.all([ + loadExternalCannonInteraction(e), loadExternalParticleInteraction(e), loadExternalPopInteraction(e), loadLightInteraction(e), diff --git a/bundles/basic/CHANGELOG.md b/bundles/basic/CHANGELOG.md index 627476e78ca..1142307a271 100644 --- a/bundles/basic/CHANGELOG.md +++ b/bundles/basic/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/basic + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/basic diff --git a/bundles/basic/package.dist.json b/bundles/basic/package.dist.json index 58863c4ad4d..c881d72ef35 100644 --- a/bundles/basic/package.dist.json +++ b/bundles/basic/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/basic", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "repository": { @@ -99,16 +99,16 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-hex-color": "4.0.0-beta.0", - "@tsparticles/plugin-hsl-color": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0", - "@tsparticles/plugin-rgb-color": "4.0.0-beta.0", - "@tsparticles/shape-circle": "4.0.0-beta.0", - "@tsparticles/updater-fill-color": "4.0.0-beta.0", - "@tsparticles/updater-opacity": "4.0.0-beta.0", - "@tsparticles/updater-out-modes": "4.0.0-beta.0", - "@tsparticles/updater-size": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-hex-color": "4.0.0-beta.1", + "@tsparticles/plugin-hsl-color": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1", + "@tsparticles/plugin-rgb-color": "4.0.0-beta.1", + "@tsparticles/shape-circle": "4.0.0-beta.1", + "@tsparticles/updater-fill-color": "4.0.0-beta.1", + "@tsparticles/updater-opacity": "4.0.0-beta.1", + "@tsparticles/updater-out-modes": "4.0.0-beta.1", + "@tsparticles/updater-size": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/bundles/basic/package.json b/bundles/basic/package.json index 477f7304dea..b37afc0adbd 100644 --- a/bundles/basic/package.json +++ b/bundles/basic/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/basic", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "scripts": { @@ -107,16 +107,16 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-hex-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-hsl-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-rgb-color": "workspace:4.0.0-beta.0", - "@tsparticles/shape-circle": "workspace:4.0.0-beta.0", - "@tsparticles/updater-fill-color": "workspace:4.0.0-beta.0", - "@tsparticles/updater-opacity": "workspace:4.0.0-beta.0", - "@tsparticles/updater-out-modes": "workspace:4.0.0-beta.0", - "@tsparticles/updater-size": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-hex-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-hsl-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-rgb-color": "workspace:4.0.0-beta.1", + "@tsparticles/shape-circle": "workspace:4.0.0-beta.1", + "@tsparticles/updater-fill-color": "workspace:4.0.0-beta.1", + "@tsparticles/updater-opacity": "workspace:4.0.0-beta.1", + "@tsparticles/updater-out-modes": "workspace:4.0.0-beta.1", + "@tsparticles/updater-size": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/bundles/basic/src/index.ts b/bundles/basic/src/index.ts index 61782736dfe..5e6b5498774 100644 --- a/bundles/basic/src/index.ts +++ b/bundles/basic/src/index.ts @@ -13,7 +13,7 @@ declare const __VERSION__: string; export async function loadBasic(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const [ { loadHexColorPlugin }, { loadHslColorPlugin }, diff --git a/bundles/confetti/CHANGELOG.md b/bundles/confetti/CHANGELOG.md index d13804347ac..c45d78b9904 100644 --- a/bundles/confetti/CHANGELOG.md +++ b/bundles/confetti/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/confetti + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/confetti diff --git a/bundles/confetti/package.dist.json b/bundles/confetti/package.dist.json index e637f3bd8de..0acc10a54d5 100644 --- a/bundles/confetti/package.dist.json +++ b/bundles/confetti/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/confetti", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "repository": { @@ -99,22 +99,22 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/basic": "4.0.0-beta.0", - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-emitters": "4.0.0-beta.0", - "@tsparticles/plugin-motion": "4.0.0-beta.0", - "@tsparticles/shape-cards": "4.0.0-beta.0", - "@tsparticles/shape-emoji": "4.0.0-beta.0", - "@tsparticles/shape-heart": "4.0.0-beta.0", - "@tsparticles/shape-image": "4.0.0-beta.0", - "@tsparticles/shape-polygon": "4.0.0-beta.0", - "@tsparticles/shape-square": "4.0.0-beta.0", - "@tsparticles/shape-star": "4.0.0-beta.0", - "@tsparticles/updater-life": "4.0.0-beta.0", - "@tsparticles/updater-roll": "4.0.0-beta.0", - "@tsparticles/updater-rotate": "4.0.0-beta.0", - "@tsparticles/updater-tilt": "4.0.0-beta.0", - "@tsparticles/updater-wobble": "4.0.0-beta.0" + "@tsparticles/basic": "4.0.0-beta.1", + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-emitters": "4.0.0-beta.1", + "@tsparticles/plugin-motion": "4.0.0-beta.1", + "@tsparticles/shape-cards": "4.0.0-beta.1", + "@tsparticles/shape-emoji": "4.0.0-beta.1", + "@tsparticles/shape-heart": "4.0.0-beta.1", + "@tsparticles/shape-image": "4.0.0-beta.1", + "@tsparticles/shape-polygon": "4.0.0-beta.1", + "@tsparticles/shape-square": "4.0.0-beta.1", + "@tsparticles/shape-star": "4.0.0-beta.1", + "@tsparticles/updater-life": "4.0.0-beta.1", + "@tsparticles/updater-roll": "4.0.0-beta.1", + "@tsparticles/updater-rotate": "4.0.0-beta.1", + "@tsparticles/updater-tilt": "4.0.0-beta.1", + "@tsparticles/updater-wobble": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/bundles/confetti/package.json b/bundles/confetti/package.json index aa86cce94e1..c773ab0df99 100644 --- a/bundles/confetti/package.json +++ b/bundles/confetti/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/confetti", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "scripts": { @@ -107,22 +107,22 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/basic": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-motion": "workspace:4.0.0-beta.0", - "@tsparticles/shape-cards": "workspace:4.0.0-beta.0", - "@tsparticles/shape-emoji": "workspace:4.0.0-beta.0", - "@tsparticles/shape-heart": "workspace:4.0.0-beta.0", - "@tsparticles/shape-image": "workspace:4.0.0-beta.0", - "@tsparticles/shape-polygon": "workspace:4.0.0-beta.0", - "@tsparticles/shape-square": "workspace:4.0.0-beta.0", - "@tsparticles/shape-star": "workspace:4.0.0-beta.0", - "@tsparticles/updater-life": "workspace:4.0.0-beta.0", - "@tsparticles/updater-roll": "workspace:4.0.0-beta.0", - "@tsparticles/updater-rotate": "workspace:4.0.0-beta.0", - "@tsparticles/updater-tilt": "workspace:4.0.0-beta.0", - "@tsparticles/updater-wobble": "workspace:4.0.0-beta.0" + "@tsparticles/basic": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-motion": "workspace:4.0.0-beta.1", + "@tsparticles/shape-cards": "workspace:4.0.0-beta.1", + "@tsparticles/shape-emoji": "workspace:4.0.0-beta.1", + "@tsparticles/shape-heart": "workspace:4.0.0-beta.1", + "@tsparticles/shape-image": "workspace:4.0.0-beta.1", + "@tsparticles/shape-polygon": "workspace:4.0.0-beta.1", + "@tsparticles/shape-square": "workspace:4.0.0-beta.1", + "@tsparticles/shape-star": "workspace:4.0.0-beta.1", + "@tsparticles/updater-life": "workspace:4.0.0-beta.1", + "@tsparticles/updater-roll": "workspace:4.0.0-beta.1", + "@tsparticles/updater-rotate": "workspace:4.0.0-beta.1", + "@tsparticles/updater-tilt": "workspace:4.0.0-beta.1", + "@tsparticles/updater-wobble": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/bundles/confetti/src/confetti.ts b/bundles/confetti/src/confetti.ts index bfce3b6f639..bcb1b302443 100644 --- a/bundles/confetti/src/confetti.ts +++ b/bundles/confetti/src/confetti.ts @@ -99,7 +99,7 @@ async function initPlugins(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const [ { loadBasic }, { loadEmittersPlugin }, diff --git a/bundles/fireworks/CHANGELOG.md b/bundles/fireworks/CHANGELOG.md index 8d9309ce063..e2854be5408 100644 --- a/bundles/fireworks/CHANGELOG.md +++ b/bundles/fireworks/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/fireworks + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/fireworks diff --git a/bundles/fireworks/package.dist.json b/bundles/fireworks/package.dist.json index d67907fe88c..1302032063d 100644 --- a/bundles/fireworks/package.dist.json +++ b/bundles/fireworks/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/fireworks", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "repository": { @@ -99,15 +99,15 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/basic": "4.0.0-beta.0", - "@tsparticles/effect-trail": "4.0.0-beta.0", - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-emitters": "4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-square": "4.0.0-beta.0", - "@tsparticles/plugin-sounds": "4.0.0-beta.0", - "@tsparticles/updater-destroy": "4.0.0-beta.0", - "@tsparticles/updater-life": "4.0.0-beta.0", - "@tsparticles/updater-rotate": "4.0.0-beta.0" + "@tsparticles/basic": "4.0.0-beta.1", + "@tsparticles/effect-trail": "4.0.0-beta.1", + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-emitters": "4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-square": "4.0.0-beta.1", + "@tsparticles/plugin-sounds": "4.0.0-beta.1", + "@tsparticles/updater-destroy": "4.0.0-beta.1", + "@tsparticles/updater-life": "4.0.0-beta.1", + "@tsparticles/updater-rotate": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/bundles/fireworks/package.json b/bundles/fireworks/package.json index 95d701428e5..a1df9c1f8a3 100644 --- a/bundles/fireworks/package.json +++ b/bundles/fireworks/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/fireworks", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "scripts": { @@ -107,15 +107,15 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/basic": "workspace:4.0.0-beta.0", - "@tsparticles/effect-trail": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-square": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-sounds": "workspace:4.0.0-beta.0", - "@tsparticles/updater-destroy": "workspace:4.0.0-beta.0", - "@tsparticles/updater-life": "workspace:4.0.0-beta.0", - "@tsparticles/updater-rotate": "workspace:4.0.0-beta.0" + "@tsparticles/basic": "workspace:4.0.0-beta.1", + "@tsparticles/effect-trail": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-square": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-sounds": "workspace:4.0.0-beta.1", + "@tsparticles/updater-destroy": "workspace:4.0.0-beta.1", + "@tsparticles/updater-life": "workspace:4.0.0-beta.1", + "@tsparticles/updater-rotate": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/bundles/fireworks/src/fireworks.ts b/bundles/fireworks/src/fireworks.ts index 448d6b7ed98..7c650ff244d 100644 --- a/bundles/fireworks/src/fireworks.ts +++ b/bundles/fireworks/src/fireworks.ts @@ -77,7 +77,7 @@ async function initPlugins(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const [ { loadBasic }, { loadEmittersPlugin }, diff --git a/bundles/full/CHANGELOG.md b/bundles/full/CHANGELOG.md index 5b0f343124c..affa6715be0 100644 --- a/bundles/full/CHANGELOG.md +++ b/bundles/full/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package tsparticles + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) ### Features diff --git a/bundles/full/package.dist.json b/bundles/full/package.dist.json index 81109e4081a..7dc7c7b7f62 100644 --- a/bundles/full/package.dist.json +++ b/bundles/full/package.dist.json @@ -1,6 +1,6 @@ { "name": "tsparticles", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "repository": { @@ -99,20 +99,20 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/interaction-external-drag": "4.0.0-beta.0", - "@tsparticles/interaction-external-trail": "4.0.0-beta.0", - "@tsparticles/plugin-absorbers": "4.0.0-beta.0", - "@tsparticles/plugin-emitters": "4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-circle": "4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-square": "4.0.0-beta.0", - "@tsparticles/shape-text": "4.0.0-beta.0", - "@tsparticles/slim": "4.0.0-beta.0", - "@tsparticles/updater-destroy": "4.0.0-beta.0", - "@tsparticles/updater-roll": "4.0.0-beta.0", - "@tsparticles/updater-tilt": "4.0.0-beta.0", - "@tsparticles/updater-twinkle": "4.0.0-beta.0", - "@tsparticles/updater-wobble": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/interaction-external-drag": "4.0.0-beta.1", + "@tsparticles/interaction-external-trail": "4.0.0-beta.1", + "@tsparticles/plugin-absorbers": "4.0.0-beta.1", + "@tsparticles/plugin-emitters": "4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-circle": "4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-square": "4.0.0-beta.1", + "@tsparticles/shape-text": "4.0.0-beta.1", + "@tsparticles/slim": "4.0.0-beta.1", + "@tsparticles/updater-destroy": "4.0.0-beta.1", + "@tsparticles/updater-roll": "4.0.0-beta.1", + "@tsparticles/updater-tilt": "4.0.0-beta.1", + "@tsparticles/updater-twinkle": "4.0.0-beta.1", + "@tsparticles/updater-wobble": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/bundles/full/package.json b/bundles/full/package.json index d0f14d8e1b7..7e21662d523 100644 --- a/bundles/full/package.json +++ b/bundles/full/package.json @@ -1,6 +1,6 @@ { "name": "tsparticles", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "scripts": { @@ -107,20 +107,20 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-drag": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-trail": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-absorbers": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-circle": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-square": "workspace:4.0.0-beta.0", - "@tsparticles/shape-text": "workspace:4.0.0-beta.0", - "@tsparticles/slim": "workspace:4.0.0-beta.0", - "@tsparticles/updater-destroy": "workspace:4.0.0-beta.0", - "@tsparticles/updater-roll": "workspace:4.0.0-beta.0", - "@tsparticles/updater-tilt": "workspace:4.0.0-beta.0", - "@tsparticles/updater-twinkle": "workspace:4.0.0-beta.0", - "@tsparticles/updater-wobble": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-drag": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-trail": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-absorbers": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-circle": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-square": "workspace:4.0.0-beta.1", + "@tsparticles/shape-text": "workspace:4.0.0-beta.1", + "@tsparticles/slim": "workspace:4.0.0-beta.1", + "@tsparticles/updater-destroy": "workspace:4.0.0-beta.1", + "@tsparticles/updater-roll": "workspace:4.0.0-beta.1", + "@tsparticles/updater-tilt": "workspace:4.0.0-beta.1", + "@tsparticles/updater-twinkle": "workspace:4.0.0-beta.1", + "@tsparticles/updater-wobble": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/bundles/full/src/index.ts b/bundles/full/src/index.ts index 4c040a6bd42..3508a3b0bb1 100644 --- a/bundles/full/src/index.ts +++ b/bundles/full/src/index.ts @@ -13,7 +13,7 @@ declare const __VERSION__: string; export async function loadFull(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const [ { loadSlim }, { loadExternalDragInteraction }, diff --git a/bundles/pjs/CHANGELOG.md b/bundles/pjs/CHANGELOG.md index 03efd66aa09..32996eb3e1c 100644 --- a/bundles/pjs/CHANGELOG.md +++ b/bundles/pjs/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/pjs + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/pjs diff --git a/bundles/pjs/package.dist.json b/bundles/pjs/package.dist.json index c55597b8987..289ad5d87f8 100644 --- a/bundles/pjs/package.dist.json +++ b/bundles/pjs/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/pjs", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "repository": { @@ -99,9 +99,9 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-responsive": "4.0.0-beta.0", - "tsparticles": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-responsive": "4.0.0-beta.1", + "tsparticles": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/bundles/pjs/package.json b/bundles/pjs/package.json index 3e9edbe990f..c1485db308c 100644 --- a/bundles/pjs/package.json +++ b/bundles/pjs/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/pjs", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "scripts": { @@ -107,12 +107,12 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-responsive": "workspace:4.0.0-beta.0", - "tsparticles": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-responsive": "workspace:4.0.0-beta.1", + "tsparticles": "workspace:4.0.0-beta.1" }, "devDependencies": { - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/bundles/pjs/src/VincentGarreau/particles.ts b/bundles/pjs/src/VincentGarreau/particles.ts index fb773b8a376..a95d4a1ef1f 100644 --- a/bundles/pjs/src/VincentGarreau/particles.ts +++ b/bundles/pjs/src/VincentGarreau/particles.ts @@ -309,7 +309,7 @@ const defaultMinOpacity = 0, */ // eslint-disable-next-line @typescript-eslint/no-deprecated particlesJS.setOnClickHandler = (callback: (e: Event, particles?: Particle[]) => void): void => { - engine.setOnClickHandler?.(callback); + engine.pluginManager.setOnClickHandler?.(callback); }; /** diff --git a/bundles/pjs/src/index.ts b/bundles/pjs/src/index.ts index a789f381d0f..238168b4010 100644 --- a/bundles/pjs/src/index.ts +++ b/bundles/pjs/src/index.ts @@ -34,7 +34,7 @@ declare global { const initPjs = async (engine: Engine): Promise => { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const [ { loadFull }, { loadResponsivePlugin }, diff --git a/bundles/slim/CHANGELOG.md b/bundles/slim/CHANGELOG.md index 2d774771762..12095b52bad 100644 --- a/bundles/slim/CHANGELOG.md +++ b/bundles/slim/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/slim + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/slim diff --git a/bundles/slim/package.dist.json b/bundles/slim/package.dist.json index e79350186f7..99f4ba49c07 100644 --- a/bundles/slim/package.dist.json +++ b/bundles/slim/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/slim", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "repository": { @@ -99,33 +99,33 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/basic": "4.0.0-beta.0", - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/interaction-external-attract": "4.0.0-beta.0", - "@tsparticles/interaction-external-bounce": "4.0.0-beta.0", - "@tsparticles/interaction-external-bubble": "4.0.0-beta.0", - "@tsparticles/interaction-external-connect": "4.0.0-beta.0", - "@tsparticles/interaction-external-grab": "4.0.0-beta.0", - "@tsparticles/interaction-external-parallax": "4.0.0-beta.0", - "@tsparticles/interaction-external-pause": "4.0.0-beta.0", - "@tsparticles/interaction-external-push": "4.0.0-beta.0", - "@tsparticles/interaction-external-remove": "4.0.0-beta.0", - "@tsparticles/interaction-external-repulse": "4.0.0-beta.0", - "@tsparticles/interaction-external-slow": "4.0.0-beta.0", - "@tsparticles/interaction-particles-attract": "4.0.0-beta.0", - "@tsparticles/interaction-particles-collisions": "4.0.0-beta.0", - "@tsparticles/interaction-particles-links": "4.0.0-beta.0", - "@tsparticles/plugin-easing-quad": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0", - "@tsparticles/shape-emoji": "4.0.0-beta.0", - "@tsparticles/shape-image": "4.0.0-beta.0", - "@tsparticles/shape-line": "4.0.0-beta.0", - "@tsparticles/shape-polygon": "4.0.0-beta.0", - "@tsparticles/shape-square": "4.0.0-beta.0", - "@tsparticles/shape-star": "4.0.0-beta.0", - "@tsparticles/updater-life": "4.0.0-beta.0", - "@tsparticles/updater-rotate": "4.0.0-beta.0", - "@tsparticles/updater-stroke-color": "4.0.0-beta.0" + "@tsparticles/basic": "4.0.0-beta.1", + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/interaction-external-attract": "4.0.0-beta.1", + "@tsparticles/interaction-external-bounce": "4.0.0-beta.1", + "@tsparticles/interaction-external-bubble": "4.0.0-beta.1", + "@tsparticles/interaction-external-connect": "4.0.0-beta.1", + "@tsparticles/interaction-external-grab": "4.0.0-beta.1", + "@tsparticles/interaction-external-parallax": "4.0.0-beta.1", + "@tsparticles/interaction-external-pause": "4.0.0-beta.1", + "@tsparticles/interaction-external-push": "4.0.0-beta.1", + "@tsparticles/interaction-external-remove": "4.0.0-beta.1", + "@tsparticles/interaction-external-repulse": "4.0.0-beta.1", + "@tsparticles/interaction-external-slow": "4.0.0-beta.1", + "@tsparticles/interaction-particles-attract": "4.0.0-beta.1", + "@tsparticles/interaction-particles-collisions": "4.0.0-beta.1", + "@tsparticles/interaction-particles-links": "4.0.0-beta.1", + "@tsparticles/plugin-easing-quad": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1", + "@tsparticles/shape-emoji": "4.0.0-beta.1", + "@tsparticles/shape-image": "4.0.0-beta.1", + "@tsparticles/shape-line": "4.0.0-beta.1", + "@tsparticles/shape-polygon": "4.0.0-beta.1", + "@tsparticles/shape-square": "4.0.0-beta.1", + "@tsparticles/shape-star": "4.0.0-beta.1", + "@tsparticles/updater-life": "4.0.0-beta.1", + "@tsparticles/updater-rotate": "4.0.0-beta.1", + "@tsparticles/updater-stroke-color": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/bundles/slim/package.json b/bundles/slim/package.json index f3c6ecd9eb3..f0ef622f704 100644 --- a/bundles/slim/package.json +++ b/bundles/slim/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/slim", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "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.", "homepage": "https://particles.js.org", "scripts": { @@ -107,33 +107,33 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/basic": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-attract": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-bounce": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-bubble": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-connect": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-grab": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-parallax": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-pause": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-push": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-remove": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-repulse": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-slow": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-particles-attract": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-particles-collisions": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-particles-links": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-quad": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0", - "@tsparticles/shape-emoji": "workspace:4.0.0-beta.0", - "@tsparticles/shape-image": "workspace:4.0.0-beta.0", - "@tsparticles/shape-line": "workspace:4.0.0-beta.0", - "@tsparticles/shape-polygon": "workspace:4.0.0-beta.0", - "@tsparticles/shape-square": "workspace:4.0.0-beta.0", - "@tsparticles/shape-star": "workspace:4.0.0-beta.0", - "@tsparticles/updater-life": "workspace:4.0.0-beta.0", - "@tsparticles/updater-rotate": "workspace:4.0.0-beta.0", - "@tsparticles/updater-stroke-color": "workspace:4.0.0-beta.0" + "@tsparticles/basic": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-attract": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-bounce": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-bubble": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-connect": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-grab": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-parallax": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-pause": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-push": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-remove": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-repulse": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-slow": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-particles-attract": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-particles-collisions": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-particles-links": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-quad": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1", + "@tsparticles/shape-emoji": "workspace:4.0.0-beta.1", + "@tsparticles/shape-image": "workspace:4.0.0-beta.1", + "@tsparticles/shape-line": "workspace:4.0.0-beta.1", + "@tsparticles/shape-polygon": "workspace:4.0.0-beta.1", + "@tsparticles/shape-square": "workspace:4.0.0-beta.1", + "@tsparticles/shape-star": "workspace:4.0.0-beta.1", + "@tsparticles/updater-life": "workspace:4.0.0-beta.1", + "@tsparticles/updater-rotate": "workspace:4.0.0-beta.1", + "@tsparticles/updater-stroke-color": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/bundles/slim/src/index.ts b/bundles/slim/src/index.ts index c2ed097482a..d75979eacd9 100644 --- a/bundles/slim/src/index.ts +++ b/bundles/slim/src/index.ts @@ -13,7 +13,7 @@ declare const __VERSION__: string; export async function loadSlim(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const [ { loadBasic }, diff --git a/demo/electron/CHANGELOG.md b/demo/electron/CHANGELOG.md index 6e3a29ade46..78c7055d8a9 100644 --- a/demo/electron/CHANGELOG.md +++ b/demo/electron/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/electron-demo + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/electron-demo diff --git a/demo/electron/package.json b/demo/electron/package.json index 937a9e9b17c..52acef68b45 100644 --- a/demo/electron/package.json +++ b/demo/electron/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/electron-demo", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "", "main": "app/index.js", "private": true, @@ -14,9 +14,9 @@ "author": "Matteo Bruni ", "license": "MIT", "dependencies": { - "@tsparticles/configs": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "tsparticles": "workspace:4.0.0-beta.0" + "@tsparticles/configs": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "tsparticles": "workspace:4.0.0-beta.1" }, "devDependencies": { "electron": "^41.0.3" diff --git a/demo/vanilla/CHANGELOG.md b/demo/vanilla/CHANGELOG.md index 2a8de17013d..d1256fd017c 100644 --- a/demo/vanilla/CHANGELOG.md +++ b/demo/vanilla/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +### Features + +- added cannon external interaction ([e133ab3](https://github.com/tsparticles/tsparticles/commit/e133ab35835b6411c0da1b151b046a36bcfd9ee1)) + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) ### Features diff --git a/demo/vanilla/app.ts b/demo/vanilla/app.ts index 1e5fb37a179..e421a69ef22 100644 --- a/demo/vanilla/app.ts +++ b/demo/vanilla/app.ts @@ -117,6 +117,7 @@ app.use("/plugin-emitters", express.static("./node_modules/@tsparticles/plugin-e app.use("/plugin-interactivity", express.static("./node_modules/@tsparticles/plugin-interactivity")); app.use("/plugin-polygon-mask", express.static("./node_modules/@tsparticles/plugin-polygon-mask")); app.use("/plugin-poisson-disc", express.static("./node_modules/@tsparticles/plugin-poisson-disc")); +app.use("/interaction-external-cannon", express.static("./node_modules/@tsparticles/interaction-external-cannon")); app.use("/interaction-external-parallax", express.static("./node_modules/@tsparticles/interaction-external-parallax")); app.use("/interaction-external-particle", express.static("./node_modules/@tsparticles/interaction-external-particle")); app.use("/interaction-external-pop", express.static("./node_modules/@tsparticles/interaction-external-pop")); diff --git a/demo/vanilla/package.json b/demo/vanilla/package.json index 2ade1747756..89b10a2dacf 100644 --- a/demo/vanilla/package.json +++ b/demo/vanilla/package.json @@ -1,7 +1,7 @@ { "name": "@tsparticles/demo", "private": true, - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "> TODO: description", "author": "Matteo Bruni ", "homepage": "https://particles.js.org", @@ -50,142 +50,143 @@ "winston": "^3.19.0" }, "dependencies": { - "@tsparticles/all": "workspace:4.0.0-beta.0", - "@tsparticles/basic": "workspace:4.0.0-beta.0", - "@tsparticles/canvas-utils": "workspace:4.0.0-beta.0", - "@tsparticles/confetti": "workspace:4.0.0-beta.0", - "@tsparticles/configs": "workspace:4.0.0-beta.0", - "@tsparticles/effect-bubble": "workspace:4.0.0-beta.0", - "@tsparticles/effect-particles": "workspace:4.0.0-beta.0", - "@tsparticles/effect-shadow": "workspace:4.0.0-beta.0", - "@tsparticles/effect-trail": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/fireworks": "workspace:4.0.0-beta.0", - "@tsparticles/fractal-noise": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-attract": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-bounce": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-bubble": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-connect": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-drag": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-grab": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-parallax": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-particle": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-pause": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-pop": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-push": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-remove": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-repulse": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-slow": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-external-trail": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-light": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-particles-attract": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-particles-collisions": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-particles-links": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-particles-repulse": "workspace:4.0.0-beta.0", - "@tsparticles/noise-field": "workspace:4.0.0-beta.0", - "@tsparticles/path-branches": "workspace:4.0.0-beta.0", - "@tsparticles/path-brownian": "workspace:4.0.0-beta.0", - "@tsparticles/path-curl-noise": "workspace:4.0.0-beta.0", - "@tsparticles/path-curves": "workspace:4.0.0-beta.0", - "@tsparticles/path-fractal-noise": "workspace:4.0.0-beta.0", - "@tsparticles/path-grid": "workspace:4.0.0-beta.0", - "@tsparticles/path-levy": "workspace:4.0.0-beta.0", - "@tsparticles/path-perlin-noise": "workspace:4.0.0-beta.0", - "@tsparticles/path-polygon": "workspace:4.0.0-beta.0", - "@tsparticles/path-random": "workspace:4.0.0-beta.0", - "@tsparticles/path-simplex-noise": "workspace:4.0.0-beta.0", - "@tsparticles/path-spiral": "workspace:4.0.0-beta.0", - "@tsparticles/path-svg": "workspace:4.0.0-beta.0", - "@tsparticles/path-utils": "workspace:4.0.0-beta.0", - "@tsparticles/path-zig-zag": "workspace:4.0.0-beta.0", - "@tsparticles/perlin-noise": "workspace:4.0.0-beta.0", - "@tsparticles/pjs": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-absorbers": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-background-mask": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-blend": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-canvas-mask": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-back": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-bounce": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-circ": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-cubic": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-elastic": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-expo": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-gaussian": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-linear": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-quad": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-quart": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-quint": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-sigmoid": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-sine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-easing-smoothstep": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-canvas": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-circle": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-path": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-polygon": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters-shape-square": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-export-image": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-export-json": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-export-video": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-hex-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-hsl-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-hsv-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-hwb-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-infection": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-lab-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-lch-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-manual-particles": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-motion": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-named-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-oklab-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-oklch-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-poisson-disc": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-polygon-mask": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-responsive": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-rgb-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-sounds": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-themes": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-trail": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-zoom": "workspace:4.0.0-beta.0", - "@tsparticles/shape-arrow": "workspace:4.0.0-beta.0", - "@tsparticles/shape-cards": "workspace:4.0.0-beta.0", - "@tsparticles/shape-circle": "workspace:4.0.0-beta.0", - "@tsparticles/shape-cog": "workspace:4.0.0-beta.0", - "@tsparticles/shape-emoji": "workspace:4.0.0-beta.0", - "@tsparticles/shape-heart": "workspace:4.0.0-beta.0", - "@tsparticles/shape-image": "workspace:4.0.0-beta.0", - "@tsparticles/shape-infinity": "workspace:4.0.0-beta.0", - "@tsparticles/shape-line": "workspace:4.0.0-beta.0", - "@tsparticles/shape-matrix": "workspace:4.0.0-beta.0", - "@tsparticles/shape-path": "workspace:4.0.0-beta.0", - "@tsparticles/shape-polygon": "workspace:4.0.0-beta.0", - "@tsparticles/shape-rounded-polygon": "workspace:4.0.0-beta.0", - "@tsparticles/shape-rounded-rect": "workspace:4.0.0-beta.0", - "@tsparticles/shape-spiral": "workspace:4.0.0-beta.0", - "@tsparticles/shape-square": "workspace:4.0.0-beta.0", - "@tsparticles/shape-squircle": "workspace:4.0.0-beta.0", - "@tsparticles/shape-star": "workspace:4.0.0-beta.0", - "@tsparticles/shape-text": "workspace:4.0.0-beta.0", - "@tsparticles/simplex-noise": "workspace:4.0.0-beta.0", - "@tsparticles/slim": "workspace:4.0.0-beta.0", - "@tsparticles/smooth-value-noise": "workspace:4.0.0-beta.0", - "@tsparticles/updater-destroy": "workspace:4.0.0-beta.0", - "@tsparticles/updater-fill-color": "workspace:4.0.0-beta.0", - "@tsparticles/updater-gradient": "workspace:4.0.0-beta.0", - "@tsparticles/updater-life": "workspace:4.0.0-beta.0", - "@tsparticles/updater-opacity": "workspace:4.0.0-beta.0", - "@tsparticles/updater-orbit": "workspace:4.0.0-beta.0", - "@tsparticles/updater-out-modes": "workspace:4.0.0-beta.0", - "@tsparticles/updater-roll": "workspace:4.0.0-beta.0", - "@tsparticles/updater-rotate": "workspace:4.0.0-beta.0", - "@tsparticles/updater-size": "workspace:4.0.0-beta.0", - "@tsparticles/updater-stroke-color": "workspace:4.0.0-beta.0", - "@tsparticles/updater-tilt": "workspace:4.0.0-beta.0", - "@tsparticles/updater-twinkle": "workspace:4.0.0-beta.0", - "@tsparticles/updater-wobble": "workspace:4.0.0-beta.0", - "tsparticles": "workspace:4.0.0-beta.0" + "@tsparticles/all": "workspace:4.0.0-beta.1", + "@tsparticles/basic": "workspace:4.0.0-beta.1", + "@tsparticles/canvas-utils": "workspace:4.0.0-beta.1", + "@tsparticles/confetti": "workspace:4.0.0-beta.1", + "@tsparticles/configs": "workspace:4.0.0-beta.1", + "@tsparticles/effect-bubble": "workspace:4.0.0-beta.1", + "@tsparticles/effect-particles": "workspace:4.0.0-beta.1", + "@tsparticles/effect-shadow": "workspace:4.0.0-beta.1", + "@tsparticles/effect-trail": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/fireworks": "workspace:4.0.0-beta.1", + "@tsparticles/fractal-noise": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-attract": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-bounce": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-bubble": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-cannon": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-connect": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-drag": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-grab": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-parallax": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-particle": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-pause": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-pop": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-push": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-remove": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-repulse": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-slow": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-external-trail": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-light": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-particles-attract": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-particles-collisions": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-particles-links": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-particles-repulse": "workspace:4.0.0-beta.1", + "@tsparticles/noise-field": "workspace:4.0.0-beta.1", + "@tsparticles/path-branches": "workspace:4.0.0-beta.1", + "@tsparticles/path-brownian": "workspace:4.0.0-beta.1", + "@tsparticles/path-curl-noise": "workspace:4.0.0-beta.1", + "@tsparticles/path-curves": "workspace:4.0.0-beta.1", + "@tsparticles/path-fractal-noise": "workspace:4.0.0-beta.1", + "@tsparticles/path-grid": "workspace:4.0.0-beta.1", + "@tsparticles/path-levy": "workspace:4.0.0-beta.1", + "@tsparticles/path-perlin-noise": "workspace:4.0.0-beta.1", + "@tsparticles/path-polygon": "workspace:4.0.0-beta.1", + "@tsparticles/path-random": "workspace:4.0.0-beta.1", + "@tsparticles/path-simplex-noise": "workspace:4.0.0-beta.1", + "@tsparticles/path-spiral": "workspace:4.0.0-beta.1", + "@tsparticles/path-svg": "workspace:4.0.0-beta.1", + "@tsparticles/path-utils": "workspace:4.0.0-beta.1", + "@tsparticles/path-zig-zag": "workspace:4.0.0-beta.1", + "@tsparticles/perlin-noise": "workspace:4.0.0-beta.1", + "@tsparticles/pjs": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-absorbers": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-background-mask": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-blend": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-canvas-mask": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-back": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-bounce": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-circ": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-cubic": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-elastic": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-expo": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-gaussian": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-linear": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-quad": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-quart": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-quint": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-sigmoid": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-sine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-easing-smoothstep": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-canvas": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-circle": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-path": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-polygon": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters-shape-square": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-export-image": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-export-json": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-export-video": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-hex-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-hsl-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-hsv-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-hwb-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-infection": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-lab-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-lch-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-manual-particles": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-motion": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-named-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-oklab-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-oklch-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-poisson-disc": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-polygon-mask": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-responsive": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-rgb-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-sounds": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-themes": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-trail": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-zoom": "workspace:4.0.0-beta.1", + "@tsparticles/shape-arrow": "workspace:4.0.0-beta.1", + "@tsparticles/shape-cards": "workspace:4.0.0-beta.1", + "@tsparticles/shape-circle": "workspace:4.0.0-beta.1", + "@tsparticles/shape-cog": "workspace:4.0.0-beta.1", + "@tsparticles/shape-emoji": "workspace:4.0.0-beta.1", + "@tsparticles/shape-heart": "workspace:4.0.0-beta.1", + "@tsparticles/shape-image": "workspace:4.0.0-beta.1", + "@tsparticles/shape-infinity": "workspace:4.0.0-beta.1", + "@tsparticles/shape-line": "workspace:4.0.0-beta.1", + "@tsparticles/shape-matrix": "workspace:4.0.0-beta.1", + "@tsparticles/shape-path": "workspace:4.0.0-beta.1", + "@tsparticles/shape-polygon": "workspace:4.0.0-beta.1", + "@tsparticles/shape-rounded-polygon": "workspace:4.0.0-beta.1", + "@tsparticles/shape-rounded-rect": "workspace:4.0.0-beta.1", + "@tsparticles/shape-spiral": "workspace:4.0.0-beta.1", + "@tsparticles/shape-square": "workspace:4.0.0-beta.1", + "@tsparticles/shape-squircle": "workspace:4.0.0-beta.1", + "@tsparticles/shape-star": "workspace:4.0.0-beta.1", + "@tsparticles/shape-text": "workspace:4.0.0-beta.1", + "@tsparticles/simplex-noise": "workspace:4.0.0-beta.1", + "@tsparticles/slim": "workspace:4.0.0-beta.1", + "@tsparticles/smooth-value-noise": "workspace:4.0.0-beta.1", + "@tsparticles/updater-destroy": "workspace:4.0.0-beta.1", + "@tsparticles/updater-fill-color": "workspace:4.0.0-beta.1", + "@tsparticles/updater-gradient": "workspace:4.0.0-beta.1", + "@tsparticles/updater-life": "workspace:4.0.0-beta.1", + "@tsparticles/updater-opacity": "workspace:4.0.0-beta.1", + "@tsparticles/updater-orbit": "workspace:4.0.0-beta.1", + "@tsparticles/updater-out-modes": "workspace:4.0.0-beta.1", + "@tsparticles/updater-roll": "workspace:4.0.0-beta.1", + "@tsparticles/updater-rotate": "workspace:4.0.0-beta.1", + "@tsparticles/updater-size": "workspace:4.0.0-beta.1", + "@tsparticles/updater-stroke-color": "workspace:4.0.0-beta.1", + "@tsparticles/updater-tilt": "workspace:4.0.0-beta.1", + "@tsparticles/updater-twinkle": "workspace:4.0.0-beta.1", + "@tsparticles/updater-wobble": "workspace:4.0.0-beta.1", + "tsparticles": "workspace:4.0.0-beta.1" }, "type": "module" } diff --git a/demo/vanilla/public/javascripts/demo.js b/demo/vanilla/public/javascripts/demo.js index 0401173fce4..8b8ae250c79 100644 --- a/demo/vanilla/public/javascripts/demo.js +++ b/demo/vanilla/public/javascripts/demo.js @@ -93,7 +93,10 @@ }); } - const particles = await tsParticles.load({ id: "tsparticles", options: tsParticles.configs[presetId] }); + const particles = await tsParticles.load({ + id: "tsparticles", + options: tsParticles.pluginManager.configs[presetId], + }); localStorage.presetId = presetId; @@ -165,14 +168,14 @@ document.addEventListener("DOMContentLoaded", async () => { await initParticles(tsParticles); - for (const presetId in tsParticles.configs) { - const preset = tsParticles.configs[presetId]; + for (const presetId in tsParticles.pluginManager.configs) { + const preset = tsParticles.pluginManager.configs[presetId]; - const option = document.createElement("option"); - option.value = presetId; - option.text = preset.name || presetId; + const option = document.createElement("option"); + option.value = presetId; + option.text = preset.name || presetId; - document.getElementById("presets").appendChild(option); + document.getElementById("presets").appendChild(option); } const element = document.getElementById("editor"), options = { diff --git a/demo/vanilla/views/index.pug b/demo/vanilla/views/index.pug index 635288cef70..b27e4d04631 100644 --- a/demo/vanilla/views/index.pug +++ b/demo/vanilla/views/index.pug @@ -128,6 +128,7 @@ html(lang="en") script(src="/interaction-external-attract/tsparticles.interaction.external.attract.min.js") script(src="/interaction-external-bounce/tsparticles.interaction.external.bounce.min.js") script(src="/interaction-external-bubble/tsparticles.interaction.external.bubble.min.js") + script(src="/interaction-external-cannon/tsparticles.interaction.external.cannon.min.js") script(src="/interaction-external-connect/tsparticles.interaction.external.connect.min.js") script(src="/interaction-external-drag/tsparticles.interaction.external.drag.min.js") script(src="/interaction-external-grab/tsparticles.interaction.external.grab.min.js") diff --git a/demo/vanilla_new/CHANGELOG.md b/demo/vanilla_new/CHANGELOG.md index fb72392b2d4..96b9d5259ad 100644 --- a/demo/vanilla_new/CHANGELOG.md +++ b/demo/vanilla_new/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/demo-new + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/demo-new diff --git a/demo/vanilla_new/package.json b/demo/vanilla_new/package.json index b43cc393f38..586bd6ced2a 100644 --- a/demo/vanilla_new/package.json +++ b/demo/vanilla_new/package.json @@ -1,7 +1,7 @@ { "name": "@tsparticles/demo-new", "private": true, - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles Demo Website", "main": "index.html", "scripts": { @@ -40,18 +40,18 @@ "sass": "^1.98.0" }, "dependencies": { - "@tsparticles/configs": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-light": "workspace:4.0.0-beta.0", - "@tsparticles/interaction-particles-repulse": "workspace:4.0.0-beta.0", - "@tsparticles/path-curves": "workspace:4.0.0-beta.0", - "@tsparticles/path-perlin-noise": "workspace:4.0.0-beta.0", - "@tsparticles/path-polygon": "workspace:4.0.0-beta.0", - "@tsparticles/path-simplex-noise": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-infection": "workspace:4.0.0-beta.0", - "@tsparticles/updater-gradient": "workspace:4.0.0-beta.0", - "@tsparticles/updater-orbit": "workspace:4.0.0-beta.0", - "tsparticles": "workspace:4.0.0-beta.0" + "@tsparticles/configs": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-light": "workspace:4.0.0-beta.1", + "@tsparticles/interaction-particles-repulse": "workspace:4.0.0-beta.1", + "@tsparticles/path-curves": "workspace:4.0.0-beta.1", + "@tsparticles/path-perlin-noise": "workspace:4.0.0-beta.1", + "@tsparticles/path-polygon": "workspace:4.0.0-beta.1", + "@tsparticles/path-simplex-noise": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-infection": "workspace:4.0.0-beta.1", + "@tsparticles/updater-gradient": "workspace:4.0.0-beta.1", + "@tsparticles/updater-orbit": "workspace:4.0.0-beta.1", + "tsparticles": "workspace:4.0.0-beta.1" }, "type": "module" } diff --git a/demo/vite/CHANGELOG.md b/demo/vite/CHANGELOG.md index 608e9712c01..35f4eb20452 100644 --- a/demo/vite/CHANGELOG.md +++ b/demo/vite/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/vite-demo + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/vite-demo diff --git a/demo/vite/package.json b/demo/vite/package.json index a3447c4c3df..ff900259e70 100644 --- a/demo/vite/package.json +++ b/demo/vite/package.json @@ -1,7 +1,7 @@ { "name": "@tsparticles/vite-demo", "private": true, - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "type": "module", "scripts": { "dev": "vite", @@ -9,9 +9,9 @@ "preview": "vite preview" }, "dependencies": { - "@tsparticles/all": "workspace:4.0.0-beta.0", - "@tsparticles/configs": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/all": "workspace:4.0.0-beta.1", + "@tsparticles/configs": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "devDependencies": { "typescript": "^5.9.3", diff --git a/effects/bubble/CHANGELOG.md b/effects/bubble/CHANGELOG.md index 94fe37a59ca..e7a15d5a105 100644 --- a/effects/bubble/CHANGELOG.md +++ b/effects/bubble/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/effect-bubble + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/effect-bubble diff --git a/effects/bubble/package.dist.json b/effects/bubble/package.dist.json index fec9ddbbeda..8913bea9b75 100644 --- a/effects/bubble/package.dist.json +++ b/effects/bubble/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/effect-bubble", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles bubble effect", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/effects/bubble/package.json b/effects/bubble/package.json index e3356d982f1..1167b2c25e4 100644 --- a/effects/bubble/package.json +++ b/effects/bubble/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/effect-bubble", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles bubble effect", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/effects/bubble/src/index.ts b/effects/bubble/src/index.ts index 563498ee244..4e1dca7b1f1 100644 --- a/effects/bubble/src/index.ts +++ b/effects/bubble/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadBubbleEffect(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addEffect("bubble", async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addEffect("bubble", async () => { const { BubbleDrawer } = await import("./BubbleDrawer.js"); return new BubbleDrawer(); diff --git a/effects/particles/CHANGELOG.md b/effects/particles/CHANGELOG.md index e43bbb694d6..e424af96c0f 100644 --- a/effects/particles/CHANGELOG.md +++ b/effects/particles/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/effect-particles + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/effect-particles diff --git a/effects/particles/package.dist.json b/effects/particles/package.dist.json index ab9123f055e..ed6a631d31d 100644 --- a/effects/particles/package.dist.json +++ b/effects/particles/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/effect-particles", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles effect", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/effects/particles/package.json b/effects/particles/package.json index f4f18186f85..08fc361b620 100644 --- a/effects/particles/package.json +++ b/effects/particles/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/effect-particles", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles effect", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/effects/particles/src/ParticlesDrawer.ts b/effects/particles/src/ParticlesDrawer.ts index 46789a668b9..46ed6b90e58 100644 --- a/effects/particles/src/ParticlesDrawer.ts +++ b/effects/particles/src/ParticlesDrawer.ts @@ -38,9 +38,15 @@ type ParticlesParticle = Particle & { }; export class ParticlesDrawer implements IEffectDrawer { + private readonly _container; + + constructor(container: Container) { + this._container = container; + } + drawAfter(data: IShapeDrawData): void { const { particle } = data, - { container } = particle; + { _container: container } = this; if (!particle.particlesNextSpawn) { return; diff --git a/effects/particles/src/index.ts b/effects/particles/src/index.ts index 9a8ea328173..51eb7df912a 100644 --- a/effects/particles/src/index.ts +++ b/effects/particles/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadParticlesEffect(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addEffect("particles", async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addEffect("particles", async container => { const { ParticlesDrawer } = await import("./ParticlesDrawer.js"); - return new ParticlesDrawer(); + return new ParticlesDrawer(container); }); }); } diff --git a/effects/shadow/CHANGELOG.md b/effects/shadow/CHANGELOG.md index eaa45845a6f..6ce812fee7c 100644 --- a/effects/shadow/CHANGELOG.md +++ b/effects/shadow/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/effect-shadow + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/effect-shadow diff --git a/effects/shadow/package.dist.json b/effects/shadow/package.dist.json index 2d326fcd679..4899babdc1c 100644 --- a/effects/shadow/package.dist.json +++ b/effects/shadow/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/effect-shadow", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles shadow effect", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/effects/shadow/package.json b/effects/shadow/package.json index 2da62494812..699aaea10a9 100644 --- a/effects/shadow/package.json +++ b/effects/shadow/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/effect-shadow", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles shadow effect", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/effects/shadow/src/ShadowDrawer.ts b/effects/shadow/src/ShadowDrawer.ts index 1d29e9bfa3e..9b8053f0edd 100644 --- a/effects/shadow/src/ShadowDrawer.ts +++ b/effects/shadow/src/ShadowDrawer.ts @@ -1,6 +1,5 @@ import { type Container, - type Engine, type ICoordinates, type IEffectDrawer, type IOptionsColor, @@ -9,6 +8,7 @@ import { type IShapeValues, OptionsColor, type Particle, + type PluginManager, getStyleFromRgb, originPoint, rangeColorToRgb, @@ -30,10 +30,12 @@ type ShadowParticle = Particle & { }; export class ShadowDrawer implements IEffectDrawer { - private readonly _engine: Engine; + private readonly _container; + private readonly _pluginManager; - constructor(engine: Engine) { - this._engine = engine; + constructor(pluginManager: PluginManager, container: Container) { + this._pluginManager = pluginManager; + this._container = container; } drawAfter(data: IShapeDrawData): void { @@ -47,7 +49,7 @@ export class ShadowDrawer implements IEffectDrawer { drawBefore(data: IShapeDrawData): void { const { particle, context } = data, - { container } = particle, + { _container: container } = this, shadowParticle = particle as ShadowParticle, shadowColor = shadowParticle.shadowColor, shadowOffset = shadowParticle.shadowOffset; @@ -66,7 +68,7 @@ export class ShadowDrawer implements IEffectDrawer { const effectData = particle.effectData as IShadowData | undefined, shadowColor = OptionsColor.create(new OptionsColor(), effectData?.color); - particle.shadowColor = rangeColorToRgb(this._engine, shadowColor); + particle.shadowColor = rangeColorToRgb(this._pluginManager, shadowColor); particle.shadowBlur = effectData?.blur ?? defaultShadowBlur; particle.shadowOffset = effectData?.offset ?? originPoint; } diff --git a/effects/shadow/src/index.ts b/effects/shadow/src/index.ts index ccff5e6affc..4d176611327 100644 --- a/effects/shadow/src/index.ts +++ b/effects/shadow/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadShadowEffect(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addEffect("shadow", async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addEffect("shadow", async container => { const { ShadowDrawer } = await import("./ShadowDrawer.js"); - return new ShadowDrawer(e); + return new ShadowDrawer(e.pluginManager, container); }); }); } diff --git a/effects/trail/CHANGELOG.md b/effects/trail/CHANGELOG.md index f39ef93e4ff..91f8665392e 100644 --- a/effects/trail/CHANGELOG.md +++ b/effects/trail/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/effect-trail + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) ### Bug Fixes diff --git a/effects/trail/package.dist.json b/effects/trail/package.dist.json index e1450c75231..e5de668061f 100644 --- a/effects/trail/package.dist.json +++ b/effects/trail/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/effect-trail", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles trail effect", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/effects/trail/package.json b/effects/trail/package.json index a1c25fdbd64..76520762c79 100644 --- a/effects/trail/package.json +++ b/effects/trail/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/effect-trail", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles trail effect", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/effects/trail/src/TrailDrawer.ts b/effects/trail/src/TrailDrawer.ts index 71641f4f21d..c6c5dd88a3e 100644 --- a/effects/trail/src/TrailDrawer.ts +++ b/effects/trail/src/TrailDrawer.ts @@ -58,10 +58,17 @@ const defaultTransform = { }; export class TrailDrawer implements IEffectDrawer { + private readonly _container; + + constructor(container: Container) { + this._container = container; + } + drawAfter(data: IShapeDrawData): void { const { context, drawPosition, drawRadius, drawScale, particle, transformData } = data, + container = this._container, diameter = drawRadius * double, - pxRatio = particle.container.retina.pixelRatio, + pxRatio = container.retina.pixelRatio, trail = particle.trail; if (!trail || !particle.trailLength) { @@ -92,8 +99,8 @@ export class TrailDrawer implements IEffectDrawer { const trailLength = Math.min(trail.length, pathLength), canvasSize = { - width: particle.container.canvas.size.width * drawScale + diameter, - height: particle.container.canvas.size.height * drawScale + diameter, + width: container.canvas.size.width * drawScale + diameter, + height: container.canvas.size.height * drawScale + diameter, }; context.save(); diff --git a/effects/trail/src/index.ts b/effects/trail/src/index.ts index 1918809047b..1aad9d25246 100644 --- a/effects/trail/src/index.ts +++ b/effects/trail/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadTrailEffect(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addEffect("trail", async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addEffect("trail", async container => { const { TrailDrawer } = await import("./TrailDrawer.js"); - return new TrailDrawer(); + return new TrailDrawer(container); }); }); } diff --git a/engine/CHANGELOG.md b/engine/CHANGELOG.md index 627a9a4a10a..e7d5761d345 100644 --- a/engine/CHANGELOG.md +++ b/engine/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +### Bug Fixes + +- improved cannon and interactivity events ([b836a59](https://github.com/tsparticles/tsparticles/commit/b836a59e90afdc68b6307e8d37898e71b5881a21)) + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/engine diff --git a/engine/README.md b/engine/README.md index 0bf9af293a0..1f0f2dde239 100644 --- a/engine/README.md +++ b/engine/README.md @@ -98,8 +98,6 @@ React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Riot.j - [Migrating from Particles.js](#migrating-from-particlesjs) - [Plugins/Customizations](#pluginscustomizations) - [Dependency Graph](#dependency-graph) -- [Sponsors](#sponsors) -- [Huge thanks to JetBrains for the 2020-2022 Open Source Licenses!](#huge-thanks-to-jetbrains-for-the-2020-2022-open-source-licenses) --- @@ -989,22 +987,3 @@ flowchart TD bundle-full --> bundle-all ``` - ---- - -

- - JetBrains - - - JetBrains - -

- -## Sponsors - -### JetBrains - -Huge thanks to [JetBrains](https://www.jetbrains.com/?from=tsParticles) for the 2020-2022 Open Source Licenses! - -[JetBrains WebStorm](https://www.jetbrains.com/webstorm/?from=tsParticles) is used to maintain this project. diff --git a/engine/package.dist.json b/engine/package.dist.json index 0b18fe275ef..4f619c434b8 100644 --- a/engine/package.dist.json +++ b/engine/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/engine", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "Easily create highly customizable particle, confetti and fireworks 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.", "homepage": "https://particles.js.org", "scripts": { diff --git a/engine/package.json b/engine/package.json index 9b0ea00b043..7a93fd7cb4f 100644 --- a/engine/package.json +++ b/engine/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/engine", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "Easily create highly customizable particle, confetti and fireworks 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.", "homepage": "https://particles.js.org", "scripts": { diff --git a/engine/src/Core/Canvas.ts b/engine/src/Core/Canvas.ts deleted file mode 100644 index 41a3f2e89b4..00000000000 --- a/engine/src/Core/Canvas.ts +++ /dev/null @@ -1,879 +0,0 @@ -import { clear, drawParticle, drawParticlePlugin, paintBase, paintImage } from "../Utils/CanvasUtils.js"; -import { cloneStyle, getFullScreenStyle, safeMatchMedia, safeMutationObserver } from "../Utils/Utils.js"; -import { - defaultCompositeValue, - defaultTransformValue, - defaultZoom, - generatedAttribute, - half, - minimumSize, - zIndexFactorOffset, -} from "./Utils/Constants.js"; -import { getStyleFromHsl, getStyleFromRgb, rangeColorToHsl, rangeColorToRgb } from "../Utils/ColorUtils.js"; -import type { Container } from "./Container.js"; -import type { Engine } from "./Engine.js"; -import type { IContainerPlugin } from "./Interfaces/IContainerPlugin.js"; -import type { ICoordinates } from "./Interfaces/ICoordinates.js"; -import type { IDelta } from "./Interfaces/IDelta.js"; -import type { IDimension } from "./Interfaces/IDimension.js"; -import type { IHsl } from "./Interfaces/Colors.js"; -import type { IParticleColorStyle } from "./Interfaces/IParticleColorStyle.js"; -import type { IParticleTransformValues } from "./Interfaces/IParticleTransformValues.js"; -import type { IParticleUpdater } from "./Interfaces/IParticleUpdater.js"; -import type { Particle } from "./Particle.js"; - -const fColorIndex = 0, - sColorIndex = 1; - -/** - * @param factor - - * @param newFactor - - * @param key - - */ -function setTransformValue( - factor: Partial, - newFactor: Partial, - key: keyof IParticleTransformValues, -): void { - const newValue = newFactor[key]; - - if (newValue !== undefined) { - factor[key] = (factor[key] ?? defaultTransformValue) * newValue; - } -} - -/** - * - * @param canvas - - * @param style - - * @param important - - */ -function setStyle(canvas: HTMLCanvasElement, style?: CSSStyleDeclaration, important = false): void { - if (!style) { - return; - } - - const element = canvas, - elementStyle = element.style, - keys = new Set(); - - for (let i = 0; i < elementStyle.length; i++) { - const key = elementStyle.item(i); - - if (!key) { - continue; - } - - keys.add(key); - } - - for (let i = 0; i < style.length; i++) { - const key = style.item(i); - - if (!key) { - continue; - } - - keys.add(key); - } - - for (const key of keys) { - const value = style.getPropertyValue(key); - - if (value) { - elementStyle.setProperty(key, value, important ? "important" : ""); - } else { - elementStyle.removeProperty(key); - } - } -} - -/** - * Canvas manager - */ -export class Canvas { - /** - * The particles canvas - */ - element?: HTMLCanvasElement; - - /** - * The particles canvas dimension - */ - readonly size: IDimension; - - /** - * Current zoom level - */ - zoom = defaultZoom; - - private _canvasClearPlugins: IContainerPlugin[]; - private _canvasPaintPlugins: IContainerPlugin[]; - private _canvasSettings?: CanvasRenderingContext2DSettings; - private _clearDrawPlugins: IContainerPlugin[]; - private _colorPlugins: IContainerPlugin[]; - /** - * The particles canvas context - */ - private _context: CanvasRenderingContext2D | null; - private _drawParticlePlugins: IContainerPlugin[]; - private _drawParticlesCleanupPlugins: IContainerPlugin[]; - private _drawParticlesSetupPlugins: IContainerPlugin[]; - private _drawPlugins: IContainerPlugin[]; - private _drawSettingsCleanupPlugins: IContainerPlugin[]; - private _drawSettingsSetupPlugins: IContainerPlugin[]; - private readonly _engine; - private _generated; - private _mutationObserver?: MutationObserver; - private _originalStyle?: CSSStyleDeclaration; - private _pointerEvents: string; - private _postDrawUpdaters: IParticleUpdater[]; - private _preDrawUpdaters: IParticleUpdater[]; - private _resizePlugins: IContainerPlugin[]; - private readonly _reusableColorStyles: IParticleColorStyle = {}; - private readonly _reusablePluginColors: (IHsl | undefined)[] = [undefined, undefined]; - private readonly _reusableTransform: Partial = {}; - private readonly _standardSize: IDimension; - - /** - * Zoom center point (for centered zooming) - */ - private _zoomCenter?: ICoordinates; - - /** - * Constructor of canvas manager - * @param container - the parent container - * @param engine - the engine managing the whole library - */ - constructor( - private readonly container: Container, - engine: Engine, - ) { - this._engine = engine; - this._standardSize = { - height: 0, - width: 0, - }; - - const pxRatio = container.retina.pixelRatio, - stdSize = this._standardSize; - - this.size = { - height: stdSize.height * pxRatio, - width: stdSize.width * pxRatio, - }; - - this._context = null; - this._generated = false; - this._preDrawUpdaters = []; - this._postDrawUpdaters = []; - this._resizePlugins = []; - this._colorPlugins = []; - this._canvasClearPlugins = []; - this._canvasPaintPlugins = []; - this._clearDrawPlugins = []; - this._drawParticlePlugins = []; - this._drawParticlesCleanupPlugins = []; - this._drawParticlesSetupPlugins = []; - this._drawPlugins = []; - this._drawSettingsSetupPlugins = []; - this._drawSettingsCleanupPlugins = []; - this._pointerEvents = "none"; - } - - get settings(): CanvasRenderingContext2DSettings | undefined { - return this._canvasSettings; - } - - private get _fullScreen(): boolean { - return this.container.actualOptions.fullScreen.enable; - } - - canvasClear(): void { - if (!this.container.actualOptions.clear) { - return; - } - - this.draw(ctx => { - clear(ctx, this.size); - }); - } - - /** - * Clears the canvas content - */ - clear(): void { - let pluginHandled = false; - - for (const plugin of this._canvasClearPlugins) { - pluginHandled = plugin.canvasClear?.() ?? false; - - if (pluginHandled) { - break; - } - } - - if (pluginHandled) { - return; - } - - this.canvasClear(); - } - - /** - * Destroying object actions - */ - destroy(): void { - this.stop(); - - if (this._generated) { - const element = this.element; - - element?.remove(); - - this.element = undefined; - } else { - this._resetOriginalStyle(); - } - - this._preDrawUpdaters = []; - this._postDrawUpdaters = []; - this._resizePlugins = []; - this._colorPlugins = []; - this._canvasClearPlugins = []; - this._canvasPaintPlugins = []; - this._clearDrawPlugins = []; - this._drawParticlePlugins = []; - this._drawParticlesCleanupPlugins = []; - this._drawParticlesSetupPlugins = []; - this._drawPlugins = []; - this._drawSettingsSetupPlugins = []; - this._drawSettingsCleanupPlugins = []; - } - - /** - * Generic draw method for drawing stuff on the canvas context - * @param cb - - * @returns the result of the callback - */ - draw(cb: (context: CanvasRenderingContext2D) => T): T | undefined { - const ctx = this._context; - - if (!ctx) { - return; - } - - return cb(ctx); - } - - /** - * Draws the specified particle in the canvas - * @param particle - the particle to draw - * @param delta - the frame delta time values - */ - drawParticle(particle: Particle, delta: IDelta): void { - if (particle.spawning || particle.destroyed) { - return; - } - - const radius = particle.getRadius(); - - if (radius <= minimumSize) { - return; - } - - const pfColor = particle.getFillColor(), - psColor = particle.getStrokeColor(); - - let [fColor, sColor] = this._getPluginParticleColors(particle); - - fColor ??= pfColor; - sColor ??= psColor; - - if (!fColor && !sColor) { - return; - } - - const container = this.container, - zIndexOptions = particle.options.zIndex, - zIndexFactor = zIndexFactorOffset - particle.zIndexFactor, - { fillOpacity, opacity, strokeOpacity } = particle.getOpacity(), - transform = this._reusableTransform, - colorStyles = this._reusableColorStyles, - fill = fColor ? getStyleFromHsl(fColor, container.hdr, fillOpacity * opacity) : undefined, - stroke = sColor ? getStyleFromHsl(sColor, container.hdr, strokeOpacity * opacity) : fill; - - transform.a = transform.b = transform.c = transform.d = undefined; - - colorStyles.fill = fill; - colorStyles.stroke = stroke; - - this.draw((context): void => { - for (const plugin of this._drawParticlesSetupPlugins) { - plugin.drawParticleSetup?.(context, particle, delta); - } - - this._applyPreDrawUpdaters(context, particle, radius, opacity, colorStyles, transform); - - drawParticle({ - container, - context, - particle, - delta, - colorStyles, - radius: radius * zIndexFactor ** zIndexOptions.sizeRate, - opacity: opacity, - transform, - }); - - this._applyPostDrawUpdaters(particle); - - for (const plugin of this._drawParticlesCleanupPlugins) { - plugin.drawParticleCleanup?.(context, particle, delta); - } - }); - } - - /** - * Draws stuff using the given plugin, using the given particle - * @param particle - the particle used - * @param delta - the frame delta time values - */ - drawParticlePlugins(particle: Particle, delta: IDelta): void { - this.draw(ctx => { - for (const plugin of this._drawParticlePlugins) { - drawParticlePlugin(ctx, plugin, particle, delta); - } - }); - } - - drawParticles(delta: IDelta): void { - const { particles } = this.container; - - this.clear(); - - /* update each particle before drawing */ - particles.update(delta); - - this.draw(ctx => { - for (const plugin of this._drawSettingsSetupPlugins) { - plugin.drawSettingsSetup?.(ctx, delta); - } - - for (const plugin of this._drawPlugins) { - plugin.draw?.(ctx, delta); - } - - particles.drawParticles(delta); - - for (const plugin of this._clearDrawPlugins) { - plugin.clearDraw?.(ctx, delta); - } - - for (const plugin of this._drawSettingsCleanupPlugins) { - plugin.drawSettingsCleanup?.(ctx, delta); - } - }); - } - - getZoomCenter(): ICoordinates { - const pxRatio = this.container.retina.pixelRatio, - { width, height } = this.size; - - if (this._zoomCenter) { - return this._zoomCenter; - } - - return { - x: (width * half) / pxRatio, - y: (height * half) / pxRatio, - }; - } - - /** - * Initializes the canvas element - */ - init(): void { - this._safeMutationObserver(obs => { - obs.disconnect(); - }); - this._mutationObserver = safeMutationObserver(records => { - for (const record of records) { - if (record.type === "attributes" && record.attributeName === "style") { - this._repairStyle(); - } - } - }); - - this.resize(); - this._initStyle(); - this.initBackground(); - this._safeMutationObserver(obs => { - if (!this.element || !(this.element instanceof Node)) { - return; - } - - obs.observe(this.element, { attributes: true }); - }); - this.initUpdaters(); - this.initPlugins(); - this.paint(); - } - - /** - * Initializes the canvas background - */ - initBackground(): void { - const { container } = this, - options = container.actualOptions, - background = options.background, - element = this.element; - - if (!element) { - return; - } - - const elementStyle = element.style, - color = rangeColorToRgb(this._engine, background.color); - - if (color) { - elementStyle.backgroundColor = getStyleFromRgb(color, container.hdr, background.opacity); - } else { - elementStyle.backgroundColor = ""; - } - - elementStyle.backgroundImage = background.image || ""; - elementStyle.backgroundPosition = background.position || ""; - elementStyle.backgroundRepeat = background.repeat || ""; - elementStyle.backgroundSize = background.size || ""; - } - - /** - * Initializes the plugins needed by canvas - */ - initPlugins(): void { - this._resizePlugins = []; - this._colorPlugins = []; - this._canvasClearPlugins = []; - this._canvasPaintPlugins = []; - this._clearDrawPlugins = []; - this._drawParticlePlugins = []; - this._drawParticlesSetupPlugins = []; - this._drawParticlesCleanupPlugins = []; - this._drawPlugins = []; - this._drawSettingsSetupPlugins = []; - this._drawSettingsCleanupPlugins = []; - - for (const plugin of this.container.plugins) { - if (plugin.resize) { - this._resizePlugins.push(plugin); - } - - if (plugin.particleFillColor ?? plugin.particleStrokeColor) { - this._colorPlugins.push(plugin); - } - - if (plugin.canvasClear) { - this._canvasClearPlugins.push(plugin); - } - - if (plugin.canvasPaint) { - this._canvasPaintPlugins.push(plugin); - } - - if (plugin.drawParticle) { - this._drawParticlePlugins.push(plugin); - } - - if (plugin.drawParticleSetup) { - this._drawParticlesSetupPlugins.push(plugin); - } - - if (plugin.drawParticleCleanup) { - this._drawParticlesCleanupPlugins.push(plugin); - } - - if (plugin.draw) { - this._drawPlugins.push(plugin); - } - - if (plugin.drawSettingsSetup) { - this._drawSettingsSetupPlugins.push(plugin); - } - - if (plugin.drawSettingsCleanup) { - this._drawSettingsCleanupPlugins.push(plugin); - } - - if (plugin.clearDraw) { - this._clearDrawPlugins.push(plugin); - } - } - } - - /** - * Initializes the updaters needed by canvas - */ - initUpdaters(): void { - this._preDrawUpdaters = []; - this._postDrawUpdaters = []; - - for (const updater of this.container.particles.updaters) { - if (updater.afterDraw) { - this._postDrawUpdaters.push(updater); - } - - if (updater.getColorStyles ?? updater.getTransformValues ?? updater.beforeDraw) { - this._preDrawUpdaters.push(updater); - } - } - } - - /** - * Loads the canvas HTML element - * @param canvas - the canvas HTML element - */ - loadCanvas(canvas: HTMLCanvasElement): void { - if (this._generated && this.element) { - this.element.remove(); - } - - const container = this.container; - - this._generated = - generatedAttribute in canvas.dataset ? canvas.dataset[generatedAttribute] === "true" : this._generated; - this.element = canvas; - this.element.ariaHidden = "true"; - this._originalStyle = cloneStyle(this.element.style); - - const standardSize = this._standardSize; - - standardSize.height = canvas.offsetHeight; - standardSize.width = canvas.offsetWidth; - - const pxRatio = this.container.retina.pixelRatio, - retinaSize = this.size; - - canvas.height = retinaSize.height = standardSize.height * pxRatio; - canvas.width = retinaSize.width = standardSize.width * pxRatio; - - const canSupportHdrQuery = safeMatchMedia("(color-gamut: p3)"); - - this._canvasSettings = { - alpha: true, - colorSpace: canSupportHdrQuery?.matches && container.hdr ? "display-p3" : "srgb", - desynchronized: true, - willReadFrequently: false, - }; - this._context = this.element.getContext("2d", this._canvasSettings); - - if (this._context) { - this._context.globalCompositeOperation = defaultCompositeValue; - } - - this._safeMutationObserver(obs => { - obs.disconnect(); - }); - - container.retina.init(); - this.initBackground(); - - this._safeMutationObserver(obs => { - if (!this.element || !(this.element instanceof Node)) { - return; - } - - obs.observe(this.element, { attributes: true }); - }); - } - - /** - * Paints the canvas background - */ - paint(): void { - let handled = false; - - for (const plugin of this._canvasPaintPlugins) { - handled = plugin.canvasPaint?.() ?? false; - - if (handled) { - break; - } - } - - if (handled) { - return; - } - - this.paintBase(); - } - - paintBase(baseColor?: string): void { - this.draw(ctx => { - paintBase(ctx, this.size, baseColor); - }); - } - - paintImage(image: HTMLImageElement, opacity: number): void { - this.draw(ctx => { - paintImage(ctx, this.size, image, opacity); - }); - } - - /** - * Calculates the size of the canvas - * @returns true if the size changed - */ - resize(): boolean { - if (!this.element) { - return false; - } - - const container = this.container, - currentSize = container.canvas._standardSize, - newSize = { - width: this.element.offsetWidth, - height: this.element.offsetHeight, - }, - pxRatio = container.retina.pixelRatio, - retinaSize = { - width: newSize.width * pxRatio, - height: newSize.height * pxRatio, - }; - - if ( - newSize.height === currentSize.height && - newSize.width === currentSize.width && - retinaSize.height === this.element.height && - retinaSize.width === this.element.width - ) { - return false; - } - - const oldSize = { ...currentSize }; - - currentSize.height = newSize.height; - currentSize.width = newSize.width; - - const canvasSize = this.size; - - this.element.width = canvasSize.width = retinaSize.width; - this.element.height = canvasSize.height = retinaSize.height; - - if (this.container.started) { - container.particles.setResizeFactor({ - width: currentSize.width / oldSize.width, - height: currentSize.height / oldSize.height, - }); - } - - return true; - } - - setPointerEvents(type: string): void { - const element = this.element; - - if (!element) { - return; - } - - this._pointerEvents = type; - this._repairStyle(); - } - - /** - * Sets the zoom level and center point - * @param zoomLevel - the new zoom level - * @param center - optional center point for zoom (default is canvas center) - */ - setZoom(zoomLevel: number, center?: ICoordinates): void { - this.zoom = zoomLevel; - this._zoomCenter = center; - } - - stop(): void { - this._safeMutationObserver(obs => { - obs.disconnect(); - }); - - this._mutationObserver = undefined; - - this.draw(ctx => { - clear(ctx, this.size); - }); - } - - /** - * The window resize event handler - */ - async windowResize(): Promise { - if (!this.element || !this.resize()) { - return; - } - - const container = this.container, - needsRefresh = container.updateActualOptions(); - - /* density particles enabled */ - container.particles.setDensity(); - - this._applyResizePlugins(); - - if (needsRefresh) { - await container.refresh(); - } - } - - private readonly _applyPostDrawUpdaters: (particle: Particle) => void = particle => { - for (const updater of this._postDrawUpdaters) { - updater.afterDraw?.(particle); - } - }; - - private readonly _applyPreDrawUpdaters: ( - ctx: CanvasRenderingContext2D, - particle: Particle, - radius: number, - zOpacity: number, - colorStyles: IParticleColorStyle, - transform: Partial, - ) => void = (ctx, particle, radius, zOpacity, colorStyles, transform) => { - for (const updater of this._preDrawUpdaters) { - if (updater.getColorStyles) { - const { fill, stroke } = updater.getColorStyles(particle, ctx, radius, zOpacity); - - if (fill) { - colorStyles.fill = fill; - } - - if (stroke) { - colorStyles.stroke = stroke; - } - } - - if (updater.getTransformValues) { - const updaterTransform = updater.getTransformValues(particle); - - for (const key in updaterTransform) { - setTransformValue(transform, updaterTransform, key as keyof IParticleTransformValues); - } - } - - updater.beforeDraw?.(particle); - } - }; - - private readonly _applyResizePlugins: () => void = () => { - for (const plugin of this._resizePlugins) { - plugin.resize?.(); - } - }; - - private readonly _getPluginParticleColors: (particle: Particle) => (IHsl | undefined)[] = particle => { - let fColor: IHsl | undefined, sColor: IHsl | undefined; - - for (const plugin of this._colorPlugins) { - if (!fColor && plugin.particleFillColor) { - fColor = rangeColorToHsl(this._engine, plugin.particleFillColor(particle)); - } - - if (!sColor && plugin.particleStrokeColor) { - sColor = rangeColorToHsl(this._engine, plugin.particleStrokeColor(particle)); - } - - if (fColor && sColor) { - break; - } - } - - this._reusablePluginColors[fColorIndex] = fColor; - this._reusablePluginColors[sColorIndex] = sColor; - - return this._reusablePluginColors; - }; - - private readonly _initStyle: () => void = () => { - const element = this.element, - options = this.container.actualOptions; - - if (!element) { - return; - } - - if (this._fullScreen) { - this._setFullScreenStyle(); - } else { - this._resetOriginalStyle(); - } - - for (const key in options.style) { - if (!key || !(key in options.style)) { - continue; - } - - const value = options.style[key]; - - if (!value) { - continue; - } - - element.style.setProperty(key, value, "important"); - } - }; - - private readonly _repairStyle: () => void = () => { - const element = this.element; - - if (!element) { - return; - } - - this._safeMutationObserver(observer => { - observer.disconnect(); - }); - this._initStyle(); - this.initBackground(); - - const pointerEvents = this._pointerEvents; - - element.style.pointerEvents = pointerEvents; - element.setAttribute("pointer-events", pointerEvents); - - this._safeMutationObserver(observer => { - if (!(element instanceof Node)) { - return; - } - - observer.observe(element, { attributes: true }); - }); - }; - - private readonly _resetOriginalStyle: () => void = () => { - const element = this.element, - originalStyle = this._originalStyle; - - if (!element || !originalStyle) { - return; - } - - setStyle(element, originalStyle, true); - }; - - private readonly _safeMutationObserver: (callback: (observer: MutationObserver) => void) => void = callback => { - if (!this._mutationObserver) { - return; - } - - callback(this._mutationObserver); - }; - - private readonly _setFullScreenStyle: () => void = () => { - const element = this.element; - - if (!element) { - return; - } - - setStyle(element, getFullScreenStyle(this.container.actualOptions.fullScreen.zIndex), true); - }; -} diff --git a/engine/src/Core/CanvasManager.ts b/engine/src/Core/CanvasManager.ts new file mode 100644 index 00000000000..f63f7223134 --- /dev/null +++ b/engine/src/Core/CanvasManager.ts @@ -0,0 +1,475 @@ +import { cloneStyle, getFullScreenStyle, safeMatchMedia, safeMutationObserver } from "../Utils/Utils.js"; +import { defaultZoom, generatedAttribute, half } from "./Utils/Constants.js"; +import { getStyleFromRgb, rangeColorToRgb } from "../Utils/ColorUtils.js"; +import type { Container } from "./Container.js"; +import type { IContainerPlugin } from "./Interfaces/IContainerPlugin.js"; +import type { ICoordinates } from "./Interfaces/ICoordinates.js"; +import type { IDimension } from "./Interfaces/IDimension.js"; +import type { PluginManager } from "./Utils/PluginManager.js"; +import { RenderManager } from "./RenderManager.js"; + +/** + * + * @param canvas - + * @param style - + * @param important - + */ +function setStyle(canvas: HTMLCanvasElement, style?: CSSStyleDeclaration, important = false): void { + if (!style) { + return; + } + + const element = canvas, + elementStyle = element.style, + keys = new Set(); + + for (let i = 0; i < elementStyle.length; i++) { + const key = elementStyle.item(i); + + if (!key) { + continue; + } + + keys.add(key); + } + + for (let i = 0; i < style.length; i++) { + const key = style.item(i); + + if (!key) { + continue; + } + + keys.add(key); + } + + for (const key of keys) { + const value = style.getPropertyValue(key); + + if (value) { + elementStyle.setProperty(key, value, important ? "important" : ""); + } else { + elementStyle.removeProperty(key); + } + } +} + +/** + * Canvas manager + */ +export class CanvasManager { + /** + * The particles canvas + */ + element?: HTMLCanvasElement; + + readonly render; + + /** + * The particles canvas dimension + */ + readonly size: IDimension; + + /** + * Current zoom level + */ + zoom = defaultZoom; + + private readonly _container; + private _generated; + private _mutationObserver?: MutationObserver; + private _originalStyle?: CSSStyleDeclaration; + private readonly _pluginManager; + private _pointerEvents: string; + private _resizePlugins: IContainerPlugin[]; + private readonly _standardSize: IDimension; + + /** + * Zoom center point (for centered zooming) + */ + private _zoomCenter?: ICoordinates; + + /** + * Constructor of canvas manager + * @param pluginManager - the engine managing the whole library + * @param container - the parent container + */ + constructor(pluginManager: PluginManager, container: Container) { + this._pluginManager = pluginManager; + this._container = container; + this.render = new RenderManager(pluginManager, container, this); + this._standardSize = { + height: 0, + width: 0, + }; + + const pxRatio = container.retina.pixelRatio, + stdSize = this._standardSize; + + this.size = { + height: stdSize.height * pxRatio, + width: stdSize.width * pxRatio, + }; + + this._generated = false; + this._resizePlugins = []; + this._pointerEvents = "none"; + } + + private get _fullScreen(): boolean { + return this._container.actualOptions.fullScreen.enable; + } + + /** + * Destroying object actions + */ + destroy(): void { + this.stop(); + + if (this._generated) { + const element = this.element; + + element?.remove(); + + this.element = undefined; + } else { + this._resetOriginalStyle(); + } + + this.render.destroy(); + + this._resizePlugins = []; + } + + getZoomCenter(): ICoordinates { + const pxRatio = this._container.retina.pixelRatio, + { width, height } = this.size; + + if (this._zoomCenter) { + return this._zoomCenter; + } + + return { + x: (width * half) / pxRatio, + y: (height * half) / pxRatio, + }; + } + + /** + * Initializes the canvas element + */ + init(): void { + this._safeMutationObserver(obs => { + obs.disconnect(); + }); + this._mutationObserver = safeMutationObserver(records => { + for (const record of records) { + if (record.type === "attributes" && record.attributeName === "style") { + this._repairStyle(); + } + } + }); + + this.resize(); + this._initStyle(); + this.initBackground(); + this._safeMutationObserver(obs => { + if (!this.element || !(this.element instanceof Node)) { + return; + } + + obs.observe(this.element, { attributes: true }); + }); + + this.initPlugins(); + this.render.init(); + } + + /** + * Initializes the canvas background + */ + initBackground(): void { + const { _container } = this, + options = _container.actualOptions, + background = options.background, + element = this.element; + + if (!element) { + return; + } + + const elementStyle = element.style, + color = rangeColorToRgb(this._pluginManager, background.color); + + if (color) { + elementStyle.backgroundColor = getStyleFromRgb(color, _container.hdr, background.opacity); + } else { + elementStyle.backgroundColor = ""; + } + + elementStyle.backgroundImage = background.image || ""; + elementStyle.backgroundPosition = background.position || ""; + elementStyle.backgroundRepeat = background.repeat || ""; + elementStyle.backgroundSize = background.size || ""; + } + + /** + * Initializes the plugins needed by canvas + */ + initPlugins(): void { + this._resizePlugins = []; + + for (const plugin of this._container.plugins) { + if (plugin.resize) { + this._resizePlugins.push(plugin); + } + } + } + + /** + * Loads the canvas HTML element + * @param canvas - the canvas HTML element + */ + loadCanvas(canvas: HTMLCanvasElement): void { + if (this._generated && this.element) { + this.element.remove(); + } + + const container = this._container; + + this._generated = + generatedAttribute in canvas.dataset ? canvas.dataset[generatedAttribute] === "true" : this._generated; + this.element = canvas; + this.element.ariaHidden = "true"; + this._originalStyle = cloneStyle(this.element.style); + + const standardSize = this._standardSize; + + standardSize.height = canvas.offsetHeight; + standardSize.width = canvas.offsetWidth; + + const pxRatio = this._container.retina.pixelRatio, + retinaSize = this.size; + + canvas.height = retinaSize.height = standardSize.height * pxRatio; + canvas.width = retinaSize.width = standardSize.width * pxRatio; + + const canSupportHdrQuery = safeMatchMedia("(color-gamut: p3)"); + + this.render.setContextSettings({ + alpha: true, + colorSpace: canSupportHdrQuery?.matches && container.hdr ? "display-p3" : "srgb", + desynchronized: true, + willReadFrequently: false, + }); + this.render.setContext(this.element.getContext("2d", this.render.settings)); + + this._safeMutationObserver(obs => { + obs.disconnect(); + }); + + container.retina.init(); + this.initBackground(); + + this._safeMutationObserver(obs => { + if (!this.element || !(this.element instanceof Node)) { + return; + } + + obs.observe(this.element, { attributes: true }); + }); + } + + /** + * Calculates the size of the canvas + * @returns true if the size changed + */ + resize(): boolean { + if (!this.element) { + return false; + } + + const container = this._container, + currentSize = container.canvas._standardSize, + newSize = { + width: this.element.offsetWidth, + height: this.element.offsetHeight, + }, + pxRatio = container.retina.pixelRatio, + retinaSize = { + width: newSize.width * pxRatio, + height: newSize.height * pxRatio, + }; + + if ( + newSize.height === currentSize.height && + newSize.width === currentSize.width && + retinaSize.height === this.element.height && + retinaSize.width === this.element.width + ) { + return false; + } + + const oldSize = { ...currentSize }; + + currentSize.height = newSize.height; + currentSize.width = newSize.width; + + const canvasSize = this.size; + + this.element.width = canvasSize.width = retinaSize.width; + this.element.height = canvasSize.height = retinaSize.height; + + if (this._container.started) { + container.particles.setResizeFactor({ + width: currentSize.width / oldSize.width, + height: currentSize.height / oldSize.height, + }); + } + + return true; + } + + setPointerEvents(type: string): void { + const element = this.element; + + if (!element) { + return; + } + + this._pointerEvents = type; + this._repairStyle(); + } + + /** + * Sets the zoom level and center point + * @param zoomLevel - the new zoom level + * @param center - optional center point for zoom (default is canvas center) + */ + setZoom(zoomLevel: number, center?: ICoordinates): void { + this.zoom = zoomLevel; + this._zoomCenter = center; + } + + stop(): void { + this._safeMutationObserver(obs => { + obs.disconnect(); + }); + + this._mutationObserver = undefined; + + this.render.stop(); + } + + /** + * The window resize event handler + */ + async windowResize(): Promise { + if (!this.element || !this.resize()) { + return; + } + + const container = this._container, + needsRefresh = container.updateActualOptions(); + + /* density particles enabled */ + container.particles.setDensity(); + + this._applyResizePlugins(); + + if (needsRefresh) { + await container.refresh(); + } + } + + private readonly _applyResizePlugins: () => void = () => { + for (const plugin of this._resizePlugins) { + plugin.resize?.(); + } + }; + + private readonly _initStyle: () => void = () => { + const element = this.element, + options = this._container.actualOptions; + + if (!element) { + return; + } + + if (this._fullScreen) { + this._setFullScreenStyle(); + } else { + this._resetOriginalStyle(); + } + + for (const key in options.style) { + if (!key || !(key in options.style)) { + continue; + } + + const value = options.style[key]; + + if (!value) { + continue; + } + + element.style.setProperty(key, value, "important"); + } + }; + + private readonly _repairStyle: () => void = () => { + const element = this.element; + + if (!element) { + return; + } + + this._safeMutationObserver(observer => { + observer.disconnect(); + }); + this._initStyle(); + this.initBackground(); + + const pointerEvents = this._pointerEvents; + + element.style.pointerEvents = pointerEvents; + element.setAttribute("pointer-events", pointerEvents); + + this._safeMutationObserver(observer => { + if (!(element instanceof Node)) { + return; + } + + observer.observe(element, { attributes: true }); + }); + }; + + private readonly _resetOriginalStyle: () => void = () => { + const element = this.element, + originalStyle = this._originalStyle; + + if (!element || !originalStyle) { + return; + } + + setStyle(element, originalStyle, true); + }; + + private readonly _safeMutationObserver: (callback: (observer: MutationObserver) => void) => void = callback => { + if (!this._mutationObserver) { + return; + } + + callback(this._mutationObserver); + }; + + private readonly _setFullScreenStyle: () => void = () => { + const element = this.element; + + if (!element) { + return; + } + + setStyle(element, getFullScreenStyle(this._container.actualOptions.fullScreen.zIndex), true); + }; +} diff --git a/engine/src/Core/Container.ts b/engine/src/Core/Container.ts index 4a16019486a..c394fcfff93 100644 --- a/engine/src/Core/Container.ts +++ b/engine/src/Core/Container.ts @@ -1,26 +1,31 @@ import { animate, cancelAnimation, getRangeValue } from "../Utils/MathUtils.js"; -import { - defaultFps, - defaultFpsLimit, - millisecondsToSeconds, - minFpsLimit, - removeDeleteCount, - removeMinIndex, -} from "./Utils/Constants.js"; -import { Canvas } from "./Canvas.js"; -import type { Engine } from "./Engine.js"; +import { defaultFps, defaultFpsLimit, millisecondsToSeconds, minFpsLimit } from "./Utils/Constants.js"; +import { CanvasManager } from "./CanvasManager.js"; +import type { CustomEventArgs } from "../Types/CustomEventArgs.js"; import { EventListeners } from "./Utils/EventListeners.js"; import { EventType } from "../Enums/Types/EventType.js"; import type { IContainerPlugin } from "./Interfaces/IContainerPlugin.js"; import type { IDelta } from "./Interfaces/IDelta.js"; +import { type IEffectDrawer } from "./Interfaces/IEffectDrawer.js"; +import { type IParticleUpdater } from "./Interfaces/IParticleUpdater.js"; import type { IPlugin } from "./Interfaces/IPlugin.js"; +import { type IShapeDrawer } from "./Interfaces/IShapeDrawer.js"; import type { ISourceOptions } from "../Types/ISourceOptions.js"; import { Options } from "../Options/Classes/Options.js"; -import { Particles } from "./Particles.js"; +import { ParticlesManager } from "./ParticlesManager.js"; +import type { PluginManager } from "./Utils/PluginManager.js"; import { Retina } from "./Retina.js"; import { getLogger } from "../Utils/LogUtils.js"; import { loadOptions } from "../Utils/OptionsUtils.js"; +interface ContainerParams { + dispatchCallback: (eventType: string, args?: CustomEventArgs) => void; + id: string; + onDestroy: (remove: boolean) => void; + pluginManager: PluginManager; + sourceOptions?: ISourceOptions; +} + /** * Checks if the container is still usable * @param container - the container to check @@ -42,17 +47,17 @@ function updateDelta(delta: IDelta, value: number, fpsLimit = defaultFps, smooth } /** - * @param engine - + * @param pluginManager - * @param container - * @param sourceOptionsArr - * @returns the options loaded */ function loadContainerOptions( - engine: Engine, + pluginManager: PluginManager, container: Container, ...sourceOptionsArr: (ISourceOptions | undefined)[] ): Options { - const options = new Options(engine, container); + const options = new Options(pluginManager, container); loadOptions(options, ...sourceOptionsArr); @@ -79,6 +84,8 @@ export class Container { */ destroyed; + effectDrawers: Map; + /** * The container fps limit, coming from options */ @@ -100,6 +107,8 @@ export class Container { readonly particleDestroyedPlugins: IContainerPlugin[]; readonly particlePositionPlugins: IContainerPlugin[]; + particleUpdaters: IParticleUpdater[]; + /** * The particles manager */ @@ -112,6 +121,8 @@ export class Container { readonly retina; + shapeDrawers: Map; + /** * Check if the particles container is started */ @@ -122,12 +133,12 @@ export class Container { private _delay: number; private _delayTimeout?: number | NodeJS.Timeout; private readonly _delta: IDelta = { value: 0, factor: 0 }; + private readonly _dispatchCallback; private _drawAnimationFrame?: number; /** * The container duration */ private _duration; - private readonly _engine; private readonly _eventListeners; private _firstStart; private _initialSourceOptions; @@ -139,19 +150,23 @@ export class Container { * The container lifetime */ private _lifeTime; + private readonly _onDestroy; private _options; private _paused; + private readonly _pluginManager; private _smooth; private _sourceOptions; /** * This is the core class, create an instance to have a new working particles manager - * @param engine - the engine used by container - * @param id - the id to identify this instance - * @param sourceOptions - the options to load + * @param params - */ - constructor(engine: Engine, id: string, sourceOptions?: ISourceOptions) { - this._engine = engine; + constructor(params: ContainerParams) { + const { dispatchCallback, pluginManager, id, onDestroy, sourceOptions } = params; + + this._pluginManager = pluginManager; + this._dispatchCallback = dispatchCallback; + this._onDestroy = onDestroy; this.id = Symbol(id); this.fpsLimit = 120; this.hdr = false; @@ -168,20 +183,23 @@ export class Container { this.pageHidden = false; this._sourceOptions = sourceOptions; this._initialSourceOptions = sourceOptions; + this.effectDrawers = new Map(); + this.shapeDrawers = new Map(); + this.particleUpdaters = []; this.retina = new Retina(this); - this.canvas = new Canvas(this, this._engine); - this.particles = new Particles(this._engine, this); + this.canvas = new CanvasManager(this._pluginManager, this); + this.particles = new ParticlesManager(this._pluginManager, this); this.plugins = []; this.particleDestroyedPlugins = []; this.particleCreatedPlugins = []; this.particlePositionPlugins = []; /* tsParticles variables with default values */ - this._options = loadContainerOptions(this._engine, this); - this.actualOptions = loadContainerOptions(this._engine, this); + this._options = loadContainerOptions(this._pluginManager, this); + this.actualOptions = loadContainerOptions(this._pluginManager, this); /* ---------- tsParticles - start ------------ */ this._eventListeners = new EventListeners(this); - this._engine.dispatchEvent(EventType.containerBuilt, { container: this }); + this.dispatchEvent(EventType.containerBuilt); } /** @@ -230,26 +248,37 @@ export class Container { this.particles.destroy(); this.canvas.destroy(); + for (const [, effectDrawer] of this.effectDrawers) { + effectDrawer.destroy?.(this); + } + + for (const [, shapeDrawer] of this.shapeDrawers) { + shapeDrawer.destroy?.(this); + } + for (const plugin of this.plugins) { plugin.destroy?.(); } + this.effectDrawers = new Map(); + this.shapeDrawers = new Map(); + this.particleUpdaters = []; this.plugins.length = 0; - this._engine.clearPlugins(this); + this._pluginManager.clearPlugins(this); this.destroyed = true; - if (remove) { - const mainArr = this._engine.items, - idx = mainArr.indexOf(this); + this._onDestroy(remove); - if (idx >= removeMinIndex) { - mainArr.splice(idx, removeDeleteCount); - } - } + this.dispatchEvent(EventType.containerDestroyed); + } - this._engine.dispatchEvent(EventType.containerDestroyed, { container: this }); + dispatchEvent(type: string, data?: unknown): void { + this._dispatchCallback(type, { + container: this, + data, + }); } /** @@ -304,7 +333,7 @@ export class Container { const allContainerPlugins = new Map(); - for (const plugin of this._engine.plugins) { + for (const plugin of this._pluginManager.plugins) { const containerPlugin = await plugin.getPlugin(this); if (containerPlugin.preInit) { @@ -314,11 +343,11 @@ export class Container { allContainerPlugins.set(plugin, containerPlugin); } - await this.particles.initPlugins(); + await this.initDrawersAndUpdaters(); /* options settings */ - this._options = loadContainerOptions(this._engine, this, this._initialSourceOptions, this.sourceOptions); - this.actualOptions = loadContainerOptions(this._engine, this, this._options); + this._options = loadContainerOptions(this._pluginManager, this, this._initialSourceOptions, this.sourceOptions); + this.actualOptions = loadContainerOptions(this._pluginManager, this, this._options); this.plugins.length = 0; this.particleDestroyedPlugins.length = 0; @@ -368,7 +397,7 @@ export class Container { await this.particles.init(); - this._engine.dispatchEvent(EventType.containerInit, { container: this }); + this.dispatchEvent(EventType.containerInit); this.particles.setDensity(); @@ -376,7 +405,15 @@ export class Container { plugin.particlesSetup?.(); } - this._engine.dispatchEvent(EventType.particlesSetup, { container: this }); + this.dispatchEvent(EventType.particlesSetup); + } + + async initDrawersAndUpdaters(): Promise { + const pluginManager = this._pluginManager; + + this.effectDrawers = await pluginManager.getEffectDrawers(this, true); + this.shapeDrawers = await pluginManager.getShapeDrawers(this, true); + this.particleUpdaters = await pluginManager.getUpdaters(this, true); } /** @@ -405,7 +442,7 @@ export class Container { this._paused = true; } - this._engine.dispatchEvent(EventType.containerPaused, { container: this }); + this.dispatchEvent(EventType.containerPaused); } /** @@ -437,7 +474,7 @@ export class Container { } } - this._engine.dispatchEvent(EventType.containerPlay, { container: this }); + this.dispatchEvent(EventType.containerPlay); this.draw(needsUpdate ?? false); } @@ -464,8 +501,8 @@ export class Container { this._initialSourceOptions = sourceOptions; this._sourceOptions = sourceOptions; - this._options = loadContainerOptions(this._engine, this, this._initialSourceOptions, this.sourceOptions); - this.actualOptions = loadContainerOptions(this._engine, this, this._options); + this._options = loadContainerOptions(this._pluginManager, this, this._initialSourceOptions, this.sourceOptions); + this.actualOptions = loadContainerOptions(this._pluginManager, this, this._options); return this.refresh(); } @@ -490,7 +527,7 @@ export class Container { await plugin.start?.(); } - this._engine.dispatchEvent(EventType.containerStarted, { container: this }); + this.dispatchEvent(EventType.containerStarted); this.play(); @@ -532,7 +569,7 @@ export class Container { this._sourceOptions = this._options; - this._engine.dispatchEvent(EventType.containerStopped, { container: this }); + this.dispatchEvent(EventType.containerStopped); } /** @@ -576,7 +613,7 @@ export class Container { return; } - this.canvas.drawParticles(this._delta); + this.canvas.render.drawParticles(this._delta); if (!this.alive()) { this.destroy(); diff --git a/engine/src/Core/Engine.ts b/engine/src/Core/Engine.ts index 54947f57662..d9107c53d84 100644 --- a/engine/src/Core/Engine.ts +++ b/engine/src/Core/Engine.ts @@ -2,13 +2,6 @@ * Engine class for creating the singleton on globalThis. * It's a singleton class for initializing {@link Container} instances */ -import type { EasingType, EasingTypeAlt } from "../Enums/Types/EasingType.js"; -import type { - EffectInitializer, - Initializers, - ShapeInitializer, - UpdaterInitializer, -} from "../Types/EngineInitializers.js"; import { canvasFirstIndex, canvasTag, @@ -20,30 +13,16 @@ import { none, one, removeDeleteCount, + removeMinIndex, } from "./Utils/Constants.js"; -import { - getItemMapFromInitializer, - getItemsFromInitializer, - itemFromSingleOrMultiple, - safeDocument, -} from "../Utils/Utils.js"; +import { itemFromSingleOrMultiple, safeDocument } from "../Utils/Utils.js"; import type { Container } from "./Container.js"; import type { CustomEventArgs } from "../Types/CustomEventArgs.js"; import type { CustomEventListener } from "../Types/CustomEventListener.js"; -import type { EasingFunction } from "../Types/EasingFunction.js"; import { EventDispatcher } from "../Utils/EventDispatcher.js"; -import { EventType } from "../Enums/Types/EventType.js"; -import type { IColorManager } from "./Interfaces/IColorManager.js"; -import type { IEffectDrawer } from "./Interfaces/IEffectDrawer.js"; import type { ILoadParams } from "./Interfaces/ILoadParams.js"; -import type { IPalette } from "./Interfaces/IPalette.js"; -import type { IParticleUpdater } from "./Interfaces/IParticleUpdater.js"; -import type { IParticlesOptions } from "../Options/Interfaces/Particles/IParticlesOptions.js"; -import type { IPlugin } from "./Interfaces/IPlugin.js"; -import type { IShapeDrawer } from "./Interfaces/IShapeDrawer.js"; import type { ISourceOptions } from "../Types/ISourceOptions.js"; -import type { ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions.js"; -import type { RecursivePartial } from "../Types/RecursivePartial.js"; +import { PluginManager } from "./Utils/PluginManager.js"; import type { SingleOrMultiple } from "../Types/SingleOrMultiple.js"; import { getLogger } from "../Utils/LogUtils.js"; import { getRandom } from "../Utils/MathUtils.js"; @@ -62,16 +41,6 @@ interface DataFromUrlParams { url: SingleOrMultiple; } -type AsyncLoadPluginFunction = (engine: Engine) => Promise; -type SyncLoadPluginFunction = (engine: Engine) => void; -type AsyncLoadPluginNoEngine = () => Promise; -type SyncLoadPluginNoEngine = () => void; -type LoadPluginFunction = - | AsyncLoadPluginFunction - | SyncLoadPluginFunction - | AsyncLoadPluginNoEngine - | SyncLoadPluginNoEngine; - /** * @param data - * @returns the options object from the jsonUrl @@ -88,7 +57,7 @@ async function getDataFromUrl( const response = await fetch(url); if (response.ok) { - return (await response.json()) as SingleOrMultiple; + return (await response.json()) as SingleOrMultiple>; } getLogger().error(`${response.status.toString()} while retrieving config file`); @@ -139,7 +108,7 @@ const getCanvasFromContainer = (domContainer: HTMLElement): HTMLCanvasElement => return domContainer; } - domContainer = documentSafe.createElement("div"); + domContainer = documentSafe.createElement("canvas"); domContainer.id = id; domContainer.dataset[generatedAttribute] = generatedTrue; @@ -155,47 +124,7 @@ const getCanvasFromContainer = (domContainer: HTMLElement): HTMLCanvasElement => * and for Plugins class responsible for every external feature */ export class Engine { - readonly colorManagers = new Map(); - - readonly easingFunctions = new Map(); - - /** - * The drawers (additional effects) array - */ - readonly effectDrawers = new Map>(); - - readonly initializers: Initializers = { - effects: new Map(), - shapes: new Map(), - updaters: new Map(), - }; - - readonly palettes = new Map(); - - /** - * The plugins array - */ - readonly plugins: IPlugin[] = []; - - /** - * The presets array - */ - readonly presets = new Map(); - - /** - * The drawers (additional shapes) array - */ - readonly shapeDrawers = new Map>(); - - /** - * The updaters array - */ - readonly updaters = new Map(); - - private _allLoadersSet = new Set(); - - private readonly _configs = new Map(); - + readonly pluginManager = new PluginManager(this); /** * Contains all the {@link Container} instances of the current engine instance */ @@ -203,27 +132,11 @@ export class Engine { private readonly _eventDispatcher = new EventDispatcher(); - private _executedSet = new Set(); - /** * Checks if the engine instance is initialized */ private _initialized = false; - private _isRunningLoaders = false; - - private readonly _loadPromises = new Set(); - - get configs(): Record { - const res: Record = {}; - - for (const [name, config] of this._configs) { - res[name] = config; - } - - return res; - } - get items(): Container[] { return this._domArray; } @@ -232,42 +145,6 @@ export class Engine { return __VERSION__; } - /** - * @param name - - * @param manager - - */ - addColorManager(name: string, manager: IColorManager): void { - this.colorManagers.set(name, manager); - } - - addConfig(config: ISourceOptions): void { - const key = config.key ?? config.name ?? "default"; - - this._configs.set(key, config); - this._eventDispatcher.dispatchEvent(EventType.configAdded, { data: { name: key, config } }); - } - - /** - * @param name - - * @param easing - - */ - addEasing(name: EasingType | EasingTypeAlt, easing: EasingFunction): void { - if (this.easingFunctions.get(name)) { - return; - } - - this.easingFunctions.set(name, easing); - } - - /** - * addEffect adds effect to tsParticles, it will be available to all future instances created - * @param effect - the effect name - * @param drawer - the effect drawer function or class instance that draws the effect in the canvas - */ - addEffect(effect: string, drawer: EffectInitializer): void { - this.initializers.effects.set(effect, drawer); - } - /** * Adds a listener to the specified event * @param type - The event to listen to @@ -277,56 +154,6 @@ export class Engine { this._eventDispatcher.addEventListener(type, listener); } - addPalette(name: string, palette: IPalette): void { - this.palettes.set(name, palette); - } - - /** - * Adds a particle updater to the collection - * @param name - the particle updater name used as a key - * @param updaterInitializer - the particle updater initializer - */ - addParticleUpdater(name: string, updaterInitializer: UpdaterInitializer): void { - this.initializers.updaters.set(name, updaterInitializer); - } - - /** - * addPlugin adds plugin to tsParticles, if an instance needs it, it will be loaded - * @param plugin - the plugin implementation of {@link IPlugin} - */ - addPlugin(plugin: IPlugin): void { - if (this.getPlugin(plugin.id)) { - return; - } - - this.plugins.push(plugin); - } - - /** - * addPreset adds preset to tsParticles, it will be available to all future instances created - * @param preset - the preset name - * @param options - the options to add to the preset - * @param override - if true, the preset will override any existing with the same name - */ - addPreset(preset: string, options: Readonly, override = false): void { - if (!(override || !this.getPreset(preset))) { - return; - } - - this.presets.set(preset, options); - } - - /** - * addShape adds shape to tsParticles, it will be available to all future instances created - * @param shapes - the shape names to add, it can be a single shape or an array of shapes - * @param drawer - the shape drawer function or class instance that draws the shape in the canvas - */ - addShape(shapes: string[], drawer: ShapeInitializer): void { - for (const shape of shapes) { - this.initializers.shapes.set(shape, drawer); - } - } - /** * @param pluginVersion - the plugin version to check against */ @@ -340,12 +167,6 @@ export class Engine { ); } - clearPlugins(container: Container): void { - this.effectDrawers.delete(container); - this.shapeDrawers.delete(container); - this.updaters.delete(container); - } - /** * Dispatches an event that will be listened from listeners * @param type - The event to dispatch @@ -355,76 +176,17 @@ export class Engine { this._eventDispatcher.dispatchEvent(type, args); } - /** - * @param name - - * @returns the easing function - */ - getEasing(name: EasingType | EasingTypeAlt): EasingFunction { - return this.easingFunctions.get(name) ?? ((value: number): number => value); - } - - getEffectDrawers(container: Container, force = false): Promise> { - return getItemMapFromInitializer(container, this.effectDrawers, this.initializers.effects, force); - } - - getPalette(name: string): IPalette | undefined { - return this.palettes.get(name); - } - - /** - * Searches if the specified plugin exists and returns it - * @param plugin - the plugin name - * @returns the plugin if found, or undefined - */ - getPlugin(plugin: string): IPlugin | undefined { - return this.plugins.find(t => t.id === plugin); - } - - /** - * Searches the preset with the given name - * @param preset - the preset name to search - * @returns the preset if found, or undefined - */ - getPreset(preset: string): ISourceOptions | undefined { - return this.presets.get(preset); - } - - async getShapeDrawers(container: Container, force = false): Promise> { - return getItemMapFromInitializer(container, this.shapeDrawers, this.initializers.shapes, force); - } - - /** - * Returns all the container particle updaters - * @param container - the container used to check which particle updaters are enabled - * @param force - if true reloads the updater collection for the given container - * @returns the array of updaters for the given container - */ - async getUpdaters(container: Container, force = false): Promise { - return getItemsFromInitializer(container, this.updaters, this.initializers.updaters, force); - } - /** * init method, used by imports */ async init(): Promise { - if (this._initialized || this._isRunningLoaders) { + if (this._initialized) { return; } - this._isRunningLoaders = true; + await this.pluginManager.init(); - this._executedSet = new Set(); - this._allLoadersSet = new Set(this._loadPromises); - - try { - for (const loader of this._allLoadersSet) { - await this._runLoader(loader, this._executedSet, this._allLoadersSet); - } - } finally { - this._loadPromises.clear(); - this._isRunningLoaders = false; - this._initialized = true; - } + this._initialized = true; } /** @@ -461,7 +223,26 @@ export class Engine { currentOptions = itemFromSingleOrMultiple(options, index), { items } = this, oldIndex = items.findIndex(v => v.id.description === id), - newItem = new Container(this, id, currentOptions); + newItem = new Container({ + dispatchCallback: (eventType, args): void => { + this.dispatchEvent(eventType, args); + }, + id, + onDestroy: (remove): void => { + if (!remove) { + return; + } + + const mainArr = this.items, + idx = mainArr.indexOf(newItem); + + if (idx >= removeMinIndex) { + mainArr.splice(idx, removeDeleteCount); + } + }, + pluginManager: this.pluginManager, + sourceOptions: currentOptions, + }); if (oldIndex >= loadMinIndex) { const old = this.item(oldIndex), @@ -487,26 +268,6 @@ export class Engine { return newItem; } - /** - * Load the given particles options for all the updaters - * @param container - the container of the updaters - * @param options - the actual options to set - * @param sourceOptions - the source options to read - */ - loadParticlesOptions( - container: Container, - options: ParticlesOptions, - ...sourceOptions: (RecursivePartial | undefined)[] - ): void { - const updaters = this.updaters.get(container); - - if (!updaters) { - return; - } - - updaters.forEach(updater => updater.loadOptions?.(options, ...sourceOptions)); - } - /** * Reloads all existing tsParticles loaded instances * @param refresh - should refresh the dom after reloading @@ -519,20 +280,6 @@ export class Engine { await Promise.all(this.items.map(t => t.refresh())); } - async register(...loaders: LoadPluginFunction[]): Promise { - if (this._initialized) { - throw new Error("Register plugins can only be done before calling tsParticles.load()"); - } - - for (const loader of loaders) { - if (this._isRunningLoaders) { - await this._runLoader(loader, this._executedSet, this._allLoadersSet); - } else { - this._loadPromises.add(loader); - } - } - } - /** * Removes a listener from the specified event * @param type - The event to stop listening to @@ -541,17 +288,4 @@ export class Engine { removeEventListener(type: string, listener: CustomEventListener): void { this._eventDispatcher.removeEventListener(type, listener); } - - private async _runLoader( - loader: LoadPluginFunction, - executed: Set, - allLoaders: Set, - ): Promise { - if (executed.has(loader)) return; - - executed.add(loader); - allLoaders.add(loader); - - await loader(this); - } } diff --git a/engine/src/Core/Interfaces/IContainerPlugin.ts b/engine/src/Core/Interfaces/IContainerPlugin.ts index eb0a36eaad6..9b253b9d5ab 100644 --- a/engine/src/Core/Interfaces/IContainerPlugin.ts +++ b/engine/src/Core/Interfaces/IContainerPlugin.ts @@ -1,3 +1,4 @@ +import type { CanvasContextType } from "../../Types/CanvasContextType.js"; import type { ExportResult } from "../../Types/ExportResult.js"; import type { ICoordinates } from "./ICoordinates.js"; import type { IDelta } from "./IDelta.js"; @@ -12,16 +13,16 @@ export interface IContainerPlugin { canvasClear?: () => boolean; canvasPaint?: () => boolean; checkParticlePosition?: (particle: Particle, position: ICoordinates, tryCount: number) => boolean; - clearDraw?: (context: CanvasRenderingContext2D, delta: IDelta) => void; + clearDraw?: (context: CanvasContextType, delta: IDelta) => void; clickPositionValid?: (position: ICoordinates) => boolean; destroy?: () => void; - draw?: (context: CanvasRenderingContext2D, delta: IDelta) => void; - drawParticle?: (context: CanvasRenderingContext2D, particle: Particle, delta: IDelta) => void; - drawParticleCleanup?: (context: CanvasRenderingContext2D, particle: Particle, delta: IDelta) => void; - drawParticleSetup?: (context: CanvasRenderingContext2D, particle: Particle, delta: IDelta) => void; + draw?: (context: CanvasContextType, delta: IDelta) => void; + drawParticle?: (context: CanvasContextType, particle: Particle, delta: IDelta) => void; + drawParticleCleanup?: (context: CanvasContextType, particle: Particle, delta: IDelta) => void; + drawParticleSetup?: (context: CanvasContextType, particle: Particle, delta: IDelta) => void; drawParticleTransform?: (data: IShapeDrawData) => void; - drawSettingsCleanup?: (context: CanvasRenderingContext2D, delta: IDelta) => void; - drawSettingsSetup?: (context: CanvasRenderingContext2D, delta: IDelta) => void; + drawSettingsCleanup?: (context: CanvasContextType, delta: IDelta) => void; + drawSettingsSetup?: (context: CanvasContextType, delta: IDelta) => void; export?: (type: string, data: Record) => Promise; init?: () => Promise; particleBounce?: (particle: Particle, delta: IDelta, direction: OutModeDirection) => boolean; diff --git a/engine/src/Core/Interfaces/IDrawParticleParams.ts b/engine/src/Core/Interfaces/IDrawParticleParams.ts index 8264d02a165..657ffcebd7f 100644 --- a/engine/src/Core/Interfaces/IDrawParticleParams.ts +++ b/engine/src/Core/Interfaces/IDrawParticleParams.ts @@ -1,3 +1,4 @@ +import type { CanvasContextType } from "../../Types/CanvasContextType.js"; import type { Container } from "../Container.js"; import type { IDelta } from "./IDelta.js"; import type { IParticleColorStyle } from "./IParticleColorStyle.js"; @@ -16,7 +17,7 @@ export interface IDrawParticleParams { /** * The canvas context to draw on */ - context: CanvasRenderingContext2D; + context: CanvasContextType; /** * This variable contains the delta between the current frame and the previous frame */ diff --git a/engine/src/Core/Interfaces/IParticleRetinaProps.ts b/engine/src/Core/Interfaces/IParticleRetinaProps.ts index 41fdec68dcf..d6fd085f328 100644 --- a/engine/src/Core/Interfaces/IParticleRetinaProps.ts +++ b/engine/src/Core/Interfaces/IParticleRetinaProps.ts @@ -2,8 +2,8 @@ import type { IDistance } from "./IDistance.js"; export interface IParticleRetinaProps { maxDistance: Partial; - maxSpeed?: number; - moveDrift?: number; - moveSpeed?: number; - sizeAnimationSpeed?: number; + maxSpeed: number; + moveDrift: number; + moveSpeed: number; + sizeAnimationSpeed: number; } diff --git a/engine/src/Core/Interfaces/IParticleUpdater.ts b/engine/src/Core/Interfaces/IParticleUpdater.ts index 6b4130c30a0..c9416a62e00 100644 --- a/engine/src/Core/Interfaces/IParticleUpdater.ts +++ b/engine/src/Core/Interfaces/IParticleUpdater.ts @@ -1,3 +1,4 @@ +import type { CanvasContextType } from "../../Types/CanvasContextType.js"; import type { IDelta } from "./IDelta.js"; import type { IParticleColorStyle } from "./IParticleColorStyle.js"; import type { IParticleTransformValues } from "./IParticleTransformValues.js"; @@ -13,7 +14,7 @@ export interface IParticleUpdater { getColorStyles?: ( particle: Particle, - context: CanvasRenderingContext2D, + context: CanvasContextType, radius: number, opacity: number, ) => IParticleColorStyle; diff --git a/engine/src/Core/Interfaces/IShapeDrawData.ts b/engine/src/Core/Interfaces/IShapeDrawData.ts index 7b0fe85042b..57357caacaa 100644 --- a/engine/src/Core/Interfaces/IShapeDrawData.ts +++ b/engine/src/Core/Interfaces/IShapeDrawData.ts @@ -1,3 +1,4 @@ +import type { CanvasContextType } from "../../Types/CanvasContextType.js"; import type { ICoordinates } from "./ICoordinates.js"; import type { IDelta } from "./IDelta.js"; import type { Particle } from "../Particle.js"; @@ -6,7 +7,7 @@ export interface IShapeDrawData { /** * the canvas context for drawing */ - context: CanvasRenderingContext2D; + context: CanvasContextType; /** * this variable contains the delta between the current frame and the previous frame diff --git a/engine/src/Core/Particle.ts b/engine/src/Core/Particle.ts index 33127d2120a..0e068b7bfdc 100644 --- a/engine/src/Core/Particle.ts +++ b/engine/src/Core/Particle.ts @@ -36,7 +36,6 @@ import { zIndexFactorOffset, } from "./Utils/Constants.js"; import type { Container } from "./Container.js"; -import type { Engine } from "./Engine.js"; import { EventType } from "../Enums/Types/EventType.js"; import type { IBubbleParticleData } from "./Interfaces/IBubbleParticleData.js"; import type { IDelta } from "./Interfaces/IDelta.js"; @@ -59,6 +58,7 @@ import { MoveDirection } from "../Enums/Directions/MoveDirection.js"; import { OutMode } from "../Enums/Modes/OutMode.js"; import { ParticleOutType } from "../Enums/Types/ParticleOutType.js"; import type { ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions.js"; +import type { PluginManager } from "./Utils/PluginManager.js"; import type { RecursivePartial } from "../Types/RecursivePartial.js"; import { loadParticlesOptions } from "../Utils/OptionsUtils.js"; @@ -368,17 +368,17 @@ export class Particle { d: 1, }; + private readonly _container; + /** * Gets the particle containing engine instance * @internal */ - private readonly _engine; + private readonly _pluginManager; - constructor( - engine: Engine, - readonly container: Container, - ) { - this._engine = engine; + constructor(pluginManager: PluginManager, container: Container) { + this._pluginManager = pluginManager; + this._container = container; } destroy(override?: boolean): void { @@ -390,8 +390,8 @@ export class Particle { this.bubble.inRange = false; this.slow.inRange = false; - const container = this.container, - shapeDrawer = this.shape ? container.particles.shapeDrawers.get(this.shape) : undefined; + const container = this._container, + shapeDrawer = this.shape ? container.shapeDrawers.get(this.shape) : undefined; shapeDrawer?.particleDestroy?.(this); @@ -399,24 +399,21 @@ export class Particle { plugin.particleDestroyed?.(this, override); } - for (const updater of container.particles.updaters) { + for (const updater of container.particleUpdaters) { updater.particleDestroyed?.(this, override); } - this._engine.dispatchEvent(EventType.particleDestroyed, { - container: this.container, - data: { - particle: this, - }, + this._container.dispatchEvent(EventType.particleDestroyed, { + particle: this, }); } draw(delta: IDelta): void { - const container = this.container, - canvas = container.canvas; + const container = this._container, + render = container.canvas.render; - canvas.drawParticlePlugins(this, delta); - canvas.drawParticle(this, delta); + render.drawParticlePlugins(this, delta); + render.drawParticle(this, delta); } getAngle(): number { @@ -493,7 +490,7 @@ export class Particle { overrideOptions?: RecursivePartial, group?: string, ): void { - const container = this.container; + const container = this._container; this.id = id; this.group = group; @@ -508,13 +505,17 @@ export class Particle { this.misplaced = false; this.retina = { maxDistance: {}, + maxSpeed: 0, + moveDrift: 0, + moveSpeed: 0, + sizeAnimationSpeed: 0, }; this.outType = ParticleOutType.normal; this.ignoresResizeRatio = true; const pxRatio = container.retina.pixelRatio, mainOptions = container.actualOptions, - particlesOptions = loadParticlesOptions(this._engine, container, mainOptions.particles), + particlesOptions = loadParticlesOptions(this._pluginManager, container, mainOptions.particles), reduceDuplicates = particlesOptions.reduceDuplicates, effectType = particlesOptions.effect.type, shapeType = particlesOptions.shape.type; @@ -550,13 +551,13 @@ export class Particle { } if (this.effect === randomColorValue) { - const availableEffects = [...this.container.particles.effectDrawers.keys()]; + const availableEffects = [...this._container.effectDrawers.keys()]; this.effect = availableEffects[Math.floor(getRandom() * availableEffects.length)]; } if (this.shape === randomColorValue) { - const availableShapes = [...this.container.particles.shapeDrawers.keys()]; + const availableShapes = [...this._container.shapeDrawers.keys()]; this.shape = availableShapes[Math.floor(getRandom() * availableShapes.length)]; } @@ -613,7 +614,7 @@ export class Particle { let effectDrawer: IEffectDrawer | undefined, shapeDrawer: IShapeDrawer | undefined; if (this.effect) { - effectDrawer = container.particles.effectDrawers.get(this.effect); + effectDrawer = container.effectDrawers.get(this.effect); } if (effectDrawer?.loadEffect) { @@ -621,7 +622,7 @@ export class Particle { } if (this.shape) { - shapeDrawer = container.particles.shapeDrawers.get(this.shape); + shapeDrawer = container.shapeDrawers.get(this.shape); } if (shapeDrawer?.loadShape) { @@ -636,7 +637,7 @@ export class Particle { this.spawning = false; - for (const updater of particles.updaters) { + for (const updater of container.particleUpdaters) { updater.init(this); } @@ -650,7 +651,7 @@ export class Particle { isInsideCanvas(): boolean { const radius = this.getRadius(), - canvasSize = this.container.canvas.size, + canvasSize = this._container.canvas.size, position = this.position; return ( @@ -700,7 +701,7 @@ export class Particle { * This method is used when the particle has lost a life and needs some value resets */ reset(): void { - for (const updater of this.container.particles.updaters) { + for (const updater of this._container.particleUpdaters) { updater.reset?.(this); } } @@ -712,7 +713,7 @@ export class Particle { let tryCount = defaultRetryCount, posVec = position ? Vector3d.create(position.x, position.y, zIndex) : undefined; - const container = this.container, + const container = this._container, plugins = container.particlePositionPlugins, outModes = this.options.move.outModes, radius = this.getRadius(), @@ -799,7 +800,7 @@ export class Particle { outMode, checkModes: [OutMode.bounce], coord: pos.x, - maxCoord: this.container.canvas.size.width, + maxCoord: this._container.canvas.size.width, setCb: (value: number) => (pos.x += value), radius, }); @@ -814,7 +815,7 @@ export class Particle { outMode, checkModes: [OutMode.bounce], coord: pos.y, - maxCoord: this.container.canvas.size.height, + maxCoord: this._container.canvas.size.height, setCb: (value: number) => (pos.y += value), radius, }); @@ -841,7 +842,7 @@ export class Particle { }; private readonly _initPosition: (position?: ICoordinates) => void = position => { - const container = this.container, + const container = this._container, zIndexValue = getRangeValue(this.options.zIndex.value), initialPosition = this._calcPosition(position, clamp(zIndexValue, minZ, container.zLayers)); diff --git a/engine/src/Core/Particles.ts b/engine/src/Core/ParticlesManager.ts similarity index 84% rename from engine/src/Core/Particles.ts rename to engine/src/Core/ParticlesManager.ts index 217e7e4120d..4e8d6ce2c6b 100644 --- a/engine/src/Core/Particles.ts +++ b/engine/src/Core/ParticlesManager.ts @@ -11,20 +11,17 @@ import { squareExp, } from "./Utils/Constants.js"; import type { Container } from "./Container.js"; -import type { Engine } from "./Engine.js"; import { EventType } from "../Enums/Types/EventType.js"; import type { IContainerPlugin } from "./Interfaces/IContainerPlugin.js"; import type { ICoordinates } from "./Interfaces/ICoordinates.js"; import type { IDelta } from "./Interfaces/IDelta.js"; import type { IDimension } from "./Interfaces/IDimension.js"; -import type { IEffectDrawer } from "./Interfaces/IEffectDrawer.js"; -import type { IParticleUpdater } from "./Interfaces/IParticleUpdater.js"; import type { IParticlesDensity } from "../Options/Interfaces/Particles/Number/IParticlesDensity.js"; import type { IParticlesOptions } from "../Options/Interfaces/Particles/IParticlesOptions.js"; -import type { IShapeDrawer } from "./Interfaces/IShapeDrawer.js"; import { LimitMode } from "../Enums/Modes/LimitMode.js"; import { Particle } from "./Particle.js"; import { type ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions.js"; +import type { PluginManager } from "./Utils/PluginManager.js"; import type { RecursivePartial } from "../Types/RecursivePartial.js"; import { SpatialHashGrid } from "./Utils/SpatialHashGrid.js"; import { getLogger } from "../Utils/LogUtils.js"; @@ -33,23 +30,16 @@ import { loadParticlesOptions } from "../Utils/OptionsUtils.js"; /** * Particles manager object */ -export class Particles { +export class ParticlesManager { checkParticlePositionPlugins: IContainerPlugin[]; - effectDrawers: Map; - grid; - shapeDrawers: Map; - - updaters: IParticleUpdater[]; - /** * All the particles used in canvas */ private _array: Particle[]; private readonly _container: Container; - private readonly _engine; private readonly _groupLimits: Map; private _limit; private _maxZIndex; @@ -58,6 +48,7 @@ export class Particles { private _nextId; private _particleResetPlugins: IContainerPlugin[]; private _particleUpdatePlugins: IContainerPlugin[]; + private readonly _pluginManager; private readonly _pool: Particle[]; private _postParticleUpdatePlugins: IContainerPlugin[]; private _postUpdatePlugins: IContainerPlugin[]; @@ -67,11 +58,11 @@ export class Particles { /** * - * @param engine - + * @param pluginManager - * @param container - */ - constructor(engine: Engine, container: Container) { - this._engine = engine; + constructor(pluginManager: PluginManager, container: Container) { + this._pluginManager = pluginManager; this._container = container; this._nextId = 0; this._array = []; @@ -83,9 +74,6 @@ export class Particles { this._minZIndex = 0; this._maxZIndex = 0; this.grid = new SpatialHashGrid(spatialHashGridCellSize); - this.effectDrawers = new Map(); - this.shapeDrawers = new Map(); - this.updaters = []; this.checkParticlePositionPlugins = []; this._particleResetPlugins = []; this._particleUpdatePlugins = []; @@ -132,7 +120,7 @@ export class Particles { } try { - const particle = this._pool.pop() ?? new Particle(this._engine, this._container); + const particle = this._pool.pop() ?? new Particle(this._pluginManager, this._container); particle.init(this._nextId, position, overrideOptions, group); @@ -153,11 +141,8 @@ export class Particles { this._nextId++; - this._engine.dispatchEvent(EventType.particleAdded, { - container: this._container, - data: { - particle, - }, + this._container.dispatchEvent(EventType.particleAdded, { + particle, }); return particle; @@ -177,22 +162,9 @@ export class Particles { } destroy(): void { - const container = this._container; - - for (const [, effectDrawer] of this.effectDrawers) { - effectDrawer.destroy?.(container); - } - - for (const [, shapeDrawer] of this.shapeDrawers) { - shapeDrawer.destroy?.(container); - } - this._array = []; this._pool.length = 0; this._zArray = []; - this.effectDrawers = new Map(); - this.shapeDrawers = new Map(); - this.updaters = []; this.checkParticlePositionPlugins = []; this._particleResetPlugins = []; this._particleUpdatePlugins = []; @@ -266,13 +238,13 @@ export class Particles { } } - await this.initPlugins(); + await this._container.initDrawersAndUpdaters(); - for (const drawer of this.effectDrawers.values()) { + for (const drawer of this._container.effectDrawers.values()) { await drawer.init?.(container); } - for (const drawer of this.shapeDrawers.values()) { + for (const drawer of this._container.shapeDrawers.values()) { await drawer.init?.(container); } @@ -308,14 +280,6 @@ export class Particles { } } - async initPlugins(): Promise { - const container = this._container; - - this.effectDrawers = await this._engine.getEffectDrawers(container, true); - this.shapeDrawers = await this._engine.getShapeDrawers(container, true); - this.updaters = await this._engine.getUpdaters(container, true); - } - push( nb: number, position?: ICoordinates, @@ -331,7 +295,7 @@ export class Particles { this.clear(); await this.init(); - this._container.canvas.drawParticles({ value: 0, factor: 0 }); + this._container.canvas.render.drawParticles({ value: 0, factor: 0 }); } remove(particle: Particle, group?: string, override?: boolean): void { @@ -376,7 +340,7 @@ export class Particles { continue; } - const groupDataOptions = loadParticlesOptions(this._engine, this._container, groupData); + const groupDataOptions = loadParticlesOptions(this._pluginManager, this._container, groupData); this._applyDensity(groupDataOptions, pluginsCount, group); } @@ -434,38 +398,38 @@ export class Particles { this.grid.insert(particle); } - if (particlesToDelete.size) { - const checkDelete = (p: Particle): boolean => !particlesToDelete.has(p); - - this._array = this.filter(checkDelete); - this._zArray = this._zArray.filter(checkDelete); - - for (const particle of particlesToDelete) { - this._engine.dispatchEvent(EventType.particleRemoved, { - container: this._container, - data: { - particle, - }, - }); - } - - this._addToPool(...particlesToDelete); - } - for (const plugin of this._postUpdatePlugins) { plugin.postUpdate?.(delta); } // this loop is required to be done after mouse interactions for (const particle of this._array) { - for (const updater of this.updaters) { + if (particle.destroyed) { + particlesToDelete.add(particle); + + continue; + } + + for (const updater of this._container.particleUpdaters) { updater.update(particle, delta); } + // particle.destroyed can be set to true in updater.update + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (!particle.destroyed && !particle.spawning) { for (const plugin of this._postParticleUpdatePlugins) { plugin.postParticleUpdate?.(particle, delta); } + + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition + } else if (particle.destroyed) { + particlesToDelete.add(particle); + } + } + + if (particlesToDelete.size) { + for (const particle of particlesToDelete) { + this.remove(particle); } } @@ -561,11 +525,8 @@ export class Particles { particle.destroy(override); - this._engine.dispatchEvent(EventType.particleRemoved, { - container: this._container, - data: { - particle, - }, + this._container.dispatchEvent(EventType.particleRemoved, { + particle, }); this._addToPool(particle); diff --git a/engine/src/Core/RenderManager.ts b/engine/src/Core/RenderManager.ts new file mode 100644 index 00000000000..3e6236cb973 --- /dev/null +++ b/engine/src/Core/RenderManager.ts @@ -0,0 +1,466 @@ +import { clear, drawParticle, drawParticlePlugin, paintBase, paintImage } from "../Utils/CanvasUtils.js"; +import { defaultCompositeValue, defaultTransformValue, minimumSize, zIndexFactorOffset } from "./Utils/Constants.js"; +import { getStyleFromHsl, rangeColorToHsl } from "../Utils/ColorUtils.js"; +import type { CanvasContextType } from "../Types/CanvasContextType.js"; +import type { CanvasManager } from "./CanvasManager.js"; +import type { Container } from "./Container.js"; +import type { IContainerPlugin } from "./Interfaces/IContainerPlugin.js"; +import type { IDelta } from "./Interfaces/IDelta.js"; +import type { IHsl } from "./Interfaces/Colors.js"; +import type { IParticleColorStyle } from "./Interfaces/IParticleColorStyle.js"; +import type { IParticleTransformValues } from "./Interfaces/IParticleTransformValues.js"; +import type { IParticleUpdater } from "./Interfaces/IParticleUpdater.js"; +import type { Particle } from "./Particle.js"; +import type { PluginManager } from "./Utils/PluginManager.js"; + +const fColorIndex = 0, + sColorIndex = 1; + +/** + * @param factor - + * @param newFactor - + * @param key - + */ +function setTransformValue( + factor: Partial, + newFactor: Partial, + key: keyof IParticleTransformValues, +): void { + const newValue = newFactor[key]; + + if (newValue !== undefined) { + factor[key] = (factor[key] ?? defaultTransformValue) * newValue; + } +} + +/** + * Canvas manager + */ +export class RenderManager { + private _canvasClearPlugins: IContainerPlugin[]; + private readonly _canvasManager: CanvasManager; + private _canvasPaintPlugins: IContainerPlugin[]; + private _clearDrawPlugins: IContainerPlugin[]; + private _colorPlugins: IContainerPlugin[]; + private readonly _container; + /** + * The particles canvas context + */ + private _context: CanvasContextType | null; + private _contextSettings?: CanvasRenderingContext2DSettings; + private _drawParticlePlugins: IContainerPlugin[]; + private _drawParticlesCleanupPlugins: IContainerPlugin[]; + private _drawParticlesSetupPlugins: IContainerPlugin[]; + private _drawPlugins: IContainerPlugin[]; + private _drawSettingsCleanupPlugins: IContainerPlugin[]; + private _drawSettingsSetupPlugins: IContainerPlugin[]; + private readonly _pluginManager; + private _postDrawUpdaters: IParticleUpdater[]; + private _preDrawUpdaters: IParticleUpdater[]; + private readonly _reusableColorStyles: IParticleColorStyle = {}; + private readonly _reusablePluginColors: (IHsl | undefined)[] = [undefined, undefined]; + private readonly _reusableTransform: Partial = {}; + + /** + * Constructor of canvas manager + * @param pluginManager - the engine managing the whole library + * @param container - the parent container + * @param canvasManager - + */ + constructor(pluginManager: PluginManager, container: Container, canvasManager: CanvasManager) { + this._pluginManager = pluginManager; + this._container = container; + this._canvasManager = canvasManager; + this._context = null; + this._preDrawUpdaters = []; + this._postDrawUpdaters = []; + this._colorPlugins = []; + this._canvasClearPlugins = []; + this._canvasPaintPlugins = []; + this._clearDrawPlugins = []; + this._drawParticlePlugins = []; + this._drawParticlesCleanupPlugins = []; + this._drawParticlesSetupPlugins = []; + this._drawPlugins = []; + this._drawSettingsSetupPlugins = []; + this._drawSettingsCleanupPlugins = []; + } + + get settings(): CanvasRenderingContext2DSettings | undefined { + return this._contextSettings; + } + + canvasClear(): void { + if (!this._container.actualOptions.clear) { + return; + } + + this.draw(ctx => { + clear(ctx, this._canvasManager.size); + }); + } + + /** + * Clears the canvas content + */ + clear(): void { + let pluginHandled = false; + + for (const plugin of this._canvasClearPlugins) { + pluginHandled = plugin.canvasClear?.() ?? false; + + if (pluginHandled) { + break; + } + } + + if (pluginHandled) { + return; + } + + this.canvasClear(); + } + + /** + * Destroying object actions + */ + destroy(): void { + this.stop(); + + this._preDrawUpdaters = []; + this._postDrawUpdaters = []; + this._colorPlugins = []; + this._canvasClearPlugins = []; + this._canvasPaintPlugins = []; + this._clearDrawPlugins = []; + this._drawParticlePlugins = []; + this._drawParticlesCleanupPlugins = []; + this._drawParticlesSetupPlugins = []; + this._drawPlugins = []; + this._drawSettingsSetupPlugins = []; + this._drawSettingsCleanupPlugins = []; + } + + /** + * Generic draw method for drawing stuff on the canvas context + * @param cb - + * @returns the result of the callback + */ + draw(cb: (context: CanvasContextType) => T): T | undefined { + const ctx = this._context; + + if (!ctx) { + return; + } + + return cb(ctx); + } + + /** + * Draws the specified particle in the canvas + * @param particle - the particle to draw + * @param delta - the frame delta time values + */ + drawParticle(particle: Particle, delta: IDelta): void { + if (particle.spawning || particle.destroyed) { + return; + } + + const radius = particle.getRadius(); + + if (radius <= minimumSize) { + return; + } + + const pfColor = particle.getFillColor(), + psColor = particle.getStrokeColor(); + + let [fColor, sColor] = this._getPluginParticleColors(particle); + + fColor ??= pfColor; + sColor ??= psColor; + + if (!fColor && !sColor) { + return; + } + + const container = this._container, + zIndexOptions = particle.options.zIndex, + zIndexFactor = zIndexFactorOffset - particle.zIndexFactor, + { fillOpacity, opacity, strokeOpacity } = particle.getOpacity(), + transform = this._reusableTransform, + colorStyles = this._reusableColorStyles, + fill = fColor ? getStyleFromHsl(fColor, container.hdr, fillOpacity * opacity) : undefined, + stroke = sColor ? getStyleFromHsl(sColor, container.hdr, strokeOpacity * opacity) : fill; + + transform.a = transform.b = transform.c = transform.d = undefined; + + colorStyles.fill = fill; + colorStyles.stroke = stroke; + + this.draw((context): void => { + for (const plugin of this._drawParticlesSetupPlugins) { + plugin.drawParticleSetup?.(context, particle, delta); + } + + this._applyPreDrawUpdaters(context, particle, radius, opacity, colorStyles, transform); + + drawParticle({ + container, + context, + particle, + delta, + colorStyles, + radius: radius * zIndexFactor ** zIndexOptions.sizeRate, + opacity: opacity, + transform, + }); + + this._applyPostDrawUpdaters(particle); + + for (const plugin of this._drawParticlesCleanupPlugins) { + plugin.drawParticleCleanup?.(context, particle, delta); + } + }); + } + + /** + * Draws stuff using the given plugin, using the given particle + * @param particle - the particle used + * @param delta - the frame delta time values + */ + drawParticlePlugins(particle: Particle, delta: IDelta): void { + this.draw(ctx => { + for (const plugin of this._drawParticlePlugins) { + drawParticlePlugin(ctx, plugin, particle, delta); + } + }); + } + + drawParticles(delta: IDelta): void { + const { particles } = this._container; + + this.clear(); + + /* update each particle before drawing */ + particles.update(delta); + + this.draw(ctx => { + for (const plugin of this._drawSettingsSetupPlugins) { + plugin.drawSettingsSetup?.(ctx, delta); + } + + for (const plugin of this._drawPlugins) { + plugin.draw?.(ctx, delta); + } + + particles.drawParticles(delta); + + for (const plugin of this._clearDrawPlugins) { + plugin.clearDraw?.(ctx, delta); + } + + for (const plugin of this._drawSettingsCleanupPlugins) { + plugin.drawSettingsCleanup?.(ctx, delta); + } + }); + } + + /** + * Initializes the canvas element + */ + init(): void { + this.initUpdaters(); + this.initPlugins(); + this.paint(); + } + + /** + * Initializes the plugins needed by canvas + */ + initPlugins(): void { + this._colorPlugins = []; + this._canvasClearPlugins = []; + this._canvasPaintPlugins = []; + this._clearDrawPlugins = []; + this._drawParticlePlugins = []; + this._drawParticlesSetupPlugins = []; + this._drawParticlesCleanupPlugins = []; + this._drawPlugins = []; + this._drawSettingsSetupPlugins = []; + this._drawSettingsCleanupPlugins = []; + + for (const plugin of this._container.plugins) { + if (plugin.particleFillColor ?? plugin.particleStrokeColor) { + this._colorPlugins.push(plugin); + } + + if (plugin.canvasClear) { + this._canvasClearPlugins.push(plugin); + } + + if (plugin.canvasPaint) { + this._canvasPaintPlugins.push(plugin); + } + + if (plugin.drawParticle) { + this._drawParticlePlugins.push(plugin); + } + + if (plugin.drawParticleSetup) { + this._drawParticlesSetupPlugins.push(plugin); + } + + if (plugin.drawParticleCleanup) { + this._drawParticlesCleanupPlugins.push(plugin); + } + + if (plugin.draw) { + this._drawPlugins.push(plugin); + } + + if (plugin.drawSettingsSetup) { + this._drawSettingsSetupPlugins.push(plugin); + } + + if (plugin.drawSettingsCleanup) { + this._drawSettingsCleanupPlugins.push(plugin); + } + + if (plugin.clearDraw) { + this._clearDrawPlugins.push(plugin); + } + } + } + + /** + * Initializes the updaters needed by canvas + */ + initUpdaters(): void { + this._preDrawUpdaters = []; + this._postDrawUpdaters = []; + + for (const updater of this._container.particleUpdaters) { + if (updater.afterDraw) { + this._postDrawUpdaters.push(updater); + } + + if (updater.getColorStyles ?? updater.getTransformValues ?? updater.beforeDraw) { + this._preDrawUpdaters.push(updater); + } + } + } + + /** + * Paints the canvas background + */ + paint(): void { + let handled = false; + + for (const plugin of this._canvasPaintPlugins) { + handled = plugin.canvasPaint?.() ?? false; + + if (handled) { + break; + } + } + + if (handled) { + return; + } + + this.paintBase(); + } + + paintBase(baseColor?: string): void { + this.draw(ctx => { + paintBase(ctx, this._canvasManager.size, baseColor); + }); + } + + paintImage(image: HTMLImageElement, opacity: number): void { + this.draw(ctx => { + paintImage(ctx, this._canvasManager.size, image, opacity); + }); + } + + setContext(context: CanvasContextType | null): void { + this._context = context; + + if (this._context) { + this._context.globalCompositeOperation = defaultCompositeValue; + } + } + + setContextSettings(settings: CanvasRenderingContext2DSettings): void { + this._contextSettings = settings; + } + + stop(): void { + this.draw(ctx => { + clear(ctx, this._canvasManager.size); + }); + } + + private readonly _applyPostDrawUpdaters: (particle: Particle) => void = particle => { + for (const updater of this._postDrawUpdaters) { + updater.afterDraw?.(particle); + } + }; + + private readonly _applyPreDrawUpdaters: ( + ctx: CanvasContextType, + particle: Particle, + radius: number, + zOpacity: number, + colorStyles: IParticleColorStyle, + transform: Partial, + ) => void = (ctx, particle, radius, zOpacity, colorStyles, transform) => { + for (const updater of this._preDrawUpdaters) { + if (updater.getColorStyles) { + const { fill, stroke } = updater.getColorStyles(particle, ctx, radius, zOpacity); + + if (fill) { + colorStyles.fill = fill; + } + + if (stroke) { + colorStyles.stroke = stroke; + } + } + + if (updater.getTransformValues) { + const updaterTransform = updater.getTransformValues(particle); + + for (const key in updaterTransform) { + setTransformValue(transform, updaterTransform, key as keyof IParticleTransformValues); + } + } + + updater.beforeDraw?.(particle); + } + }; + + private readonly _getPluginParticleColors: (particle: Particle) => (IHsl | undefined)[] = particle => { + let fColor: IHsl | undefined, sColor: IHsl | undefined; + + for (const plugin of this._colorPlugins) { + if (!fColor && plugin.particleFillColor) { + fColor = rangeColorToHsl(this._pluginManager, plugin.particleFillColor(particle)); + } + + if (!sColor && plugin.particleStrokeColor) { + sColor = rangeColorToHsl(this._pluginManager, plugin.particleStrokeColor(particle)); + } + + if (fColor && sColor) { + break; + } + } + + this._reusablePluginColors[fColorIndex] = fColor; + this._reusablePluginColors[sColorIndex] = sColor; + + return this._reusablePluginColors; + }; +} diff --git a/engine/src/Core/Retina.ts b/engine/src/Core/Retina.ts index 3a0d78bbd06..e8752565bf4 100644 --- a/engine/src/Core/Retina.ts +++ b/engine/src/Core/Retina.ts @@ -6,10 +6,8 @@ import { getRangeValue } from "../Utils/MathUtils.js"; /** */ export class Retina { - maxSpeed!: number; pixelRatio: number; reduceFactor: number; - sizeAnimationSpeed!: number; constructor(private readonly container: Container) { this.pixelRatio = defaultRatio; @@ -35,12 +33,6 @@ export class Retina { canvas.size.width = element.offsetWidth * ratio; canvas.size.height = element.offsetHeight * ratio; } - - const particles = options.particles, - moveOptions = particles.move; - - this.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio; - this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio; } initParticle(particle: Particle): void { @@ -50,15 +42,14 @@ export class Retina { moveDistance = moveOptions.distance, props = particle.retina; + props.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio; props.moveDrift = getRangeValue(moveOptions.drift) * ratio; props.moveSpeed = getRangeValue(moveOptions.speed) * ratio; props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio; const maxDistance = props.maxDistance; - maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined; - maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined; - - props.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio; + maxDistance.horizontal = moveDistance.horizontal === undefined ? undefined : moveDistance.horizontal * ratio; + maxDistance.vertical = moveDistance.vertical === undefined ? undefined : moveDistance.vertical * ratio; } } diff --git a/engine/src/Core/Utils/PluginManager.ts b/engine/src/Core/Utils/PluginManager.ts new file mode 100644 index 00000000000..fc1d8c92fc2 --- /dev/null +++ b/engine/src/Core/Utils/PluginManager.ts @@ -0,0 +1,313 @@ +import type { EasingType, EasingTypeAlt } from "../../Enums/Types/EasingType.js"; +import type { + EffectInitializer, + Initializers, + ShapeInitializer, + UpdaterInitializer, +} from "../../Types/EngineInitializers.js"; +import { getItemMapFromInitializer, getItemsFromInitializer } from "../../Utils/Utils.js"; +import type { Container } from "../Container.js"; +import type { EasingFunction } from "../../Types/EasingFunction.js"; +import type { Engine } from "../Engine.js"; +import { EventType } from "../../Enums/Types/EventType.js"; +import type { IColorManager } from "../Interfaces/IColorManager.js"; +import type { IEffectDrawer } from "../Interfaces/IEffectDrawer.js"; +import type { IPalette } from "../Interfaces/IPalette.js"; +import type { IParticleUpdater } from "../Interfaces/IParticleUpdater.js"; +import type { IParticlesOptions } from "../../Options/Interfaces/Particles/IParticlesOptions.js"; +import type { IPlugin } from "../Interfaces/IPlugin.js"; +import type { IShapeDrawer } from "../Interfaces/IShapeDrawer.js"; +import type { ISourceOptions } from "../../Types/ISourceOptions.js"; +import type { ParticlesOptions } from "../../Options/Classes/Particles/ParticlesOptions.js"; +import type { RecursivePartial } from "../../Types/RecursivePartial.js"; + +type AsyncLoadPluginFunction = (engine: Engine) => Promise; +type SyncLoadPluginFunction = (engine: Engine) => void; +type AsyncLoadPluginNoEngine = () => Promise; +type SyncLoadPluginNoEngine = () => void; +type LoadPluginFunction = + | AsyncLoadPluginFunction + | SyncLoadPluginFunction + | AsyncLoadPluginNoEngine + | SyncLoadPluginNoEngine; + +export class PluginManager { + readonly colorManagers = new Map(); + + readonly easingFunctions = new Map(); + + /** + * The drawers (additional effects) array + */ + readonly effectDrawers = new Map>(); + + readonly initializers: Initializers = { + effects: new Map(), + shapes: new Map(), + updaters: new Map(), + }; + + readonly palettes = new Map(); + + /** + * The plugins array + */ + readonly plugins: IPlugin[] = []; + + /** + * The presets array + */ + readonly presets = new Map(); + + /** + * The drawers (additional shapes) array + */ + readonly shapeDrawers = new Map>(); + + /** + * The updaters array + */ + readonly updaters = new Map(); + + private _allLoadersSet = new Set(); + + private readonly _configs = new Map(); + + private readonly _engine; + + private _executedSet = new Set(); + + /** + * Checks if the engine instance is initialized + */ + private _initialized = false; + + private _isRunningLoaders = false; + + private readonly _loadPromises = new Set(); + + constructor(engine: Engine) { + this._engine = engine; + } + + get configs(): Record { + const res: Record = {}; + + for (const [name, config] of this._configs) { + res[name] = config; + } + + return res; + } + + /** + * @param name - + * @param manager - + */ + addColorManager(name: string, manager: IColorManager): void { + this.colorManagers.set(name, manager); + } + + addConfig(config: ISourceOptions): void { + const key = config.key ?? config.name ?? "default"; + + this._configs.set(key, config); + this._engine.dispatchEvent(EventType.configAdded, { data: { name: key, config } }); + } + + /** + * @param name - + * @param easing - + */ + addEasing(name: EasingType | EasingTypeAlt, easing: EasingFunction): void { + if (this.easingFunctions.get(name)) { + return; + } + + this.easingFunctions.set(name, easing); + } + + /** + * addEffect adds effect to tsParticles, it will be available to all future instances created + * @param effect - the effect name + * @param drawer - the effect drawer function or class instance that draws the effect in the canvas + */ + addEffect(effect: string, drawer: EffectInitializer): void { + this.initializers.effects.set(effect, drawer); + } + + addPalette(name: string, palette: IPalette): void { + this.palettes.set(name, palette); + } + + /** + * Adds a particle updater to the collection + * @param name - the particle updater name used as a key + * @param updaterInitializer - the particle updater initializer + */ + addParticleUpdater(name: string, updaterInitializer: UpdaterInitializer): void { + this.initializers.updaters.set(name, updaterInitializer); + } + + /** + * addPlugin adds plugin to tsParticles, if an instance needs it, it will be loaded + * @param plugin - the plugin implementation of {@link IPlugin} + */ + addPlugin(plugin: IPlugin): void { + if (this.getPlugin(plugin.id)) { + return; + } + + this.plugins.push(plugin); + } + + /** + * addPreset adds preset to tsParticles, it will be available to all future instances created + * @param preset - the preset name + * @param options - the options to add to the preset + * @param override - if true, the preset will override any existing with the same name + */ + addPreset(preset: string, options: Readonly, override = false): void { + if (!(override || !this.getPreset(preset))) { + return; + } + + this.presets.set(preset, options); + } + + /** + * addShape adds shape to tsParticles, it will be available to all future instances created + * @param shapes - the shape names to add, it can be a single shape or an array of shapes + * @param drawer - the shape drawer function or class instance that draws the shape in the canvas + */ + addShape(shapes: string[], drawer: ShapeInitializer): void { + for (const shape of shapes) { + this.initializers.shapes.set(shape, drawer); + } + } + + clearPlugins(container: Container): void { + this.effectDrawers.delete(container); + this.shapeDrawers.delete(container); + this.updaters.delete(container); + } + + /** + * @param name - + * @returns the easing function + */ + getEasing(name: EasingType | EasingTypeAlt): EasingFunction { + return this.easingFunctions.get(name) ?? ((value: number): number => value); + } + + getEffectDrawers(container: Container, force = false): Promise> { + return getItemMapFromInitializer(container, this.effectDrawers, this.initializers.effects, force); + } + + getPalette(name: string): IPalette | undefined { + return this.palettes.get(name); + } + + /** + * Searches if the specified plugin exists and returns it + * @param plugin - the plugin name + * @returns the plugin if found, or undefined + */ + getPlugin(plugin: string): IPlugin | undefined { + return this.plugins.find(t => t.id === plugin); + } + + /** + * Searches the preset with the given name + * @param preset - the preset name to search + * @returns the preset if found, or undefined + */ + getPreset(preset: string): ISourceOptions | undefined { + return this.presets.get(preset); + } + + async getShapeDrawers(container: Container, force = false): Promise> { + return getItemMapFromInitializer(container, this.shapeDrawers, this.initializers.shapes, force); + } + + /** + * Returns all the container particle updaters + * @param container - the container used to check which particle updaters are enabled + * @param force - if true reloads the updater collection for the given container + * @returns the array of updaters for the given container + */ + async getUpdaters(container: Container, force = false): Promise { + return getItemsFromInitializer(container, this.updaters, this.initializers.updaters, force); + } + + /** + * init method, used by imports + */ + async init(): Promise { + if (this._initialized || this._isRunningLoaders) { + return; + } + + this._isRunningLoaders = true; + + this._executedSet = new Set(); + this._allLoadersSet = new Set(this._loadPromises); + + try { + for (const loader of this._allLoadersSet) { + await this._runLoader(loader, this._executedSet, this._allLoadersSet); + } + } finally { + this._loadPromises.clear(); + this._isRunningLoaders = false; + this._initialized = true; + } + } + + /** + * Load the given particles options for all the updaters + * @param container - the container of the updaters + * @param options - the actual options to set + * @param sourceOptions - the source options to read + */ + loadParticlesOptions( + container: Container, + options: ParticlesOptions, + ...sourceOptions: (RecursivePartial | undefined)[] + ): void { + const updaters = this.updaters.get(container); + + if (!updaters) { + return; + } + + updaters.forEach(updater => updater.loadOptions?.(options, ...sourceOptions)); + } + + async register(...loaders: LoadPluginFunction[]): Promise { + if (this._initialized) { + throw new Error("Register plugins can only be done before calling tsParticles.load()"); + } + + for (const loader of loaders) { + if (this._isRunningLoaders) { + await this._runLoader(loader, this._executedSet, this._allLoadersSet); + } else { + this._loadPromises.add(loader); + } + } + } + + private async _runLoader( + loader: LoadPluginFunction, + executed: Set, + allLoaders: Set, + ): Promise { + if (executed.has(loader)) return; + + executed.add(loader); + allLoaders.add(loader); + + await loader(this._engine); + } +} diff --git a/engine/src/Options/Classes/Options.ts b/engine/src/Options/Classes/Options.ts index 0e0e67d2915..650eb0c3a87 100644 --- a/engine/src/Options/Classes/Options.ts +++ b/engine/src/Options/Classes/Options.ts @@ -2,11 +2,11 @@ import { deepExtend, executeOnSingleOrMultiple } from "../../Utils/Utils.js"; import { isBoolean, isNull } from "../../Utils/TypeUtils.js"; import { Background } from "./Background/Background.js"; import type { Container } from "../../Core/Container.js"; -import type { Engine } from "../../Core/Engine.js"; import { FullScreen } from "./FullScreen/FullScreen.js"; import type { IOptionLoader } from "../Interfaces/IOptionLoader.js"; import type { IOptions } from "../Interfaces/IOptions.js"; import type { ISourceOptions } from "../../Types/ISourceOptions.js"; +import type { PluginManager } from "../../Core/Utils/PluginManager.js"; import type { RangeValue } from "../../Types/RangeValue.js"; import type { RecursivePartial } from "../../Types/RecursivePartial.js"; import { ResizeEvent } from "./ResizeEvent.js"; @@ -48,10 +48,10 @@ export class Options implements IOptions, IOptionLoader { zLayers; private readonly _container; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: Engine, container: Container) { - this._engine = engine; + constructor(pluginManager: PluginManager, container: Container) { + this._pluginManager = pluginManager; this._container = container; this.autoPlay = true; this.background = new Background(); @@ -63,7 +63,7 @@ export class Options implements IOptions, IOptionLoader { this.duration = 0; this.fpsLimit = 120; this.hdr = true; - this.particles = loadParticlesOptions(this._engine, this._container); + this.particles = loadParticlesOptions(this._pluginManager, this._container); this.pauseOnBlur = true; this.pauseOnOutsideViewport = true; this.resize = new ResizeEvent(); @@ -167,13 +167,13 @@ export class Options implements IOptions, IOptionLoader { this.smooth = data.smooth; } - this._engine.plugins.forEach(plugin => { + this._pluginManager.plugins.forEach(plugin => { plugin.loadOptions(this._container, this, data); }); } private readonly _importPalette: (palette: string) => void = palette => { - const paletteData = this._engine.getPalette(palette); + const paletteData = this._pluginManager.getPalette(palette); if (!paletteData) { return; @@ -207,6 +207,6 @@ export class Options implements IOptions, IOptionLoader { }; private readonly _importPreset: (preset: string) => void = preset => { - this.load(this._engine.getPreset(preset)); + this.load(this._pluginManager.getPreset(preset)); }; } diff --git a/engine/src/Options/Classes/Particles/ParticlesOptions.ts b/engine/src/Options/Classes/Particles/ParticlesOptions.ts index 4e40226949d..6e1e0c36c97 100644 --- a/engine/src/Options/Classes/Particles/ParticlesOptions.ts +++ b/engine/src/Options/Classes/Particles/ParticlesOptions.ts @@ -1,7 +1,6 @@ import { deepExtend, executeOnSingleOrMultiple } from "../../../Utils/Utils.js"; import type { Container } from "../../../Core/Container.js"; import { Effect } from "./Effect/Effect.js"; -import type { Engine } from "../../../Core/Engine.js"; import { Fill } from "./Fill.js"; import type { IOptionLoader } from "../../Interfaces/IOptionLoader.js"; import type { IParticlesOptions } from "../../Interfaces/Particles/IParticlesOptions.js"; @@ -10,6 +9,7 @@ import { Opacity } from "./Opacity/Opacity.js"; import { ParticlesBounce } from "./Bounce/ParticlesBounce.js"; import type { ParticlesGroups } from "../../../Types/ParticlesGroups.js"; import { ParticlesNumber } from "./Number/ParticlesNumber.js"; +import type { PluginManager } from "../../../Core/Utils/PluginManager.js"; import type { RecursivePartial } from "../../../Types/RecursivePartial.js"; import { Shape } from "./Shape/Shape.js"; import type { SingleOrMultiple } from "../../../Types/SingleOrMultiple.js"; @@ -38,10 +38,10 @@ export class ParticlesOptions implements IParticlesOptions, IOptionLoader(), @@ -81,16 +81,16 @@ function getCachedStyle(key: string, generator: () => string): string { /** * Converts a string to a RGBA color. - * @param engine - The engine managing the current parameters. + * @param pluginManager - The plugin manager * @param input - A string that represents a color. * @returns the converted color from string to {@link IRgba} interfaec */ -function stringToRgba(engine: Engine, input: string): IRgba | undefined { +function stringToRgba(pluginManager: PluginManager, input: string): IRgba | undefined { if (!input) { return; } - for (const manager of engine.colorManagers.values()) { + for (const manager of pluginManager.colorManagers.values()) { if (manager.accepts(input)) { return manager.parseString(input); } @@ -101,14 +101,14 @@ function stringToRgba(engine: Engine, input: string): IRgba | undefined { /** * Gets the particles color - * @param engine - the engine managing the current parameters + * @param pluginManager - the plugin manager * @param input - the input color to convert in {@link IRgb} object * @param index - the array index, if needed * @param useIndex - set to false for ignoring the index parameter * @returns returns a RGB color in the given range */ export function rangeColorToRgb( - engine: Engine, + pluginManager: PluginManager, input?: string | IRangeColor, index?: number, useIndex = true, @@ -120,7 +120,7 @@ export function rangeColorToRgb( const color = isString(input) ? { value: input } : input; if (isString(color.value)) { - return colorToRgb(engine, color.value, index, useIndex); + return colorToRgb(pluginManager, color.value, index, useIndex); } if (isArray(color.value)) { @@ -130,12 +130,12 @@ export function rangeColorToRgb( return; } - return rangeColorToRgb(engine, { + return rangeColorToRgb(pluginManager, { value, }); } - for (const manager of engine.colorManagers.values()) { + for (const manager of pluginManager.colorManagers.values()) { const res = manager.handleRangeColor(color); if (res) { @@ -148,13 +148,18 @@ export function rangeColorToRgb( /** * Gets the particles color - * @param engine - the engine managing the current parameters + * @param pluginManager - the plugin manager * @param input - the input color to convert in {@link IRgb} object * @param index - the array index, if needed * @param useIndex - set to false to ignore the index parameter * @returns returns an RGB color taken from a {@link IColor} object */ -export function colorToRgb(engine: Engine, input?: string | IColor, index?: number, useIndex = true): IRgb | undefined { +export function colorToRgb( + pluginManager: PluginManager, + input?: string | IColor, + index?: number, + useIndex = true, +): IRgb | undefined { if (!input) { return; } @@ -162,7 +167,7 @@ export function colorToRgb(engine: Engine, input?: string | IColor, index?: numb const color = isString(input) ? { value: input } : input; if (isString(color.value)) { - return color.value === randomColorValue ? getRandomRgbColor() : stringToRgb(engine, color.value); + return color.value === randomColorValue ? getRandomRgbColor() : stringToRgb(pluginManager, color.value); } if (isArray(color.value)) { @@ -172,12 +177,12 @@ export function colorToRgb(engine: Engine, input?: string | IColor, index?: numb return; } - return colorToRgb(engine, { + return colorToRgb(pluginManager, { value, }); } - for (const manager of engine.colorManagers.values()) { + for (const manager of pluginManager.colorManagers.values()) { const res = manager.handleColor(color); if (res) { @@ -190,38 +195,38 @@ export function colorToRgb(engine: Engine, input?: string | IColor, index?: numb /** * Gets the particles color - * @param engine - the engine managing the current parameters + * @param pluginManager - the plugin manager * @param color - the input color to convert in {@link IHsl} object * @param index - the array index, if needed * @param useIndex - set to false to ignore the index parameter * @returns the {@link IHsl} object */ export function colorToHsl( - engine: Engine, + pluginManager: PluginManager, color: string | IColor | undefined, index?: number, useIndex = true, ): IHsl | undefined { - const rgb = colorToRgb(engine, color, index, useIndex); + const rgb = colorToRgb(pluginManager, color, index, useIndex); return rgb ? rgbToHsl(rgb) : undefined; } /** * Gets the particles color - * @param engine - the engine managing the current parameters + * @param pluginManager - the plugin manager * @param color - the input color to convert in {@link IHsl} object * @param index - the array index, if needed * @param useIndex - set to false to ignore the index parameter * @returns the {@link IHsl} object */ export function rangeColorToHsl( - engine: Engine, + pluginManager: PluginManager, color: string | IRangeColor | undefined, index?: number, useIndex = true, ): IHsl | undefined { - const rgb = rangeColorToRgb(engine, color, index, useIndex); + const rgb = rangeColorToRgb(pluginManager, color, index, useIndex); return rgb ? rgbToHsl(rgb) : undefined; } @@ -274,22 +279,22 @@ export function rgbToHsl(color: IRgb): IHsl { /** * Gets alpha value from string color - * @param engine - the engine managing the current parameters + * @param pluginManager - the plugin manager * @param input - the input color to convert in alpha value * @returns the alpha value */ -export function stringToAlpha(engine: Engine, input: string): number | undefined { - return stringToRgba(engine, input)?.a; +export function stringToAlpha(pluginManager: PluginManager, input: string): number | undefined { + return stringToRgba(pluginManager, input)?.a; } /** * Converts hexadecimal string (HTML color code) in a {@link IRgb} object - * @param engine - the engine managing the current parameters + * @param pluginManager - the plugin manager * @param input - the hexadecimal string (#f70 or #ff7700) * @returns the {@link IRgb} object */ -export function stringToRgb(engine: Engine, input: string): IRgb | undefined { - return stringToRgba(engine, input); +export function stringToRgb(pluginManager: PluginManager, input: string): IRgb | undefined { + return stringToRgba(pluginManager, input); } /** @@ -512,14 +517,14 @@ export function getLinkColor(p1: Particle, p2?: Particle, linkColor?: string | I } /** - * @param engine - + * @param pluginManager - * @param optColor - * @param blink - * @param consent - * @returns returns a link random color, if needed */ export function getLinkRandomColor( - engine: Engine, + pluginManager: PluginManager, optColor: string | IOptionsColor, blink: boolean, consent: boolean, @@ -528,7 +533,7 @@ export function getLinkRandomColor( if (color === randomColorValue) { if (consent) { - return rangeColorToRgb(engine, { + return rangeColorToRgb(pluginManager, { value: color, }); } @@ -541,7 +546,7 @@ export function getLinkRandomColor( } else if (color === midColorValue) { return midColorValue; } else { - return rangeColorToRgb(engine, { + return rangeColorToRgb(pluginManager, { value: color, }); } diff --git a/engine/src/Utils/LogUtils.ts b/engine/src/Utils/LogUtils.ts index eaec82eabee..2e988c9c31f 100644 --- a/engine/src/Utils/LogUtils.ts +++ b/engine/src/Utils/LogUtils.ts @@ -14,6 +14,9 @@ interface ILogger { // eslint-disable-next-line @typescript-eslint/no-invalid-void-type log(this: void, message?: unknown, ...optionalParams: unknown[]): void; + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + trace(this: void, ...data: unknown[]): void; + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type verbose(this: void, message?: unknown, ...optionalParams: unknown[]): void; @@ -29,6 +32,7 @@ const _logger: ILogger = { }, info: console.info, log: console.log, + trace: console.trace, verbose: console.log, warning: console.warn, }; diff --git a/engine/src/Utils/OptionsUtils.ts b/engine/src/Utils/OptionsUtils.ts index 674f56b3438..0473e4c3001 100644 --- a/engine/src/Utils/OptionsUtils.ts +++ b/engine/src/Utils/OptionsUtils.ts @@ -1,8 +1,8 @@ import type { Container } from "../Core/Container.js"; -import type { Engine } from "../Core/Engine.js"; import type { IOptionLoader } from "../Options/Interfaces/IOptionLoader.js"; import type { IParticlesOptions } from "../Options/Interfaces/Particles/IParticlesOptions.js"; import { ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions.js"; +import type { PluginManager } from "../Core/Utils/PluginManager.js"; import type { RecursivePartial } from "../Types/RecursivePartial.js"; /** @@ -19,17 +19,17 @@ export function loadOptions( } /** - * @param engine - + * @param pluginManager - * @param container - * @param sourceOptionsArr - * @returns the newly created {@link ParticlesOptions} object */ export function loadParticlesOptions( - engine: Engine, + pluginManager: PluginManager, container: Container, ...sourceOptionsArr: RecursivePartial[] ): ParticlesOptions { - const options = new ParticlesOptions(engine, container); + const options = new ParticlesOptions(pluginManager, container); loadOptions(options, ...sourceOptionsArr); diff --git a/engine/src/export-types.ts b/engine/src/export-types.ts index 3d1ec8b65cc..5a8e65507f5 100644 --- a/engine/src/export-types.ts +++ b/engine/src/export-types.ts @@ -73,6 +73,7 @@ export type * from "./Options/Interfaces/Particles/Size/ISizeAnimation.js"; export type * from "./Options/Interfaces/Particles/ZIndex/IZIndex.js"; +export type * from "./Types/CanvasContextType.js"; export type * from "./Types/CustomEventArgs.js"; export type * from "./Types/CustomEventListener.js"; export type * from "./Types/EasingFunction.js"; @@ -88,9 +89,10 @@ export type * from "./Types/SingleOrMultiple.js"; export type { EventListeners } from "./Core/Utils/EventListeners.js"; export type { SpatialHashGrid } from "./Core/Utils/SpatialHashGrid.js"; -export type { Canvas } from "./Core/Canvas.js"; +export type { CanvasManager } from "./Core/CanvasManager.js"; export type { Container } from "./Core/Container.js"; export type { Particle } from "./Core/Particle.js"; -export type { Particles } from "./Core/Particles.js"; +export type { ParticlesManager } from "./Core/ParticlesManager.js"; export type { Retina } from "./Core/Retina.js"; export type { Engine } from "./Core/Engine.js"; +export type { PluginManager } from "./Core/Utils/PluginManager.js"; diff --git a/interactions/external/attract/CHANGELOG.md b/interactions/external/attract/CHANGELOG.md index 1c93c58e384..e9e36d03383 100644 --- a/interactions/external/attract/CHANGELOG.md +++ b/interactions/external/attract/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-attract + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-attract diff --git a/interactions/external/attract/package.dist.json b/interactions/external/attract/package.dist.json index 72ae7bc3c63..21a33f7f1db 100644 --- a/interactions/external/attract/package.dist.json +++ b/interactions/external/attract/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-attract", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles attract external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/attract/package.json b/interactions/external/attract/package.json index f7a8da04955..0c940e205a2 100644 --- a/interactions/external/attract/package.json +++ b/interactions/external/attract/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-attract", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles attract external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/attract/src/Attractor.ts b/interactions/external/attract/src/Attractor.ts index a0cbd150e4d..d17e12688a5 100644 --- a/interactions/external/attract/src/Attractor.ts +++ b/interactions/external/attract/src/Attractor.ts @@ -1,5 +1,4 @@ import type { AttractContainer, AttractMode, IAttractMode } from "./Types.js"; -import { type Engine, type RecursivePartial, isInArray, millisecondsToSeconds } from "@tsparticles/engine"; import { ExternalInteractorBase, type IInteractivityData, @@ -8,6 +7,7 @@ import { type Modes, mouseMoveEvent, } from "@tsparticles/plugin-interactivity"; +import { type PluginManager, type RecursivePartial, isInArray, millisecondsToSeconds } from "@tsparticles/engine"; import { clickAttract, hoverAttract } from "./Utils.js"; import { Attract } from "./Options/Classes/Attract.js"; @@ -19,13 +19,13 @@ const attractMode = "attract"; export class Attractor extends ExternalInteractorBase { handleClickMode: (mode: string, interactivityData: IInteractivityData) => void; - private readonly _engine; private _maxDistance; + private readonly _pluginManager; - constructor(engine: Engine, container: AttractContainer) { + constructor(pluginManager: PluginManager, container: AttractContainer) { super(container); - this._engine = engine; + this._pluginManager = pluginManager; this._maxDistance = 0; container.attract ??= { particles: [] }; @@ -101,9 +101,9 @@ export class Attractor extends ExternalInteractorBase { { enable: clickEnabled, mode: clickMode } = events.onClick; if (mouseMoveStatus && hoverEnabled && isInArray(attractMode, hoverMode)) { - hoverAttract(this._engine, this.container, interactivityData, p => this.isEnabled(interactivityData, p)); + hoverAttract(this._pluginManager, this.container, interactivityData, p => this.isEnabled(interactivityData, p)); } else if (clickEnabled && isInArray(attractMode, clickMode)) { - clickAttract(this._engine, this.container, interactivityData, p => this.isEnabled(interactivityData, p)); + clickAttract(this._pluginManager, this.container, interactivityData, p => this.isEnabled(interactivityData, p)); } } diff --git a/interactions/external/attract/src/Utils.ts b/interactions/external/attract/src/Utils.ts index 4d14eb258aa..86c8c1f25b8 100644 --- a/interactions/external/attract/src/Utils.ts +++ b/interactions/external/attract/src/Utils.ts @@ -1,9 +1,9 @@ import { type BaseRange, Circle, - type Engine, type ICoordinates, type Particle, + type PluginManager, Vector, clamp, getDistances, @@ -18,7 +18,7 @@ const minFactor = 1, /** * - * @param engine - + * @param pluginManager - * @param container - * @param position - * @param attractRadius - @@ -26,7 +26,7 @@ const minFactor = 1, * @param queryCb - */ function processAttract( - engine: Engine, + pluginManager: PluginManager, container: AttractContainer, position: ICoordinates, attractRadius: number, @@ -45,7 +45,7 @@ function processAttract( const { dx, dy, distance } = getDistances(particle.position, position), velocity = attractOptions.speed * attractOptions.factor, attractFactor = clamp( - engine.getEasing(attractOptions.easing)(identity - distance / attractRadius) * velocity, + pluginManager.getEasing(attractOptions.easing)(identity - distance / attractRadius) * velocity, minFactor, attractOptions.maxSpeed, ); @@ -58,13 +58,13 @@ function processAttract( } /** - * @param engine - + * @param pluginManager - * @param container - * @param interactivityData - * @param enabledCb - */ export function clickAttract( - engine: Engine, + pluginManager: PluginManager, container: AttractContainer, interactivityData: IInteractivityData, enabledCb: (particle: Particle) => boolean, @@ -91,7 +91,7 @@ export function clickAttract( } processAttract( - engine, + pluginManager, container, mousePos, attractRadius, @@ -104,13 +104,13 @@ export function clickAttract( } /** - * @param engine - + * @param pluginManager - * @param container - * @param interactivityData - * @param enabledCb - */ export function hoverAttract( - engine: Engine, + pluginManager: PluginManager, container: AttractContainer, interactivityData: IInteractivityData, enabledCb: (particle: Particle) => boolean, @@ -123,7 +123,7 @@ export function hoverAttract( } processAttract( - engine, + pluginManager, container, mousePos, attractRadius, diff --git a/interactions/external/attract/src/index.ts b/interactions/external/attract/src/index.ts index d8c58262804..a4e7065355b 100644 --- a/interactions/external/attract/src/index.ts +++ b/interactions/external/attract/src/index.ts @@ -9,15 +9,15 @@ declare const __VERSION__: string; export async function loadExternalAttractInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalAttract", async container => { + e.pluginManager.addInteractor?.("externalAttract", async container => { const { Attractor } = await import("./Attractor.js"); - return new Attractor(e, container); + return new Attractor(e.pluginManager, container); }); }); } diff --git a/interactions/external/bounce/CHANGELOG.md b/interactions/external/bounce/CHANGELOG.md index 7c98ac9a327..3b5bb968fa8 100644 --- a/interactions/external/bounce/CHANGELOG.md +++ b/interactions/external/bounce/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-bounce + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-bounce diff --git a/interactions/external/bounce/package.dist.json b/interactions/external/bounce/package.dist.json index ffa1d4492ba..51f57ff28bd 100644 --- a/interactions/external/bounce/package.dist.json +++ b/interactions/external/bounce/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-bounce", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles bounce external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/bounce/package.json b/interactions/external/bounce/package.json index 2e4f1b61321..c69c9dcac8c 100644 --- a/interactions/external/bounce/package.json +++ b/interactions/external/bounce/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-bounce", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles bounce external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/bounce/src/index.ts b/interactions/external/bounce/src/index.ts index cb2dd429812..1fa1c4d76ae 100644 --- a/interactions/external/bounce/src/index.ts +++ b/interactions/external/bounce/src/index.ts @@ -9,12 +9,12 @@ declare const __VERSION__: string; export async function loadExternalBounceInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalBounce", async container => { + e.pluginManager.addInteractor?.("externalBounce", async container => { const { Bouncer } = await import("./Bouncer.js"); return new Bouncer(container); diff --git a/interactions/external/bubble/CHANGELOG.md b/interactions/external/bubble/CHANGELOG.md index a84b8baf0e8..7cbb9cb3d4e 100644 --- a/interactions/external/bubble/CHANGELOG.md +++ b/interactions/external/bubble/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-bubble + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-bubble diff --git a/interactions/external/bubble/package.dist.json b/interactions/external/bubble/package.dist.json index 296abd8ad09..707b5f722c5 100644 --- a/interactions/external/bubble/package.dist.json +++ b/interactions/external/bubble/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-bubble", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles bubble external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/bubble/package.json b/interactions/external/bubble/package.json index 0618b73bbad..04f8c2139dc 100644 --- a/interactions/external/bubble/package.json +++ b/interactions/external/bubble/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-bubble", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles bubble external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/bubble/src/Bubbler.ts b/interactions/external/bubble/src/Bubbler.ts index 5040398acc0..0bb4a3b63b8 100644 --- a/interactions/external/bubble/src/Bubbler.ts +++ b/interactions/external/bubble/src/Bubbler.ts @@ -1,9 +1,9 @@ import type { BubbleContainer, BubbleMode, IBubbleMode } from "./Types.js"; import { Circle, - type Engine, type IDelta, type Particle, + type PluginManager, Rectangle, type RecursivePartial, colorMix, @@ -53,13 +53,13 @@ const bubbleMode = "bubble", export class Bubbler extends ExternalInteractorBase { handleClickMode: (mode: string, interactivityData: IInteractivityData) => void; - private readonly _engine; private _maxDistance; + private readonly _pluginManager; - constructor(engine: Engine, container: BubbleContainer) { + constructor(pluginManager: PluginManager, container: BubbleContainer) { super(container); - this._engine = engine; + this._pluginManager = pluginManager; this._maxDistance = 0; container.bubble ??= {}; @@ -313,7 +313,7 @@ export class Bubbler extends ExternalInteractorBase { const bubbleColor = itemFromSingleOrMultiple(modeColor); - particle.bubble.finalColor = rangeColorToHsl(this._engine, bubbleColor); + particle.bubble.finalColor = rangeColorToHsl(this._pluginManager, bubbleColor); } if (!particle.bubble.finalColor) { diff --git a/interactions/external/bubble/src/index.ts b/interactions/external/bubble/src/index.ts index d45f1e8be71..a52ea7b6a92 100644 --- a/interactions/external/bubble/src/index.ts +++ b/interactions/external/bubble/src/index.ts @@ -9,15 +9,15 @@ declare const __VERSION__: string; export async function loadExternalBubbleInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalBubble", async container => { + e.pluginManager.addInteractor?.("externalBubble", async container => { const { Bubbler } = await import("./Bubbler.js"); - return new Bubbler(e, container); + return new Bubbler(e.pluginManager, container); }); }); } diff --git a/interactions/external/cannon/.browserslistrc b/interactions/external/cannon/.browserslistrc new file mode 100644 index 00000000000..8e3f6e2d618 --- /dev/null +++ b/interactions/external/cannon/.browserslistrc @@ -0,0 +1,3 @@ +since 2021 +not dead + diff --git a/interactions/external/cannon/.npmignore b/interactions/external/cannon/.npmignore new file mode 100644 index 00000000000..ec3632c8123 --- /dev/null +++ b/interactions/external/cannon/.npmignore @@ -0,0 +1,2 @@ +report.html + diff --git a/interactions/external/cannon/CHANGELOG.md b/interactions/external/cannon/CHANGELOG.md new file mode 100644 index 00000000000..8281460b30b --- /dev/null +++ b/interactions/external/cannon/CHANGELOG.md @@ -0,0 +1,16 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +### Bug Fixes + +- improved cannon and interactivity events ([b836a59](https://github.com/tsparticles/tsparticles/commit/b836a59e90afdc68b6307e8d37898e71b5881a21)) +- improved cannon options loading ([8cfcc50](https://github.com/tsparticles/tsparticles/commit/8cfcc50f4375582b73ff79569a097aea8464c8c7)) +- improved cannon vector draw ([5d55e8f](https://github.com/tsparticles/tsparticles/commit/5d55e8f22aa34939ac96a58ef9e1eb478f33e9f6)) + +### Features + +- added cannon external interaction ([e133ab3](https://github.com/tsparticles/tsparticles/commit/e133ab35835b6411c0da1b151b046a36bcfd9ee1)) diff --git a/interactions/external/cannon/LICENSE b/interactions/external/cannon/LICENSE new file mode 100644 index 00000000000..bdc05f528fa --- /dev/null +++ b/interactions/external/cannon/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Matteo Bruni + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/interactions/external/cannon/README.md b/interactions/external/cannon/README.md new file mode 100644 index 00000000000..30aa165f848 --- /dev/null +++ b/interactions/external/cannon/README.md @@ -0,0 +1,88 @@ +[![banner](https://particles.js.org/images/banner2.png)](https://particles.js.org) + +# tsParticles External Cannon Interaction + +[![jsDelivr](https://data.jsdelivr.com/v1/package/npm/@tsparticles/interaction-external-cannon/badge)](https://www.jsdelivr.com/package/npm/@tsparticles/interaction-external-cannon) +[![npmjs](https://badge.fury.io/js/@tsparticles/interaction-external-cannon.svg)](https://www.npmjs.com/package/@tsparticles/interaction-external-cannon) +[![npmjs](https://img.shields.io/npm/dt/@tsparticles/interaction-external-cannon)](https://www.npmjs.com/package/@tsparticles/interaction-external-cannon) [![GitHub Sponsors](https://img.shields.io/github/sponsors/matteobruni)](https://github.com/sponsors/matteobruni) + +[tsParticles](https://github.com/tsparticles/tsparticles) interaction plugin for a particles cannon +with the mouse/pointer. + +## How to use it + +### CDN / Vanilla JS / jQuery + +The CDN/Vanilla version JS has one required file in vanilla configuration: + +Including the `tsparticles.interaction.external.cannon.min.js` file will export the function to load the interaction +plugin: + +```javascript +loadExternalCannonInteraction; +``` + +### Usage + +Once the scripts are loaded you can set up `tsParticles` and the interaction plugin like this: + +```javascript +(async () => { + await loadInteractivityPlugin(tsParticles); + await loadExternalCannonInteraction(tsParticles); + + await tsParticles.load({ + id: "tsparticles", + options: { + interactivity: { + events: { + onClick: { + enable: true, + mode: "cannon", + }, + }, + }, + }, + }); +})(); +``` + +### ESM / CommonJS + +This package is compatible also with ES or CommonJS modules, firstly this needs to be installed, like this: + +```shell +$ npm install @tsparticles/interaction-external-cannon +``` + +or + +```shell +$ yarn add @tsparticles/interaction-external-cannon +``` + +Then you need to import it in the app, like this: + +```javascript +const { tsParticles } = require("@tsparticles/engine"); +const { loadInteractivityPlugin } = require("@tsparticles/plugin-interactivity"); +const { loadExternalCannonInteraction } = require("@tsparticles/interaction-external-cannon"); + +(async () => { + await loadInteractivityPlugin(tsParticles); + await loadExternalCannonInteraction(tsParticles); +})(); +``` + +or + +```javascript +import { tsParticles } from "@tsparticles/engine"; +import { loadInteractivityPlugin } from "@tsparticles/plugin-interactivity"; +import { loadExternalCannonInteraction } from "@tsparticles/interaction-external-cannon"; + +(async () => { + await loadInteractivityPlugin(tsParticles); + await loadExternalCannonInteraction(tsParticles); +})(); +``` diff --git a/interactions/external/cannon/eslint.config.js b/interactions/external/cannon/eslint.config.js new file mode 100644 index 00000000000..4304e66d2b2 --- /dev/null +++ b/interactions/external/cannon/eslint.config.js @@ -0,0 +1,7 @@ +import tsParticlesESLintConfig from "@tsparticles/eslint-config"; +import { defineConfig } from "eslint/config"; + +export default defineConfig([ + tsParticlesESLintConfig, +]); + diff --git a/interactions/external/cannon/package.dist.json b/interactions/external/cannon/package.dist.json new file mode 100644 index 00000000000..fb825c35bd5 --- /dev/null +++ b/interactions/external/cannon/package.dist.json @@ -0,0 +1,97 @@ +{ + "name": "@tsparticles/interaction-external-cannon", + "version": "4.0.0-beta.1", + "description": "tsParticles cannon external interaction", + "homepage": "https://particles.js.org", + "repository": { + "type": "git", + "url": "git+https://github.com/tsparticles/tsparticles.git", + "directory": "interactions/external/cannon" + }, + "keywords": [ + "front-end", + "frontend", + "tsparticles", + "particles.js", + "particlesjs", + "particles", + "particle", + "canvas", + "jsparticles", + "xparticles", + "particles-js", + "particles-bg", + "particles-bg-vue", + "particles-ts", + "particles.ts", + "react-particles-js", + "react-particles.js", + "react-particles", + "react", + "reactjs", + "vue-particles", + "ngx-particles", + "angular-particles", + "particleground", + "vue", + "vuejs", + "preact", + "preactjs", + "jquery", + "angularjs", + "angular", + "typescript", + "javascript", + "animation", + "web", + "html5", + "web-design", + "webdesign", + "css", + "html", + "css3", + "animated", + "background", + "confetti", + "canvas", + "fireworks", + "fireworks-js", + "confetti-js", + "confettijs", + "fireworksjs", + "canvas-confetti", + "tsparticles-plugin", + "@tsparticles/interaction" + ], + "author": "Matteo Bruni ", + "license": "MIT", + "bugs": { + "url": "https://github.com/tsparticles/tsparticles/issues" + }, + "sideEffects": false, + "jsdelivr": "tsparticles.interaction.external.cannon.min.js", + "unpkg": "tsparticles.interaction.external.cannon.min.js", + "browser": "browser/index.js", + "main": "cjs/index.js", + "module": "esm/index.js", + "types": "types/index.d.ts", + "exports": { + ".": { + "types": "./types/index.d.ts", + "browser": "./browser/index.js", + "import": "./esm/index.js", + "require": "./cjs/index.js", + "umd": "./umd/index.js", + "default": "./cjs/index.js" + }, + "./package.json": "./package.json" + }, + "dependencies": { + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" + }, + "publishConfig": { + "access": "public" + }, + "type": "module" +} diff --git a/interactions/external/cannon/package.json b/interactions/external/cannon/package.json new file mode 100644 index 00000000000..dd3588b9b48 --- /dev/null +++ b/interactions/external/cannon/package.json @@ -0,0 +1,79 @@ +{ + "name": "@tsparticles/interaction-external-cannon", + "version": "4.0.0-beta.1", + "description": "tsParticles cannon external interaction", + "homepage": "https://particles.js.org", + "scripts": { + "build": "tsparticles-cli build", + "build:ci": "tsparticles-cli build --ci", + "version": "tsparticles-cli build -d && git add package.dist.json && tsparticles-cli build -p -l && git add .", + "prepack": "pnpm run build" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/tsparticles/tsparticles.git", + "directory": "interactions/external/cannon" + }, + "keywords": [ + "front-end", + "frontend", + "tsparticles", + "particles", + "particle", + "canvas", + "jsparticles", + "xparticles", + "particles-js", + "particles.js", + "particles-ts", + "particles.ts", + "typescript", + "javascript", + "animation", + "web", + "html5", + "web-design", + "webdesign", + "css", + "html", + "css3", + "animated", + "background", + "@tsparticles/interaction" + ], + "author": "Matteo Bruni ", + "license": "MIT", + "bugs": { + "url": "https://github.com/tsparticles/tsparticles/issues" + }, + "prettier": "@tsparticles/prettier-config", + "files": [ + "dist" + ], + "sideEffects": false, + "browser": "dist/browser/index.js", + "main": "dist/cjs/index.js", + "module": "dist/esm/index.js", + "types": "dist/types/index.d.ts", + "exports": { + ".": { + "types": "./dist/types/index.d.ts", + "browser": "./dist/browser/index.js", + "import": "./dist/esm/index.js", + "require": "./dist/cjs/index.js", + "umd": "./dist/umd/index.js", + "default": "./dist/cjs/index.js" + }, + "./package.json": "./dist/package.json" + }, + "dependencies": { + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" + }, + "publishConfig": { + "access": "public", + "directory": "dist", + "linkDirectory": true + }, + "type": "module" +} diff --git a/interactions/external/cannon/src/Cannoner.ts b/interactions/external/cannon/src/Cannoner.ts new file mode 100644 index 00000000000..3f28ab8a63e --- /dev/null +++ b/interactions/external/cannon/src/Cannoner.ts @@ -0,0 +1,277 @@ +import type { CannonContainer, CannonMode, ICannonMode } from "./Types.js"; +import { + ExternalInteractorBase, + type IInteractivityData, + type IModes, + type InteractivityParticle, + type Modes, +} from "@tsparticles/plugin-interactivity"; +import { + type ICoordinates, + type IDelta, + type RecursivePartial, + Vector, + degToRad, + double, + doublePI, + getDistance, + getRandomInRange, + identity, + none, +} from "@tsparticles/engine"; +import { Cannon } from "./Options/Classes/Cannon.js"; + +enum CannonState { + idle, + aiming, + fired, +} + +const cannonMode = "cannon", + minAngle = 0, + powerRadiusMin = 4, + powerRadiusMaxDenominator = 20, + powerRadiusMaxFactor = identity / powerRadiusMaxDenominator, + minTapsLength = 2, + piDeg = 180, + quarter = 0.25, + minDistance = 0; + +/** + * Computes the angle in radians between two points. + * @param x0 - + * @param y0 - + * @param x1 - + * @param y1 - + * @returns - + */ +function angleRad(x0: number, y0: number, x1: number, y1: number): number { + return Math.atan2(y1 - y0, x1 - x0); +} + +interface CannonData { + drawVector: boolean; + maxDragDistance: number; + maxParticles: number; + minParticles: number; + particleFactor: number; + spread: number; + vectorColor: string; + velocityFactor: number; +} + +interface CannonGesture { + /** Whether the pointer is currently held down. */ + active: boolean; + /** Current drag endpoint (updated on mousemove). */ + current: ICoordinates; + /** Canvas-space origin of the drag (mousedown position). */ + origin: ICoordinates; +} + +/** + * Cannon interactor for tsParticles. + * + * The user presses and drags away from the desired launch origin. + * On release the drag vector is reversed (slingshot / confetti-cannon style) + * and a burst of particles is fired in that direction. + * + * The number of particles and their velocity scale with the drag length. + * + * Options live under `interactivity.modes.cannon`: + * - `spread` — half-angle spread in degrees around the launch angle (default 30) + * - `velocityFactor` — multiplier applied to drag length to obtain particle speed (default 10) + * - `particleFactor` — how many particles per pixel of drag (default 0.2) + * - `minParticles` — minimum burst size regardless of drag length (default 5) + * - `maxParticles` — cap for burst size (default 200) + * - `drawVector` — whether to render the aiming line while dragging (default true) + * - `vectorColor` — CSS color for the aiming line (default "#ffffff80") + */ +export class Cannoner extends ExternalInteractorBase { + readonly maxDistance = 0; + + private _data?: CannonData; + private _gesture: CannonGesture = { + origin: Vector.origin, + current: Vector.origin, + active: false, + }; + + private _lastDownPosition: ICoordinates | undefined = undefined; + private _state: CannonState = CannonState.idle; + + // eslint-disable-next-line @typescript-eslint/no-useless-constructor + constructor(container: CannonContainer) { + super(container); + } + + clear(_particle: InteractivityParticle, _delta: IDelta): void { + // nothing to clear per-particle + } + + init(): void { + const options = this.container.actualOptions.interactivity?.modes.cannon ?? new Cannon(); + + this._data = { + spread: degToRad(options.spread), + maxDragDistance: options.maxDragDistance, + velocityFactor: options.velocityFactor, + particleFactor: options.particleFactor, + minParticles: options.minParticles, + maxParticles: options.maxParticles, + drawVector: options.drawVector, + vectorColor: options.vectorColor, + }; + } + + interact(interactivityData: IInteractivityData, _delta: IDelta): void { + const mouse = interactivityData.mouse, + mousePos = mouse.position, + clicking = mouse.clicking, + downPos = mouse.downPosition; + + // ── DOWN transition: new downPosition that we haven't processed yet + if (clicking && downPos && downPos !== this._lastDownPosition && this._state === CannonState.idle) { + this._lastDownPosition = downPos; + this._gesture = { + origin: { x: downPos.x, y: downPos.y }, + current: { x: downPos.x, y: downPos.y }, + active: true, + }; + this._state = CannonState.aiming; + } + + // ── Update endpoint during drag + if (this._state === CannonState.aiming && mousePos) { + this._gesture.current = { x: mousePos.x, y: mousePos.y }; + this._drawVector(); + } + + // ── UP transition: clicking false while we were aiming + if (!clicking && this._state === CannonState.aiming) { + this._gesture.active = false; + this._fire(); + this._state = CannonState.idle; + } + } + + isEnabled(interactivityData: IInteractivityData): boolean { + const { container } = this, + events = container.actualOptions.interactivity?.events; + + if (!events?.onClick.enable) { + return false; + } + + const modes = events.onClick.mode, + modeEnabled = Array.isArray(modes) ? modes.includes(cannonMode) : modes === cannonMode; + + if (!modeEnabled) { + return false; + } + + // Enabled if the gesture is active OR if the mouse is pressed — + // the second case covers frame zero before _state switches to "aiming" + return this._state !== CannonState.idle || interactivityData.mouse.clicking; + } + + loadModeOptions( + options: Modes & CannonMode, + ...sources: RecursivePartial<(IModes & ICannonMode) | undefined>[] + ): void { + options.cannon ??= new Cannon(); + + for (const source of sources) { + options.cannon.load(source?.cannon); + } + } + + reset(_interactivityData: IInteractivityData, _particle: InteractivityParticle): void { + // nothing to reset + } + + // ── Private helpers ──────────────────────────────────────────────────────── + /** + * Draws the aiming line and power circle on the canvas. + * Rendered directly on the container canvas context. + */ + private _drawVector(): void { + this.container.canvas.render.draw(ctx => { + const opts = this._data; + + if (!opts) { + return; + } + + const { origin, current } = this._gesture, + pxRatio = this.container.retina.pixelRatio, + dragDist = getDistance(origin, current), + // Clamp to maxDragDistance so visual feedback matches actual force + clampedDist = opts.maxDragDistance > none ? Math.min(dragDist, opts.maxDragDistance * pxRatio) : pxRatio, + clampRatio = dragDist > minDistance ? clampedDist / dragDist : minDistance, + clampedX = origin.x + (current.x - origin.x) * clampRatio, + clampedY = origin.y + (current.y - origin.y) * clampRatio; + + ctx.save(); + ctx.strokeStyle = opts.vectorColor; + ctx.lineWidth = double * pxRatio; + ctx.beginPath(); + ctx.moveTo(origin.x, origin.y); + ctx.lineTo(clampedX, clampedY); + ctx.stroke(); + + // Power circle at origin — radius reflects clamped force + const radius = Math.max(powerRadiusMin, clampedDist * powerRadiusMaxFactor) * pxRatio; + + ctx.beginPath(); + ctx.arc(origin.x, origin.y, radius, minAngle, doublePI); + ctx.strokeStyle = opts.vectorColor; + ctx.lineWidth = double * pxRatio; + ctx.stroke(); + ctx.restore(); + }); + } + + /** + * Fires a burst of particles based on the completed drag gesture. + */ + private _fire(): void { + const opts = this._data; + + if (!opts) { + return; + } + + const { origin, current } = this._gesture, + pxRatio = this.container.retina.pixelRatio, + dist = getDistance(origin, current), + dragLength = opts.maxDragDistance > none ? Math.min(dist, opts.maxDragDistance * pxRatio) : dist; + + if (dragLength < minTapsLength) { + // Ignore accidental taps + return; + } + + const pxRatioFactor = identity / pxRatio, + // Reverse the drag vector to get launch angle (already in radians) + launchAngle = angleRad(current.x, current.y, origin.x, origin.y), + velocity = dragLength * pxRatioFactor * opts.velocityFactor, + count = Math.min(opts.maxParticles, Math.max(opts.minParticles, Math.round(dragLength * opts.particleFactor))), + toDeg = piDeg / Math.PI; + + for (let i = 0; i < count; i++) { + const spreadAngle = launchAngle + getRandomInRange(-opts.spread, opts.spread), + speed = getRandomInRange(velocity * quarter, velocity); + + // addParticle expects logical (non-retina) coords + // direction is in degrees, convert once per particle from the cached radian value + this.container.particles.addParticle(origin, { + move: { + enable: true, + speed, + direction: spreadAngle * toDeg, + }, + }); + } + } +} diff --git a/interactions/external/cannon/src/Options/Classes/Cannon.ts b/interactions/external/cannon/src/Options/Classes/Cannon.ts new file mode 100644 index 00000000000..f31fec97a3c --- /dev/null +++ b/interactions/external/cannon/src/Options/Classes/Cannon.ts @@ -0,0 +1,58 @@ +import type { ICannon } from "../Interfaces/ICannon.js"; +import type { RecursivePartial } from "@tsparticles/engine"; + +export class Cannon implements ICannon { + drawVector; + maxDragDistance; + maxParticles; + minParticles; + particleFactor; + spread; + vectorColor; + velocityFactor; + + constructor() { + this.spread = 30; + this.velocityFactor = 0.5; + this.particleFactor = 0.2; + this.maxDragDistance = 200; + this.minParticles = 5; + this.maxParticles = 200; + this.drawVector = true; + this.vectorColor = "#ffffff80"; + } + + load(data?: RecursivePartial): void { + if (!data) { + return; + } + + if (data.spread !== undefined) { + this.spread = data.spread; + } + + if (data.velocityFactor !== undefined) { + this.velocityFactor = data.velocityFactor; + } + + if (data.particleFactor !== undefined) { + this.particleFactor = data.particleFactor; + } + + if (data.minParticles !== undefined) { + this.minParticles = data.minParticles; + } + + if (data.maxParticles !== undefined) { + this.maxParticles = data.maxParticles; + } + + if (data.drawVector !== undefined) { + this.drawVector = data.drawVector; + } + + if (data.vectorColor !== undefined) { + this.vectorColor = data.vectorColor; + } + } +} diff --git a/interactions/external/cannon/src/Options/Classes/CannonOptions.ts b/interactions/external/cannon/src/Options/Classes/CannonOptions.ts new file mode 100644 index 00000000000..0f30d69508e --- /dev/null +++ b/interactions/external/cannon/src/Options/Classes/CannonOptions.ts @@ -0,0 +1,8 @@ +import type { CannonMode } from "../../Types.js"; +import type { InteractivityOptions } from "@tsparticles/plugin-interactivity"; + +export type CannonOptions = InteractivityOptions & { + interactivity?: { + modes: CannonMode; + }; +}; diff --git a/interactions/external/cannon/src/Options/Interfaces/ICannon.ts b/interactions/external/cannon/src/Options/Interfaces/ICannon.ts new file mode 100644 index 00000000000..97a56a3cf84 --- /dev/null +++ b/interactions/external/cannon/src/Options/Interfaces/ICannon.ts @@ -0,0 +1,41 @@ +export interface ICannon { + /** + * Whether to render the dashed aim line and power circle while dragging. + */ + drawVector: boolean; + + maxDragDistance: number; + + /** + * Maximum number of particles spawned per shot. + */ + maxParticles: number; + + /** + * Minimum number of particles spawned per shot, regardless of drag length. + */ + minParticles: number; + + /** + * How many particles to spawn per pixel of drag. + * The final count is clamped between minParticles and maxParticles. + */ + particleFactor: number; + + /** + * Half-angle spread around the launch direction, in degrees. + * A value of 30 means particles can spread ±30° from the aim angle. + */ + spread: number; + + /** + * CSS color string for the aim line and power circle. + */ + vectorColor: string; + + /** + * Multiplier applied to the drag length (in canvas pixels) to produce + * the base particle speed. Larger values = faster particles. + */ + velocityFactor: number; +} diff --git a/interactions/external/cannon/src/Types.ts b/interactions/external/cannon/src/Types.ts new file mode 100644 index 00000000000..f390a3a0417 --- /dev/null +++ b/interactions/external/cannon/src/Types.ts @@ -0,0 +1,16 @@ +import type { Cannon } from "./Options/Classes/Cannon.js"; +import type { CannonOptions } from "./Options/Classes/CannonOptions.js"; +import type { ICannon } from "./Options/Interfaces/ICannon.js"; +import type { InteractivityContainer } from "@tsparticles/plugin-interactivity"; + +export interface ICannonMode { + cannon: ICannon; +} + +export interface CannonMode { + cannon?: Cannon; +} + +export type CannonContainer = InteractivityContainer & { + actualOptions: CannonOptions; +}; diff --git a/interactions/external/cannon/src/index.ts b/interactions/external/cannon/src/index.ts new file mode 100644 index 00000000000..4697c87710f --- /dev/null +++ b/interactions/external/cannon/src/index.ts @@ -0,0 +1,26 @@ +import { type Engine } from "@tsparticles/engine"; +import type { InteractivityEngine } from "@tsparticles/plugin-interactivity"; +export type { ICannon } from "./Options/Interfaces/ICannon.js"; +export type { CannonContainer, CannonMode, ICannonMode } from "./Types.js"; +export { Cannon } from "./Options/Classes/Cannon.js"; + +declare const __VERSION__: string; + +/** + * @param engine - + */ +export async function loadExternalCannonInteraction(engine: Engine): Promise { + engine.checkVersion(__VERSION__); + + await engine.pluginManager.register(async (e: InteractivityEngine) => { + const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); + + ensureInteractivityPluginLoaded(e); + + e.pluginManager.addInteractor?.("externalCannon", async container => { + const { Cannoner } = await import("./Cannoner.js"); + + return new Cannoner(container); + }); + }); +} diff --git a/interactions/external/cannon/tsconfig.base.json b/interactions/external/cannon/tsconfig.base.json new file mode 100644 index 00000000000..deef1f14976 --- /dev/null +++ b/interactions/external/cannon/tsconfig.base.json @@ -0,0 +1,10 @@ +{ + "extends": "@tsparticles/tsconfig/dist/tsconfig.base.json", + "compilerOptions": { + "rootDir": "./src" + }, + "include": [ + "./src" + ] +} + diff --git a/interactions/external/cannon/tsconfig.browser.json b/interactions/external/cannon/tsconfig.browser.json new file mode 100644 index 00000000000..824ce17c0fd --- /dev/null +++ b/interactions/external/cannon/tsconfig.browser.json @@ -0,0 +1,7 @@ +{ + "extends": ["./tsconfig.base.json", "@tsparticles/tsconfig/dist/tsconfig.browser.json"], + "compilerOptions": { + "outDir": "./dist/browser" + } +} + diff --git a/interactions/external/cannon/tsconfig.json b/interactions/external/cannon/tsconfig.json new file mode 100644 index 00000000000..d29d546208c --- /dev/null +++ b/interactions/external/cannon/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": ["./tsconfig.base.json", "@tsparticles/tsconfig/dist/tsconfig.json"], + "compilerOptions": { + "outDir": "./dist/cjs" + } +} + diff --git a/interactions/external/cannon/tsconfig.module.json b/interactions/external/cannon/tsconfig.module.json new file mode 100644 index 00000000000..030719f2c21 --- /dev/null +++ b/interactions/external/cannon/tsconfig.module.json @@ -0,0 +1,7 @@ +{ + "extends": ["./tsconfig.base.json", "@tsparticles/tsconfig/dist/tsconfig.module.json"], + "compilerOptions": { + "outDir": "./dist/esm" + } +} + diff --git a/interactions/external/cannon/tsconfig.types.json b/interactions/external/cannon/tsconfig.types.json new file mode 100644 index 00000000000..db4045ffaef --- /dev/null +++ b/interactions/external/cannon/tsconfig.types.json @@ -0,0 +1,7 @@ +{ + "extends": ["./tsconfig.base.json", "@tsparticles/tsconfig/dist/tsconfig.types.json"], + "compilerOptions": { + "outDir": "./dist/types" + } +} + diff --git a/interactions/external/cannon/tsconfig.umd.json b/interactions/external/cannon/tsconfig.umd.json new file mode 100644 index 00000000000..17e1acb271d --- /dev/null +++ b/interactions/external/cannon/tsconfig.umd.json @@ -0,0 +1,7 @@ +{ + "extends": ["./tsconfig.base.json", "@tsparticles/tsconfig/dist/tsconfig.umd.json"], + "compilerOptions": { + "outDir": "./dist/umd" + } +} + diff --git a/interactions/external/cannon/typedoc.json b/interactions/external/cannon/typedoc.json new file mode 100644 index 00000000000..7a189f8cbe0 --- /dev/null +++ b/interactions/external/cannon/typedoc.json @@ -0,0 +1,16 @@ +{ + "projectDocuments": ["../markdown/**/*.md"], + "entryPoints": [ + "./src/" + ], + "entryPointStrategy": "expand", + "name": "tsParticles Drag External Interaction", + "includeVersion": true, + "hideGenerator": true, + "out": "./docs", + "validation": { + "invalidLink": true, + "notDocumented": true + } +} + diff --git a/interactions/external/cannon/webpack.config.js b/interactions/external/cannon/webpack.config.js new file mode 100644 index 00000000000..2e14cf49f68 --- /dev/null +++ b/interactions/external/cannon/webpack.config.js @@ -0,0 +1,19 @@ +import { loadParticlesInteractionExternal } from "@tsparticles/webpack-plugin"; +import { fileURLToPath } from "node:url"; +import fs from "fs-extra"; +import path from "node:path"; + +const __filename = fileURLToPath(import.meta.url), + __dirname = path.dirname(__filename), + rootPkgPath = path.join(__dirname, "package.json"), + pkg = await fs.readJson(rootPkgPath), + version = pkg.version; + +export default loadParticlesInteractionExternal({ + moduleName: "cannon", + pluginName: "Cannon", + version, + dir: __dirname, + progress: false, +}); + diff --git a/interactions/external/connect/CHANGELOG.md b/interactions/external/connect/CHANGELOG.md index 4f490154f9d..ca3536710b8 100644 --- a/interactions/external/connect/CHANGELOG.md +++ b/interactions/external/connect/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-connect + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-connect diff --git a/interactions/external/connect/package.dist.json b/interactions/external/connect/package.dist.json index 710bef62eed..a9be9bfd13f 100644 --- a/interactions/external/connect/package.dist.json +++ b/interactions/external/connect/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-connect", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles connect external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,9 +87,9 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "4.0.0-beta.0", - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/canvas-utils": "4.0.0-beta.1", + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/connect/package.json b/interactions/external/connect/package.json index 587ae1e7e1f..16d9ba4df4b 100644 --- a/interactions/external/connect/package.json +++ b/interactions/external/connect/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-connect", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles connect external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,9 +95,9 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/canvas-utils": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/connect/src/Utils.ts b/interactions/external/connect/src/Utils.ts index 5250dba7d9c..efaa45b482f 100644 --- a/interactions/external/connect/src/Utils.ts +++ b/interactions/external/connect/src/Utils.ts @@ -1,5 +1,5 @@ -import type { ConnectContainer, LinkParticle } from "./Types.js"; import { + type CanvasContextType, type ICoordinates, type Particle, clamp, @@ -7,6 +7,7 @@ import { getStyleFromHsl, getStyleFromRgb, } from "@tsparticles/engine"; +import type { ConnectContainer, LinkParticle } from "./Types.js"; import { drawLine } from "@tsparticles/canvas-utils"; const gradientMin = 0, @@ -15,6 +16,7 @@ const gradientMin = 0, /** * Creates a gradient using two particles colors and opacity. + * @param container - The particles container * @param context - The canvas context to draw on. * @param p1 - The first particle. * @param p2 - The second particle. @@ -22,7 +24,8 @@ const gradientMin = 0, * @returns The gradient. */ export function gradient( - context: CanvasRenderingContext2D, + container: ConnectContainer, + context: CanvasContextType, p1: Particle, p2: Particle, opacity: number, @@ -35,8 +38,7 @@ export function gradient( return; } - const { container } = p1, - sourcePos = p1.getPosition(), + const sourcePos = p1.getPosition(), destPos = p2.getPosition(), midRgb = colorMix(color1, color2, p1.getRadius(), p2.getRadius()), grad = context.createLinearGradient(sourcePos.x, sourcePos.y, destPos.x, destPos.y); @@ -56,7 +58,7 @@ export function gradient( * @param end - */ export function drawConnectLine( - context: CanvasRenderingContext2D, + context: CanvasContextType, width: number, lineStyle: CanvasGradient, begin: ICoordinates, @@ -78,7 +80,7 @@ export function drawConnectLine( */ export function lineStyle( container: ConnectContainer, - ctx: CanvasRenderingContext2D, + ctx: CanvasContextType, p1: Particle, p2: Particle, ): CanvasGradient | undefined { @@ -89,7 +91,7 @@ export function lineStyle( return; } - return gradient(ctx, p1, p2, connectOptions.links.opacity); + return gradient(container, ctx, p1, p2, connectOptions.links.opacity); } /** @@ -98,7 +100,7 @@ export function lineStyle( * @param p2 - */ export function drawConnection(container: ConnectContainer, p1: LinkParticle, p2: LinkParticle): void { - container.canvas.draw(ctx => { + container.canvas.render.draw(ctx => { const ls = lineStyle(container, ctx, p1, p2); if (!ls) { diff --git a/interactions/external/connect/src/index.ts b/interactions/external/connect/src/index.ts index d5d5fe56a6e..48c4ec1d8a3 100644 --- a/interactions/external/connect/src/index.ts +++ b/interactions/external/connect/src/index.ts @@ -9,12 +9,12 @@ declare const __VERSION__: string; export async function loadExternalConnectInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalConnect", async container => { + e.pluginManager.addInteractor?.("externalConnect", async container => { const { Connector } = await import("./Connector.js"); return new Connector(container); diff --git a/interactions/external/drag/CHANGELOG.md b/interactions/external/drag/CHANGELOG.md index d455f35ccf3..9b8f0e26341 100644 --- a/interactions/external/drag/CHANGELOG.md +++ b/interactions/external/drag/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +### Features + +- added cannon external interaction ([e133ab3](https://github.com/tsparticles/tsparticles/commit/e133ab35835b6411c0da1b151b046a36bcfd9ee1)) + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) ### Features diff --git a/interactions/external/drag/package.dist.json b/interactions/external/drag/package.dist.json index 39a3e935aa0..b654b2703a6 100644 --- a/interactions/external/drag/package.dist.json +++ b/interactions/external/drag/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-drag", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles drag external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/drag/package.json b/interactions/external/drag/package.json index 5eb5ee4c26d..42fd44920b6 100644 --- a/interactions/external/drag/package.json +++ b/interactions/external/drag/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-drag", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles drag external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -67,8 +67,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/drag/src/Dragger.ts b/interactions/external/drag/src/Dragger.ts index 4b0396a7bdb..e67a3fe9046 100644 --- a/interactions/external/drag/src/Dragger.ts +++ b/interactions/external/drag/src/Dragger.ts @@ -7,6 +7,7 @@ import { type Modes, } from "@tsparticles/plugin-interactivity"; import { + type ICoordinates, type IDelta, type Particle, type RecursivePartial, @@ -48,11 +49,11 @@ export class Dragger extends ExternalInteractorBase { private _dragStartClickTime?: number; private _dragStartClickingFalseTime?: number; private _draggedParticle?: Particle; - private _grabOffset?: { x: number; y: number }; - private _lastMousePosition?: { x: number; y: number }; + private _grabOffset?: ICoordinates; + private _lastMousePosition?: ICoordinates; private _momentumSamples: MomentumSample[] = []; private _mouseDownHandled = false; - private _savedVelocity?: { x: number; y: number }; + private _savedVelocity?: ICoordinates; // eslint-disable-next-line @typescript-eslint/no-useless-constructor constructor(container: DragContainer) { diff --git a/interactions/external/drag/src/index.ts b/interactions/external/drag/src/index.ts index d05f4aa3ec3..131fde14f76 100644 --- a/interactions/external/drag/src/index.ts +++ b/interactions/external/drag/src/index.ts @@ -16,12 +16,12 @@ declare const __VERSION__: string; export async function loadExternalDragInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalDrag", async container => { + e.pluginManager.addInteractor?.("externalDrag", async container => { const { Dragger } = await import("./Dragger.js"); return new Dragger(container); diff --git a/interactions/external/grab/CHANGELOG.md b/interactions/external/grab/CHANGELOG.md index 5a6263122b4..d38b7146e2e 100644 --- a/interactions/external/grab/CHANGELOG.md +++ b/interactions/external/grab/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-grab + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-grab diff --git a/interactions/external/grab/package.dist.json b/interactions/external/grab/package.dist.json index 37691a67919..67a29bb2db3 100644 --- a/interactions/external/grab/package.dist.json +++ b/interactions/external/grab/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-grab", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles grab external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,9 +87,9 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "4.0.0-beta.0", - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/canvas-utils": "4.0.0-beta.1", + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/grab/package.json b/interactions/external/grab/package.json index 7c8ccb83de8..76b9768559f 100644 --- a/interactions/external/grab/package.json +++ b/interactions/external/grab/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-grab", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles grab external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,9 +95,9 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/canvas-utils": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/grab/src/Grabber.ts b/interactions/external/grab/src/Grabber.ts index 9da896c5596..cec65cde480 100644 --- a/interactions/external/grab/src/Grabber.ts +++ b/interactions/external/grab/src/Grabber.ts @@ -1,11 +1,3 @@ -import { - type Engine, - type RecursivePartial, - getDistance, - getLinkColor, - getLinkRandomColor, - isInArray, -} from "@tsparticles/engine"; import { ExternalInteractorBase, type IInteractivityData, @@ -15,6 +7,14 @@ import { mouseMoveEvent, } from "@tsparticles/plugin-interactivity"; import type { GrabContainer, GrabMode, IGrabMode, LinkParticle } from "./Types.js"; +import { + type PluginManager, + type RecursivePartial, + getDistance, + getLinkColor, + getLinkRandomColor, + isInArray, +} from "@tsparticles/engine"; import { Grab } from "./Options/Classes/Grab.js"; import { drawGrab } from "./Utils.js"; @@ -26,13 +26,13 @@ const grabMode = "grab", * Particle grab manager */ export class Grabber extends ExternalInteractorBase { - private readonly _engine; private _maxDistance; + private readonly _pluginManager; - constructor(container: GrabContainer, engine: Engine) { + constructor(pluginManager: PluginManager, container: GrabContainer) { super(container); - this._engine = engine; + this._pluginManager = pluginManager; this._maxDistance = 0; } @@ -112,7 +112,7 @@ export class Grabber extends ExternalInteractorBase { const linksOptions = interactivity.modes.grab.links; container.particles.grabLineColor = getLinkRandomColor( - this._engine, + this._pluginManager, optColor, linksOptions.blink, linksOptions.consent, diff --git a/interactions/external/grab/src/Utils.ts b/interactions/external/grab/src/Utils.ts index 02699648f04..517af789c46 100644 --- a/interactions/external/grab/src/Utils.ts +++ b/interactions/external/grab/src/Utils.ts @@ -1,5 +1,5 @@ +import { type CanvasContextType, type ICoordinates, type IRgb, getStyleFromRgb } from "@tsparticles/engine"; import type { GrabContainer, LinkParticle } from "./Types.js"; -import { type ICoordinates, type IRgb, getStyleFromRgb } from "@tsparticles/engine"; import { drawLine } from "@tsparticles/canvas-utils"; const defaultWidth = 0; @@ -15,7 +15,7 @@ const defaultWidth = 0; * @param hdr - Whether the line should be drawn in HDR mode or not. */ export function drawGrabLine( - context: CanvasRenderingContext2D, + context: CanvasContextType, width: number, begin: ICoordinates, end: ICoordinates, @@ -44,7 +44,7 @@ export function drawGrab( opacity: number, mousePos: ICoordinates, ): void { - container.canvas.draw(ctx => { + container.canvas.render.draw(ctx => { const beginPos = particle.getPosition(); drawGrabLine( diff --git a/interactions/external/grab/src/index.ts b/interactions/external/grab/src/index.ts index e241e4668d0..bca8095f161 100644 --- a/interactions/external/grab/src/index.ts +++ b/interactions/external/grab/src/index.ts @@ -9,15 +9,15 @@ declare const __VERSION__: string; export async function loadExternalGrabInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalGrab", async container => { + e.pluginManager.addInteractor?.("externalGrab", async container => { const { Grabber } = await import("./Grabber.js"); - return new Grabber(container, engine); + return new Grabber(e.pluginManager, container); }); }); } diff --git a/interactions/external/parallax/CHANGELOG.md b/interactions/external/parallax/CHANGELOG.md index 36aa49d6a0d..928d1745b50 100644 --- a/interactions/external/parallax/CHANGELOG.md +++ b/interactions/external/parallax/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-parallax + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-parallax diff --git a/interactions/external/parallax/package.dist.json b/interactions/external/parallax/package.dist.json index b03ee5a321f..2291db1a71e 100644 --- a/interactions/external/parallax/package.dist.json +++ b/interactions/external/parallax/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-parallax", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles parallax external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/parallax/package.json b/interactions/external/parallax/package.json index d91242fe9b2..fff497ae6af 100644 --- a/interactions/external/parallax/package.json +++ b/interactions/external/parallax/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-parallax", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles parallax external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/parallax/src/index.ts b/interactions/external/parallax/src/index.ts index 6637551338f..a53fafbbe03 100644 --- a/interactions/external/parallax/src/index.ts +++ b/interactions/external/parallax/src/index.ts @@ -9,12 +9,12 @@ declare const __VERSION__: string; export async function loadExternalParallaxInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalParallax", async container => { + e.pluginManager.addInteractor?.("externalParallax", async container => { const { Parallaxer } = await import("./Parallaxer.js"); return new Parallaxer(container); diff --git a/interactions/external/particle/CHANGELOG.md b/interactions/external/particle/CHANGELOG.md index 7fdd6b1d1fc..a2fd2692aeb 100644 --- a/interactions/external/particle/CHANGELOG.md +++ b/interactions/external/particle/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +### Bug Fixes + +- improved cannon and interactivity events ([b836a59](https://github.com/tsparticles/tsparticles/commit/b836a59e90afdc68b6307e8d37898e71b5881a21)) + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-particle diff --git a/interactions/external/particle/package.dist.json b/interactions/external/particle/package.dist.json index 102cd195c49..32e1b57cbfc 100644 --- a/interactions/external/particle/package.dist.json +++ b/interactions/external/particle/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-particle", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particle external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/particle/package.json b/interactions/external/particle/package.json index 8a947fc9b0d..8106a67a4b5 100644 --- a/interactions/external/particle/package.json +++ b/interactions/external/particle/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-particle", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particle external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -67,8 +67,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/particle/src/InteractivityParticleMaker.ts b/interactions/external/particle/src/InteractivityParticleMaker.ts index 4606fcaa032..c8d2e63732f 100644 --- a/interactions/external/particle/src/InteractivityParticleMaker.ts +++ b/interactions/external/particle/src/InteractivityParticleMaker.ts @@ -84,10 +84,10 @@ export class InteractivityParticleMaker extends ExternalInteractorBase { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalParticle", async container => { + e.pluginManager.addInteractor?.("externalParticle", async container => { const { InteractivityParticleMaker } = await import("./InteractivityParticleMaker.js"); return new InteractivityParticleMaker(container); diff --git a/interactions/external/pause/CHANGELOG.md b/interactions/external/pause/CHANGELOG.md index 3d0949814bd..287fdd42757 100644 --- a/interactions/external/pause/CHANGELOG.md +++ b/interactions/external/pause/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-pause + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-pause diff --git a/interactions/external/pause/package.dist.json b/interactions/external/pause/package.dist.json index 16bc2cbbe79..7086437c598 100644 --- a/interactions/external/pause/package.dist.json +++ b/interactions/external/pause/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-pause", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles pause external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/pause/package.json b/interactions/external/pause/package.json index 8956fc47406..11a5cda36d7 100644 --- a/interactions/external/pause/package.json +++ b/interactions/external/pause/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-pause", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles pause external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/pause/src/index.ts b/interactions/external/pause/src/index.ts index f1e3152d772..24434e0bc21 100644 --- a/interactions/external/pause/src/index.ts +++ b/interactions/external/pause/src/index.ts @@ -9,12 +9,12 @@ declare const __VERSION__: string; export async function loadExternalPauseInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalPause", async container => { + e.pluginManager.addInteractor?.("externalPause", async container => { const { Pauser } = await import("./Pauser.js"); return new Pauser(container); diff --git a/interactions/external/pop/CHANGELOG.md b/interactions/external/pop/CHANGELOG.md index 17480eaf42c..ee978d66a1b 100644 --- a/interactions/external/pop/CHANGELOG.md +++ b/interactions/external/pop/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-pop + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-pop diff --git a/interactions/external/pop/package.dist.json b/interactions/external/pop/package.dist.json index 0e20048b7a0..744ace5ab21 100644 --- a/interactions/external/pop/package.dist.json +++ b/interactions/external/pop/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-pop", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles pop external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/pop/package.json b/interactions/external/pop/package.json index 80caff0138d..a661645b33a 100644 --- a/interactions/external/pop/package.json +++ b/interactions/external/pop/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-pop", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles pop external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/pop/src/Popper.ts b/interactions/external/pop/src/Popper.ts index a3862b8b2b1..01d74cd3285 100644 --- a/interactions/external/pop/src/Popper.ts +++ b/interactions/external/pop/src/Popper.ts @@ -39,7 +39,7 @@ export class Popper extends ExternalInteractorBase { } for (const particle of poppedParticles) { - container.particles.remove(particle); + particle.destroy(); } }; } diff --git a/interactions/external/pop/src/index.ts b/interactions/external/pop/src/index.ts index bbe50cf83d5..7280ab9ea49 100644 --- a/interactions/external/pop/src/index.ts +++ b/interactions/external/pop/src/index.ts @@ -9,12 +9,12 @@ declare const __VERSION__: string; export async function loadExternalPopInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalPop", async container => { + e.pluginManager.addInteractor?.("externalPop", async container => { const { Popper } = await import("./Popper.js"); return new Popper(container); diff --git a/interactions/external/push/CHANGELOG.md b/interactions/external/push/CHANGELOG.md index 1ea9a657cd7..d5643890bfd 100644 --- a/interactions/external/push/CHANGELOG.md +++ b/interactions/external/push/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-push + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-push diff --git a/interactions/external/push/package.dist.json b/interactions/external/push/package.dist.json index 3c1e808dea7..9a8fd9c4cbf 100644 --- a/interactions/external/push/package.dist.json +++ b/interactions/external/push/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-push", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles push external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/push/package.json b/interactions/external/push/package.json index 85f64f7af14..95579f2e480 100644 --- a/interactions/external/push/package.json +++ b/interactions/external/push/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-push", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles push external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/push/src/index.ts b/interactions/external/push/src/index.ts index 5f94a7e8d9b..15e5d01f2d4 100644 --- a/interactions/external/push/src/index.ts +++ b/interactions/external/push/src/index.ts @@ -9,12 +9,12 @@ declare const __VERSION__: string; export async function loadExternalPushInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalPush", async container => { + e.pluginManager.addInteractor?.("externalPush", async container => { const { Pusher } = await import("./Pusher.js"); return new Pusher(container); diff --git a/interactions/external/remove/CHANGELOG.md b/interactions/external/remove/CHANGELOG.md index 88e497888f2..0596f9fa863 100644 --- a/interactions/external/remove/CHANGELOG.md +++ b/interactions/external/remove/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-remove + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-remove diff --git a/interactions/external/remove/package.dist.json b/interactions/external/remove/package.dist.json index fcdcf90541b..79b5134fdc7 100644 --- a/interactions/external/remove/package.dist.json +++ b/interactions/external/remove/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-remove", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles remove external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/remove/package.json b/interactions/external/remove/package.json index 6337ba9da75..684593045cb 100644 --- a/interactions/external/remove/package.json +++ b/interactions/external/remove/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-remove", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles remove external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/remove/src/Remover.ts b/interactions/external/remove/src/Remover.ts index 806dafa789b..39e23e361e7 100644 --- a/interactions/external/remove/src/Remover.ts +++ b/interactions/external/remove/src/Remover.ts @@ -32,7 +32,9 @@ export class Remover extends ExternalInteractorBase { const removeNb = getRangeValue(options.interactivity.modes.remove.quantity); - container.particles.removeQuantity(removeNb); + for (let i = 0; i < removeNb; i++) { + container.particles.get(i)?.destroy(); + } }; } diff --git a/interactions/external/remove/src/index.ts b/interactions/external/remove/src/index.ts index ffa03605868..381ee6588a1 100644 --- a/interactions/external/remove/src/index.ts +++ b/interactions/external/remove/src/index.ts @@ -9,12 +9,12 @@ declare const __VERSION__: string; export async function loadExternalRemoveInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalRemove", async container => { + e.pluginManager.addInteractor?.("externalRemove", async container => { const { Remover } = await import("./Remover.js"); return new Remover(container); diff --git a/interactions/external/repulse/CHANGELOG.md b/interactions/external/repulse/CHANGELOG.md index e0b88c8b640..b8e324cd52e 100644 --- a/interactions/external/repulse/CHANGELOG.md +++ b/interactions/external/repulse/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-repulse + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-repulse diff --git a/interactions/external/repulse/package.dist.json b/interactions/external/repulse/package.dist.json index b4b752cb20e..590c164abc2 100644 --- a/interactions/external/repulse/package.dist.json +++ b/interactions/external/repulse/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-repulse", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles repulse external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/repulse/package.json b/interactions/external/repulse/package.json index 29c35b161f3..73d8fa4a1b5 100644 --- a/interactions/external/repulse/package.json +++ b/interactions/external/repulse/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-repulse", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles repulse external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/repulse/src/Repulser.ts b/interactions/external/repulse/src/Repulser.ts index e14bca2ebf1..4ad7db7a50b 100644 --- a/interactions/external/repulse/src/Repulser.ts +++ b/interactions/external/repulse/src/Repulser.ts @@ -1,8 +1,8 @@ import { type BaseRange, Circle, - type Engine, type ICoordinates, + type PluginManager, Rectangle, type RecursivePartial, Vector, @@ -46,14 +46,14 @@ export class Repulser extends ExternalInteractorBase { handleClickMode: (mode: string, interactivityData: IInteractivityData) => void; private readonly _clickVec: Vector; - private readonly _engine; private _maxDistance; private readonly _normVec: Vector; + private readonly _pluginManager; - constructor(engine: Engine, container: RepulseContainer) { + constructor(pluginManager: PluginManager, container: RepulseContainer) { super(container); - this._engine = engine; + this._pluginManager = pluginManager; this._maxDistance = 0; this._normVec = Vector.origin; this._clickVec = Vector.origin; @@ -276,7 +276,7 @@ export class Repulser extends ExternalInteractorBase { } const { easing, speed, factor, maxSpeed } = repulseOptions, - easingFunc = this._engine.getEasing(easing), + easingFunc = this._pluginManager.getEasing(easing), velocity = (divRepulse?.speed ?? speed) * factor; for (const particle of query) { @@ -332,306 +332,3 @@ export class Repulser extends ExternalInteractorBase { }); }; } - -/* import { - Circle, - type DivEvent, - DivType, - type Engine, - ExternalInteractorBase, - type ICoordinates, - type IDelta, - type IModes, - type Modes, - type Range, - Rectangle, - type RecursivePartial - Vector, - clamp, - divMode, - divModeExecute, - getDistances, - getEasing, - isDivModeEnabled, - isInArray, - mouseMoveEvent, -} from "@tsparticles/engine"; -import type { IRepulseMode, RepulseContainer, RepulseMode, RepulseParticle } from "./Types.js"; -import { Repulse } from "./Options/Classes/Repulse.js"; -import type { RepulseDiv } from "./Options/Classes/RepulseDiv.js"; - -/** - * Particle repulse manager - - * -export class Repulser extends ExternalInteractorBase { - handleClickMode: (mode: string) => void; - - private readonly _engine; - - constructor(engine: Engine, container: RepulseContainer) { - super(container); - - this._engine = engine; - - this.handleClickMode = (mode): void => { - const options = this.container.actualOptions, - repulse = options.interactivity.modes.repulse; - - if (!repulse || mode !== repulseMode) { - return; - } - }; - } - - clear(/*particle: RepulseParticle, delta: IDelta*): void { - // if (particle.repulse || !particle.normalPosition) { - // return; - // } - // - // const container = this.container, - // repulseOptions = container.actualOptions.interactivity.modes.repulse, - // repulseDistance = container.retina.repulseModeDistance; - // - // if (!repulseOptions || !repulseDistance) { - // return; - // } - // - // this.particleRepulse( - // particle, - // delta, - // true, - // particle.normalPosition, - // repulseOptions, - // repulseDistance, - // repulseOptions.speed - // ); - } - - doInteract(delta: IDelta, inverse = false): void { - const container = this.container, - options = container.actualOptions, - mouseMoveStatus = container.interactivity.status === mouseMoveEvent, - events = options.interactivity.events, - hoverEnabled = events.onHover.enable, - hoverMode = events.onHover.mode, - clickEnabled = events.onClick.enable, - clickMode = events.onClick.mode, - divs = events.onDiv; - - if (mouseMoveStatus && hoverEnabled && isInArray(repulseMode, hoverMode)) { - this.hoverRepulse(delta, inverse); - } else if (clickEnabled && isInArray(repulseMode, clickMode)) { - this.clickRepulse(delta, inverse); - } else { - divModeExecute(repulseMode, divs, (selector, div): void => - this.singleSelectorRepulse(delta, inverse, selector, div) - ); - } - } - - init(): void { - const container = this.container, - repulse = container.actualOptions.interactivity.modes.repulse; - - if (!repulse) { - return; - } - - container.retina.repulseModeDistance = repulse.distance * container.retina.pixelRatio; - } - - interact(delta: IDelta): void { - this.doInteract(delta); - } - - isEnabled(particle?: RepulseParticle): boolean { - const container = this.container, - options = container.actualOptions, - mouse = container.interactivity.mouse, - events = (particle?.interactivity ?? options.interactivity).events, - divs = events.onDiv, - divRepulse = isDivModeEnabled(repulseMode, divs); - - if ( - !(divRepulse || (events.onHover.enable && mouse.position) || (events.onClick.enable && mouse.clickPosition)) - ) { - return false; - } - - const hoverMode = events.onHover.mode, - clickMode = events.onClick.mode; - - return isInArray(repulseMode, hoverMode) || isInArray(repulseMode, clickMode) || divRepulse; - } - - loadModeOptions( - options: Modes & RepulseMode, - ...sources: RecursivePartial<(IModes & IRepulseMode) | undefined>[] - ): void { - if (!options.repulse) { - options.repulse = new Repulse(); - } - - for (const source of sources) { - options.repulse.load(source?.repulse); - } - } - - reset(particle: RepulseParticle): void { - particle.repulse = false; - } - - private clickRepulse(delta: IDelta, inverse: boolean): void { - const container = this.container, - repulse = container.actualOptions.interactivity.modes.repulse; - - if (!repulse) { - return; - } - - const repulseDistance = container.retina.repulseModeDistance; - - if (!repulseDistance || repulseDistance < 0) { - return; - } - - const repulseRadius = repulseDistance, - mouseClickPos = container.interactivity.mouse.clickPosition; - - if (mouseClickPos === undefined) { - return; - } - - this.processRepulse( - delta, - inverse, - mouseClickPos, - repulseRadius, - new Circle(mouseClickPos.x, mouseClickPos.y, repulseRadius) - ); - } - - private hoverRepulse(delta: IDelta, inverse: boolean): void { - const container = this.container, - mousePos = container.interactivity.mouse.position, - repulseRadius = container.retina.repulseModeDistance; - - if (!repulseRadius || repulseRadius < 0 || !mousePos) { - return; - } - - this.processRepulse(delta, inverse, mousePos, repulseRadius, new Circle(mousePos.x, mousePos.y, repulseRadius)); - } - - private particleRepulse( - particle: RepulseParticle, - delta: IDelta, - inverse: boolean, - position: ICoordinates, - repulseOptions: Repulse, - repulseRadius: number, - speed: number - ): void { - const { dx, dy, distance } = getDistances(particle.position, position), - velocity = speed * repulseOptions.factor * (inverse ? -1 : 1), - repulseFactor = clamp( - getEasing(repulseOptions.easing)(1 - distance / repulseRadius) * velocity, - inverse ? -repulseOptions.maxSpeed : 0, - inverse ? 0 : repulseOptions.maxSpeed - ), - normVec = Vector.create( - distance === 0 ? repulseFactor : (dx / distance) * repulseFactor, - distance === 0 ? repulseFactor : (dy / distance) * repulseFactor - ); - - if (!inverse) { - if (!particle.normalPosition) { - particle.normalPosition = particle.position.copy(); - } else { - particle.normalPosition.add(particle.velocity); - } - - particle.repulse = true; - } else { - if ( - particle.normalPosition && - particle.position.x - particle.normalPosition.x < 1 && - particle.position.y - particle.normalPosition.y < 1 - ) { - particle.normalPosition = undefined; - return; - } - } - - particle.position.addTo(normVec); - } - - private processRepulse( - delta: IDelta, - inverse: boolean, - position: ICoordinates, - repulseRadius: number, - area: Range, - divRepulse?: RepulseDiv - ): void { - const container = this.container, - query = container.particles.grid.query(area, (p) => this.isEnabled(p)) as RepulseParticle[], - repulseOptions = container.actualOptions.interactivity.modes.repulse; - - if (!repulseOptions) { - return; - } - - for (const particle of query) { - this.particleRepulse( - particle, - delta, - inverse, - position, - repulseOptions, - repulseRadius, - divRepulse?.speed ?? repulseOptions.speed - ); - } - } - - private singleSelectorRepulse(delta: IDelta, inverse: boolean, selector: string, div: DivEvent): void { - const container = this.container, - repulse = container.actualOptions.interactivity.modes.repulse; - - if (!repulse) { - return; - } - - const query = safeDocument().querySelectorAll(selector); - - if (!query.length) { - return; - } - - query.forEach((item) => { - const elem = item as HTMLElement, - pxRatio = container.retina.pixelRatio, - pos = { - x: (elem.offsetLeft + elem.offsetWidth / 2) * pxRatio, - y: (elem.offsetTop + elem.offsetHeight / 2) * pxRatio, - }, - repulseRadius = (elem.offsetWidth / 2) * pxRatio, - area = - div.type === DivType.circle - ? new Circle(pos.x, pos.y, repulseRadius) - : new Rectangle( - elem.offsetLeft * pxRatio, - elem.offsetTop * pxRatio, - elem.offsetWidth * pxRatio, - elem.offsetHeight * pxRatio - ), - divs = repulse.divs, - divRepulse = divMode(divs, elem); - - this.processRepulse(delta, inverse, pos, repulseRadius, area, divRepulse); - }); - } -} -*/ diff --git a/interactions/external/repulse/src/index.ts b/interactions/external/repulse/src/index.ts index 80670cf0714..fc0faff0191 100644 --- a/interactions/external/repulse/src/index.ts +++ b/interactions/external/repulse/src/index.ts @@ -9,15 +9,17 @@ declare const __VERSION__: string; export async function loadExternalRepulseInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalRepulse", async container => { + const pluginManager = e.pluginManager; + + pluginManager.addInteractor?.("externalRepulse", async container => { const { Repulser } = await import("./Repulser.js"); - return new Repulser(engine, container); + return new Repulser(pluginManager, container); }); }); } diff --git a/interactions/external/slow/CHANGELOG.md b/interactions/external/slow/CHANGELOG.md index d78b843e7f1..3ba3006f458 100644 --- a/interactions/external/slow/CHANGELOG.md +++ b/interactions/external/slow/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-slow + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-slow diff --git a/interactions/external/slow/package.dist.json b/interactions/external/slow/package.dist.json index 2ca53dd61a9..bb14635c78b 100644 --- a/interactions/external/slow/package.dist.json +++ b/interactions/external/slow/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-slow", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles slow external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/slow/package.json b/interactions/external/slow/package.json index ba1e932248e..e8aa5b6d0f0 100644 --- a/interactions/external/slow/package.json +++ b/interactions/external/slow/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-slow", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles slow external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/slow/src/index.ts b/interactions/external/slow/src/index.ts index 31e55553626..4929649fb11 100644 --- a/interactions/external/slow/src/index.ts +++ b/interactions/external/slow/src/index.ts @@ -9,12 +9,12 @@ declare const __VERSION__: string; export async function loadExternalSlowInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalSlow", async container => { + e.pluginManager.addInteractor?.("externalSlow", async container => { const { Slower } = await import("./Slower.js"); return new Slower(container); diff --git a/interactions/external/trail/CHANGELOG.md b/interactions/external/trail/CHANGELOG.md index 8e0ec39022b..08394c654b8 100644 --- a/interactions/external/trail/CHANGELOG.md +++ b/interactions/external/trail/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-external-trail + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-external-trail diff --git a/interactions/external/trail/package.dist.json b/interactions/external/trail/package.dist.json index 86682644688..f0ca9141995 100644 --- a/interactions/external/trail/package.dist.json +++ b/interactions/external/trail/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-trail", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles trail external interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/external/trail/package.json b/interactions/external/trail/package.json index 9bfb2fe5e92..ae0210fdc83 100644 --- a/interactions/external/trail/package.json +++ b/interactions/external/trail/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-external-trail", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles trail external interaction", "homepage": "https://particles.js.org", "scripts": { @@ -67,8 +67,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/external/trail/src/TrailMaker.ts b/interactions/external/trail/src/TrailMaker.ts index 911aeecbc85..22c3d69bac3 100644 --- a/interactions/external/trail/src/TrailMaker.ts +++ b/interactions/external/trail/src/TrailMaker.ts @@ -20,8 +20,8 @@ import { ExternalInteractorBase, type IInteractivityData, type IModes, - type InteractivityEngine, type InteractivityParticle, + type InteractivityPluginManager, type Modes, } from "@tsparticles/plugin-interactivity"; import type { ITrailMode, TrailContainer, TrailMode } from "./Types.js"; @@ -36,12 +36,12 @@ export class TrailMaker extends ExternalInteractorBase { readonly maxDistance = 0; private _delay: number; - private readonly _engine; private _lastPosition?: ICoordinates; + private readonly _pluginManager; - constructor(engine: InteractivityEngine, container: TrailContainer) { + constructor(pluginManager: InteractivityPluginManager, container: TrailContainer) { super(container); - this._engine = engine; + this._pluginManager = pluginManager; this._delay = 0; } @@ -117,7 +117,7 @@ export class TrailMaker extends ExternalInteractorBase { // Safe conversion of the particle color option to HSL structure // This handles strings, RGB, and existing HSL objects correctly baseHsl = fillData - ? rangeColorToHsl(this._engine, AnimatableColor.create(undefined, fillData.color)) + ? rangeColorToHsl(this._pluginManager, AnimatableColor.create(undefined, fillData.color)) : undefined, h = calculateValue(colorCoords.h, baseHsl?.h, hMax), s = calculateValue(colorCoords.s, baseHsl?.s, sMax), diff --git a/interactions/external/trail/src/index.ts b/interactions/external/trail/src/index.ts index d09da3ecd09..7c16cab6bea 100644 --- a/interactions/external/trail/src/index.ts +++ b/interactions/external/trail/src/index.ts @@ -9,15 +9,15 @@ declare const __VERSION__: string; export async function loadExternalTrailInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalTrail", async container => { + e.pluginManager.addInteractor?.("externalTrail", async container => { const { TrailMaker } = await import("./TrailMaker.js"); - return new TrailMaker(e, container); + return new TrailMaker(e.pluginManager, container); }); }); } diff --git a/interactions/light/CHANGELOG.md b/interactions/light/CHANGELOG.md index 07393218c44..d1379af0ca5 100644 --- a/interactions/light/CHANGELOG.md +++ b/interactions/light/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-light + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-light diff --git a/interactions/light/package.dist.json b/interactions/light/package.dist.json index cdd5b998d5d..fbd96ce9a75 100644 --- a/interactions/light/package.dist.json +++ b/interactions/light/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-light", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles Light interaction", "homepage": "https://particles.js.org", "repository": { @@ -101,8 +101,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/light/package.json b/interactions/light/package.json index c612391a1bc..9b1a30ea15c 100644 --- a/interactions/light/package.json +++ b/interactions/light/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-light", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles Light interaction", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/light/src/ExternalLighter.ts b/interactions/light/src/ExternalLighter.ts index ed9c0b53e04..40871196b07 100644 --- a/interactions/light/src/ExternalLighter.ts +++ b/interactions/light/src/ExternalLighter.ts @@ -1,4 +1,3 @@ -import { type Engine, type RecursivePartial, isInArray, rangeColorToRgb } from "@tsparticles/engine"; import { ExternalInteractorBase, type IInteractivityData, @@ -6,17 +5,18 @@ import { type Modes, } from "@tsparticles/plugin-interactivity"; import type { ILightMode, LightContainer, LightMode, LightParticle } from "./Types.js"; +import { type PluginManager, type RecursivePartial, isInArray, rangeColorToRgb } from "@tsparticles/engine"; import { drawLight, lightMode } from "./Utils.js"; import { Light } from "./Options/Classes/Light.js"; export class ExternalLighter extends ExternalInteractorBase { readonly maxDistance = 0; - private readonly _engine; + private readonly _pluginManager; - constructor(container: LightContainer, engine: Engine) { + constructor(pluginManager: PluginManager, container: LightContainer) { super(container); - this._engine = engine; + this._pluginManager = pluginManager; } clear(): void { @@ -42,7 +42,7 @@ export class ExternalLighter extends ExternalInteractorBase { return; } - container.canvas.draw(ctx => { + container.canvas.render.draw(ctx => { drawLight(container, ctx, mousePos); }); } @@ -63,8 +63,8 @@ export class ExternalLighter extends ExternalInteractorBase { const lightGradient = interactivity.modes.light.area.gradient; container.canvas.mouseLight = { - start: rangeColorToRgb(this._engine, lightGradient.start), - stop: rangeColorToRgb(this._engine, lightGradient.stop), + start: rangeColorToRgb(this._pluginManager, lightGradient.start), + stop: rangeColorToRgb(this._pluginManager, lightGradient.stop), }; } diff --git a/interactions/light/src/ParticlesLighter.ts b/interactions/light/src/ParticlesLighter.ts index 0db1c1977c4..ae440c60350 100644 --- a/interactions/light/src/ParticlesLighter.ts +++ b/interactions/light/src/ParticlesLighter.ts @@ -1,17 +1,17 @@ -import { type Engine, isInArray, rangeColorToRgb } from "@tsparticles/engine"; import { type IInteractivityData, ParticlesInteractorBase } from "@tsparticles/plugin-interactivity"; import type { LightContainer, LightParticle } from "./Types.js"; +import { type PluginManager, isInArray, rangeColorToRgb } from "@tsparticles/engine"; import { drawParticleShadow, lightMode } from "./Utils.js"; export class ParticlesLighter extends ParticlesInteractorBase { readonly maxDistance; - private readonly _engine; + private readonly _pluginManager; - constructor(container: LightContainer, engine: Engine) { + constructor(pluginManager: PluginManager, container: LightContainer) { super(container); - this._engine = engine; + this._pluginManager = pluginManager; this.maxDistance = 0; } @@ -37,7 +37,7 @@ export class ParticlesLighter extends ParticlesInteractorBase { return; } - container.canvas.draw(ctx => { + container.canvas.render.draw(ctx => { drawParticleShadow(container, ctx, particle, mousePos); }); } @@ -56,7 +56,7 @@ export class ParticlesLighter extends ParticlesInteractorBase { if (res && interactivity.modes.light) { const shadowOptions = interactivity.modes.light.shadow; - particle.lightShadow = rangeColorToRgb(this._engine, shadowOptions.color); + particle.lightShadow = rangeColorToRgb(this._pluginManager, shadowOptions.color); } return res; diff --git a/interactions/light/src/Utils.ts b/interactions/light/src/Utils.ts index c8f1f916cd9..e09f0bd0336 100644 --- a/interactions/light/src/Utils.ts +++ b/interactions/light/src/Utils.ts @@ -1,4 +1,11 @@ -import { type ICoordinates, doublePI, getStyleFromRgb, half, quarter } from "@tsparticles/engine"; +import { + type CanvasContextType, + type ICoordinates, + doublePI, + getStyleFromRgb, + half, + quarter, +} from "@tsparticles/engine"; import type { LightContainer, LightParticle } from "./Types.js"; const gradientPos = { @@ -16,7 +23,7 @@ export const lightMode = "light"; * @param context - * @param mousePos - */ -export function drawLight(container: LightContainer, context: CanvasRenderingContext2D, mousePos: ICoordinates): void { +export function drawLight(container: LightContainer, context: CanvasContextType, mousePos: ICoordinates): void { const lightOptions = container.actualOptions.interactivity?.modes.light?.area; if (!lightOptions) { @@ -55,7 +62,7 @@ export function drawLight(container: LightContainer, context: CanvasRenderingCon */ export function drawParticleShadow( container: LightContainer, - context: CanvasRenderingContext2D, + context: CanvasContextType, particle: LightParticle, mousePos: ICoordinates, ): void { diff --git a/interactions/light/src/index.ts b/interactions/light/src/index.ts index 7fa1b9c7cd7..9295c4fb35d 100644 --- a/interactions/light/src/index.ts +++ b/interactions/light/src/index.ts @@ -9,20 +9,20 @@ declare const __VERSION__: string; export async function loadLightInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("externalLight", async container => { + e.pluginManager.addInteractor?.("externalLight", async container => { const { ExternalLighter } = await import("./ExternalLighter.js"); - return new ExternalLighter(container, engine); + return new ExternalLighter(e.pluginManager, container); }); - e.addInteractor?.("particlesLight", async container => { + e.pluginManager.addInteractor?.("particlesLight", async container => { const { ParticlesLighter } = await import("./ParticlesLighter.js"); - return new ParticlesLighter(container, engine); + return new ParticlesLighter(e.pluginManager, container); }); }); } diff --git a/interactions/particles/attract/CHANGELOG.md b/interactions/particles/attract/CHANGELOG.md index f9e01bd5560..7003747122e 100644 --- a/interactions/particles/attract/CHANGELOG.md +++ b/interactions/particles/attract/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-particles-attract + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-particles-attract diff --git a/interactions/particles/attract/package.dist.json b/interactions/particles/attract/package.dist.json index c0232d7284f..654dde17dbf 100644 --- a/interactions/particles/attract/package.dist.json +++ b/interactions/particles/attract/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-particles-attract", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles attract particles interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/particles/attract/package.json b/interactions/particles/attract/package.json index c9c76aa012d..12e0e478d88 100644 --- a/interactions/particles/attract/package.json +++ b/interactions/particles/attract/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-particles-attract", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles attract particles interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/particles/attract/src/index.ts b/interactions/particles/attract/src/index.ts index 0a3afce5fb6..ed6731394d7 100644 --- a/interactions/particles/attract/src/index.ts +++ b/interactions/particles/attract/src/index.ts @@ -9,12 +9,12 @@ declare const __VERSION__: string; export async function loadParticlesAttractInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("particlesAttract", async container => { + e.pluginManager.addInteractor?.("particlesAttract", async container => { const { Attractor } = await import("./Attractor.js"); return new Attractor(container); diff --git a/interactions/particles/collisions/CHANGELOG.md b/interactions/particles/collisions/CHANGELOG.md index 5fdd163ac7a..b73990ab696 100644 --- a/interactions/particles/collisions/CHANGELOG.md +++ b/interactions/particles/collisions/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-particles-collisions + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-particles-collisions diff --git a/interactions/particles/collisions/package.dist.json b/interactions/particles/collisions/package.dist.json index 1ed7ecfdd19..8b9c29bad70 100644 --- a/interactions/particles/collisions/package.dist.json +++ b/interactions/particles/collisions/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-particles-collisions", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles collisions particles interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,8 +87,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/particles/collisions/package.json b/interactions/particles/collisions/package.json index 41f4b1944ac..9e492fc2ff2 100644 --- a/interactions/particles/collisions/package.json +++ b/interactions/particles/collisions/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-particles-collisions", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles collisions particles interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,8 +95,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/particles/collisions/src/index.ts b/interactions/particles/collisions/src/index.ts index 317f0abbf4d..a37e5d3af1c 100644 --- a/interactions/particles/collisions/src/index.ts +++ b/interactions/particles/collisions/src/index.ts @@ -9,7 +9,7 @@ declare const __VERSION__: string; export async function loadParticlesCollisionsInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const [ { ensureInteractivityPluginLoaded }, { OverlapPlugin }, @@ -20,9 +20,9 @@ export async function loadParticlesCollisionsInteraction(engine: Engine): Promis ensureInteractivityPluginLoaded(e); - e.addPlugin(new OverlapPlugin()); + e.pluginManager.addPlugin(new OverlapPlugin()); - e.addInteractor?.("particlesCollisions", async container => { + e.pluginManager.addInteractor?.("particlesCollisions", async container => { const { Collider } = await import("./Collider.js"); return new Collider(container); diff --git a/interactions/particles/links/CHANGELOG.md b/interactions/particles/links/CHANGELOG.md index f83891509d1..b7e38d87875 100644 --- a/interactions/particles/links/CHANGELOG.md +++ b/interactions/particles/links/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-particles-links + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-particles-links diff --git a/interactions/particles/links/package.dist.json b/interactions/particles/links/package.dist.json index 37cac17939c..d8d5dab074c 100644 --- a/interactions/particles/links/package.dist.json +++ b/interactions/particles/links/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-particles-links", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles links particles interaction", "homepage": "https://particles.js.org", "repository": { @@ -87,9 +87,9 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "4.0.0-beta.0", - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/canvas-utils": "4.0.0-beta.1", + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/particles/links/package.json b/interactions/particles/links/package.json index e52c5b7b505..6cc517f373c 100644 --- a/interactions/particles/links/package.json +++ b/interactions/particles/links/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-particles-links", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles links particles interaction", "homepage": "https://particles.js.org", "scripts": { @@ -95,9 +95,9 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/canvas-utils": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/particles/links/src/LinkInstance.ts b/interactions/particles/links/src/LinkInstance.ts index 97d892a43ae..59c0f88849b 100644 --- a/interactions/particles/links/src/LinkInstance.ts +++ b/interactions/particles/links/src/LinkInstance.ts @@ -1,7 +1,8 @@ import { - type Engine, + type CanvasContextType, type IContainerPlugin, type IRgb, + type PluginManager, getLinkColor as engineGetLinkColor, getRandom, getRangeValue, @@ -23,16 +24,16 @@ const minOpacity = 0, export class LinkInstance implements IContainerPlugin { private readonly _colorCache = new Map(); private readonly _container: LinkContainer; - private readonly _engine: Engine; private readonly _freqs: IParticlesFrequencies; + private readonly _pluginManager: PluginManager; - constructor(container: LinkContainer, engine: Engine) { + constructor(pluginManager: PluginManager, container: LinkContainer) { + this._pluginManager = pluginManager; this._container = container; - this._engine = engine; this._freqs = { links: new Map(), triangles: new Map() }; } - drawParticle(context: CanvasRenderingContext2D, particle: LinkParticle): void { + drawParticle(context: CanvasContextType, particle: LinkParticle): void { const { links, options } = particle; if (!links?.length || !options.links) { @@ -86,7 +87,9 @@ export class LinkInstance implements IContainerPlugin { colorLine = link.color; const twinkleRgb = - twinkle?.enable && getRandom() < twinkle.frequency ? rangeColorToRgb(this._engine, twinkle.color) : undefined; + twinkle?.enable && getRandom() < twinkle.frequency + ? rangeColorToRgb(this._pluginManager, twinkle.color) + : undefined; if (twinkle && twinkleRgb) { colorLine = twinkleRgb; @@ -189,7 +192,7 @@ export class LinkInstance implements IContainerPlugin { p1Destinations: Set, pos1: ReturnType, pos2: ReturnType, - context: CanvasRenderingContext2D, + context: CanvasContextType, ): void { const p2 = link.destination, triangleOptions = options.links?.triangles; @@ -220,7 +223,7 @@ export class LinkInstance implements IContainerPlugin { } const opacityTriangle = triangleOptions.opacity ?? (link.opacity + vertex.opacity) * half, - colorTriangle = rangeColorToRgb(this._engine, triangleOptions.color) ?? link.color; + colorTriangle = rangeColorToRgb(this._pluginManager, triangleOptions.color) ?? link.color; if (!colorTriangle || opacityTriangle <= minOpacity) { continue; diff --git a/interactions/particles/links/src/Linker.ts b/interactions/particles/links/src/Linker.ts index 0b97b535bde..efa160ccd39 100644 --- a/interactions/particles/links/src/Linker.ts +++ b/interactions/particles/links/src/Linker.ts @@ -1,9 +1,9 @@ import { Circle, - type Engine, type ICoordinates, type IDimension, type IRgb, + type PluginManager, type RecursivePartial, getDistances, getLinkColor, @@ -38,13 +38,13 @@ function getWarpDistance(pos1: ICoordinates, pos2: ICoordinates, canvasSize: IDi } export class Linker extends ParticlesInteractorBase { - private readonly _engine; private _maxDistance; + private readonly _pluginManager; - constructor(container: LinkContainer, engine: Engine) { + constructor(pluginManager: PluginManager, container: LinkContainer) { super(container); - this._engine = engine; + this._pluginManager = pluginManager; this._maxDistance = 0; } @@ -183,7 +183,7 @@ export class Linker extends ParticlesInteractorBase return; } - linkColor = getLinkRandomColor(this._engine, linksOptions.color, linksOptions.blink, linksOptions.consent); + linkColor = getLinkRandomColor(this._pluginManager, linksOptions.color, linksOptions.blink, linksOptions.consent); if (linksOptions.id === undefined) { container.particles.linksColor = linkColor; diff --git a/interactions/particles/links/src/LinksPlugin.ts b/interactions/particles/links/src/LinksPlugin.ts index 427f1d8afaa..aa803d51681 100644 --- a/interactions/particles/links/src/LinksPlugin.ts +++ b/interactions/particles/links/src/LinksPlugin.ts @@ -1,19 +1,19 @@ -import { type Engine, type IPlugin } from "@tsparticles/engine"; +import { type IPlugin, type PluginManager } from "@tsparticles/engine"; import type { LinkContainer } from "./Types.js"; import type { LinkInstance } from "./LinkInstance.js"; export class LinksPlugin implements IPlugin { readonly id = "links"; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: Engine) { - this._engine = engine; + constructor(pluginManager: PluginManager) { + this._pluginManager = pluginManager; } async getPlugin(container: LinkContainer): Promise { const { LinkInstance } = await import("./LinkInstance.js"); - return new LinkInstance(container, this._engine); + return new LinkInstance(this._pluginManager, container); } loadOptions(): void { diff --git a/interactions/particles/links/src/index.ts b/interactions/particles/links/src/index.ts index 487c8e3b1e7..cd2a70919e3 100644 --- a/interactions/particles/links/src/index.ts +++ b/interactions/particles/links/src/index.ts @@ -10,23 +10,24 @@ declare const __VERSION__: string; export async function loadParticlesLinksInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { - const [ - { ensureInteractivityPluginLoaded }, - { LinksPlugin }, - ] = await Promise.all([ - import("@tsparticles/plugin-interactivity"), - import("./LinksPlugin.js"), - ]); + await engine.pluginManager.register(async (e: InteractivityEngine) => { + const pluginManager = e.pluginManager, + [ + { ensureInteractivityPluginLoaded }, + { LinksPlugin }, + ] = await Promise.all([ + import("@tsparticles/plugin-interactivity"), + import("./LinksPlugin.js"), + ]); ensureInteractivityPluginLoaded(e); - e.addPlugin(new LinksPlugin(e)); + pluginManager.addPlugin(new LinksPlugin(pluginManager)); - e.addInteractor?.("particlesLinks", async container => { + pluginManager.addInteractor?.("particlesLinks", async container => { const { Linker } = await import("./Linker.js"); - return new Linker(container as LinkContainer, e); + return new Linker(pluginManager, container as LinkContainer); }); }); } diff --git a/interactions/particles/repulse/CHANGELOG.md b/interactions/particles/repulse/CHANGELOG.md index d7c7eb301db..2e6cb777636 100644 --- a/interactions/particles/repulse/CHANGELOG.md +++ b/interactions/particles/repulse/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/interaction-particles-repulse + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/interaction-particles-repulse diff --git a/interactions/particles/repulse/package.dist.json b/interactions/particles/repulse/package.dist.json index b1f5cea0324..66df140157d 100644 --- a/interactions/particles/repulse/package.dist.json +++ b/interactions/particles/repulse/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-particles-repulse", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles repulse particles interaction", "homepage": "https://particles.js.org", "repository": { @@ -101,8 +101,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/interactions/particles/repulse/package.json b/interactions/particles/repulse/package.json index 941c794d355..01779753baf 100644 --- a/interactions/particles/repulse/package.json +++ b/interactions/particles/repulse/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/interaction-particles-repulse", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles repulse particles interaction", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/interactions/particles/repulse/src/index.ts b/interactions/particles/repulse/src/index.ts index 55b9e71c12a..4fdc06ab22d 100644 --- a/interactions/particles/repulse/src/index.ts +++ b/interactions/particles/repulse/src/index.ts @@ -9,12 +9,12 @@ declare const __VERSION__: string; export async function loadParticlesRepulseInteraction(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const { ensureInteractivityPluginLoaded } = await import("@tsparticles/plugin-interactivity"); ensureInteractivityPluginLoaded(e); - e.addInteractor?.("particlesRepulse", async container => { + e.pluginManager.addInteractor?.("particlesRepulse", async container => { const { Repulser } = await import("./Repulser.js"); return new Repulser(container); diff --git a/lerna.json b/lerna.json index 50342361d09..5d64a0ef86b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "npmClient": "pnpm", "conventionalCommits": true, "command": { diff --git a/package.json b/package.json index 10a68a0e50f..17aed9cb85b 100644 --- a/package.json +++ b/package.json @@ -30,34 +30,34 @@ "devDependencies": { "@commitlint/cli": "^20.5.0", "@commitlint/config-conventional": "^20.5.0", - "@swc/core": "^1.15.18", + "@swc/core": "^1.15.21", "@tsparticles/cli": "^3.3.8", "@tsparticles/depcruise-config": "^3.3.5", "@tsparticles/eslint-config": "^3.3.5", "@tsparticles/prettier-config": "^3.3.5", "@tsparticles/tsconfig": "^3.3.5", "@tsparticles/webpack-plugin": "^3.3.5", - "@types/jsdom": "^28.0.0", + "@types/jsdom": "^28.0.1", "@types/node": "^25.5.0", "@types/webpack-env": "^1.18.8", - "@vitest/coverage-v8": "^4.1.0", - "@vitest/ui": "^4.1.0", + "@vitest/coverage-v8": "^4.1.2", + "@vitest/ui": "^4.1.2", "browserslist": "^4.28.1", - "canvas": "^3.2.1", + "canvas": "^3.2.2", "copyfiles": "^2.4.1", "cross-env": "^10.1.0", - "eslint": "^10.0.3", + "eslint": "^10.1.0", "eslint-config-prettier": "^10.1.8", - "eslint-plugin-jsdoc": "^62.8.0", + "eslint-plugin-jsdoc": "^62.8.1", "eslint-plugin-prettier": "^5.5.5", "eslint-plugin-tsdoc": "^0.5.2", "fs-extra": "^11.3.4", "gh-pages": "^6.3.0", "husky": "^9.1.7", - "jsdom": "^29.0.0", + "jsdom": "^29.0.1", "jsdom-global": "^3.0.2", "lerna": "^9.0.7", - "nx": "^22.6.0", + "nx": "^22.6.3", "nx-cloud": "^19.1.0", "prettier": "^3.8.1", "prettier-plugin-multiline-arrays": "^4.1.5", @@ -67,7 +67,7 @@ "terser-webpack-plugin": "^5.4.0", "ts-json-schema-generator": "^2.9.0", "ts-node": "^10.9.2", - "typedoc": "^0.28.17", + "typedoc": "^0.28.18", "typedoc-plugin-google-ads": "^1.6.0", "typedoc-plugin-clarity": "^1.6.0", "typedoc-plugin-coverage": "^4.0.2", @@ -77,11 +77,11 @@ "typescript": "^5.9.3", "typescript-eslint": "^8.57.1", "typescript-json-schema": "^0.67.1", - "vitest": "^4.1.0", + "vitest": "^4.1.2", "webpack": "^5.105.4", - "webpack-bundle-analyzer": "^5.2.0", + "webpack-bundle-analyzer": "^5.3.0", "webpack-cli": "^7.0.2", "yargs": "^18.0.0" }, - "packageManager": "pnpm@10.32.1" + "packageManager": "pnpm@10.33.0" } diff --git a/paths/branches/CHANGELOG.md b/paths/branches/CHANGELOG.md index 5e5b0de969a..ec05789e6a1 100644 --- a/paths/branches/CHANGELOG.md +++ b/paths/branches/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-branches + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-branches diff --git a/paths/branches/package.dist.json b/paths/branches/package.dist.json index a374de533d5..ab2e982417a 100644 --- a/paths/branches/package.dist.json +++ b/paths/branches/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-branches", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles branches path", "homepage": "https://particles.js.org", "repository": { @@ -104,8 +104,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "type": "module" } diff --git a/paths/branches/package.json b/paths/branches/package.json index 2dba60b251c..677fe8ffddc 100644 --- a/paths/branches/package.json +++ b/paths/branches/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-branches", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles branches path", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/branches/src/index.ts b/paths/branches/src/index.ts index c456ed06bd8..7294e1d3e6e 100644 --- a/paths/branches/src/index.ts +++ b/paths/branches/src/index.ts @@ -11,12 +11,12 @@ export const branchingPathName = "branchesPathGenerator"; export async function loadBranchesPath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(branchingPathName, async container => { + e.pluginManager.addPathGenerator?.(branchingPathName, async container => { const { BranchesPathGenerator } = await import("./BranchesPathGenerator.js"); return new BranchesPathGenerator(container); diff --git a/paths/brownian/CHANGELOG.md b/paths/brownian/CHANGELOG.md index 6663d7b50ad..e935744e5ea 100644 --- a/paths/brownian/CHANGELOG.md +++ b/paths/brownian/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-brownian + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-brownian diff --git a/paths/brownian/package.dist.json b/paths/brownian/package.dist.json index f18910c1812..376c135a899 100644 --- a/paths/brownian/package.dist.json +++ b/paths/brownian/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-brownian", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles brownian path", "homepage": "https://particles.js.org", "repository": { @@ -104,8 +104,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "type": "module" } diff --git a/paths/brownian/package.json b/paths/brownian/package.json index fb7e151d3cd..f5915c88c35 100644 --- a/paths/brownian/package.json +++ b/paths/brownian/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-brownian", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles brownian path", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/brownian/src/index.ts b/paths/brownian/src/index.ts index 38f3f925b2a..a886127eb41 100644 --- a/paths/brownian/src/index.ts +++ b/paths/brownian/src/index.ts @@ -11,12 +11,12 @@ export const brownianPathName = "brownianPathGenerator"; export async function loadBrownianPath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(brownianPathName, async container => { + e.pluginManager.addPathGenerator?.(brownianPathName, async container => { const { BrownianPathGenerator } = await import("./BrownianPathGenerator.js"); return new BrownianPathGenerator(container); diff --git a/paths/curlNoise/CHANGELOG.md b/paths/curlNoise/CHANGELOG.md index 8620daefbf1..27eca73508a 100644 --- a/paths/curlNoise/CHANGELOG.md +++ b/paths/curlNoise/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-curl-noise + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-curl-noise diff --git a/paths/curlNoise/package.dist.json b/paths/curlNoise/package.dist.json index 893161a8052..f87701d551b 100644 --- a/paths/curlNoise/package.dist.json +++ b/paths/curlNoise/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-curl-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles curl noise path", "homepage": "https://particles.js.org", "repository": { @@ -104,9 +104,9 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0", - "@tsparticles/simplex-noise": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1", + "@tsparticles/simplex-noise": "4.0.0-beta.1" }, "type": "module" } diff --git a/paths/curlNoise/package.json b/paths/curlNoise/package.json index 945a32156e5..38101b0d650 100644 --- a/paths/curlNoise/package.json +++ b/paths/curlNoise/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-curl-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles curl noise path", "homepage": "https://particles.js.org", "scripts": { @@ -95,9 +95,9 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0", - "@tsparticles/simplex-noise": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1", + "@tsparticles/simplex-noise": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/curlNoise/src/index.ts b/paths/curlNoise/src/index.ts index 117f114407f..7d97377396f 100644 --- a/paths/curlNoise/src/index.ts +++ b/paths/curlNoise/src/index.ts @@ -11,12 +11,12 @@ export const curlNoisePathName = "curlNoise"; export async function loadCurlNoisePath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(curlNoisePathName, async container => { + e.pluginManager.addPathGenerator?.(curlNoisePathName, async container => { const { CurlNoiseGenerator } = await import("./CurlNoiseGenerator.js"); return new CurlNoiseGenerator(container); diff --git a/paths/curves/CHANGELOG.md b/paths/curves/CHANGELOG.md index 556fbd52981..4182c412596 100644 --- a/paths/curves/CHANGELOG.md +++ b/paths/curves/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-curves + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-curves diff --git a/paths/curves/package.dist.json b/paths/curves/package.dist.json index 9e6afe1cc31..6841e894631 100644 --- a/paths/curves/package.dist.json +++ b/paths/curves/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-curves", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles curves path", "homepage": "https://particles.js.org", "repository": { @@ -104,8 +104,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "type": "module" } diff --git a/paths/curves/package.json b/paths/curves/package.json index ecbfef6d2b2..d3e54531d02 100644 --- a/paths/curves/package.json +++ b/paths/curves/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-curves", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles curves path", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/curves/src/index.ts b/paths/curves/src/index.ts index 5715bace24f..66887ff6cba 100644 --- a/paths/curves/src/index.ts +++ b/paths/curves/src/index.ts @@ -11,12 +11,12 @@ export const curvesPathName = "curvesPathGenerator"; export async function loadCurvesPath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(curvesPathName, async container => { + e.pluginManager.addPathGenerator?.(curvesPathName, async container => { const { CurvesPathGenerator } = await import("./CurvesPathGenerator.js"); return new CurvesPathGenerator(container); diff --git a/paths/fractalNoise/CHANGELOG.md b/paths/fractalNoise/CHANGELOG.md index 6663c24b4b1..f0e250c1997 100644 --- a/paths/fractalNoise/CHANGELOG.md +++ b/paths/fractalNoise/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-fractal-noise + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-fractal-noise diff --git a/paths/fractalNoise/package.dist.json b/paths/fractalNoise/package.dist.json index a040b164b03..505114c328f 100644 --- a/paths/fractalNoise/package.dist.json +++ b/paths/fractalNoise/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-fractal-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles fractal noise path", "homepage": "https://particles.js.org", "repository": { @@ -104,10 +104,10 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/fractal-noise": "4.0.0-beta.0", - "@tsparticles/noise-field": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/fractal-noise": "4.0.0-beta.1", + "@tsparticles/noise-field": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "type": "module" } diff --git a/paths/fractalNoise/package.json b/paths/fractalNoise/package.json index b12e90fa5d4..73ff58df143 100644 --- a/paths/fractalNoise/package.json +++ b/paths/fractalNoise/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-fractal-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles fractal noise path", "homepage": "https://particles.js.org", "scripts": { @@ -109,10 +109,10 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/fractal-noise": "workspace:4.0.0-beta.0", - "@tsparticles/noise-field": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/fractal-noise": "workspace:4.0.0-beta.1", + "@tsparticles/noise-field": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/fractalNoise/src/index.ts b/paths/fractalNoise/src/index.ts index 455cc25e81d..e6be4f7582b 100644 --- a/paths/fractalNoise/src/index.ts +++ b/paths/fractalNoise/src/index.ts @@ -11,12 +11,12 @@ export const fractalNoisePathName = "fractalNoise"; export async function loadFractalNoisePath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(fractalNoisePathName, async container => { + e.pluginManager.addPathGenerator?.(fractalNoisePathName, async container => { const { FractalNoiseGenerator } = await import("./FractalNoiseGenerator.js"); return new FractalNoiseGenerator(container); diff --git a/paths/grid/CHANGELOG.md b/paths/grid/CHANGELOG.md index 51cf752f213..1d1b1fb802e 100644 --- a/paths/grid/CHANGELOG.md +++ b/paths/grid/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-grid + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-grid diff --git a/paths/grid/package.dist.json b/paths/grid/package.dist.json index 89d60d61a80..9c143328b58 100644 --- a/paths/grid/package.dist.json +++ b/paths/grid/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-grid", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles grid path", "homepage": "https://particles.js.org", "repository": { @@ -104,8 +104,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "type": "module" } diff --git a/paths/grid/package.json b/paths/grid/package.json index 9efbe1bdc34..409a12d88f3 100644 --- a/paths/grid/package.json +++ b/paths/grid/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-grid", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles grid path", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/grid/src/index.ts b/paths/grid/src/index.ts index 6aa2a491480..3f396a97779 100644 --- a/paths/grid/src/index.ts +++ b/paths/grid/src/index.ts @@ -11,12 +11,12 @@ export const gridPathName = "gridPathGenerator"; export async function loadGridPath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(gridPathName, async container => { + e.pluginManager.addPathGenerator?.(gridPathName, async container => { const { GridPathGenerator } = await import("./GridPathGenerator.js"); return new GridPathGenerator(container); diff --git a/paths/levy/CHANGELOG.md b/paths/levy/CHANGELOG.md index fb4a1b87312..f02ad5e42c9 100644 --- a/paths/levy/CHANGELOG.md +++ b/paths/levy/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-levy + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-levy diff --git a/paths/levy/package.dist.json b/paths/levy/package.dist.json index c43761900a5..664507feb8f 100644 --- a/paths/levy/package.dist.json +++ b/paths/levy/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-levy", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles levy path", "homepage": "https://particles.js.org", "repository": { @@ -104,8 +104,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "type": "module" } diff --git a/paths/levy/package.json b/paths/levy/package.json index 0626f82131c..fc60b3fe20b 100644 --- a/paths/levy/package.json +++ b/paths/levy/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-levy", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles levy path", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/levy/src/index.ts b/paths/levy/src/index.ts index f84029085a1..24dc5d1f7f8 100644 --- a/paths/levy/src/index.ts +++ b/paths/levy/src/index.ts @@ -11,12 +11,12 @@ export const levyPathName = "levyPathGenerator"; export async function loadLevyPath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(levyPathName, async container => { + e.pluginManager.addPathGenerator?.(levyPathName, async container => { const { LevyPathGenerator } = await import("./LevyPathGenerator.js"); return new LevyPathGenerator(container); diff --git a/paths/perlinNoise/CHANGELOG.md b/paths/perlinNoise/CHANGELOG.md index fe4476d5d9f..2fff8bef0c2 100644 --- a/paths/perlinNoise/CHANGELOG.md +++ b/paths/perlinNoise/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-perlin-noise + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-perlin-noise diff --git a/paths/perlinNoise/package.dist.json b/paths/perlinNoise/package.dist.json index a5e68f743c1..208881e5680 100644 --- a/paths/perlinNoise/package.dist.json +++ b/paths/perlinNoise/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-perlin-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles perlin noise path", "homepage": "https://particles.js.org", "repository": { @@ -104,10 +104,10 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/noise-field": "4.0.0-beta.0", - "@tsparticles/perlin-noise": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/noise-field": "4.0.0-beta.1", + "@tsparticles/perlin-noise": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "type": "module" } diff --git a/paths/perlinNoise/package.json b/paths/perlinNoise/package.json index 0e5752df287..bb484c043af 100644 --- a/paths/perlinNoise/package.json +++ b/paths/perlinNoise/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-perlin-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles perlin noise path", "homepage": "https://particles.js.org", "scripts": { @@ -109,10 +109,10 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/noise-field": "workspace:4.0.0-beta.0", - "@tsparticles/perlin-noise": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/noise-field": "workspace:4.0.0-beta.1", + "@tsparticles/perlin-noise": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/perlinNoise/src/index.ts b/paths/perlinNoise/src/index.ts index 945b4c76965..7e638f500af 100644 --- a/paths/perlinNoise/src/index.ts +++ b/paths/perlinNoise/src/index.ts @@ -11,12 +11,12 @@ export const perlinNoisePathName = "perlinNoise"; export async function loadPerlinNoisePath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(perlinNoisePathName, async container => { + e.pluginManager.addPathGenerator?.(perlinNoisePathName, async container => { const { PerlinNoiseGenerator } = await import("./PerlinNoiseGenerator.js"); return new PerlinNoiseGenerator(container); diff --git a/paths/polygon/CHANGELOG.md b/paths/polygon/CHANGELOG.md index 8d55a64e50b..1cf2ba7b57c 100644 --- a/paths/polygon/CHANGELOG.md +++ b/paths/polygon/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-polygon + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-polygon diff --git a/paths/polygon/package.dist.json b/paths/polygon/package.dist.json index 05fdf006e4c..cd8c709cbbd 100644 --- a/paths/polygon/package.dist.json +++ b/paths/polygon/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-polygon", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles polygon path", "homepage": "https://particles.js.org", "repository": { @@ -104,8 +104,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "type": "module" } diff --git a/paths/polygon/package.json b/paths/polygon/package.json index c978523119d..dc5c4bf93e1 100644 --- a/paths/polygon/package.json +++ b/paths/polygon/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-polygon", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles polygon path", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/polygon/src/index.ts b/paths/polygon/src/index.ts index 0e5ab3ed7fd..c54842fa7b4 100644 --- a/paths/polygon/src/index.ts +++ b/paths/polygon/src/index.ts @@ -11,12 +11,12 @@ export const polygonPathName = "polygonPathGenerator"; export async function loadPolygonPath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(polygonPathName, async container => { + e.pluginManager.addPathGenerator?.(polygonPathName, async container => { const { PolygonPathGenerator } = await import("./PolygonPathGenerator.js"); return new PolygonPathGenerator(container); diff --git a/paths/random/CHANGELOG.md b/paths/random/CHANGELOG.md index a6414d822c1..f6259f943a6 100644 --- a/paths/random/CHANGELOG.md +++ b/paths/random/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-random + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-random diff --git a/paths/random/package.dist.json b/paths/random/package.dist.json index aa87eab7bfe..15478f71c2e 100644 --- a/paths/random/package.dist.json +++ b/paths/random/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-random", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles zig zag path", "homepage": "https://particles.js.org", "repository": { @@ -101,8 +101,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/paths/random/package.json b/paths/random/package.json index 369aa684a48..21edad90be4 100644 --- a/paths/random/package.json +++ b/paths/random/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-random", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles zig zag path", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/random/src/index.ts b/paths/random/src/index.ts index 4977eb866e4..e6e242a0357 100644 --- a/paths/random/src/index.ts +++ b/paths/random/src/index.ts @@ -11,12 +11,12 @@ export const randomPathName = "randomPathGenerator"; export async function loadRandomPath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(randomPathName, async () => { + e.pluginManager.addPathGenerator?.(randomPathName, async () => { const { RandomPathGenerator } = await import("./RandomPathGenerator.js"); return new RandomPathGenerator(); diff --git a/paths/simplexNoise/CHANGELOG.md b/paths/simplexNoise/CHANGELOG.md index 351adca6708..fc85ff42b84 100644 --- a/paths/simplexNoise/CHANGELOG.md +++ b/paths/simplexNoise/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-simplex-noise + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-simplex-noise diff --git a/paths/simplexNoise/package.dist.json b/paths/simplexNoise/package.dist.json index c6b06eb2408..bb8ed89c555 100644 --- a/paths/simplexNoise/package.dist.json +++ b/paths/simplexNoise/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-simplex-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles simplex noise path", "homepage": "https://particles.js.org", "repository": { @@ -104,10 +104,10 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/noise-field": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0", - "@tsparticles/simplex-noise": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/noise-field": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1", + "@tsparticles/simplex-noise": "4.0.0-beta.1" }, "type": "module" } diff --git a/paths/simplexNoise/package.json b/paths/simplexNoise/package.json index 1b2b521d14d..52b080dcbb4 100644 --- a/paths/simplexNoise/package.json +++ b/paths/simplexNoise/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-simplex-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles simplex noise path", "homepage": "https://particles.js.org", "scripts": { @@ -95,10 +95,10 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/noise-field": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0", - "@tsparticles/simplex-noise": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/noise-field": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1", + "@tsparticles/simplex-noise": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/simplexNoise/src/index.ts b/paths/simplexNoise/src/index.ts index e5f8f94f499..4f5a52f7aea 100644 --- a/paths/simplexNoise/src/index.ts +++ b/paths/simplexNoise/src/index.ts @@ -11,12 +11,12 @@ export const simplexNoisePathName = "simplexNoise"; export async function loadSimplexNoisePath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(simplexNoisePathName, async container => { + e.pluginManager.addPathGenerator?.(simplexNoisePathName, async container => { const { SimplexNoiseGenerator } = await import("./SimplexNoiseGenerator.js"); return new SimplexNoiseGenerator(container); diff --git a/paths/spiral/CHANGELOG.md b/paths/spiral/CHANGELOG.md index f498300149f..3a6a4f4b216 100644 --- a/paths/spiral/CHANGELOG.md +++ b/paths/spiral/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-spiral + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-spiral diff --git a/paths/spiral/package.dist.json b/paths/spiral/package.dist.json index 33bc92cf561..6558422115d 100644 --- a/paths/spiral/package.dist.json +++ b/paths/spiral/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-spiral", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles spiral path", "homepage": "https://particles.js.org", "repository": { @@ -104,8 +104,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "type": "module" } diff --git a/paths/spiral/package.json b/paths/spiral/package.json index 2c4c5f2036c..d7b52a0f9b8 100644 --- a/paths/spiral/package.json +++ b/paths/spiral/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-spiral", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles spiral path", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/spiral/src/index.ts b/paths/spiral/src/index.ts index a414e34cbe8..36ee53bdf7f 100644 --- a/paths/spiral/src/index.ts +++ b/paths/spiral/src/index.ts @@ -11,12 +11,12 @@ export const spiralPathName = "spiralPathGenerator"; export async function loadSpiralPath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(spiralPathName, async container => { + e.pluginManager.addPathGenerator?.(spiralPathName, async container => { const { SpiralPathGenerator } = await import("./SpiralPathGenerator.js"); return new SpiralPathGenerator(container); diff --git a/paths/svg/CHANGELOG.md b/paths/svg/CHANGELOG.md index e2e64fd61e6..61ca731b918 100644 --- a/paths/svg/CHANGELOG.md +++ b/paths/svg/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-svg + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-svg diff --git a/paths/svg/package.dist.json b/paths/svg/package.dist.json index 0758e2cc9d2..7f405fe5e80 100644 --- a/paths/svg/package.dist.json +++ b/paths/svg/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-svg", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles svg path", "homepage": "https://particles.js.org", "repository": { @@ -101,8 +101,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/paths/svg/package.json b/paths/svg/package.json index fab727ff356..a5b94644856 100644 --- a/paths/svg/package.json +++ b/paths/svg/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-svg", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles svg path", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/svg/src/SVGPathGenerator.ts b/paths/svg/src/SVGPathGenerator.ts index e8d16c2963a..7e52a7cbdc0 100644 --- a/paths/svg/src/SVGPathGenerator.ts +++ b/paths/svg/src/SVGPathGenerator.ts @@ -23,8 +23,7 @@ enum SVGPathDirection { reverse, } -const defaultSpeed = 1, - minStep = 0, +const minStep = 0, minIndex = 0, minWidth = 0, minScale = 1; @@ -77,7 +76,7 @@ export class SVGPathGenerator implements IMovePathGenerator { particle.svgDirection ??= getRandom() > half ? SVGPathDirection.normal : SVGPathDirection.reverse; particle.svgPathIndex ??= Math.floor(getRandom() * this._paths.length); - particle.svgSpeed ??= particle.velocity.mult((particle.retina.moveSpeed ?? defaultSpeed) * half).length; + particle.svgSpeed ??= particle.velocity.mult(particle.retina.moveSpeed * half).length; particle.svgStep ??= randomInRangeValue({ min: 0, max: this._paths[particle.svgPathIndex]!.length }) * pxRatio; particle.svgOffset ??= { width: randomInRangeValue({ min: -this._width * half, max: this._width * half }) * pxRatio, diff --git a/paths/svg/src/index.ts b/paths/svg/src/index.ts index 9387d8cfa4d..5f3ba5157f0 100644 --- a/paths/svg/src/index.ts +++ b/paths/svg/src/index.ts @@ -11,12 +11,12 @@ export const svgPathName = "svgPathGenerator"; export async function loadSVGPath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(svgPathName, async container => { + e.pluginManager.addPathGenerator?.(svgPathName, async container => { const { SVGPathGenerator } = await import("./SVGPathGenerator.js"); return new SVGPathGenerator(container); diff --git a/paths/zigzag/CHANGELOG.md b/paths/zigzag/CHANGELOG.md index 77056543f9a..560e8286381 100644 --- a/paths/zigzag/CHANGELOG.md +++ b/paths/zigzag/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-zig-zag + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-zig-zag diff --git a/paths/zigzag/package.dist.json b/paths/zigzag/package.dist.json index 6e6ee91a93d..d18a4609a14 100644 --- a/paths/zigzag/package.dist.json +++ b/paths/zigzag/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-zig-zag", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles zig zag path", "homepage": "https://particles.js.org", "repository": { @@ -101,8 +101,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/paths/zigzag/package.json b/paths/zigzag/package.json index 0718581a17b..f99b9b94e97 100644 --- a/paths/zigzag/package.json +++ b/paths/zigzag/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-zig-zag", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles zig zag path", "homepage": "https://particles.js.org", "scripts": { @@ -109,8 +109,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/paths/zigzag/src/index.ts b/paths/zigzag/src/index.ts index 9b3325a4795..9840d55d553 100644 --- a/paths/zigzag/src/index.ts +++ b/paths/zigzag/src/index.ts @@ -11,12 +11,12 @@ export const zigZagPathName = "zigZagPathGenerator"; export async function loadZigZagPath(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: MoveEngine) => { + await engine.pluginManager.register(async (e: MoveEngine) => { const { ensureBaseMoverLoaded } = await import("@tsparticles/plugin-move"); ensureBaseMoverLoaded(e); - e.addPathGenerator?.(zigZagPathName, async container => { + e.pluginManager.addPathGenerator?.(zigZagPathName, async container => { const { ZigZagPathGenerator } = await import("./ZigZagPathGenerator.js"); return new ZigZagPathGenerator(container); diff --git a/plugins/absorbers/CHANGELOG.md b/plugins/absorbers/CHANGELOG.md index a6dc6f97d5d..21892484dc3 100644 --- a/plugins/absorbers/CHANGELOG.md +++ b/plugins/absorbers/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-absorbers + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-absorbers diff --git a/plugins/absorbers/package.dist.json b/plugins/absorbers/package.dist.json index 3b08f14f7b4..01817af47f5 100644 --- a/plugins/absorbers/package.dist.json +++ b/plugins/absorbers/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-absorbers", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles absorbers plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,8 +86,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/absorbers/package.json b/plugins/absorbers/package.json index 846c7bc88c5..1d4108c78b3 100644 --- a/plugins/absorbers/package.json +++ b/plugins/absorbers/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-absorbers", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles absorbers plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,8 +94,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/absorbers/src/AbsorberInstance.ts b/plugins/absorbers/src/AbsorberInstance.ts index 48ea99f8dc9..39edc4fe1f9 100644 --- a/plugins/absorbers/src/AbsorberInstance.ts +++ b/plugins/absorbers/src/AbsorberInstance.ts @@ -1,10 +1,11 @@ import { + type CanvasContextType, type Container, - type Engine, type ICoordinates, type IDelta, type IRgb, type Particle, + type PluginManager, type RecursivePartial, RotateDirection, Vector, @@ -14,12 +15,14 @@ import { getDistance, getDistances, getRandom, + getRangeMax, getRangeValue, getStyleFromRgb, + half, + identity, isPointInside, millisecondsToSeconds, originPoint, - percentDenominator, rangeColorToRgb, } from "@tsparticles/engine"; import { Absorber } from "./Options/Classes/Absorber.js"; @@ -33,6 +36,8 @@ const squareExp = 2, minMass = 0, minAngle = 0, maxAngle = doublePI, + maxDegreeAngle = 360, + angleIncrementFactor = identity / maxDegreeAngle, minVelocity = 0, defaultLifeDelay = 0, minLifeCount = 0, @@ -107,23 +112,28 @@ export class AbsorberInstance { private _currentDuration; private _currentSpawnDelay; private _duration?: number; - private readonly _engine; private _firstSpawn; private readonly _immortal; private _lifeCount; + private readonly _pluginManager; private _spawnDelay?: number; private readonly initialPosition?: Vector; /** * The absorber constructor, initializes the absorber based on the given options and position - * @param engine - the Engine instance that will be used for calculating the Absorber interactions + * @param pluginManager - the plugin manager * @param container - the Container engine using the absorber plugin, containing the particles that will interact with this Absorber * @param options - the Absorber source options * @param position - the Absorber optional position, if not given, it will be searched in options, and if not available also there, a random one will be used */ - constructor(engine: Engine, container: Container, options: RecursivePartial, position?: ICoordinates) { + constructor( + pluginManager: PluginManager, + container: Container, + options: RecursivePartial, + position?: ICoordinates, + ) { this._container = container; - this._engine = engine; + this._pluginManager = pluginManager; this._currentDuration = 0; this._currentSpawnDelay = 0; @@ -149,7 +159,7 @@ export class AbsorberInstance { mass: limit.mass, }; - this.color = rangeColorToRgb(this._engine, this.options.color) ?? { + this.color = rangeColorToRgb(this._pluginManager, this.options.color) ?? { b: 0, g: 0, r: 0, @@ -192,14 +202,14 @@ export class AbsorberInstance { } else { particle.needsNewPosition = true; - this._updateParticlePosition(particle, v); + this._updateParticlePosition(particle, delta, v); } } else { if (options.destroy) { particle.size.value -= sizeFactor; } - this._updateParticlePosition(particle, v); + this._updateParticlePosition(particle, delta, v); } if (this.limit.radius <= minRadius || this.size < this.limit.radius) { @@ -210,7 +220,7 @@ export class AbsorberInstance { this.mass += sizeFactor * this.options.size.density * container.retina.reduceFactor; } } else { - this._updateParticlePosition(particle, v); + this._updateParticlePosition(particle, delta, v); } } @@ -218,7 +228,7 @@ export class AbsorberInstance { * The draw method, for drawing the absorber in the canvas * @param context - the canvas 2d context used for drawing */ - draw(context: CanvasRenderingContext2D): void { + draw(context: CanvasContextType): void { context.translate(this.position.x, this.position.y); context.beginPath(); context.arc(originPoint.x, originPoint.y, this.size, minAngle, maxAngle, false); @@ -316,10 +326,15 @@ export class AbsorberInstance { /** * Updates the particle position, if the particle needs a new position * @param particle - the particle to update + * @param delta - the delta * @param v - the vector used for calculating the distance between the Absorber and the particle * @internal */ - private readonly _updateParticlePosition: (particle: OrbitingParticle, v: Vector) => void = (particle, v) => { + private readonly _updateParticlePosition: (particle: OrbitingParticle, delta: IDelta, v: Vector) => void = ( + particle, + delta, + v, + ) => { if (particle.destroyed) { return; } @@ -361,25 +376,21 @@ export class AbsorberInstance { particle.velocity.setTo(Vector.origin); - const updateFunc = { - x: orbitDirection === RotateDirection.clockwise ? Math.cos : Math.sin, - y: orbitDirection === RotateDirection.clockwise ? Math.sin : Math.cos, - }; + const maxSize = getRangeMax(particle.options.size.value) * container.retina.pixelRatio, + sizeFactor = particle.options.move.size ? particle.getRadius() / maxSize : identity, + deltaFactor = delta.factor || identity, + baseSpeed = particle.retina.moveSpeed, + moveSpeed = baseSpeed * sizeFactor * deltaFactor * half; - particle.position.x = this.position.x + orbitRadius * updateFunc.x(orbitAngle); - particle.position.y = this.position.y + orbitRadius * updateFunc.y(orbitAngle); + particle.position.x = this.position.x + orbitRadius * Math.cos(orbitAngle); + particle.position.y = + this.position.y + + orbitRadius * (orbitDirection === RotateDirection.clockwise ? identity : -identity) * Math.sin(orbitAngle); - particle.absorberOrbit.length -= v.length; - particle.absorberOrbit.angle += - (((particle.retina.moveSpeed ?? minVelocity) * container.retina.pixelRatio) / percentDenominator) * - container.retina.reduceFactor; + particle.absorberOrbit.length = Math.max(minOrbitLength, particle.absorberOrbit.length - v.length); + particle.absorberOrbit.angle += moveSpeed * angleIncrementFactor * container.retina.reduceFactor; } else { - const addV = Vector.origin; - - addV.length = v.length; - addV.angle = v.angle; - - particle.velocity.addTo(addV); + particle.velocity.addTo(v); } }; diff --git a/plugins/absorbers/src/AbsorbersInstancesManager.ts b/plugins/absorbers/src/AbsorbersInstancesManager.ts index dbaaaaf5d61..6ddf7ddb490 100644 --- a/plugins/absorbers/src/AbsorbersInstancesManager.ts +++ b/plugins/absorbers/src/AbsorbersInstancesManager.ts @@ -1,4 +1,4 @@ -import { type Engine, type ICoordinates, type RecursivePartial, isNumber } from "@tsparticles/engine"; +import { type ICoordinates, type PluginManager, type RecursivePartial, isNumber } from "@tsparticles/engine"; import type { AbsorberContainer } from "./AbsorberContainer.js"; import type { AbsorberInstance } from "./AbsorberInstance.js"; import type { IAbsorber } from "./Options/Interfaces/IAbsorber.js"; @@ -7,11 +7,11 @@ const defaultIndex = 0; export class AbsorbersInstancesManager { private readonly _containerArrays; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: Engine) { + constructor(pluginManager: PluginManager) { + this._pluginManager = pluginManager; this._containerArrays = new Map(); - this._engine = engine; } async addAbsorber( @@ -20,7 +20,7 @@ export class AbsorbersInstancesManager { position?: ICoordinates, ): Promise { const { AbsorberInstance } = await import("./AbsorberInstance.js"), - absorber = new AbsorberInstance(this._engine, container, options, position), + absorber = new AbsorberInstance(this._pluginManager, container, options, position), array = this.getArray(container); array.push(absorber); diff --git a/plugins/absorbers/src/AbsorbersPluginInstance.ts b/plugins/absorbers/src/AbsorbersPluginInstance.ts index 0c7385b839a..6bc8fceb274 100644 --- a/plugins/absorbers/src/AbsorbersPluginInstance.ts +++ b/plugins/absorbers/src/AbsorbersPluginInstance.ts @@ -1,4 +1,5 @@ import { + type CanvasContextType, type IContainerPlugin, type IDelta, type Particle, @@ -21,7 +22,7 @@ export class AbsorbersPluginInstance implements IContainerPlugin { this._instancesManager.initContainer(container); } - draw(context: CanvasRenderingContext2D): void { + draw(context: CanvasContextType): void { for (const absorber of this._instancesManager.getArray(this._container)) { absorber.draw(context); } diff --git a/plugins/absorbers/src/index.ts b/plugins/absorbers/src/index.ts index a22b491a644..7c2db79dbb9 100644 --- a/plugins/absorbers/src/index.ts +++ b/plugins/absorbers/src/index.ts @@ -10,7 +10,7 @@ declare const __VERSION__: string; export async function loadAbsorbersPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const [ { ensureInteractivityPluginLoaded }, { AbsorbersInstancesManager }, @@ -20,13 +20,14 @@ export async function loadAbsorbersPlugin(engine: Engine): Promise { import("./AbsorbersInstancesManager.js"), import("./AbsorbersPlugin.js"), ]), - instancesManager = new AbsorbersInstancesManager(e); + pluginManager = e.pluginManager, + instancesManager = new AbsorbersInstancesManager(pluginManager); ensureInteractivityPluginLoaded(e); - e.addPlugin(new AbsorbersPlugin(instancesManager)); + pluginManager.addPlugin(new AbsorbersPlugin(instancesManager)); - e.addInteractor?.("externalAbsorbers", async container => { + pluginManager.addInteractor?.("externalAbsorbers", async container => { const { AbsorbersInteractor } = await import("./AbsorbersInteractor.js"); return new AbsorbersInteractor(container as AbsorberContainer, instancesManager); diff --git a/plugins/backgroundMask/CHANGELOG.md b/plugins/backgroundMask/CHANGELOG.md index 6afda33fd82..e772650c374 100644 --- a/plugins/backgroundMask/CHANGELOG.md +++ b/plugins/backgroundMask/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-background-mask + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-background-mask diff --git a/plugins/backgroundMask/package.dist.json b/plugins/backgroundMask/package.dist.json index eb7a2a8aa2e..e97f5222ffe 100644 --- a/plugins/backgroundMask/package.dist.json +++ b/plugins/backgroundMask/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-background-mask", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles background mask plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,7 +86,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/backgroundMask/package.json b/plugins/backgroundMask/package.json index 4a4f82e8a0d..15fc407a811 100644 --- a/plugins/backgroundMask/package.json +++ b/plugins/backgroundMask/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-background-mask", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles background mask plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,7 +94,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/backgroundMask/src/BackgroundMaskPlugin.ts b/plugins/backgroundMask/src/BackgroundMaskPlugin.ts index a6c853a2b94..a8d80671ab7 100644 --- a/plugins/backgroundMask/src/BackgroundMaskPlugin.ts +++ b/plugins/backgroundMask/src/BackgroundMaskPlugin.ts @@ -1,5 +1,5 @@ import type { BackgroundMaskOptions, IBackgroundMaskOptions } from "./types.js"; -import type { Container, Engine, IContainerPlugin, IPlugin, RecursivePartial } from "@tsparticles/engine"; +import type { Container, IContainerPlugin, IPlugin, PluginManager, RecursivePartial } from "@tsparticles/engine"; import { BackgroundMask } from "./Options/Classes/BackgroundMask.js"; /** @@ -7,16 +7,16 @@ import { BackgroundMask } from "./Options/Classes/BackgroundMask.js"; export class BackgroundMaskPlugin implements IPlugin { readonly id = "background-mask"; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: Engine) { - this._engine = engine; + constructor(pluginManager: PluginManager) { + this._pluginManager = pluginManager; } async getPlugin(container: Container): Promise { const { BackgroundMaskPluginInstance } = await import("./BackgroundMaskPluginInstance.js"); - return new BackgroundMaskPluginInstance(container, this._engine); + return new BackgroundMaskPluginInstance(this._pluginManager, container); } loadOptions( diff --git a/plugins/backgroundMask/src/BackgroundMaskPluginInstance.ts b/plugins/backgroundMask/src/BackgroundMaskPluginInstance.ts index a3a4a30ef1b..134529c83e3 100644 --- a/plugins/backgroundMask/src/BackgroundMaskPluginInstance.ts +++ b/plugins/backgroundMask/src/BackgroundMaskPluginInstance.ts @@ -1,6 +1,7 @@ import { - type Engine, + type CanvasContextType, type IContainerPlugin, + type PluginManager, getStyleFromRgb, rangeColorToRgb, safeDocument, @@ -12,11 +13,11 @@ export class BackgroundMaskPluginInstance implements IContainerPlugin { private _coverColorStyle?: string; private _coverImage?: { image: HTMLImageElement; opacity: number }; private _defaultCompositeValue?: GlobalCompositeOperation; - private readonly _engine; + private readonly _pluginManager; - constructor(container: BackgroundMaskContainer, engine: Engine) { + constructor(pluginManager: PluginManager, container: BackgroundMaskContainer) { + this._pluginManager = pluginManager; this._container = container; - this._engine = engine; } canvasClear(): boolean { @@ -36,18 +37,18 @@ export class BackgroundMaskPluginInstance implements IContainerPlugin { const canvas = this._container.canvas; - canvas.canvasClear(); + canvas.render.canvasClear(); if (this._coverImage) { - canvas.paintImage(this._coverImage.image, this._coverImage.opacity); + canvas.render.paintImage(this._coverImage.image, this._coverImage.opacity); } else { - canvas.paintBase(this._coverColorStyle); + canvas.render.paintBase(this._coverColorStyle); } return true; } - drawSettingsCleanup(context: CanvasRenderingContext2D): void { + drawSettingsCleanup(context: CanvasContextType): void { if (!this._defaultCompositeValue) { return; } @@ -55,7 +56,7 @@ export class BackgroundMaskPluginInstance implements IContainerPlugin { context.globalCompositeOperation = this._defaultCompositeValue; } - drawSettingsSetup(context: CanvasRenderingContext2D): void { + drawSettingsSetup(context: CanvasContextType): void { const previousComposite = context.globalCompositeOperation, backgroundMask = this._container.actualOptions.backgroundMask; @@ -74,7 +75,7 @@ export class BackgroundMaskPluginInstance implements IContainerPlugin { color = cover?.color; if (color) { - const coverRgb = rangeColorToRgb(this._engine, color); + const coverRgb = rangeColorToRgb(this._pluginManager, color); if (coverRgb) { const coverColor = { diff --git a/plugins/backgroundMask/src/Options/Classes/BackgroundMask.ts b/plugins/backgroundMask/src/Options/Classes/BackgroundMask.ts index 6741f47b03c..9bf921d14fc 100644 --- a/plugins/backgroundMask/src/Options/Classes/BackgroundMask.ts +++ b/plugins/backgroundMask/src/Options/Classes/BackgroundMask.ts @@ -9,7 +9,7 @@ import type { IBackgroundMaskCover } from "../Interfaces/IBackgroundMaskCover.js export class BackgroundMask implements IBackgroundMask, IOptionLoader { /** * Canvas composite operation - * values here: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + * values here: https://developer.mozilla.org/en-US/docs/Web/API/CanvasContextType/globalCompositeOperation */ composite: GlobalCompositeOperation; diff --git a/plugins/backgroundMask/src/Options/Interfaces/IBackgroundMask.ts b/plugins/backgroundMask/src/Options/Interfaces/IBackgroundMask.ts index 80dd81db830..7bdddddf8cc 100644 --- a/plugins/backgroundMask/src/Options/Interfaces/IBackgroundMask.ts +++ b/plugins/backgroundMask/src/Options/Interfaces/IBackgroundMask.ts @@ -11,7 +11,7 @@ export interface IBackgroundMask { * This property is used to choose the composition mode for the background mask effect. * * The default value is `destination-out`, which unveils the background below using drawn elements, any other valid value - * can be found [here](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation) + * can be found [here](https://developer.mozilla.org/en-US/docs/Web/API/CanvasContextType/globalCompositeOperation) */ composite: GlobalCompositeOperation; diff --git a/plugins/backgroundMask/src/index.ts b/plugins/backgroundMask/src/index.ts index e64aa338a32..715b9228620 100644 --- a/plugins/backgroundMask/src/index.ts +++ b/plugins/backgroundMask/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadBackgroundMaskPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { BackgroundMaskPlugin } = await import("./BackgroundMaskPlugin.js"); - e.addPlugin(new BackgroundMaskPlugin(e)); + e.pluginManager.addPlugin(new BackgroundMaskPlugin(e.pluginManager)); }); } diff --git a/plugins/blend/CHANGELOG.md b/plugins/blend/CHANGELOG.md index 575dbcd0e11..ef3338d270f 100644 --- a/plugins/blend/CHANGELOG.md +++ b/plugins/blend/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-blend + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-blend diff --git a/plugins/blend/package.dist.json b/plugins/blend/package.dist.json index 26e5bf86c46..884e592dd24 100644 --- a/plugins/blend/package.dist.json +++ b/plugins/blend/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-blend", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles blend plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,7 +86,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/blend/package.json b/plugins/blend/package.json index 543af026fc8..5c1eafc6425 100644 --- a/plugins/blend/package.json +++ b/plugins/blend/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-blend", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles blend plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,7 +94,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/blend/src/BlendPluginInstance.ts b/plugins/blend/src/BlendPluginInstance.ts index 0026e9b57c4..2d333212ce9 100644 --- a/plugins/blend/src/BlendPluginInstance.ts +++ b/plugins/blend/src/BlendPluginInstance.ts @@ -1,5 +1,5 @@ import type { BlendContainer, BlendParticle } from "./types.js"; -import { type IContainerPlugin, defaultCompositeValue } from "@tsparticles/engine"; +import { type CanvasContextType, type IContainerPlugin, defaultCompositeValue } from "@tsparticles/engine"; export class BlendPluginInstance implements IContainerPlugin { private readonly _container; @@ -9,7 +9,7 @@ export class BlendPluginInstance implements IContainerPlugin { this._container = container; } - drawParticleCleanup(context: CanvasRenderingContext2D, particle: BlendParticle): void { + drawParticleCleanup(context: CanvasContextType, particle: BlendParticle): void { if (!particle.options.blend?.enable) { return; } @@ -19,7 +19,7 @@ export class BlendPluginInstance implements IContainerPlugin { particle.originalBlendMode = undefined; } - drawParticleSetup(context: CanvasRenderingContext2D, particle: BlendParticle): void { + drawParticleSetup(context: CanvasContextType, particle: BlendParticle): void { if (!particle.options.blend?.enable) { return; } @@ -29,7 +29,7 @@ export class BlendPluginInstance implements IContainerPlugin { context.globalCompositeOperation = particle.options.blend.mode; } - drawSettingsCleanup(context: CanvasRenderingContext2D): void { + drawSettingsCleanup(context: CanvasContextType): void { if (!this._defaultCompositeValue) { return; } @@ -37,7 +37,7 @@ export class BlendPluginInstance implements IContainerPlugin { context.globalCompositeOperation = this._defaultCompositeValue; } - drawSettingsSetup(context: CanvasRenderingContext2D): void { + drawSettingsSetup(context: CanvasContextType): void { const previousComposite = context.globalCompositeOperation, blend = this._container.actualOptions.blend; diff --git a/plugins/blend/src/Options/Classes/Blend.ts b/plugins/blend/src/Options/Classes/Blend.ts index 3d84393a9df..21eef9b0b14 100644 --- a/plugins/blend/src/Options/Classes/Blend.ts +++ b/plugins/blend/src/Options/Classes/Blend.ts @@ -12,7 +12,7 @@ export class Blend implements IBlend, IOptionLoader { /** * Canvas composite operation - * values here: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation + * values here: https://developer.mozilla.org/en-US/docs/Web/API/CanvasContextType/globalCompositeOperation */ mode: GlobalCompositeOperation; diff --git a/plugins/blend/src/Options/Interfaces/IBlend.ts b/plugins/blend/src/Options/Interfaces/IBlend.ts index 05b15481d25..62143cbc7fd 100644 --- a/plugins/blend/src/Options/Interfaces/IBlend.ts +++ b/plugins/blend/src/Options/Interfaces/IBlend.ts @@ -13,7 +13,7 @@ export interface IBlend { * This property is used to choose the composition mode for the blend effect. * * The default value is `destination-out`, which unveils the background below using drawn elements, any other valid value - * can be found [here](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation) + * can be found [here](https://developer.mozilla.org/en-US/docs/Web/API/CanvasContextType/globalCompositeOperation) */ mode: GlobalCompositeOperation; } diff --git a/plugins/blend/src/index.ts b/plugins/blend/src/index.ts index 64c4935a5dd..28e66e24d49 100644 --- a/plugins/blend/src/index.ts +++ b/plugins/blend/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadBlendPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { BlendPlugin } = await import("./BlendPlugin.js"); - e.addPlugin(new BlendPlugin()); + e.pluginManager.addPlugin(new BlendPlugin()); }); } diff --git a/plugins/canvasMask/CHANGELOG.md b/plugins/canvasMask/CHANGELOG.md index f5a4c995df6..825cb56f0fa 100644 --- a/plugins/canvasMask/CHANGELOG.md +++ b/plugins/canvasMask/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-canvas-mask + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-canvas-mask diff --git a/plugins/canvasMask/package.dist.json b/plugins/canvasMask/package.dist.json index 0a00880ed37..8e258eef2a2 100644 --- a/plugins/canvasMask/package.dist.json +++ b/plugins/canvasMask/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-canvas-mask", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles canvas mask plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,8 +86,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "4.0.0-beta.0", - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/canvas-utils": "4.0.0-beta.1", + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/canvasMask/package.json b/plugins/canvasMask/package.json index 300a756c96a..7e8352b7036 100644 --- a/plugins/canvasMask/package.json +++ b/plugins/canvasMask/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-canvas-mask", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles canvas mask plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,8 +94,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/canvas-utils": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/canvasMask/src/CanvasMaskPluginInstance.ts b/plugins/canvasMask/src/CanvasMaskPluginInstance.ts index d4ef5856f4e..753ca999818 100644 --- a/plugins/canvasMask/src/CanvasMaskPluginInstance.ts +++ b/plugins/canvasMask/src/CanvasMaskPluginInstance.ts @@ -33,10 +33,10 @@ export class CanvasMaskPluginInstance implements IContainerPlugin { return; } - pixelData = await getImageData(url, offset, container.canvas.settings); + pixelData = await getImageData(url, offset, container.canvas.render.settings); } else if (options.text) { const textOptions = options.text, - data = getTextData(textOptions, offset, textOptions.fill, container.canvas.settings); + data = getTextData(textOptions, offset, textOptions.fill, container.canvas.render.settings); if (isNull(data)) { return; @@ -51,7 +51,7 @@ export class CanvasMaskPluginInstance implements IContainerPlugin { return; } - const context = canvas.getContext("2d", container.canvas.settings); + const context = canvas.getContext("2d", container.canvas.render.settings); if (!context) { return; diff --git a/plugins/canvasMask/src/index.ts b/plugins/canvasMask/src/index.ts index 05bc8045307..b6b19c30a97 100644 --- a/plugins/canvasMask/src/index.ts +++ b/plugins/canvasMask/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadCanvasMaskPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { CanvasMaskPlugin } = await import("./CanvasMaskPlugin.js"); - e.addPlugin(new CanvasMaskPlugin()); + e.pluginManager.addPlugin(new CanvasMaskPlugin()); }); } diff --git a/plugins/colors/hex/CHANGELOG.md b/plugins/colors/hex/CHANGELOG.md index d5f2697e297..e5f9c21b673 100644 --- a/plugins/colors/hex/CHANGELOG.md +++ b/plugins/colors/hex/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-hex-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-hex-color diff --git a/plugins/colors/hex/package.dist.json b/plugins/colors/hex/package.dist.json index 191156c7bc3..87ed37cff7a 100644 --- a/plugins/colors/hex/package.dist.json +++ b/plugins/colors/hex/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-hex-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles hex color plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/colors/hex/package.json b/plugins/colors/hex/package.json index 6afda7f2c12..2ac6021cdd5 100644 --- a/plugins/colors/hex/package.json +++ b/plugins/colors/hex/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-hex-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles hex color plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/colors/hex/src/index.ts b/plugins/colors/hex/src/index.ts index d1a4d25c820..e25b525ab6c 100644 --- a/plugins/colors/hex/src/index.ts +++ b/plugins/colors/hex/src/index.ts @@ -9,9 +9,9 @@ declare const __VERSION__: string; export async function loadHexColorPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { HexColorManager } = await import("./HexColorManager.js"); - e.addColorManager("hex", new HexColorManager()); + e.pluginManager.addColorManager("hex", new HexColorManager()); }); } diff --git a/plugins/colors/hsl/CHANGELOG.md b/plugins/colors/hsl/CHANGELOG.md index 58f09611da3..f94271a4375 100644 --- a/plugins/colors/hsl/CHANGELOG.md +++ b/plugins/colors/hsl/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-hsl-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-hsl-color diff --git a/plugins/colors/hsl/package.dist.json b/plugins/colors/hsl/package.dist.json index 2f6c05f2273..8e1c8680956 100644 --- a/plugins/colors/hsl/package.dist.json +++ b/plugins/colors/hsl/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-hsl-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles HSL color plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/colors/hsl/package.json b/plugins/colors/hsl/package.json index acb368e22cf..a2f5a41a914 100644 --- a/plugins/colors/hsl/package.json +++ b/plugins/colors/hsl/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-hsl-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles HSL color plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/colors/hsl/src/index.ts b/plugins/colors/hsl/src/index.ts index 0edd1605f81..73e4c4ef6e1 100644 --- a/plugins/colors/hsl/src/index.ts +++ b/plugins/colors/hsl/src/index.ts @@ -9,9 +9,9 @@ declare const __VERSION__: string; export async function loadHslColorPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { HslColorManager } = await import("./HslColorManager.js"); - e.addColorManager("hsl", new HslColorManager()); + e.pluginManager.addColorManager("hsl", new HslColorManager()); }); } diff --git a/plugins/colors/hsv/CHANGELOG.md b/plugins/colors/hsv/CHANGELOG.md index a9521125567..5170a41f020 100644 --- a/plugins/colors/hsv/CHANGELOG.md +++ b/plugins/colors/hsv/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-hsv-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-hsv-color diff --git a/plugins/colors/hsv/package.dist.json b/plugins/colors/hsv/package.dist.json index a94e035aaf1..5128e49ffc8 100644 --- a/plugins/colors/hsv/package.dist.json +++ b/plugins/colors/hsv/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-hsv-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles HSV color plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/colors/hsv/package.json b/plugins/colors/hsv/package.json index 7387919a86d..e3b629a048f 100644 --- a/plugins/colors/hsv/package.json +++ b/plugins/colors/hsv/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-hsv-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles HSV color plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/colors/hsv/src/index.ts b/plugins/colors/hsv/src/index.ts index bb5287df0fa..642f29b771a 100644 --- a/plugins/colors/hsv/src/index.ts +++ b/plugins/colors/hsv/src/index.ts @@ -9,9 +9,9 @@ declare const __VERSION__: string; export async function loadHsvColorPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { HsvColorManager } = await import("./HsvColorManager.js"); - e.addColorManager("hsv", new HsvColorManager()); + e.pluginManager.addColorManager("hsv", new HsvColorManager()); }); } diff --git a/plugins/colors/hwb/CHANGELOG.md b/plugins/colors/hwb/CHANGELOG.md index 68bb69af56f..aadc0273e70 100644 --- a/plugins/colors/hwb/CHANGELOG.md +++ b/plugins/colors/hwb/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-hwb-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-hwb-color diff --git a/plugins/colors/hwb/package.dist.json b/plugins/colors/hwb/package.dist.json index 5ac172fbd52..a0691d605f4 100644 --- a/plugins/colors/hwb/package.dist.json +++ b/plugins/colors/hwb/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-hwb-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles HWB color plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/colors/hwb/package.json b/plugins/colors/hwb/package.json index 570c7441210..f3a8d58ffd6 100644 --- a/plugins/colors/hwb/package.json +++ b/plugins/colors/hwb/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-hwb-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles HWB color plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/colors/hwb/src/index.ts b/plugins/colors/hwb/src/index.ts index 5e60519a54d..ad2a02a545a 100644 --- a/plugins/colors/hwb/src/index.ts +++ b/plugins/colors/hwb/src/index.ts @@ -9,9 +9,9 @@ declare const __VERSION__: string; export async function loadHwbColorPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { HwbColorManager } = await import("./HwbColorManager.js"); - e.addColorManager("hwb", new HwbColorManager()); + e.pluginManager.addColorManager("hwb", new HwbColorManager()); }); } diff --git a/plugins/colors/lab/CHANGELOG.md b/plugins/colors/lab/CHANGELOG.md index f6d447a06b7..4079dbf5c2d 100644 --- a/plugins/colors/lab/CHANGELOG.md +++ b/plugins/colors/lab/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-lab-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-lab-color diff --git a/plugins/colors/lab/package.dist.json b/plugins/colors/lab/package.dist.json index f148e710e44..31574230e12 100644 --- a/plugins/colors/lab/package.dist.json +++ b/plugins/colors/lab/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-lab-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles LAB color plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/colors/lab/package.json b/plugins/colors/lab/package.json index 4eb5e194fcd..a7b8afbab53 100644 --- a/plugins/colors/lab/package.json +++ b/plugins/colors/lab/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-lab-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles LAB color plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/colors/lab/src/index.ts b/plugins/colors/lab/src/index.ts index 9eccef13598..c5f4a50272a 100644 --- a/plugins/colors/lab/src/index.ts +++ b/plugins/colors/lab/src/index.ts @@ -9,9 +9,9 @@ declare const __VERSION__: string; export async function loadLabColorPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { LabColorManager } = await import("./LabColorManager.js"); - e.addColorManager("lab", new LabColorManager()); + e.pluginManager.addColorManager("lab", new LabColorManager()); }); } diff --git a/plugins/colors/lch/CHANGELOG.md b/plugins/colors/lch/CHANGELOG.md index 9eecfd18df1..01b301c2c35 100644 --- a/plugins/colors/lch/CHANGELOG.md +++ b/plugins/colors/lch/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-lch-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-lch-color diff --git a/plugins/colors/lch/package.dist.json b/plugins/colors/lch/package.dist.json index ae8fa0e950d..87135b0f3f6 100644 --- a/plugins/colors/lch/package.dist.json +++ b/plugins/colors/lch/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-lch-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles LCH color plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/colors/lch/package.json b/plugins/colors/lch/package.json index 123f9e11c5a..77300babb9c 100644 --- a/plugins/colors/lch/package.json +++ b/plugins/colors/lch/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-lch-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles LCH color plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/colors/lch/src/index.ts b/plugins/colors/lch/src/index.ts index f71fd4715e2..08340412d87 100644 --- a/plugins/colors/lch/src/index.ts +++ b/plugins/colors/lch/src/index.ts @@ -9,9 +9,9 @@ declare const __VERSION__: string; export async function loadLchColorPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { LchColorManager } = await import("./LchColorManager.js"); - e.addColorManager("lch", new LchColorManager()); + e.pluginManager.addColorManager("lch", new LchColorManager()); }); } diff --git a/plugins/colors/named/CHANGELOG.md b/plugins/colors/named/CHANGELOG.md index e8fcde0fb74..632e03e49f1 100644 --- a/plugins/colors/named/CHANGELOG.md +++ b/plugins/colors/named/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-named-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-named-color diff --git a/plugins/colors/named/package.dist.json b/plugins/colors/named/package.dist.json index 2422cf4b09d..156b616f4b3 100644 --- a/plugins/colors/named/package.dist.json +++ b/plugins/colors/named/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-named-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles named color plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/colors/named/package.json b/plugins/colors/named/package.json index f533b76d978..5f8afc67485 100644 --- a/plugins/colors/named/package.json +++ b/plugins/colors/named/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-named-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles named color plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/colors/named/src/index.ts b/plugins/colors/named/src/index.ts index 1af1c7da763..d0159bdef00 100644 --- a/plugins/colors/named/src/index.ts +++ b/plugins/colors/named/src/index.ts @@ -9,9 +9,9 @@ declare const __VERSION__: string; export async function loadNamedColorPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { NamedColorManager } = await import("./NamedColorManager.js"); - e.addColorManager("named", new NamedColorManager()); + e.pluginManager.addColorManager("named", new NamedColorManager()); }); } diff --git a/plugins/colors/oklab/CHANGELOG.md b/plugins/colors/oklab/CHANGELOG.md index 757dfe4a8b2..00ac83a7401 100644 --- a/plugins/colors/oklab/CHANGELOG.md +++ b/plugins/colors/oklab/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-oklab-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-oklab-color diff --git a/plugins/colors/oklab/package.dist.json b/plugins/colors/oklab/package.dist.json index 5f06469aa77..9067b062272 100644 --- a/plugins/colors/oklab/package.dist.json +++ b/plugins/colors/oklab/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-oklab-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles OKLAB color plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/colors/oklab/package.json b/plugins/colors/oklab/package.json index 55148d064a7..0d6ef5e99a1 100644 --- a/plugins/colors/oklab/package.json +++ b/plugins/colors/oklab/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-oklab-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles OKLAB color plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/colors/oklab/src/index.ts b/plugins/colors/oklab/src/index.ts index 14ef6c7d69d..23b43a98d1c 100644 --- a/plugins/colors/oklab/src/index.ts +++ b/plugins/colors/oklab/src/index.ts @@ -9,9 +9,9 @@ declare const __VERSION__: string; export async function loadOklabColorPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { OklabColorManager } = await import("./OklabColorManager.js"); - e.addColorManager("oklab", new OklabColorManager()); + e.pluginManager.addColorManager("oklab", new OklabColorManager()); }); } diff --git a/plugins/colors/oklch/CHANGELOG.md b/plugins/colors/oklch/CHANGELOG.md index 255d16570ae..2dc1aad7e97 100644 --- a/plugins/colors/oklch/CHANGELOG.md +++ b/plugins/colors/oklch/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-oklch-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-oklch-color diff --git a/plugins/colors/oklch/package.dist.json b/plugins/colors/oklch/package.dist.json index 07a996dc18d..c6608f9b2ef 100644 --- a/plugins/colors/oklch/package.dist.json +++ b/plugins/colors/oklch/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-oklch-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles OKLCH color plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/colors/oklch/package.json b/plugins/colors/oklch/package.json index ec47b1c0568..70c78d7972e 100644 --- a/plugins/colors/oklch/package.json +++ b/plugins/colors/oklch/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-oklch-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles OKLCH color plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/colors/oklch/src/index.ts b/plugins/colors/oklch/src/index.ts index 9556f3c8b7a..06af323f66a 100644 --- a/plugins/colors/oklch/src/index.ts +++ b/plugins/colors/oklch/src/index.ts @@ -9,9 +9,9 @@ declare const __VERSION__: string; export async function loadOklchColorPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { OklchColorManager } = await import("./OklchColorManager.js"); - e.addColorManager("oklch", new OklchColorManager()); + e.pluginManager.addColorManager("oklch", new OklchColorManager()); }); } diff --git a/plugins/colors/rgb/CHANGELOG.md b/plugins/colors/rgb/CHANGELOG.md index 66c4acc33b9..7d6aced13cb 100644 --- a/plugins/colors/rgb/CHANGELOG.md +++ b/plugins/colors/rgb/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-rgb-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-rgb-color diff --git a/plugins/colors/rgb/package.dist.json b/plugins/colors/rgb/package.dist.json index 3bb25cd16d3..4a411ba1d6b 100644 --- a/plugins/colors/rgb/package.dist.json +++ b/plugins/colors/rgb/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-rgb-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles RGB color plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/colors/rgb/package.json b/plugins/colors/rgb/package.json index ae6e38c641f..08398614486 100644 --- a/plugins/colors/rgb/package.json +++ b/plugins/colors/rgb/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-rgb-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles RGB color plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/colors/rgb/src/index.ts b/plugins/colors/rgb/src/index.ts index e225455b802..7e2f8b1f1fa 100644 --- a/plugins/colors/rgb/src/index.ts +++ b/plugins/colors/rgb/src/index.ts @@ -9,9 +9,9 @@ declare const __VERSION__: string; export async function loadRgbColorPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { RgbColorManager } = await import("./RgbColorManager.js"); - e.addColorManager("rgb", new RgbColorManager()); + e.pluginManager.addColorManager("rgb", new RgbColorManager()); }); } diff --git a/plugins/easings/back/CHANGELOG.md b/plugins/easings/back/CHANGELOG.md index 73d177d4f97..8625a988817 100644 --- a/plugins/easings/back/CHANGELOG.md +++ b/plugins/easings/back/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-back + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-back diff --git a/plugins/easings/back/package.dist.json b/plugins/easings/back/package.dist.json index e2353df8c73..7051b96bd45 100644 --- a/plugins/easings/back/package.dist.json +++ b/plugins/easings/back/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-back", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing back plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/back/package.json b/plugins/easings/back/package.json index fa05a8ada0b..14980ebfd35 100644 --- a/plugins/easings/back/package.json +++ b/plugins/easings/back/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-back", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing back plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/back/src/index.ts b/plugins/easings/back/src/index.ts index 4746efb863f..af797b1aacb 100644 --- a/plugins/easings/back/src/index.ts +++ b/plugins/easings/back/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingBackPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/bounce/CHANGELOG.md b/plugins/easings/bounce/CHANGELOG.md index 7a712d7cfd6..b4976ee3acf 100644 --- a/plugins/easings/bounce/CHANGELOG.md +++ b/plugins/easings/bounce/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-bounce + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-bounce diff --git a/plugins/easings/bounce/package.dist.json b/plugins/easings/bounce/package.dist.json index 8f661ba27f6..a8002ff6be6 100644 --- a/plugins/easings/bounce/package.dist.json +++ b/plugins/easings/bounce/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-bounce", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing bounce plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/bounce/package.json b/plugins/easings/bounce/package.json index 935c9376061..0db4ea79b41 100644 --- a/plugins/easings/bounce/package.json +++ b/plugins/easings/bounce/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-bounce", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing bounce plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/bounce/src/index.ts b/plugins/easings/bounce/src/index.ts index 2fdad45eb8f..6f307d1cfc2 100644 --- a/plugins/easings/bounce/src/index.ts +++ b/plugins/easings/bounce/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingBouncePlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/circ/CHANGELOG.md b/plugins/easings/circ/CHANGELOG.md index ebc5db4e07d..6201dcba0ba 100644 --- a/plugins/easings/circ/CHANGELOG.md +++ b/plugins/easings/circ/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-circ + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-circ diff --git a/plugins/easings/circ/package.dist.json b/plugins/easings/circ/package.dist.json index d530298ea32..04e78871a04 100644 --- a/plugins/easings/circ/package.dist.json +++ b/plugins/easings/circ/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-circ", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing circ plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/circ/package.json b/plugins/easings/circ/package.json index 5aba7d5d023..ba85834f270 100644 --- a/plugins/easings/circ/package.json +++ b/plugins/easings/circ/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-circ", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing circ plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/circ/src/index.ts b/plugins/easings/circ/src/index.ts index 9d331b63fb3..795398003b6 100644 --- a/plugins/easings/circ/src/index.ts +++ b/plugins/easings/circ/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingCircPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/cubic/CHANGELOG.md b/plugins/easings/cubic/CHANGELOG.md index 2f0e3ddded0..c1cfb0b2a4c 100644 --- a/plugins/easings/cubic/CHANGELOG.md +++ b/plugins/easings/cubic/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-cubic + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-cubic diff --git a/plugins/easings/cubic/package.dist.json b/plugins/easings/cubic/package.dist.json index da145af498d..147f1e19730 100644 --- a/plugins/easings/cubic/package.dist.json +++ b/plugins/easings/cubic/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-cubic", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing cubic plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/cubic/package.json b/plugins/easings/cubic/package.json index ac8c0230030..2d56dc83184 100644 --- a/plugins/easings/cubic/package.json +++ b/plugins/easings/cubic/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-cubic", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing cubic plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/cubic/src/index.ts b/plugins/easings/cubic/src/index.ts index f5ba8377d8d..34ce9ab33fa 100644 --- a/plugins/easings/cubic/src/index.ts +++ b/plugins/easings/cubic/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingCubicPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/elastic/CHANGELOG.md b/plugins/easings/elastic/CHANGELOG.md index a88f7b8b52d..4d9b42d8642 100644 --- a/plugins/easings/elastic/CHANGELOG.md +++ b/plugins/easings/elastic/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-elastic + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-elastic diff --git a/plugins/easings/elastic/package.dist.json b/plugins/easings/elastic/package.dist.json index c7d1c6c635f..e23fbdd0a3e 100644 --- a/plugins/easings/elastic/package.dist.json +++ b/plugins/easings/elastic/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-elastic", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing elastic plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/elastic/package.json b/plugins/easings/elastic/package.json index 3b5ebef67f7..ecad38ffb3c 100644 --- a/plugins/easings/elastic/package.json +++ b/plugins/easings/elastic/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-elastic", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing elastic plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/elastic/src/index.ts b/plugins/easings/elastic/src/index.ts index f62d72d5a15..77464358c48 100644 --- a/plugins/easings/elastic/src/index.ts +++ b/plugins/easings/elastic/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingElasticPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/expo/CHANGELOG.md b/plugins/easings/expo/CHANGELOG.md index 11212590b00..84f6a2ed698 100644 --- a/plugins/easings/expo/CHANGELOG.md +++ b/plugins/easings/expo/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-expo + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-expo diff --git a/plugins/easings/expo/package.dist.json b/plugins/easings/expo/package.dist.json index 56d8ca03d26..c02f0cde51f 100644 --- a/plugins/easings/expo/package.dist.json +++ b/plugins/easings/expo/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-expo", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing expo plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/expo/package.json b/plugins/easings/expo/package.json index 40108f1d355..49d1af284d6 100644 --- a/plugins/easings/expo/package.json +++ b/plugins/easings/expo/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-expo", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing expo plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/expo/src/index.ts b/plugins/easings/expo/src/index.ts index 0e66a484443..9ef85b342c7 100644 --- a/plugins/easings/expo/src/index.ts +++ b/plugins/easings/expo/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingExpoPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/gaussian/CHANGELOG.md b/plugins/easings/gaussian/CHANGELOG.md index 290893ab402..61fb97e09cb 100644 --- a/plugins/easings/gaussian/CHANGELOG.md +++ b/plugins/easings/gaussian/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-gaussian + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-gaussian diff --git a/plugins/easings/gaussian/package.dist.json b/plugins/easings/gaussian/package.dist.json index cd984f769b4..12404424cee 100644 --- a/plugins/easings/gaussian/package.dist.json +++ b/plugins/easings/gaussian/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-gaussian", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing gaussian plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/gaussian/package.json b/plugins/easings/gaussian/package.json index 68f097b7182..c7fd787faf1 100644 --- a/plugins/easings/gaussian/package.json +++ b/plugins/easings/gaussian/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-gaussian", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing gaussian plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/gaussian/src/index.ts b/plugins/easings/gaussian/src/index.ts index 801f9253081..8bb4c6235f3 100644 --- a/plugins/easings/gaussian/src/index.ts +++ b/plugins/easings/gaussian/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingGaussianPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/linear/CHANGELOG.md b/plugins/easings/linear/CHANGELOG.md index 91a4a065845..303fa83acfb 100644 --- a/plugins/easings/linear/CHANGELOG.md +++ b/plugins/easings/linear/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-linear + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-linear diff --git a/plugins/easings/linear/package.dist.json b/plugins/easings/linear/package.dist.json index 1e4d4303ad5..482703e1c79 100644 --- a/plugins/easings/linear/package.dist.json +++ b/plugins/easings/linear/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-linear", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing linear plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/linear/package.json b/plugins/easings/linear/package.json index c444fb0c7f4..cd17f03a692 100644 --- a/plugins/easings/linear/package.json +++ b/plugins/easings/linear/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-linear", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing linear plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/linear/src/index.ts b/plugins/easings/linear/src/index.ts index 53162e8d71b..97e67641785 100644 --- a/plugins/easings/linear/src/index.ts +++ b/plugins/easings/linear/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingLinearPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/quad/CHANGELOG.md b/plugins/easings/quad/CHANGELOG.md index 9160be2849a..285cc476210 100644 --- a/plugins/easings/quad/CHANGELOG.md +++ b/plugins/easings/quad/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-quad + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-quad diff --git a/plugins/easings/quad/package.dist.json b/plugins/easings/quad/package.dist.json index 169bc5e3d05..5f9678a0aa2 100644 --- a/plugins/easings/quad/package.dist.json +++ b/plugins/easings/quad/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-quad", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing quad plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/quad/package.json b/plugins/easings/quad/package.json index 2ef7211a964..1c1d42cd32b 100644 --- a/plugins/easings/quad/package.json +++ b/plugins/easings/quad/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-quad", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing quad plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/quad/src/index.ts b/plugins/easings/quad/src/index.ts index 18dd6456dc5..cceb1a96e30 100644 --- a/plugins/easings/quad/src/index.ts +++ b/plugins/easings/quad/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingQuadPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/quart/CHANGELOG.md b/plugins/easings/quart/CHANGELOG.md index 72e3683dcde..c1eca74034b 100644 --- a/plugins/easings/quart/CHANGELOG.md +++ b/plugins/easings/quart/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-quart + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-quart diff --git a/plugins/easings/quart/package.dist.json b/plugins/easings/quart/package.dist.json index 109e0d70a96..51ae6d21c91 100644 --- a/plugins/easings/quart/package.dist.json +++ b/plugins/easings/quart/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-quart", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing quart plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/quart/package.json b/plugins/easings/quart/package.json index 86506fe17dc..fba1beb831e 100644 --- a/plugins/easings/quart/package.json +++ b/plugins/easings/quart/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-quart", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing quart plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/quart/src/index.ts b/plugins/easings/quart/src/index.ts index b9665cb4af6..f4b7ed25b1e 100644 --- a/plugins/easings/quart/src/index.ts +++ b/plugins/easings/quart/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingQuartPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/quint/CHANGELOG.md b/plugins/easings/quint/CHANGELOG.md index 80eeb049f9d..9ae6b628604 100644 --- a/plugins/easings/quint/CHANGELOG.md +++ b/plugins/easings/quint/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-quint + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-quint diff --git a/plugins/easings/quint/package.dist.json b/plugins/easings/quint/package.dist.json index 1ceb80b6bc8..8f07c226b20 100644 --- a/plugins/easings/quint/package.dist.json +++ b/plugins/easings/quint/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-quint", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing quint plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/quint/package.json b/plugins/easings/quint/package.json index 8fc59342851..514f7dad4c2 100644 --- a/plugins/easings/quint/package.json +++ b/plugins/easings/quint/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-quint", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing quint plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/quint/src/index.ts b/plugins/easings/quint/src/index.ts index bbe7d3d27f9..c6de60c4fd3 100644 --- a/plugins/easings/quint/src/index.ts +++ b/plugins/easings/quint/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingQuintPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/sigmoid/CHANGELOG.md b/plugins/easings/sigmoid/CHANGELOG.md index 64bb6f14285..912f27bff8e 100644 --- a/plugins/easings/sigmoid/CHANGELOG.md +++ b/plugins/easings/sigmoid/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-sigmoid + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-sigmoid diff --git a/plugins/easings/sigmoid/package.dist.json b/plugins/easings/sigmoid/package.dist.json index 6a57a3400df..377f4eac660 100644 --- a/plugins/easings/sigmoid/package.dist.json +++ b/plugins/easings/sigmoid/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-sigmoid", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing sigmoid plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/sigmoid/package.json b/plugins/easings/sigmoid/package.json index 3b561cc32e8..9397494c7d9 100644 --- a/plugins/easings/sigmoid/package.json +++ b/plugins/easings/sigmoid/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-sigmoid", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing sigmoid plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/sigmoid/src/index.ts b/plugins/easings/sigmoid/src/index.ts index 6eda257f1f5..0d91a0c0c0e 100644 --- a/plugins/easings/sigmoid/src/index.ts +++ b/plugins/easings/sigmoid/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingSigmoidPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/sine/CHANGELOG.md b/plugins/easings/sine/CHANGELOG.md index 33d1d70df3c..c47bd07d06d 100644 --- a/plugins/easings/sine/CHANGELOG.md +++ b/plugins/easings/sine/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-sine + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-sine diff --git a/plugins/easings/sine/package.dist.json b/plugins/easings/sine/package.dist.json index 3abbf8488a9..2aa9317d748 100644 --- a/plugins/easings/sine/package.dist.json +++ b/plugins/easings/sine/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-sine", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing sine plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/sine/package.json b/plugins/easings/sine/package.json index deb716880a9..67188b172a0 100644 --- a/plugins/easings/sine/package.json +++ b/plugins/easings/sine/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-sine", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing sine plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/sine/src/index.ts b/plugins/easings/sine/src/index.ts index 8ed25457ac1..df8abd797fa 100644 --- a/plugins/easings/sine/src/index.ts +++ b/plugins/easings/sine/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingSinePlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/easings/smoothstep/CHANGELOG.md b/plugins/easings/smoothstep/CHANGELOG.md index 56b0779bd0d..cbf84eb22a7 100644 --- a/plugins/easings/smoothstep/CHANGELOG.md +++ b/plugins/easings/smoothstep/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-easing-smoothstep + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-easing-smoothstep diff --git a/plugins/easings/smoothstep/package.dist.json b/plugins/easings/smoothstep/package.dist.json index 4d5b07bc0be..e1500921370 100644 --- a/plugins/easings/smoothstep/package.dist.json +++ b/plugins/easings/smoothstep/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-smoothstep", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing smoothstep plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/easings/smoothstep/package.json b/plugins/easings/smoothstep/package.json index cfb8fa4e9cc..3530265f7e1 100644 --- a/plugins/easings/smoothstep/package.json +++ b/plugins/easings/smoothstep/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-easing-smoothstep", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles easing smoothstep plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/easings/smoothstep/src/index.ts b/plugins/easings/smoothstep/src/index.ts index 0c7abc63774..1b36ffaf509 100644 --- a/plugins/easings/smoothstep/src/index.ts +++ b/plugins/easings/smoothstep/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadEasingSmoothstepPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { easingsFunctions } = await import("./easingsFunctions.js"); for (const [easing, easingFn] of easingsFunctions) { - e.addEasing(easing, easingFn); + e.pluginManager.addEasing(easing, easingFn); } }); } diff --git a/plugins/emitters/CHANGELOG.md b/plugins/emitters/CHANGELOG.md index 5d3c58762ba..c071f83c704 100644 --- a/plugins/emitters/CHANGELOG.md +++ b/plugins/emitters/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-emitters + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-emitters diff --git a/plugins/emitters/package.dist.json b/plugins/emitters/package.dist.json index b6dfd3c9ebe..d590c34d13d 100644 --- a/plugins/emitters/package.dist.json +++ b/plugins/emitters/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,8 +86,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/emitters/package.json b/plugins/emitters/package.json index 3aa75b2dadb..ef7f594c77e 100644 --- a/plugins/emitters/package.json +++ b/plugins/emitters/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,8 +94,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/emitters/src/EmitterInstance.ts b/plugins/emitters/src/EmitterInstance.ts index cddbd9eba15..ff4d751d4b2 100644 --- a/plugins/emitters/src/EmitterInstance.ts +++ b/plugins/emitters/src/EmitterInstance.ts @@ -32,7 +32,7 @@ import { } from "@tsparticles/engine"; import { Emitter } from "./Options/Classes/Emitter.js"; import { EmitterSize } from "./Options/Classes/EmitterSize.js"; -import type { EmittersEngine } from "./EmittersEngine.js"; +import type { EmittersPluginManager } from "./EmittersEngine.js"; import type { IEmitter } from "./Options/Interfaces/IEmitter.js"; import type { IEmitterShape } from "./IEmitterShape.js"; import type { IEmitterSize } from "./Options/Interfaces/IEmitterSize.js"; @@ -99,12 +99,12 @@ export class EmitterInstance { spawnStrokeOpacity?: number; spawnStrokeWidth?: number; + private readonly _container; private _currentDuration; private _currentEmitDelay; private _currentSpawnDelay; private _duration?: number; private _emitDelay?: number; - private readonly _engine; private _firstSpawn; private readonly _immortal; private readonly _initialPosition?: ICoordinates; @@ -112,6 +112,8 @@ export class EmitterInstance { private _mutationObserver?: MutationObserver; private readonly _particlesOptions: RecursivePartial; private _paused; + private readonly _pluginManager; + private readonly _removeCallback; private _resizeObserver?: ResizeObserver; private readonly _shape?: IEmitterShape; private _size; @@ -119,13 +121,15 @@ export class EmitterInstance { private _startParticlesAdded; constructor( - engine: EmittersEngine, - private readonly container: Container, - private readonly removeCallback: (emitter: EmitterInstance) => void, + pluginManager: EmittersPluginManager, + container: Container, + removeCallback: (emitter: EmitterInstance) => void, options: Emitter | RecursivePartial, position?: ICoordinates, ) { - this._engine = engine; + this._pluginManager = pluginManager; + this._container = container; + this._removeCallback = removeCallback; this._currentDuration = 0; this._currentEmitDelay = 0; this._currentSpawnDelay = 0; @@ -156,17 +160,17 @@ export class EmitterInstance { particlesOptions.move.direction ??= this.options.direction; if (this.options.spawn.fill?.color) { - this.spawnFillColor = rangeColorToHsl(this._engine, this.options.spawn.fill.color); + this.spawnFillColor = rangeColorToHsl(this._pluginManager, this.options.spawn.fill.color); } if (this.options.spawn.stroke?.color) { - this.spawnStrokeColor = rangeColorToHsl(this._engine, this.options.spawn.stroke.color); + this.spawnStrokeColor = rangeColorToHsl(this._pluginManager, this.options.spawn.stroke.color); } this._paused = !this.options.autoPlay; this._particlesOptions = particlesOptions; this._size = this._calcSize(); - this.size = getSize(this._size, this.container.canvas.size); + this.size = getSize(this._size, this._container.canvas.size); this._lifeCount = this.options.life.count ?? defaultLifeCount; this._immortal = this._lifeCount <= minLifeCount; @@ -191,17 +195,14 @@ export class EmitterInstance { } const shapeOptions = this.options.shape, - shapeGenerator = this._engine.emitterShapeManager?.getShapeGenerator(shapeOptions.type); + shapeGenerator = this._pluginManager.emitterShapeManager?.getShapeGenerator(shapeOptions.type); if (shapeGenerator) { - this._shape = shapeGenerator.generate(this.container, this.position, this.size, this.fill, shapeOptions.options); + this._shape = shapeGenerator.generate(this._container, this.position, this.size, this.fill, shapeOptions.options); } - this._engine.dispatchEvent("emitterCreated", { - container, - data: { - emitter: this, - }, + this._container.dispatchEvent("emitterCreated", { + emitter: this, }); this.play(); @@ -245,7 +246,7 @@ export class EmitterInstance { return; } - const container = this.container; + const container = this._container; if (this._emitDelay === undefined) { const delay = getRangeValue(this.options.rate.delay); @@ -262,7 +263,7 @@ export class EmitterInstance { resize(): void { const initialPosition = this._initialPosition, - container = this.container; + container = this._container; this.position = initialPosition && isPointInside(initialPosition, container.canvas.size, Vector.origin) @@ -280,7 +281,7 @@ export class EmitterInstance { return; } - const container = this.container; + const container = this._container; if (this._firstSpawn) { this._firstSpawn = false; @@ -332,9 +333,7 @@ export class EmitterInstance { this._currentSpawnDelay += delta.value; if (this._currentSpawnDelay >= this._spawnDelay) { - this._engine.dispatchEvent("emitterPlay", { - container: this.container, - }); + this._container.dispatchEvent("emitterPlay"); this.play(); @@ -355,7 +354,7 @@ export class EmitterInstance { } private _calcPosition(): ICoordinates { - const container = this.container; + const container = this._container; if (this.options.domId) { const element = safeDocument().getElementById(this.options.domId); @@ -378,7 +377,7 @@ export class EmitterInstance { } private _calcSize(): IDimensionWithMode { - const container = this.container; + const container = this._container; if (this.options.domId) { const element = safeDocument().getElementById(this.options.domId); @@ -417,13 +416,10 @@ export class EmitterInstance { this._resizeObserver?.disconnect(); this._resizeObserver = undefined; - this.removeCallback(this); + this._removeCallback(this); - this._engine.dispatchEvent("emitterDestroyed", { - container: this.container, - data: { - emitter: this, - }, + this._container.dispatchEvent("emitterDestroyed", { + emitter: this, }); }; @@ -455,7 +451,7 @@ export class EmitterInstance { this.options.spawn.stroke?.width === undefined ? defaultStrokeWidth : getRangeValue(this.options.spawn.stroke.width), - reduceFactor = this.container.retina.reduceFactor, + reduceFactor = this._container.retina.reduceFactor, needsFillColorAnimation = !!fillHslAnimation, needsStrokeColorAnimation = !!strokeHslAnimation, needsShapeData = !!this._shape, @@ -538,7 +534,7 @@ export class EmitterInstance { } if (position) { - this.container.particles.addParticle(position, particlesOptions); + this._container.particles.addParticle(position, particlesOptions); } } } @@ -563,7 +559,7 @@ export class EmitterInstance { maxValue: number, factor: number = defaultColorAnimationFactor, ): number => { - const container = this.container; + const container = this._container; if (!animation.enable) { return initValue; diff --git a/plugins/emitters/src/EmittersEngine.ts b/plugins/emitters/src/EmittersEngine.ts index dee644aab60..d6ad0c8fba9 100644 --- a/plugins/emitters/src/EmittersEngine.ts +++ b/plugins/emitters/src/EmittersEngine.ts @@ -1,8 +1,12 @@ +import type { InteractivityEngine, InteractivityPluginManager } from "@tsparticles/plugin-interactivity"; import type { IEmitterShapeGenerator } from "./IEmitterShapeGenerator.js"; -import type { InteractivityEngine } from "@tsparticles/plugin-interactivity"; import type { ShapeManager } from "./ShapeManager.js"; -export type EmittersEngine = InteractivityEngine & { +export type EmittersPluginManager = InteractivityPluginManager & { addEmitterShapeGenerator?: (name: string, shape: IEmitterShapeGenerator) => void; emitterShapeManager?: ShapeManager; }; + +export type EmittersEngine = InteractivityEngine & { + pluginManager: EmittersPluginManager; +}; diff --git a/plugins/emitters/src/EmittersInstancesManager.ts b/plugins/emitters/src/EmittersInstancesManager.ts index c38b3e68cee..d46e0da80bc 100644 --- a/plugins/emitters/src/EmittersInstancesManager.ts +++ b/plugins/emitters/src/EmittersInstancesManager.ts @@ -2,18 +2,18 @@ import { type ICoordinates, type RecursivePartial, isNumber } from "@tsparticles import { Emitter } from "./Options/Classes/Emitter.js"; import type { EmitterContainer } from "./EmitterContainer.js"; import type { EmitterInstance } from "./EmitterInstance.js"; -import type { EmittersEngine } from "./EmittersEngine.js"; +import type { EmittersPluginManager } from "./EmittersEngine.js"; import type { IEmitter } from "./Options/Interfaces/IEmitter.js"; const defaultIndex = 0; export class EmittersInstancesManager { private readonly _containerArrays; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: EmittersEngine) { + constructor(pluginManager: EmittersPluginManager) { this._containerArrays = new Map(); - this._engine = engine; + this._pluginManager = pluginManager; } async addEmitter( @@ -27,7 +27,7 @@ export class EmittersInstancesManager { const { EmitterInstance } = await import("./EmitterInstance.js"), emitter = new EmitterInstance( - this._engine, + this._pluginManager, container, (emitter: EmitterInstance) => { this.removeEmitter(container, emitter); diff --git a/plugins/emitters/src/index.ts b/plugins/emitters/src/index.ts index 8d8e60bfa64..aa12784df91 100644 --- a/plugins/emitters/src/index.ts +++ b/plugins/emitters/src/index.ts @@ -10,7 +10,7 @@ declare const __VERSION__: string; export async function loadEmittersPlugin(engine: EmittersEngine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: EmittersEngine) => { + await engine.pluginManager.register(async (e: EmittersEngine) => { const [ { ensureInteractivityPluginLoaded }, { ShapeManager }, @@ -22,18 +22,19 @@ export async function loadEmittersPlugin(engine: EmittersEngine): Promise import("./EmittersInstancesManager.js"), import("./EmittersPlugin.js"), ]), - instancesManager = new EmittersInstancesManager(e); + pluginManager = e.pluginManager, + instancesManager = new EmittersInstancesManager(pluginManager); ensureInteractivityPluginLoaded(e); - e.emitterShapeManager ??= new ShapeManager(); - e.addEmitterShapeGenerator ??= (name: string, generator: IEmitterShapeGenerator): void => { - e.emitterShapeManager?.addShapeGenerator(name, generator); + pluginManager.emitterShapeManager ??= new ShapeManager(); + pluginManager.addEmitterShapeGenerator ??= (name: string, generator: IEmitterShapeGenerator): void => { + pluginManager.emitterShapeManager?.addShapeGenerator(name, generator); }; - e.addPlugin(new EmittersPlugin(instancesManager)); + pluginManager.addPlugin(new EmittersPlugin(instancesManager)); - e.addInteractor?.("externalEmitters", async container => { + pluginManager.addInteractor?.("externalEmitters", async container => { const { EmittersInteractor } = await import("./EmittersInteractor.js"); return new EmittersInteractor(instancesManager, container as EmitterContainer); @@ -45,7 +46,7 @@ export async function loadEmittersPlugin(engine: EmittersEngine): Promise * @param e - */ export function ensureEmittersPluginLoaded(e: EmittersEngine): void { - if (!e.addEmitterShapeGenerator) { + if (!e.pluginManager.addEmitterShapeGenerator) { throw new Error("tsParticles Emitters Plugin is not loaded"); } } diff --git a/plugins/emittersShapes/canvas/CHANGELOG.md b/plugins/emittersShapes/canvas/CHANGELOG.md index 6a1c19560a6..6683f36dcc6 100644 --- a/plugins/emittersShapes/canvas/CHANGELOG.md +++ b/plugins/emittersShapes/canvas/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-emitters-shape-canvas + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-emitters-shape-canvas diff --git a/plugins/emittersShapes/canvas/package.dist.json b/plugins/emittersShapes/canvas/package.dist.json index 9139c691350..83f1e7c966f 100644 --- a/plugins/emittersShapes/canvas/package.dist.json +++ b/plugins/emittersShapes/canvas/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters-shape-canvas", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters shape canvas plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,9 +100,9 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "4.0.0-beta.0", - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-emitters": "4.0.0-beta.0" + "@tsparticles/canvas-utils": "4.0.0-beta.1", + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-emitters": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/emittersShapes/canvas/package.json b/plugins/emittersShapes/canvas/package.json index f7fdda79af2..9c4d9104d94 100644 --- a/plugins/emittersShapes/canvas/package.json +++ b/plugins/emittersShapes/canvas/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters-shape-canvas", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters shape canvas plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,9 +108,9 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.0" + "@tsparticles/canvas-utils": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/emittersShapes/canvas/src/EmittersCanvasShape.ts b/plugins/emittersShapes/canvas/src/EmittersCanvasShape.ts index 367b0216ea1..5e63a85e77f 100644 --- a/plugins/emittersShapes/canvas/src/EmittersCanvasShape.ts +++ b/plugins/emittersShapes/canvas/src/EmittersCanvasShape.ts @@ -81,7 +81,7 @@ export class EmittersCanvasShape extends EmitterShapeBase(selector)); @@ -89,7 +89,7 @@ export class EmittersCanvasShape extends EmitterShapeBase { engine.checkVersion(__VERSION__); - await engine.register(async (e: EmittersEngine) => { + await engine.pluginManager.register(async (e: EmittersEngine) => { const { ensureEmittersPluginLoaded } = await import("@tsparticles/plugin-emitters"); ensureEmittersPluginLoaded(e); const { EmittersCanvasShapeGenerator } = await import("./EmittersCanvasShapeGenerator.js"); - e.addEmitterShapeGenerator?.("canvas", new EmittersCanvasShapeGenerator()); + e.pluginManager.addEmitterShapeGenerator?.("canvas", new EmittersCanvasShapeGenerator()); }); } diff --git a/plugins/emittersShapes/circle/CHANGELOG.md b/plugins/emittersShapes/circle/CHANGELOG.md index d4b9f74a427..52997ed3391 100644 --- a/plugins/emittersShapes/circle/CHANGELOG.md +++ b/plugins/emittersShapes/circle/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-emitters-shape-circle + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-emitters-shape-circle diff --git a/plugins/emittersShapes/circle/package.dist.json b/plugins/emittersShapes/circle/package.dist.json index 0a28a97cbaf..a670133913a 100644 --- a/plugins/emittersShapes/circle/package.dist.json +++ b/plugins/emittersShapes/circle/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters-shape-circle", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters shape circle plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,8 +100,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-emitters": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-emitters": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/emittersShapes/circle/package.json b/plugins/emittersShapes/circle/package.json index 3f593c40e81..de1dab75580 100644 --- a/plugins/emittersShapes/circle/package.json +++ b/plugins/emittersShapes/circle/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters-shape-circle", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters shape circle plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,8 +108,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/emittersShapes/circle/src/index.ts b/plugins/emittersShapes/circle/src/index.ts index ac05afb57e4..467bdc078f6 100644 --- a/plugins/emittersShapes/circle/src/index.ts +++ b/plugins/emittersShapes/circle/src/index.ts @@ -9,13 +9,13 @@ declare const __VERSION__: string; export async function loadEmittersShapeCircle(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: EmittersEngine) => { + await engine.pluginManager.register(async (e: EmittersEngine) => { const { ensureEmittersPluginLoaded } = await import("@tsparticles/plugin-emitters"); ensureEmittersPluginLoaded(e); const { EmittersCircleShapeGenerator } = await import("./EmittersCircleShapeGenerator.js"); - e.addEmitterShapeGenerator?.("circle", new EmittersCircleShapeGenerator()); + e.pluginManager.addEmitterShapeGenerator?.("circle", new EmittersCircleShapeGenerator()); }); } diff --git a/plugins/emittersShapes/path/CHANGELOG.md b/plugins/emittersShapes/path/CHANGELOG.md index 61dede3f28c..3b2bf11252a 100644 --- a/plugins/emittersShapes/path/CHANGELOG.md +++ b/plugins/emittersShapes/path/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-emitters-shape-path + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-emitters-shape-path diff --git a/plugins/emittersShapes/path/package.dist.json b/plugins/emittersShapes/path/package.dist.json index 1da6c0c70c3..4964a0a1380 100644 --- a/plugins/emittersShapes/path/package.dist.json +++ b/plugins/emittersShapes/path/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters-shape-path", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters shape path plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,8 +100,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-emitters": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-emitters": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/emittersShapes/path/package.json b/plugins/emittersShapes/path/package.json index 56177d29864..19a39fcc007 100644 --- a/plugins/emittersShapes/path/package.json +++ b/plugins/emittersShapes/path/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters-shape-path", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters shape path plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,8 +108,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/emittersShapes/path/src/EmittersPathShape.ts b/plugins/emittersShapes/path/src/EmittersPathShape.ts index c742f0dab8b..e3cb59141ac 100644 --- a/plugins/emittersShapes/path/src/EmittersPathShape.ts +++ b/plugins/emittersShapes/path/src/EmittersPathShape.ts @@ -1,4 +1,5 @@ import { + type CanvasContextType, type Container, type ICoordinates, type IDimension, @@ -11,7 +12,7 @@ import { generateRandomPointOnPathPerimeter, generateRandomPointWithinPath } fro import type { EmittersPathShapeOptions } from "./Options/Classes/EmittersPathShapeOptions.js"; export class EmittersPathShape extends EmitterShapeBase { - checkContext: CanvasRenderingContext2D; + checkContext: CanvasContextType; path: Path2D; points: ICoordinates[]; @@ -24,7 +25,7 @@ export class EmittersPathShape extends EmitterShapeBase { engine.checkVersion(__VERSION__); - await engine.register(async (e: EmittersEngine) => { + await engine.pluginManager.register(async (e: EmittersEngine) => { const { ensureEmittersPluginLoaded } = await import("@tsparticles/plugin-emitters"); ensureEmittersPluginLoaded(e); const { EmittersPathShapeGenerator } = await import("./EmittersPathShapeGenerator.js"); - e.addEmitterShapeGenerator?.("path", new EmittersPathShapeGenerator()); + e.pluginManager.addEmitterShapeGenerator?.("path", new EmittersPathShapeGenerator()); }); } diff --git a/plugins/emittersShapes/path/src/utils.ts b/plugins/emittersShapes/path/src/utils.ts index 6f53e3054f0..a2b72850482 100644 --- a/plugins/emittersShapes/path/src/utils.ts +++ b/plugins/emittersShapes/path/src/utils.ts @@ -1,4 +1,4 @@ -import { type ICoordinates, type IDimension, getRandom, half } from "@tsparticles/engine"; +import { type CanvasContextType, type ICoordinates, type IDimension, getRandom, half } from "@tsparticles/engine"; const maxAttempts = 100; @@ -11,7 +11,7 @@ const maxAttempts = 100; * @returns the random point within the path */ export function generateRandomPointWithinPath( - ctx: CanvasRenderingContext2D, + ctx: CanvasContextType, path: Path2D, center: ICoordinates, size: IDimension, @@ -43,7 +43,7 @@ export function generateRandomPointWithinPath( * @returns the random point on the perimeter of the path */ export function generateRandomPointOnPathPerimeter( - ctx: CanvasRenderingContext2D, + ctx: CanvasContextType, path: Path2D, center: ICoordinates, size: IDimension, diff --git a/plugins/emittersShapes/polygon/CHANGELOG.md b/plugins/emittersShapes/polygon/CHANGELOG.md index 9b37f763018..86935bb9c3b 100644 --- a/plugins/emittersShapes/polygon/CHANGELOG.md +++ b/plugins/emittersShapes/polygon/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-emitters-shape-polygon + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-emitters-shape-polygon diff --git a/plugins/emittersShapes/polygon/package.dist.json b/plugins/emittersShapes/polygon/package.dist.json index d31f2c790b9..fd6b8ab4a34 100644 --- a/plugins/emittersShapes/polygon/package.dist.json +++ b/plugins/emittersShapes/polygon/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters-shape-polygon", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters shape polygon plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,8 +100,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-emitters": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-emitters": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/emittersShapes/polygon/package.json b/plugins/emittersShapes/polygon/package.json index b6035a6a185..bdc273884d7 100644 --- a/plugins/emittersShapes/polygon/package.json +++ b/plugins/emittersShapes/polygon/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters-shape-polygon", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters shape polygon plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,8 +108,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/emittersShapes/polygon/src/index.ts b/plugins/emittersShapes/polygon/src/index.ts index 6403e9a01ef..9141f57d2c3 100644 --- a/plugins/emittersShapes/polygon/src/index.ts +++ b/plugins/emittersShapes/polygon/src/index.ts @@ -9,13 +9,13 @@ declare const __VERSION__: string; export async function loadEmittersShapePolygon(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: EmittersEngine) => { + await engine.pluginManager.register(async (e: EmittersEngine) => { const { ensureEmittersPluginLoaded } = await import("@tsparticles/plugin-emitters"); ensureEmittersPluginLoaded(e); const { EmittersPolygonShapeGenerator } = await import("./EmittersPolygonShapeGenerator.js"); - e.addEmitterShapeGenerator?.("polygon", new EmittersPolygonShapeGenerator()); + e.pluginManager.addEmitterShapeGenerator?.("polygon", new EmittersPolygonShapeGenerator()); }); } diff --git a/plugins/emittersShapes/square/CHANGELOG.md b/plugins/emittersShapes/square/CHANGELOG.md index 4a1c7a60a09..95fb751a0bf 100644 --- a/plugins/emittersShapes/square/CHANGELOG.md +++ b/plugins/emittersShapes/square/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-emitters-shape-square + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-emitters-shape-square diff --git a/plugins/emittersShapes/square/package.dist.json b/plugins/emittersShapes/square/package.dist.json index 5f24bb49134..686c3ba87e0 100644 --- a/plugins/emittersShapes/square/package.dist.json +++ b/plugins/emittersShapes/square/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters-shape-square", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters shape square plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,8 +100,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-emitters": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-emitters": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/emittersShapes/square/package.json b/plugins/emittersShapes/square/package.json index 01a4f58b6b7..cd3ea02c504 100644 --- a/plugins/emittersShapes/square/package.json +++ b/plugins/emittersShapes/square/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-emitters-shape-square", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emitters shape square plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,8 +108,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-emitters": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/emittersShapes/square/src/index.ts b/plugins/emittersShapes/square/src/index.ts index aa9003eaa67..d1e61c5e45e 100644 --- a/plugins/emittersShapes/square/src/index.ts +++ b/plugins/emittersShapes/square/src/index.ts @@ -9,13 +9,13 @@ declare const __VERSION__: string; export async function loadEmittersShapeSquare(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: EmittersEngine) => { + await engine.pluginManager.register(async (e: EmittersEngine) => { const { ensureEmittersPluginLoaded } = await import("@tsparticles/plugin-emitters"); ensureEmittersPluginLoaded(e); const { EmittersSquareShapeGenerator } = await import("./EmittersSquareShapeGenerator.js"); - e.addEmitterShapeGenerator?.("square", new EmittersSquareShapeGenerator()); + e.pluginManager.addEmitterShapeGenerator?.("square", new EmittersSquareShapeGenerator()); }); } diff --git a/plugins/exports/image/CHANGELOG.md b/plugins/exports/image/CHANGELOG.md index 1ff9b61dd74..9143b815adf 100644 --- a/plugins/exports/image/CHANGELOG.md +++ b/plugins/exports/image/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-export-image + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-export-image diff --git a/plugins/exports/image/package.dist.json b/plugins/exports/image/package.dist.json index a0530536264..5b0ce17aa69 100644 --- a/plugins/exports/image/package.dist.json +++ b/plugins/exports/image/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-export-image", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles export image plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/exports/image/package.json b/plugins/exports/image/package.json index 53b7de4d495..53ed6303f75 100644 --- a/plugins/exports/image/package.json +++ b/plugins/exports/image/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-export-image", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles export image plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/exports/image/src/index.ts b/plugins/exports/image/src/index.ts index 0ebc5a22bf8..66f4d90991a 100644 --- a/plugins/exports/image/src/index.ts +++ b/plugins/exports/image/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadExportImagePlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { ExportImagePlugin } = await import("./ExportImagePlugin.js"); - e.addPlugin(new ExportImagePlugin()); + e.pluginManager.addPlugin(new ExportImagePlugin()); }); } diff --git a/plugins/exports/json/CHANGELOG.md b/plugins/exports/json/CHANGELOG.md index 65140178784..9b912843760 100644 --- a/plugins/exports/json/CHANGELOG.md +++ b/plugins/exports/json/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-export-json + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-export-json diff --git a/plugins/exports/json/package.dist.json b/plugins/exports/json/package.dist.json index 6ced1ad3f7f..04f69b8c45e 100644 --- a/plugins/exports/json/package.dist.json +++ b/plugins/exports/json/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-export-json", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles export json plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/exports/json/package.json b/plugins/exports/json/package.json index e16afad2486..cd4624ad639 100644 --- a/plugins/exports/json/package.json +++ b/plugins/exports/json/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-export-json", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles export json plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/exports/json/src/index.ts b/plugins/exports/json/src/index.ts index c3e9e0fc2b1..99285d6c225 100644 --- a/plugins/exports/json/src/index.ts +++ b/plugins/exports/json/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadExportJSONPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { ExportJSONPlugin } = await import("./ExportJSONPlugin.js"); - e.addPlugin(new ExportJSONPlugin()); + e.pluginManager.addPlugin(new ExportJSONPlugin()); }); } diff --git a/plugins/exports/video/CHANGELOG.md b/plugins/exports/video/CHANGELOG.md index 64d1dd2b65f..f505baf997d 100644 --- a/plugins/exports/video/CHANGELOG.md +++ b/plugins/exports/video/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-export-video + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-export-video diff --git a/plugins/exports/video/package.dist.json b/plugins/exports/video/package.dist.json index ba25ba9da3d..334d445a0e3 100644 --- a/plugins/exports/video/package.dist.json +++ b/plugins/exports/video/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-export-video", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles export video plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/exports/video/package.json b/plugins/exports/video/package.json index b0c25e2fd49..8dc9de24948 100644 --- a/plugins/exports/video/package.json +++ b/plugins/exports/video/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-export-video", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles export video plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/exports/video/src/index.ts b/plugins/exports/video/src/index.ts index 197aafa6a55..179690ed941 100644 --- a/plugins/exports/video/src/index.ts +++ b/plugins/exports/video/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadExportVideoPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { ExportVideoPlugin } = await import("./ExportVideoPlugin.js"); - e.addPlugin(new ExportVideoPlugin()); + e.pluginManager.addPlugin(new ExportVideoPlugin()); }); } diff --git a/plugins/infection/CHANGELOG.md b/plugins/infection/CHANGELOG.md index 348667fd78b..462f4a420b8 100644 --- a/plugins/infection/CHANGELOG.md +++ b/plugins/infection/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-infection + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-infection diff --git a/plugins/infection/package.dist.json b/plugins/infection/package.dist.json index 9ef68d79dbe..3347c9ac64b 100644 --- a/plugins/infection/package.dist.json +++ b/plugins/infection/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-infection", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles infection plugin", "homepage": "https://particles.js.org", "repository": { @@ -100,8 +100,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/infection/package.json b/plugins/infection/package.json index 90902e5d8f2..6f8beff2133 100644 --- a/plugins/infection/package.json +++ b/plugins/infection/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-infection", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles infection plugin", "homepage": "https://particles.js.org", "scripts": { @@ -108,8 +108,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-interactivity": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/infection/src/index.ts b/plugins/infection/src/index.ts index 7ab55678e04..3ce985e7501 100644 --- a/plugins/infection/src/index.ts +++ b/plugins/infection/src/index.ts @@ -9,7 +9,7 @@ declare const __VERSION__: string; export async function loadInfectionPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async (e: InteractivityEngine) => { + await engine.pluginManager.register(async (e: InteractivityEngine) => { const [ { ensureInteractivityPluginLoaded }, { InfectionPlugin }, @@ -20,9 +20,9 @@ export async function loadInfectionPlugin(engine: Engine): Promise { ensureInteractivityPluginLoaded(e); - e.addPlugin(new InfectionPlugin()); + e.pluginManager.addPlugin(new InfectionPlugin()); - e.addInteractor?.("particlesInfection", async container => { + e.pluginManager.addInteractor?.("particlesInfection", async container => { const { ParticlesInfecter } = await import("./ParticlesInfecter.js"); return new ParticlesInfecter(container); diff --git a/plugins/interactivity/CHANGELOG.md b/plugins/interactivity/CHANGELOG.md index 5d62ae3553e..b3708f11a4d 100644 --- a/plugins/interactivity/CHANGELOG.md +++ b/plugins/interactivity/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +### Bug Fixes + +- improved cannon and interactivity events ([b836a59](https://github.com/tsparticles/tsparticles/commit/b836a59e90afdc68b6307e8d37898e71b5881a21)) + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-interactivity diff --git a/plugins/interactivity/package.dist.json b/plugins/interactivity/package.dist.json index 4be1751cca5..22478ad0f12 100644 --- a/plugins/interactivity/package.dist.json +++ b/plugins/interactivity/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-interactivity", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles interactivity sickness plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,7 +86,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/interactivity/package.json b/plugins/interactivity/package.json index d9bd38f9dc8..d36f5c599d5 100644 --- a/plugins/interactivity/package.json +++ b/plugins/interactivity/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-interactivity", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles interactivity sickness plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,7 +94,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/interactivity/src/InteractionManager.ts b/plugins/interactivity/src/InteractionManager.ts index 85c897eac3e..447eaee4548 100644 --- a/plugins/interactivity/src/InteractionManager.ts +++ b/plugins/interactivity/src/InteractionManager.ts @@ -16,8 +16,8 @@ import type { IExternalInteractor } from "./Interfaces/IExternalInteractor.js"; import type { IInteractivityData } from "./Interfaces/IInteractivityData.js"; import type { IInteractor } from "./Interfaces/IInteractor.js"; import type { IParticlesInteractor } from "./Interfaces/IParticlesInteractor.js"; -import type { InteractivityEngine } from "./types.js"; import { InteractivityEventListeners } from "./InteractivityEventListeners.js"; +import type { InteractivityPluginManager } from "./types.js"; import { InteractorType } from "./Enums/InteractorType.js"; const clickRadius = 1, @@ -31,12 +31,6 @@ export class InteractionManager { private readonly _clickHandlers; - /** - * The engine used for registering the interactions managers - * @internal - */ - private readonly _engine; - private readonly _eventListeners; /** @@ -59,16 +53,22 @@ export class InteractionManager { */ private _particleInteractors: IParticlesInteractor[]; + /** + * The plugin manager used for registering the interactions managers + * @internal + */ + private readonly _pluginManager; + /** * The constructor of the interaction manager - * @param engine - the parent engine + * @param pluginManager - the parent engine * @param container - the parent container */ constructor( - engine: InteractivityEngine, + pluginManager: InteractivityPluginManager, private readonly container: Container, ) { - this._engine = engine; + this._pluginManager = pluginManager; this._interactors = []; this._externalInteractors = []; this._particleInteractors = []; @@ -256,7 +256,7 @@ export class InteractionManager { } async initInteractors(): Promise { - const interactors = await this._engine.getInteractors?.(this.container, true); + const interactors = await this._pluginManager.getInteractors?.(this.container, true); if (!interactors) { return; diff --git a/plugins/interactivity/src/InteractivityConstants.ts b/plugins/interactivity/src/InteractivityConstants.ts index e13280ac22d..b2c2a89dd7a 100644 --- a/plugins/interactivity/src/InteractivityConstants.ts +++ b/plugins/interactivity/src/InteractivityConstants.ts @@ -2,7 +2,6 @@ export const clickEvent = "click", mouseDownEvent = "pointerdown", mouseUpEvent = "pointerup", mouseLeaveEvent = "pointerleave", - mouseOutEvent = "pointerout", mouseMoveEvent = "pointermove", touchStartEvent = "touchstart", touchEndEvent = "touchend", diff --git a/plugins/interactivity/src/InteractivityEventListeners.ts b/plugins/interactivity/src/InteractivityEventListeners.ts index f7542900b89..317b87f7e3b 100644 --- a/plugins/interactivity/src/InteractivityEventListeners.ts +++ b/plugins/interactivity/src/InteractivityEventListeners.ts @@ -5,13 +5,13 @@ import { executeOnSingleOrMultiple, lengthOffset, manageListener, + safeDocument, visibilityChangeEvent, } from "@tsparticles/engine"; import { mouseDownEvent, mouseLeaveEvent, mouseMoveEvent, - mouseOutEvent, mouseUpEvent, touchCancelEvent, touchEndEvent, @@ -160,10 +160,7 @@ export class InteractivityEventListeners { this._mouseTouchFinish(); }; - private readonly _manageInteractivityListeners: (mouseLeaveTmpEvent: string, add: boolean) => void = ( - mouseLeaveTmpEvent, - add, - ) => { + private readonly _manageInteractivityListeners: (add: boolean) => void = add => { const handlers = this._handlers, container = this._container, interactionManager = this._interactionManager, @@ -204,7 +201,7 @@ export class InteractivityEventListeners { manageListener(interactivityEl, touchEndEvent, handlers.touchEnd, add); } - manageListener(interactivityEl, mouseLeaveTmpEvent, handlers.mouseLeave, add); + manageListener(interactivityEl, mouseLeaveEvent, handlers.mouseLeave, add); manageListener(interactivityEl, touchCancelEvent, handlers.touchCancel, add); }; @@ -220,20 +217,16 @@ export class InteractivityEventListeners { detectType = options.interactivity?.detectsOn, canvasEl = container.canvas.element; - let mouseLeaveTmpEvent = mouseLeaveEvent; - /* events target element */ if (detectType === InteractivityDetect.window) { - interactionManager.interactivityData.element = globalThis; - - mouseLeaveTmpEvent = mouseOutEvent; + interactionManager.interactivityData.element = safeDocument(); } else if (detectType === InteractivityDetect.parent && canvasEl) { interactionManager.interactivityData.element = canvasEl.parentElement ?? canvasEl.parentNode; } else { interactionManager.interactivityData.element = canvasEl; } - this._manageInteractivityListeners(mouseLeaveTmpEvent, add); + this._manageInteractivityListeners(add); manageListener(document, visibilityChangeEvent, handlers.visibilityChange, add, false); }; @@ -326,7 +319,7 @@ export class InteractivityEventListeners { const mouseEvent = e as MouseEvent; - if (interactivity.element === globalThis) { + if (interactivity.element === safeDocument()) { if (canvasEl) { const clientRect = canvasEl.getBoundingClientRect(); diff --git a/plugins/interactivity/src/InteractivityPlugin.ts b/plugins/interactivity/src/InteractivityPlugin.ts index 127b9433db7..9fbf39c6a22 100644 --- a/plugins/interactivity/src/InteractivityPlugin.ts +++ b/plugins/interactivity/src/InteractivityPlugin.ts @@ -8,9 +8,9 @@ import { import type { IInteractivityOptions, IInteractivityParticlesOptions, - InteractivityEngine, InteractivityOptions, InteractivityParticlesOptions, + InteractivityPluginManager, } from "./types.js"; import type { IInteractivity } from "./Options/Interfaces/IInteractivity.js"; import type { IParticleInteractorBase } from "./Interfaces/IParticleInteractorBase.js"; @@ -21,16 +21,16 @@ import { Interactivity } from "./Options/Classes/Interactivity.js"; export class InteractivityPlugin implements IPlugin { readonly id = "interactivity"; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: InteractivityEngine) { - this._engine = engine; + constructor(pluginManager: InteractivityPluginManager) { + this._pluginManager = pluginManager; } async getPlugin(container: Container): Promise { const { InteractivityPluginInstance } = await import("./InteractivityPluginInstance.js"); - return new InteractivityPluginInstance(this._engine, container); + return new InteractivityPluginInstance(this._pluginManager, container); } loadOptions( @@ -45,12 +45,12 @@ export class InteractivityPlugin implements IPlugin { let interactivityOptions = options.interactivity; if (!interactivityOptions?.load) { - options.interactivity = interactivityOptions = new Interactivity(this._engine, container); + options.interactivity = interactivityOptions = new Interactivity(this._pluginManager, container); } interactivityOptions.load(source?.interactivity); - const interactors = this._engine.interactors?.get(container); + const interactors = this._pluginManager.interactors?.get(container); if (!interactors) { return; @@ -72,7 +72,7 @@ export class InteractivityPlugin implements IPlugin { options.interactivity = deepExtend({}, source.interactivity) as RecursivePartial; } - const interactors = this._engine.interactors?.get(container) as IParticleInteractorBase[] | undefined; + const interactors = this._pluginManager.interactors?.get(container) as IParticleInteractorBase[] | undefined; if (!interactors) { return; diff --git a/plugins/interactivity/src/InteractivityPluginInstance.ts b/plugins/interactivity/src/InteractivityPluginInstance.ts index 54872d217b5..2748740bfda 100644 --- a/plugins/interactivity/src/InteractivityPluginInstance.ts +++ b/plugins/interactivity/src/InteractivityPluginInstance.ts @@ -1,5 +1,5 @@ import { type IContainerPlugin, type IDelta, type Particle } from "@tsparticles/engine"; -import type { InteractivityContainer, InteractivityEngine, InteractivityParticle } from "./types.js"; +import type { InteractivityContainer, InteractivityParticle, InteractivityPluginManager } from "./types.js"; import { InteractionManager } from "./InteractionManager.js"; import { Interactivity } from "./Options/Classes/Interactivity.js"; @@ -7,12 +7,12 @@ export class InteractivityPluginInstance implements IContainerPlugin { readonly interactionManager: InteractionManager; private readonly _container; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: InteractivityEngine, container: InteractivityContainer) { + constructor(pluginManager: InteractivityPluginManager, container: InteractivityContainer) { this._container = container; - this._engine = engine; - this.interactionManager = new InteractionManager(engine, container); + this._pluginManager = pluginManager; + this.interactionManager = new InteractionManager(pluginManager, container); this._container.addClickHandler = (callback: (evt: Event, particles?: Particle[]) => void): void => { this.interactionManager.addClickHandler(callback); @@ -34,12 +34,12 @@ export class InteractivityPluginInstance implements IContainerPlugin { destroy(): void { this.clearClickHandlers(); - this._engine.interactors?.delete(this._container); + this._pluginManager.interactors?.delete(this._container); } particleCreated(particle: Particle): void { const interactivityParticle = particle as InteractivityParticle, - interactivity = new Interactivity(this._engine, this._container); + interactivity = new Interactivity(this._pluginManager, this._container); interactivity.load(this._container.actualOptions.interactivity); interactivity.load(interactivityParticle.options.interactivity); diff --git a/plugins/interactivity/src/Options/Classes/Interactivity.ts b/plugins/interactivity/src/Options/Classes/Interactivity.ts index 0442f52a7bc..a50de567dc3 100644 --- a/plugins/interactivity/src/Options/Classes/Interactivity.ts +++ b/plugins/interactivity/src/Options/Classes/Interactivity.ts @@ -2,7 +2,7 @@ import { type Container, type IOptionLoader, type RecursivePartial, isNull } fro import { Events } from "./Events/Events.js"; import type { IInteractivity } from "../Interfaces/IInteractivity.js"; import { InteractivityDetect } from "../../Enums/InteractivityDetect.js"; -import type { InteractivityEngine } from "../../types.js"; +import type { InteractivityPluginManager } from "../../types.js"; import { Modes } from "./Modes/Modes.js"; /** @@ -16,10 +16,10 @@ export class Interactivity implements IInteractivity, IOptionLoader): void { diff --git a/plugins/interactivity/src/Options/Classes/Modes/Modes.ts b/plugins/interactivity/src/Options/Classes/Modes/Modes.ts index 02b0131038a..7c135aaf364 100644 --- a/plugins/interactivity/src/Options/Classes/Modes/Modes.ts +++ b/plugins/interactivity/src/Options/Classes/Modes/Modes.ts @@ -1,7 +1,7 @@ import { type Container, type IOptionLoader, type RecursivePartial, isNull } from "@tsparticles/engine"; import type { IExternalInteractor } from "../../../Interfaces/IExternalInteractor.js"; import type { IModes } from "../../Interfaces/Modes/IModes.js"; -import type { InteractivityEngine } from "../../../types.js"; +import type { InteractivityPluginManager } from "../../../types.js"; /** * [[include:Options/Interactivity/Modes.md]] @@ -10,10 +10,10 @@ export class Modes implements IModes, IOptionLoader { [name: string]: unknown; private readonly _container; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: InteractivityEngine, container?: Container) { - this._engine = engine; + constructor(pluginManager: InteractivityPluginManager, container?: Container) { + this._pluginManager = pluginManager; this._container = container; } @@ -26,7 +26,7 @@ export class Modes implements IModes, IOptionLoader { return; } - const interactors = this._engine.interactors?.get(this._container) as IExternalInteractor[] | undefined; + const interactors = this._pluginManager.interactors?.get(this._container) as IExternalInteractor[] | undefined; if (!interactors) { return; diff --git a/plugins/interactivity/src/index.ts b/plugins/interactivity/src/index.ts index 8d0775781b8..0f4ccaa3365 100644 --- a/plugins/interactivity/src/index.ts +++ b/plugins/interactivity/src/index.ts @@ -10,24 +10,25 @@ declare const __VERSION__: string; export async function loadInteractivityPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const interactivityEngine = e as InteractivityEngine, + interactivityPluginManager = interactivityEngine.pluginManager, { InteractivityPlugin } = await import("./InteractivityPlugin.js"); - interactivityEngine.addPlugin(new InteractivityPlugin(interactivityEngine)); + interactivityPluginManager.addPlugin(new InteractivityPlugin(interactivityPluginManager)); - interactivityEngine.initializers.interactors ??= new Map(); - interactivityEngine.interactors ??= new Map(); + interactivityPluginManager.initializers.interactors ??= new Map(); + interactivityPluginManager.interactors ??= new Map(); /** * Adds an interaction manager to the current collection * @param name - the interaction manager name * @param interactorInitializer - the interaction manager initializer */ - interactivityEngine.addInteractor = (name: string, interactorInitializer: InteractorInitializer): void => { - interactivityEngine.initializers.interactors ??= new Map(); + interactivityPluginManager.addInteractor = (name: string, interactorInitializer: InteractorInitializer): void => { + interactivityPluginManager.initializers.interactors ??= new Map(); - interactivityEngine.initializers.interactors.set(name, interactorInitializer); + interactivityPluginManager.initializers.interactors.set(name, interactorInitializer); }; /** @@ -36,14 +37,14 @@ export async function loadInteractivityPlugin(engine: Engine): Promise { * @param force - if true reloads the interaction managers collection for the given container * @returns the array of interaction managers for the given container */ - interactivityEngine.getInteractors = async (container: Container, force = false): Promise => { - interactivityEngine.interactors ??= new Map(); - interactivityEngine.initializers.interactors ??= new Map(); + interactivityPluginManager.getInteractors = async (container: Container, force = false): Promise => { + interactivityPluginManager.interactors ??= new Map(); + interactivityPluginManager.initializers.interactors ??= new Map(); return getItemsFromInitializer( container, - interactivityEngine.interactors, - interactivityEngine.initializers.interactors, + interactivityPluginManager.interactors, + interactivityPluginManager.initializers.interactors, force, ); }; @@ -52,7 +53,7 @@ export async function loadInteractivityPlugin(engine: Engine): Promise { * Adds another click handler to all the loaded {@link Container} objects. * @param callback - The function called after the click event is fired */ - interactivityEngine.setOnClickHandler = (callback: (e: Event, particles?: Particle[]) => void): void => { + interactivityPluginManager.setOnClickHandler = (callback: (e: Event, particles?: Particle[]) => void): void => { const { items } = interactivityEngine; if (!items.length) { @@ -72,7 +73,7 @@ export async function loadInteractivityPlugin(engine: Engine): Promise { * @param e - */ export function ensureInteractivityPluginLoaded(e: InteractivityEngine): void { - if (!e.addInteractor) { + if (!e.pluginManager.addInteractor) { throw new Error("tsParticles Interactivity Plugin is not loaded"); } } diff --git a/plugins/interactivity/src/types.ts b/plugins/interactivity/src/types.ts index 0da83313ddb..9071e479a47 100644 --- a/plugins/interactivity/src/types.ts +++ b/plugins/interactivity/src/types.ts @@ -7,6 +7,7 @@ import type { Options, Particle, ParticlesOptions, + PluginManager, RecursivePartial, } from "@tsparticles/engine"; import type { IInteractivity } from "./Options/Interfaces/IInteractivity.js"; @@ -45,7 +46,7 @@ export type InteractivityParticlesOptions = RecursivePartial & */ export type InteractorInitializer = GenericInitializer; -export type InteractivityEngine = Engine & { +export type InteractivityPluginManager = PluginManager & { addInteractor?: (name: string, interactorInitializer: InteractorInitializer) => void; getInteractors?: (container: Container, force?: boolean) => Promise; @@ -58,3 +59,7 @@ export type InteractivityEngine = Engine & { setOnClickHandler?: (callback: (e: Event, particles?: Particle[]) => void) => void; }; + +export type InteractivityEngine = Engine & { + pluginManager: InteractivityPluginManager; +}; diff --git a/plugins/manualParticles/CHANGELOG.md b/plugins/manualParticles/CHANGELOG.md index e78392ff03d..9429018ccc2 100644 --- a/plugins/manualParticles/CHANGELOG.md +++ b/plugins/manualParticles/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-manual-particles + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-manual-particles diff --git a/plugins/manualParticles/package.dist.json b/plugins/manualParticles/package.dist.json index b3da11dbcb6..7bff3f23bbb 100644 --- a/plugins/manualParticles/package.dist.json +++ b/plugins/manualParticles/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-manual-particles", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles manual particles plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,7 +86,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/manualParticles/package.json b/plugins/manualParticles/package.json index 786d2c38de0..6ea8bcdab13 100644 --- a/plugins/manualParticles/package.json +++ b/plugins/manualParticles/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-manual-particles", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles manual particles plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,7 +94,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/manualParticles/src/index.ts b/plugins/manualParticles/src/index.ts index bc84c820517..01a407873eb 100644 --- a/plugins/manualParticles/src/index.ts +++ b/plugins/manualParticles/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadManualParticlesPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { ManualParticlesPlugin } = await import("./ManualParticlesPlugin.js"); - e.addPlugin(new ManualParticlesPlugin()); + e.pluginManager.addPlugin(new ManualParticlesPlugin()); }); } diff --git a/plugins/motion/CHANGELOG.md b/plugins/motion/CHANGELOG.md index c64a439b79e..fd7592f8ec7 100644 --- a/plugins/motion/CHANGELOG.md +++ b/plugins/motion/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-motion + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-motion diff --git a/plugins/motion/package.dist.json b/plugins/motion/package.dist.json index 027742b723d..cb4ad9a4b45 100644 --- a/plugins/motion/package.dist.json +++ b/plugins/motion/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-motion", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles motion sickness plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,7 +86,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/motion/package.json b/plugins/motion/package.json index c3414c79f5e..8d73f413898 100644 --- a/plugins/motion/package.json +++ b/plugins/motion/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-motion", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles motion sickness plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,7 +94,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/motion/src/index.ts b/plugins/motion/src/index.ts index d23b32a3b93..1a86290c0ed 100644 --- a/plugins/motion/src/index.ts +++ b/plugins/motion/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadMotionPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { MotionPlugin } = await import("./MotionPlugin.js"); - e.addPlugin(new MotionPlugin()); + e.pluginManager.addPlugin(new MotionPlugin()); }); } diff --git a/plugins/move/CHANGELOG.md b/plugins/move/CHANGELOG.md index 4e3bf84ac7a..5e3868f605f 100644 --- a/plugins/move/CHANGELOG.md +++ b/plugins/move/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-move + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-move diff --git a/plugins/move/package.dist.json b/plugins/move/package.dist.json index c6024de6ffc..1dd9e9c819b 100644 --- a/plugins/move/package.dist.json +++ b/plugins/move/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-move", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles Move plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,7 +86,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/move/package.json b/plugins/move/package.json index e57cabc9f8c..5febdc19fef 100644 --- a/plugins/move/package.json +++ b/plugins/move/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-move", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles Move plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,7 +94,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/move/src/MovePlugin.ts b/plugins/move/src/MovePlugin.ts index c8ffc59713a..c9b6d83c140 100644 --- a/plugins/move/src/MovePlugin.ts +++ b/plugins/move/src/MovePlugin.ts @@ -1,19 +1,19 @@ import type { Container, IContainerPlugin, IPlugin } from "@tsparticles/engine"; -import type { MoveEngine } from "./Types.js"; +import type { MovePluginManager } from "./Types.js"; export class MovePlugin implements IPlugin { id = "move"; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: MoveEngine) { - this._engine = engine; + constructor(pluginManager: MovePluginManager) { + this._pluginManager = pluginManager; } async getPlugin(container: Container): Promise { const { MovePluginInstance } = await import("./MovePluginInstance.js"); - return new MovePluginInstance(this._engine, container); + return new MovePluginInstance(this._pluginManager, container); } loadOptions(): void { diff --git a/plugins/move/src/MovePluginInstance.ts b/plugins/move/src/MovePluginInstance.ts index 52ce8700a0d..262cf2ef63a 100644 --- a/plugins/move/src/MovePluginInstance.ts +++ b/plugins/move/src/MovePluginInstance.ts @@ -5,14 +5,14 @@ import { decayOffset, getRangeMax, getRangeValue, + half, millisecondsToSeconds, } from "@tsparticles/engine"; -import type { MoveEngine, MoveParticle } from "./Types.js"; +import type { MoveParticle, MovePluginManager } from "./Types.js"; import { applyDistance, getProximitySpeedFactor, initSpin, move, spin } from "./Utils.js"; import type { IMovePathGenerator } from "./IMovePathGenerator.js"; -const diffFactor = 2, - defaultSizeFactor = 1, +const defaultSizeFactor = 1, defaultDeltaFactor = 1; export class MovePluginInstance implements IContainerPlugin { @@ -20,10 +20,10 @@ export class MovePluginInstance implements IContainerPlugin { pathGenerators: Map; private readonly _container; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: MoveEngine, container: Container) { - this._engine = engine; + constructor(pluginManager: MovePluginManager, container: Container) { + this._pluginManager = pluginManager; this._container = container; this.availablePathGenerators = new Map(); @@ -48,10 +48,11 @@ export class MovePluginInstance implements IContainerPlugin { */ particleCreated(particle: MoveParticle): void { const options = particle.options, - gravityOptions = options.move.gravity, - pathOptions = options.move.path; + moveOptions = options.move, + gravityOptions = moveOptions.gravity, + pathOptions = moveOptions.path; - particle.moveDecay = decayOffset - getRangeValue(options.move.decay); + particle.moveDecay = decayOffset - getRangeValue(moveOptions.decay); particle.pathDelay = getRangeValue(pathOptions.delay.value) * millisecondsToSeconds; if (pathOptions.generator) { @@ -76,7 +77,7 @@ export class MovePluginInstance implements IContainerPlugin { inverse: gravityOptions.inverse, }; - initSpin(particle); + initSpin(this._container, particle); } particleDestroyed(particle: MoveParticle): void { @@ -97,24 +98,20 @@ export class MovePluginInstance implements IContainerPlugin { return; } - const container = particle.container, - pxRatio = container.retina.pixelRatio; - - particle.retina.moveSpeed ??= getRangeValue(moveOptions.speed) * pxRatio; - particle.retina.moveDrift ??= getRangeValue(particle.options.move.drift) * pxRatio; - - const slowFactor = getProximitySpeedFactor(particle), + const container = this._container, + pxRatio = container.retina.pixelRatio, + slowFactor = getProximitySpeedFactor(particle), reduceFactor = container.retina.reduceFactor, baseSpeed = particle.retina.moveSpeed, moveDrift = particle.retina.moveDrift, maxSize = getRangeMax(particleOptions.size.value) * pxRatio, sizeFactor = moveOptions.size ? particle.getRadius() / maxSize : defaultSizeFactor, deltaFactor = delta.factor || defaultDeltaFactor, - moveSpeed = (baseSpeed * sizeFactor * slowFactor * deltaFactor) / diffFactor, - maxSpeed = particle.retina.maxSpeed ?? container.retina.maxSpeed; + moveSpeed = baseSpeed * sizeFactor * slowFactor * deltaFactor * half, + maxSpeed = particle.retina.maxSpeed; if (moveOptions.spin.enable) { - spin(particle, moveSpeed, reduceFactor); + spin(container, particle, moveSpeed, reduceFactor); } else { move(particle, moveOptions, moveSpeed, maxSpeed, moveDrift, reduceFactor, delta); } @@ -137,7 +134,7 @@ export class MovePluginInstance implements IContainerPlugin { } private async _init(): Promise { - const availablePathGenerators = await this._engine.getPathGenerators?.(this._container, true); + const availablePathGenerators = await this._pluginManager.getPathGenerators?.(this._container, true); if (!availablePathGenerators) { return; diff --git a/plugins/move/src/Types.ts b/plugins/move/src/Types.ts index dbf2657d71c..0f41b4586cf 100644 --- a/plugins/move/src/Types.ts +++ b/plugins/move/src/Types.ts @@ -1,11 +1,11 @@ -import type { Container, Engine, GenericInitializer, Particle } from "@tsparticles/engine"; +import type { Container, Engine, GenericInitializer, Particle, PluginManager } from "@tsparticles/engine"; import type { IMovePathGenerator } from "./IMovePathGenerator.js"; import type { IParticleGravity } from "./IParticleGravity.js"; import type { IParticleSpin } from "./IParticleSpin.js"; export type PathGeneratorInitializer = GenericInitializer; -export type MoveEngine = Engine & { +export type MovePluginManager = PluginManager & { addPathGenerator?: (name: string, generator: PathGeneratorInitializer) => void; getPathGenerators?: (container: Container, force?: boolean) => Promise>; @@ -17,6 +17,10 @@ export type MoveEngine = Engine & { pathGenerators?: Map>; }; +export type MoveEngine = Engine & { + pluginManager: MovePluginManager; +}; + export type MoveParticle = Particle & { /** * Gets particle gravity options diff --git a/plugins/move/src/Utils.ts b/plugins/move/src/Utils.ts index d74305c7eca..2f8dc6a042a 100644 --- a/plugins/move/src/Utils.ts +++ b/plugins/move/src/Utils.ts @@ -1,4 +1,5 @@ import { + type Container, type IDelta, type Move, type Particle, @@ -141,13 +142,12 @@ export function move( } /** + * @param container - * @param particle - * @param moveSpeed - * @param reduceFactor - */ -export function spin(particle: MoveParticle, moveSpeed: number, reduceFactor: number): void { - const container = particle.container; - +export function spin(container: Container, particle: MoveParticle, moveSpeed: number, reduceFactor: number): void { if (!particle.spin) { return; } @@ -222,11 +222,11 @@ export function getProximitySpeedFactor(particle: Particle): number { } /** + * @param container - * @param particle - */ -export function initSpin(particle: MoveParticle): void { - const container = particle.container, - options = particle.options, +export function initSpin(container: Container, particle: MoveParticle): void { + const options = particle.options, spinOptions = options.move.spin; if (!spinOptions.enable) { diff --git a/plugins/move/src/index.ts b/plugins/move/src/index.ts index a8c5308ae4a..7f766081fd9 100644 --- a/plugins/move/src/index.ts +++ b/plugins/move/src/index.ts @@ -10,41 +10,42 @@ declare const __VERSION__: string; export async function loadMovePlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { - const moveEngine = e as MoveEngine; + await engine.pluginManager.register(async e => { + const moveEngine = e as MoveEngine, + movePluginManager = moveEngine.pluginManager; - moveEngine.initializers.pathGenerators ??= new Map(); - moveEngine.pathGenerators ??= new Map>(); + movePluginManager.initializers.pathGenerators ??= new Map(); + movePluginManager.pathGenerators ??= new Map>(); /** * addPathGenerator adds a named path generator to tsParticles, this can be called by options * @param name - the path generator name * @param generator - the path generator object */ - moveEngine.addPathGenerator = (name: string, generator: PathGeneratorInitializer): void => { - moveEngine.initializers.pathGenerators ??= new Map(); + movePluginManager.addPathGenerator = (name: string, generator: PathGeneratorInitializer): void => { + movePluginManager.initializers.pathGenerators ??= new Map(); - moveEngine.initializers.pathGenerators.set(name, generator); + movePluginManager.initializers.pathGenerators.set(name, generator); }; - moveEngine.getPathGenerators = async ( + movePluginManager.getPathGenerators = async ( container: Container, force = false, ): Promise> => { - moveEngine.initializers.pathGenerators ??= new Map(); - moveEngine.pathGenerators ??= new Map>(); + movePluginManager.initializers.pathGenerators ??= new Map(); + movePluginManager.pathGenerators ??= new Map>(); return getItemMapFromInitializer( container, - moveEngine.pathGenerators, - moveEngine.initializers.pathGenerators, + movePluginManager.pathGenerators, + movePluginManager.initializers.pathGenerators, force, ); }; const { MovePlugin } = await import("./MovePlugin.js"); - e.addPlugin(new MovePlugin(e)); + e.pluginManager.addPlugin(new MovePlugin(e.pluginManager)); }); } @@ -52,7 +53,7 @@ export async function loadMovePlugin(engine: Engine): Promise { * @param e - */ export function ensureBaseMoverLoaded(e: MoveEngine): void { - if (!e.addPathGenerator) { + if (!e.pluginManager.addPathGenerator) { throw new Error("tsParticles Base Mover is not loaded"); } } diff --git a/plugins/poisson/CHANGELOG.md b/plugins/poisson/CHANGELOG.md index 088f88b577a..0eb214a8473 100644 --- a/plugins/poisson/CHANGELOG.md +++ b/plugins/poisson/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-poisson-disc + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-poisson-disc diff --git a/plugins/poisson/package.dist.json b/plugins/poisson/package.dist.json index 90389f6d4d4..8243c55a329 100644 --- a/plugins/poisson/package.dist.json +++ b/plugins/poisson/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-poisson-disc", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles poisson disc plugin", "homepage": "https://particles.js.org", "repository": { @@ -85,7 +85,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/poisson/package.json b/plugins/poisson/package.json index 490d3ee7277..9bf2eb2e839 100644 --- a/plugins/poisson/package.json +++ b/plugins/poisson/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-poisson-disc", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles poisson disc plugin", "homepage": "https://particles.js.org", "scripts": { @@ -78,7 +78,7 @@ "types": "dist/types/index.d.ts", "prettier": "@tsparticles/prettier-config", "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/poisson/src/PoissonDisc.ts b/plugins/poisson/src/PoissonDisc.ts index 50e7bb8ce75..1fa5027f7ab 100644 --- a/plugins/poisson/src/PoissonDisc.ts +++ b/plugins/poisson/src/PoissonDisc.ts @@ -237,7 +237,7 @@ export class PoissonDisc { return; } - // La cella è già occupata + // The cell is already occupied if (cellValue >= gridMinValue) { return; } diff --git a/plugins/poisson/src/index.ts b/plugins/poisson/src/index.ts index 98b5d8f8132..9bd34804e8b 100644 --- a/plugins/poisson/src/index.ts +++ b/plugins/poisson/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadPoissonDiscPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { PoissonDiscPlugin } = await import("./PoissonDiscPlugin.js"); - e.addPlugin(new PoissonDiscPlugin()); + e.pluginManager.addPlugin(new PoissonDiscPlugin()); }); } diff --git a/plugins/polygonMask/CHANGELOG.md b/plugins/polygonMask/CHANGELOG.md index 9e40a154d5f..0c6ddcd2ef9 100644 --- a/plugins/polygonMask/CHANGELOG.md +++ b/plugins/polygonMask/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-polygon-mask + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-polygon-mask diff --git a/plugins/polygonMask/package.dist.json b/plugins/polygonMask/package.dist.json index 4b9277d5b07..b0ff81c4bb0 100644 --- a/plugins/polygonMask/package.dist.json +++ b/plugins/polygonMask/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-polygon-mask", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles polygon mask plugin", "homepage": "https://particles.js.org", "repository": { @@ -88,7 +88,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/polygonMask/package.json b/plugins/polygonMask/package.json index bd38b37e853..4ff11254210 100644 --- a/plugins/polygonMask/package.json +++ b/plugins/polygonMask/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-polygon-mask", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles polygon mask plugin", "homepage": "https://particles.js.org", "scripts": { @@ -81,7 +81,7 @@ "dist/**/pathseg.js" ], "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/polygonMask/src/Options/Classes/PolygonMask.ts b/plugins/polygonMask/src/Options/Classes/PolygonMask.ts index 7fd91ecfaac..a510c06593b 100644 --- a/plugins/polygonMask/src/Options/Classes/PolygonMask.ts +++ b/plugins/polygonMask/src/Options/Classes/PolygonMask.ts @@ -1,7 +1,7 @@ import { - type Engine, type ICoordinates, type IOptionLoader, + type PluginManager, type RecursivePartial, deepExtend, isNull, @@ -28,8 +28,8 @@ export class PolygonMask implements IPolygonMask, IOptionLoader { type; url?: string; - constructor(engine: Engine) { - this.draw = new PolygonMaskDraw(engine); + constructor(pluginManager: PluginManager) { + this.draw = new PolygonMaskDraw(pluginManager); this.enable = false; this.inline = new PolygonMaskInline(); this.move = new PolygonMaskMove(); diff --git a/plugins/polygonMask/src/Options/Classes/PolygonMaskDraw.ts b/plugins/polygonMask/src/Options/Classes/PolygonMaskDraw.ts index b502de3bb3b..2ae1f360b4f 100644 --- a/plugins/polygonMask/src/Options/Classes/PolygonMaskDraw.ts +++ b/plugins/polygonMask/src/Options/Classes/PolygonMaskDraw.ts @@ -1,4 +1,4 @@ -import { type Engine, type IOptionLoader, type RecursivePartial, isNull } from "@tsparticles/engine"; +import { type IOptionLoader, type PluginManager, type RecursivePartial, isNull } from "@tsparticles/engine"; import type { IPolygonMaskDraw } from "../Interfaces/IPolygonMaskDraw.js"; import { PolygonMaskDrawStroke } from "./PolygonMaskDrawStroke.js"; @@ -8,9 +8,9 @@ export class PolygonMaskDraw implements IPolygonMaskDraw, IOptionLoader): void { diff --git a/plugins/polygonMask/src/Options/Classes/PolygonMaskDrawStroke.ts b/plugins/polygonMask/src/Options/Classes/PolygonMaskDrawStroke.ts index 6e418a852c4..3377c94ccb2 100644 --- a/plugins/polygonMask/src/Options/Classes/PolygonMaskDrawStroke.ts +++ b/plugins/polygonMask/src/Options/Classes/PolygonMaskDrawStroke.ts @@ -1,7 +1,7 @@ import { - type Engine, type IOptionLoader, OptionsColor, + type PluginManager, type RecursivePartial, isNull, isString, @@ -16,10 +16,10 @@ export class PolygonMaskDrawStroke implements IPolygonMaskDrawStroke, IOptionLoa opacity; width; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: Engine) { - this._engine = engine; + constructor(pluginManager: PluginManager) { + this._pluginManager = pluginManager; this.color = new OptionsColor(); this.width = 0.5; this.opacity = 1; @@ -33,7 +33,7 @@ export class PolygonMaskDrawStroke implements IPolygonMaskDrawStroke, IOptionLoa this.color = OptionsColor.create(this.color, data.color); if (isString(this.color.value)) { - this.opacity = stringToAlpha(this._engine, this.color.value) ?? this.opacity; + this.opacity = stringToAlpha(this._pluginManager, this.color.value) ?? this.opacity; } if (data.opacity !== undefined) { diff --git a/plugins/polygonMask/src/PolygonMaskInstance.ts b/plugins/polygonMask/src/PolygonMaskInstance.ts index bf53d2b7ba3..fb1c9b0ba4c 100644 --- a/plugins/polygonMask/src/PolygonMaskInstance.ts +++ b/plugins/polygonMask/src/PolygonMaskInstance.ts @@ -1,12 +1,13 @@ import "./pathseg.js"; import { - type Engine, + type CanvasContextType, type IContainerPlugin, type ICoordinates, type IDelta, type IDimension, OutModeDirection, type Particle, + type PluginManager, deepExtend, double, getDistance, @@ -40,13 +41,13 @@ export class PolygonMaskInstance implements IContainerPlugin { redrawTimeout?: number | NodeJS.Timeout; private readonly _container; - private readonly _engine; private _moveRadius; + private readonly _pluginManager; private _scale; - constructor(container: PolygonMaskContainer, engine: Engine) { + constructor(pluginManager: PluginManager, container: PolygonMaskContainer) { this._container = container; - this._engine = engine; + this._pluginManager = pluginManager; this.dimension = { height: 0, width: 0, @@ -66,7 +67,7 @@ export class PolygonMaskInstance implements IContainerPlugin { ); } - draw(context: CanvasRenderingContext2D): void { + draw(context: CanvasContextType): void { if (!this.paths?.length) { return; } @@ -89,9 +90,9 @@ export class PolygonMaskInstance implements IContainerPlugin { const path2d = path.path2d; if (path2d && this.offset) { - drawPolygonMaskPath(this._engine, context, path2d, polygonDraw.stroke, this.offset, this._container.hdr); + drawPolygonMaskPath(this._pluginManager, context, path2d, polygonDraw.stroke, this.offset, this._container.hdr); } else if (rawData) { - drawPolygonMask(this._engine, context, rawData, polygonDraw.stroke, this._container.hdr); + drawPolygonMask(this._pluginManager, context, rawData, polygonDraw.stroke, this._container.hdr); } } } @@ -454,9 +455,7 @@ export class PolygonMaskInstance implements IContainerPlugin { this._createPath2D(); - this._engine.dispatchEvent("polygonMaskLoaded", { - container: this._container, - }); + this._container.dispatchEvent("polygonMaskLoaded"); }; private readonly _parseSvgPath = (xml: string, force?: boolean): ICoordinates[] | undefined => { diff --git a/plugins/polygonMask/src/PolygonMaskPlugin.ts b/plugins/polygonMask/src/PolygonMaskPlugin.ts index 4a17fca7479..01ac84d7e36 100644 --- a/plugins/polygonMask/src/PolygonMaskPlugin.ts +++ b/plugins/polygonMask/src/PolygonMaskPlugin.ts @@ -1,4 +1,4 @@ -import type { Container, Engine, IContainerPlugin, IPlugin, RecursivePartial } from "@tsparticles/engine"; +import type { Container, IContainerPlugin, IPlugin, PluginManager, RecursivePartial } from "@tsparticles/engine"; import type { IPolygonMaskOptions, PolygonMaskOptions } from "./types.js"; import { PolygonMask } from "./Options/Classes/PolygonMask.js"; import { PolygonMaskType } from "./Enums/PolygonMaskType.js"; @@ -8,16 +8,16 @@ import { PolygonMaskType } from "./Enums/PolygonMaskType.js"; export class PolygonMaskPlugin implements IPlugin { readonly id = "polygon-mask"; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: Engine) { - this._engine = engine; + constructor(pluginManager: PluginManager) { + this._pluginManager = pluginManager; } async getPlugin(container: Container): Promise { const { PolygonMaskInstance } = await import("./PolygonMaskInstance.js"); - return new PolygonMaskInstance(container, this._engine); + return new PolygonMaskInstance(this._pluginManager, container); } loadOptions( @@ -32,7 +32,7 @@ export class PolygonMaskPlugin implements IPlugin { let polygonOptions = options.polygon; if (polygonOptions?.load === undefined) { - options.polygon = polygonOptions = new PolygonMask(this._engine); + options.polygon = polygonOptions = new PolygonMask(this._pluginManager); } polygonOptions.load(source?.polygon); diff --git a/plugins/polygonMask/src/index.ts b/plugins/polygonMask/src/index.ts index aef3f9afd4e..7ccb373bb9b 100644 --- a/plugins/polygonMask/src/index.ts +++ b/plugins/polygonMask/src/index.ts @@ -8,10 +8,10 @@ declare const __VERSION__: string; export async function loadPolygonMaskPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { PolygonMaskPlugin } = await import("./PolygonMaskPlugin.js"); - e.addPlugin(new PolygonMaskPlugin(engine)); + e.pluginManager.addPlugin(new PolygonMaskPlugin(e.pluginManager)); }); } diff --git a/plugins/polygonMask/src/utils.ts b/plugins/polygonMask/src/utils.ts index 1dff84842ae..4dc1d2b22e2 100644 --- a/plugins/polygonMask/src/utils.ts +++ b/plugins/polygonMask/src/utils.ts @@ -1,6 +1,7 @@ import { - type Engine, + type CanvasContextType, type ICoordinates, + type PluginManager, Vector, double, getDistances, @@ -25,20 +26,20 @@ const squareExp = 2, }; /** - * @param engine - + * @param pluginManager - * @param context - * @param rawData - * @param stroke - * @param hdr - */ export function drawPolygonMask( - engine: Engine, - context: CanvasRenderingContext2D, + pluginManager: PluginManager, + context: CanvasContextType, rawData: ICoordinates[], stroke: IPolygonMaskDrawStroke, hdr = false, ): void { - const color = rangeColorToRgb(engine, stroke.color); + const color = rangeColorToRgb(pluginManager, stroke.color); if (!color) { return; @@ -65,7 +66,7 @@ export function drawPolygonMask( } /** - * @param engine - + * @param pluginManager - * @param context - * @param path - * @param stroke - @@ -73,8 +74,8 @@ export function drawPolygonMask( * @param hdr - */ export function drawPolygonMaskPath( - engine: Engine, - context: CanvasRenderingContext2D, + pluginManager: PluginManager, + context: CanvasContextType, path: Path2D, stroke: IPolygonMaskDrawStroke, position: ICoordinates, @@ -96,7 +97,7 @@ export function drawPolygonMaskPath( position.y, ); - const color = rangeColorToRgb(engine, stroke.color); + const color = rangeColorToRgb(pluginManager, stroke.color); if (!color) { return; diff --git a/plugins/responsive/CHANGELOG.md b/plugins/responsive/CHANGELOG.md index 5ee702a087e..fab37172ab0 100644 --- a/plugins/responsive/CHANGELOG.md +++ b/plugins/responsive/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-responsive + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-responsive diff --git a/plugins/responsive/package.dist.json b/plugins/responsive/package.dist.json index c997521061e..1b8f06540b1 100644 --- a/plugins/responsive/package.dist.json +++ b/plugins/responsive/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-responsive", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles responsive plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,7 +86,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/responsive/package.json b/plugins/responsive/package.json index 63dddfd26a2..71fc94297d2 100644 --- a/plugins/responsive/package.json +++ b/plugins/responsive/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-responsive", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles responsive plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,7 +94,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/responsive/src/index.ts b/plugins/responsive/src/index.ts index 019d3381f0d..974a7b2f454 100644 --- a/plugins/responsive/src/index.ts +++ b/plugins/responsive/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadResponsivePlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { ResponsivePlugin } = await import("./ResponsivePlugin.js"); - e.addPlugin(new ResponsivePlugin()); + e.pluginManager.addPlugin(new ResponsivePlugin()); }); } diff --git a/plugins/sounds/CHANGELOG.md b/plugins/sounds/CHANGELOG.md index 5f297357bcc..416728fd452 100644 --- a/plugins/sounds/CHANGELOG.md +++ b/plugins/sounds/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-sounds + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-sounds diff --git a/plugins/sounds/package.dist.json b/plugins/sounds/package.dist.json index 6f8034e4938..a69f4199664 100644 --- a/plugins/sounds/package.dist.json +++ b/plugins/sounds/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-sounds", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles sounds plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,7 +86,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/sounds/package.json b/plugins/sounds/package.json index 651e98cbc59..b8eec10bc88 100644 --- a/plugins/sounds/package.json +++ b/plugins/sounds/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-sounds", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles sounds plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,7 +94,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/sounds/src/SoundsPluginInstance.ts b/plugins/sounds/src/SoundsPluginInstance.ts index b00f4df3847..fd14905cd67 100644 --- a/plugins/sounds/src/SoundsPluginInstance.ts +++ b/plugins/sounds/src/SoundsPluginInstance.ts @@ -435,7 +435,7 @@ export class SoundsPluginInstance implements IContainerPlugin { container.audioContext = undefined; - this._engine.dispatchEvent(SoundsEventType.mute, { container: this._container }); + this._container.dispatchEvent(SoundsEventType.mute); }; private readonly _playBuffer: (audio: SoundsAudio) => void = audio => { @@ -604,7 +604,7 @@ export class SoundsPluginInstance implements IContainerPlugin { this._initEvents(); - this._engine.dispatchEvent(SoundsEventType.unmute, { container: this._container }); + this._container.dispatchEvent(SoundsEventType.unmute); }; private readonly _updateMuteIcons: () => void = () => { diff --git a/plugins/sounds/src/index.ts b/plugins/sounds/src/index.ts index 1b32b09acad..d1cfb210a03 100644 --- a/plugins/sounds/src/index.ts +++ b/plugins/sounds/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadSoundsPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { SoundsPlugin } = await import("./SoundsPlugin.js"); - e.addPlugin(new SoundsPlugin(engine)); + e.pluginManager.addPlugin(new SoundsPlugin(e)); }); } diff --git a/plugins/themes/CHANGELOG.md b/plugins/themes/CHANGELOG.md index dda0f37b106..81150c031cd 100644 --- a/plugins/themes/CHANGELOG.md +++ b/plugins/themes/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-themes + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-themes diff --git a/plugins/themes/package.dist.json b/plugins/themes/package.dist.json index 9d90894aeb9..23fd54755d5 100644 --- a/plugins/themes/package.dist.json +++ b/plugins/themes/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-themes", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles themes plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,7 +86,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/themes/package.json b/plugins/themes/package.json index 145a74e60f7..73018ff8681 100644 --- a/plugins/themes/package.json +++ b/plugins/themes/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-themes", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles themes plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,7 +94,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/themes/src/index.ts b/plugins/themes/src/index.ts index bc967acaf8c..8090853c0ec 100644 --- a/plugins/themes/src/index.ts +++ b/plugins/themes/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadThemesPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { ThemesPlugin } = await import("./ThemesPlugin.js"); - e.addPlugin(new ThemesPlugin()); + e.pluginManager.addPlugin(new ThemesPlugin()); }); } diff --git a/plugins/trail/CHANGELOG.md b/plugins/trail/CHANGELOG.md index f5b190855d9..4b891b9cb9a 100644 --- a/plugins/trail/CHANGELOG.md +++ b/plugins/trail/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-trail + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-trail diff --git a/plugins/trail/package.dist.json b/plugins/trail/package.dist.json index 86aa212f888..2bd53553fc1 100644 --- a/plugins/trail/package.dist.json +++ b/plugins/trail/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-trail", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles trail plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,7 +86,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/trail/package.json b/plugins/trail/package.json index a3852702410..a99abd451d6 100644 --- a/plugins/trail/package.json +++ b/plugins/trail/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-trail", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles trail plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,7 +94,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/trail/src/TrailPlugin.ts b/plugins/trail/src/TrailPlugin.ts index 369d2d5cbcd..50594be1a82 100644 --- a/plugins/trail/src/TrailPlugin.ts +++ b/plugins/trail/src/TrailPlugin.ts @@ -1,4 +1,4 @@ -import type { Container, Engine, IContainerPlugin, IPlugin, RecursivePartial } from "@tsparticles/engine"; +import type { Container, IContainerPlugin, IPlugin, PluginManager, RecursivePartial } from "@tsparticles/engine"; import type { ITrailOptions, TrailOptions } from "./types.js"; import { Trail } from "./Options/Classes/Trail.js"; @@ -7,16 +7,16 @@ import { Trail } from "./Options/Classes/Trail.js"; export class TrailPlugin implements IPlugin { readonly id = "trail"; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: Engine) { - this._engine = engine; + constructor(pluginManager: PluginManager) { + this._pluginManager = pluginManager; } async getPlugin(container: Container): Promise { const { TrailPluginInstance } = await import("./TrailPluginInstance.js"); - return new TrailPluginInstance(container, this._engine); + return new TrailPluginInstance(this._pluginManager, container); } loadOptions(_container: Container, options: TrailOptions, source?: RecursivePartial): void { diff --git a/plugins/trail/src/TrailPluginInstance.ts b/plugins/trail/src/TrailPluginInstance.ts index 889e5687efd..caa2e9ce36c 100644 --- a/plugins/trail/src/TrailPluginInstance.ts +++ b/plugins/trail/src/TrailPluginInstance.ts @@ -1,7 +1,7 @@ import { - type Engine, type IContainerPlugin, type IRgb, + type PluginManager, getLogger, getStyleFromRgb, inverseFactorNumerator, @@ -20,12 +20,12 @@ interface ITrailFillData { export class TrailPluginInstance implements IContainerPlugin { private readonly _container; - private readonly _engine; + private readonly _pluginManager; private _trailFill?: ITrailFillData; - constructor(container: TrailContainer, engine: Engine) { + constructor(pluginManager: PluginManager, container: TrailContainer) { this._container = container; - this._engine = engine; + this._pluginManager = pluginManager; } canvasClear(): boolean { @@ -42,11 +42,11 @@ export class TrailPluginInstance implements IContainerPlugin { const canvas = container.canvas; if (trailFill.color) { - canvas.paintBase(getStyleFromRgb(trailFill.color, container.hdr, trailFill.opacity)); + canvas.render.paintBase(getStyleFromRgb(trailFill.color, container.hdr, trailFill.opacity)); handled = true; } else if (trailFill.image) { - canvas.paintImage(trailFill.image, trailFill.opacity); + canvas.render.paintImage(trailFill.image, trailFill.opacity); handled = true; } @@ -74,7 +74,7 @@ export class TrailPluginInstance implements IContainerPlugin { opacity = inverseFactorNumerator / trail.length; if (trailFill.color) { - const fillColor = rangeColorToRgb(this._engine, trailFill.color); + const fillColor = rangeColorToRgb(this._pluginManager, trailFill.color); if (!fillColor) { return; diff --git a/plugins/trail/src/index.ts b/plugins/trail/src/index.ts index 28d847f8398..39ac8987f6b 100644 --- a/plugins/trail/src/index.ts +++ b/plugins/trail/src/index.ts @@ -8,9 +8,9 @@ declare const __VERSION__: string; export async function loadTrailPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { TrailPlugin } = await import("./TrailPlugin.js"); - e.addPlugin(new TrailPlugin(engine)); + e.pluginManager.addPlugin(new TrailPlugin(e.pluginManager)); }); } diff --git a/plugins/zoom/CHANGELOG.md b/plugins/zoom/CHANGELOG.md index 20064ae4f55..e1e9ffcdf7a 100644 --- a/plugins/zoom/CHANGELOG.md +++ b/plugins/zoom/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/plugin-zoom + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/plugin-zoom diff --git a/plugins/zoom/package.dist.json b/plugins/zoom/package.dist.json index 6e5563773a3..392b4b7f117 100644 --- a/plugins/zoom/package.dist.json +++ b/plugins/zoom/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-zoom", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles zoom plugin", "homepage": "https://particles.js.org", "repository": { @@ -86,7 +86,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/plugins/zoom/package.json b/plugins/zoom/package.json index 3ba6dd3dc1a..60f86c4e557 100644 --- a/plugins/zoom/package.json +++ b/plugins/zoom/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/plugin-zoom", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles zoom plugin", "homepage": "https://particles.js.org", "scripts": { @@ -94,7 +94,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/plugins/zoom/src/ZoomPluginInstance.ts b/plugins/zoom/src/ZoomPluginInstance.ts index c3bdf7b4cc6..708b220c6be 100644 --- a/plugins/zoom/src/ZoomPluginInstance.ts +++ b/plugins/zoom/src/ZoomPluginInstance.ts @@ -1,4 +1,4 @@ -import { type IContainerPlugin, type IShapeDrawData, defaultZoom } from "@tsparticles/engine"; +import { type CanvasContextType, type IContainerPlugin, type IShapeDrawData, defaultZoom } from "@tsparticles/engine"; import type { ZoomContainer } from "./types.js"; import { ZoomEventListeners } from "./ZoomEventListeners.js"; @@ -43,7 +43,7 @@ export class ZoomPluginInstance implements IContainerPlugin { ); } - drawSettingsCleanup(context: CanvasRenderingContext2D): void { + drawSettingsCleanup(context: CanvasContextType): void { const zoom = this._container.canvas.zoom; if (zoom === defaultZoom) { @@ -53,7 +53,7 @@ export class ZoomPluginInstance implements IContainerPlugin { context.restore(); } - drawSettingsSetup(context: CanvasRenderingContext2D): void { + drawSettingsSetup(context: CanvasContextType): void { const zoom = this._container.canvas.zoom; if (zoom === defaultZoom) { diff --git a/plugins/zoom/src/index.ts b/plugins/zoom/src/index.ts index 85d2045cba3..d39a75b3e54 100644 --- a/plugins/zoom/src/index.ts +++ b/plugins/zoom/src/index.ts @@ -24,9 +24,9 @@ export { export async function loadZoomPlugin(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { ZoomPlugin } = await import("./ZoomPlugin.js"); - e.addPlugin(new ZoomPlugin()); + e.pluginManager.addPlugin(new ZoomPlugin()); }); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87418907bd4..d022b312167 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,8 +14,8 @@ importers: specifier: ^20.5.0 version: 20.5.0 "@swc/core": - specifier: ^1.15.18 - version: 1.15.18 + specifier: ^1.15.21 + version: 1.15.21 "@tsparticles/cli": specifier: ^3.3.8 version: 3.3.8(@types/eslint@8.56.6)(esbuild@0.27.2)(jiti@2.6.1)(webpack-cli@7.0.2) @@ -24,7 +24,7 @@ importers: version: 3.3.5(dependency-cruiser@17.3.9) "@tsparticles/eslint-config": specifier: ^3.3.5 - version: 3.3.5(@types/eslint@8.56.6)(eslint@10.0.3(jiti@2.6.1)) + version: 3.3.5(@types/eslint@8.56.6)(eslint@10.1.0(jiti@2.6.1)) "@tsparticles/prettier-config": specifier: ^3.3.5 version: 3.3.5(prettier@3.8.1) @@ -35,8 +35,8 @@ importers: specifier: ^3.3.5 version: 3.3.5(@types/eslint@8.56.6)(esbuild@0.27.2)(jiti@2.6.1) "@types/jsdom": - specifier: ^28.0.0 - version: 28.0.0 + specifier: ^28.0.1 + version: 28.0.1 "@types/node": specifier: ^25.5.0 version: 25.5.0 @@ -44,17 +44,17 @@ importers: specifier: ^1.18.8 version: 1.18.8 "@vitest/coverage-v8": - specifier: ^4.1.0 - version: 4.1.0(vitest@4.1.0) + specifier: ^4.1.2 + version: 4.1.2(vitest@4.1.2) "@vitest/ui": - specifier: ^4.1.0 - version: 4.1.0(vitest@4.1.0) + specifier: ^4.1.2 + version: 4.1.2(vitest@4.1.2) browserslist: specifier: ^4.28.1 version: 4.28.1 canvas: - specifier: ^3.2.1 - version: 3.2.1 + specifier: ^3.2.2 + version: 3.2.2 copyfiles: specifier: ^2.4.1 version: 2.4.1 @@ -62,20 +62,20 @@ importers: specifier: ^10.1.0 version: 10.1.0 eslint: - specifier: ^10.0.3 - version: 10.0.3(jiti@2.6.1) + specifier: ^10.1.0 + version: 10.1.0(jiti@2.6.1) eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@10.0.3(jiti@2.6.1)) + version: 10.1.8(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-jsdoc: - specifier: ^62.8.0 - version: 62.8.0(eslint@10.0.3(jiti@2.6.1)) + specifier: ^62.8.1 + version: 62.8.1(eslint@10.1.0(jiti@2.6.1)) eslint-plugin-prettier: specifier: ^5.5.5 - version: 5.5.5(@types/eslint@8.56.6)(eslint-config-prettier@10.1.8(eslint@10.0.3(jiti@2.6.1)))(eslint@10.0.3(jiti@2.6.1))(prettier@3.8.1) + version: 5.5.5(@types/eslint@8.56.6)(eslint-config-prettier@10.1.8(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(prettier@3.8.1) eslint-plugin-tsdoc: specifier: ^0.5.2 - version: 0.5.2(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) + version: 0.5.2(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) fs-extra: specifier: ^11.3.4 version: 11.3.4 @@ -86,17 +86,17 @@ importers: specifier: ^9.1.7 version: 9.1.7 jsdom: - specifier: ^29.0.0 - version: 29.0.0(canvas@3.2.1) + specifier: ^29.0.1 + version: 29.0.1(canvas@3.2.2) jsdom-global: specifier: ^3.0.2 - version: 3.0.2(jsdom@29.0.0(canvas@3.2.1)) + version: 3.0.2(jsdom@29.0.1(canvas@3.2.2)) lerna: specifier: ^9.0.7 - version: 9.0.7(@swc/core@1.15.18)(@types/node@25.5.0) + version: 9.0.7(@swc/core@1.15.21)(@types/node@25.5.0) nx: - specifier: ^22.6.0 - version: 22.6.0(@swc/core@1.15.18) + specifier: ^22.6.3 + version: 22.6.3(@swc/core@1.15.21) nx-cloud: specifier: ^19.1.0 version: 19.1.0 @@ -114,58 +114,58 @@ importers: version: 0.5.21 swc-loader: specifier: ^0.2.7 - version: 0.2.7(@swc/core@1.15.18)(webpack@5.105.4) + version: 0.2.7(@swc/core@1.15.21)(webpack@5.105.4) terser-webpack-plugin: specifier: ^5.4.0 - version: 5.4.0(@swc/core@1.15.18)(esbuild@0.27.2)(webpack@5.105.4) + version: 5.4.0(@swc/core@1.15.21)(esbuild@0.27.2)(webpack@5.105.4) ts-json-schema-generator: specifier: ^2.9.0 version: 2.9.0 ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.15.18)(@types/node@25.5.0)(typescript@5.9.3) + version: 10.9.2(@swc/core@1.15.21)(@types/node@25.5.0)(typescript@5.9.3) typedoc: - specifier: ^0.28.17 - version: 0.28.17(typescript@5.9.3) + specifier: ^0.28.18 + version: 0.28.18(typescript@5.9.3) typedoc-plugin-clarity: specifier: ^1.6.0 - version: 1.6.0(typedoc@0.28.17(typescript@5.9.3)) + version: 1.6.0(typedoc@0.28.18(typescript@5.9.3)) typedoc-plugin-coverage: specifier: ^4.0.2 - version: 4.0.2(typedoc@0.28.17(typescript@5.9.3)) + version: 4.0.2(typedoc@0.28.18(typescript@5.9.3)) typedoc-plugin-google-ads: specifier: ^1.6.0 - version: 1.6.0(typedoc@0.28.17(typescript@5.9.3)) + version: 1.6.0(typedoc@0.28.18(typescript@5.9.3)) typedoc-plugin-keywords: specifier: ^1.6.0 - version: 1.6.0(typedoc@0.28.17(typescript@5.9.3)) + version: 1.6.0(typedoc@0.28.18(typescript@5.9.3)) typedoc-plugin-mdn-links: specifier: ^5.1.1 - version: 5.1.1(typedoc@0.28.17(typescript@5.9.3)) + version: 5.1.1(typedoc@0.28.18(typescript@5.9.3)) typedoc-plugin-missing-exports: specifier: ^4.1.2 - version: 4.1.2(typedoc@0.28.17(typescript@5.9.3)) + version: 4.1.2(typedoc@0.28.18(typescript@5.9.3)) typescript: specifier: ^5.9.3 version: 5.9.3 typescript-eslint: specifier: ^8.57.1 - version: 8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) + version: 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) typescript-json-schema: specifier: ^0.67.1 - version: 0.67.1(@swc/core@1.15.18) + version: 0.67.1(@swc/core@1.15.21) vitest: - specifier: ^4.1.0 - version: 4.1.0(@types/node@25.5.0)(@vitest/ui@4.1.0)(jsdom@29.0.0(canvas@3.2.1))(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.1)) + specifier: ^4.1.2 + version: 4.1.2(@types/node@25.5.0)(@vitest/ui@4.1.2)(jsdom@29.0.1(canvas@3.2.2))(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.3)) webpack: specifier: ^5.105.4 - version: 5.105.4(@swc/core@1.15.18)(esbuild@0.27.2)(webpack-cli@7.0.2) + version: 5.105.4(@swc/core@1.15.21)(esbuild@0.27.2)(webpack-cli@7.0.2) webpack-bundle-analyzer: - specifier: ^5.2.0 - version: 5.2.0 + specifier: ^5.3.0 + version: 5.3.0 webpack-cli: specifier: ^7.0.2 - version: 7.0.2(webpack-bundle-analyzer@5.2.0)(webpack@5.105.4) + version: 7.0.2(webpack-bundle-analyzer@5.3.0)(webpack@5.105.4) yargs: specifier: ^18.0.0 version: 18.0.0 @@ -173,510 +173,513 @@ importers: bundles/all: dependencies: "@tsparticles/effect-bubble": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../effects/bubble/dist "@tsparticles/effect-particles": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../effects/particles/dist "@tsparticles/effect-shadow": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../effects/shadow/dist "@tsparticles/effect-trail": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../effects/trail/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist + "@tsparticles/interaction-external-cannon": + specifier: workspace:4.0.0-beta.1 + version: link:../../interactions/external/cannon/dist "@tsparticles/interaction-external-particle": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/particle/dist "@tsparticles/interaction-external-pop": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/pop/dist "@tsparticles/interaction-light": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/light/dist "@tsparticles/interaction-particles-repulse": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/particles/repulse/dist "@tsparticles/path-branches": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/branches/dist "@tsparticles/path-brownian": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/brownian/dist "@tsparticles/path-curl-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/curlNoise/dist "@tsparticles/path-curves": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/curves/dist "@tsparticles/path-fractal-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/fractalNoise/dist "@tsparticles/path-grid": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/grid/dist "@tsparticles/path-levy": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/levy/dist "@tsparticles/path-perlin-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/perlinNoise/dist "@tsparticles/path-polygon": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/polygon/dist "@tsparticles/path-random": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/random/dist "@tsparticles/path-simplex-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/simplexNoise/dist "@tsparticles/path-spiral": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/spiral/dist "@tsparticles/path-svg": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/svg/dist "@tsparticles/path-zig-zag": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/zigzag/dist "@tsparticles/plugin-background-mask": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/backgroundMask/dist "@tsparticles/plugin-blend": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/blend/dist "@tsparticles/plugin-canvas-mask": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/canvasMask/dist "@tsparticles/plugin-easing-back": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/back/dist "@tsparticles/plugin-easing-bounce": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/bounce/dist "@tsparticles/plugin-easing-circ": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/circ/dist "@tsparticles/plugin-easing-cubic": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/cubic/dist "@tsparticles/plugin-easing-elastic": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/elastic/dist "@tsparticles/plugin-easing-expo": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/expo/dist "@tsparticles/plugin-easing-gaussian": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/gaussian/dist "@tsparticles/plugin-easing-linear": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/linear/dist "@tsparticles/plugin-easing-quart": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/quart/dist "@tsparticles/plugin-easing-quint": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/quint/dist "@tsparticles/plugin-easing-sigmoid": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/sigmoid/dist "@tsparticles/plugin-easing-sine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/sine/dist "@tsparticles/plugin-easing-smoothstep": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/smoothstep/dist "@tsparticles/plugin-emitters-shape-canvas": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emittersShapes/canvas/dist "@tsparticles/plugin-emitters-shape-path": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emittersShapes/path/dist "@tsparticles/plugin-emitters-shape-polygon": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emittersShapes/polygon/dist "@tsparticles/plugin-export-image": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/exports/image/dist "@tsparticles/plugin-export-json": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/exports/json/dist "@tsparticles/plugin-export-video": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/exports/video/dist "@tsparticles/plugin-hsv-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/hsv/dist "@tsparticles/plugin-hwb-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/hwb/dist "@tsparticles/plugin-infection": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/infection/dist "@tsparticles/plugin-lab-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/lab/dist "@tsparticles/plugin-lch-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/lch/dist "@tsparticles/plugin-manual-particles": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/manualParticles/dist "@tsparticles/plugin-motion": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/motion/dist "@tsparticles/plugin-named-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/named/dist "@tsparticles/plugin-oklab-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/oklab/dist "@tsparticles/plugin-oklch-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/oklch/dist "@tsparticles/plugin-poisson-disc": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/poisson/dist "@tsparticles/plugin-polygon-mask": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/polygonMask/dist "@tsparticles/plugin-responsive": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/responsive/dist "@tsparticles/plugin-sounds": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/sounds/dist "@tsparticles/plugin-themes": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/themes/dist "@tsparticles/plugin-trail": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/trail/dist "@tsparticles/plugin-zoom": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/zoom/dist "@tsparticles/shape-arrow": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/arrow/dist "@tsparticles/shape-cards": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/cards/dist "@tsparticles/shape-cog": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/cog/dist "@tsparticles/shape-heart": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/heart/dist "@tsparticles/shape-infinity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/infinity/dist "@tsparticles/shape-matrix": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/matrix/dist "@tsparticles/shape-path": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/path/dist "@tsparticles/shape-rounded-polygon": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/rounded-polygon/dist "@tsparticles/shape-rounded-rect": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/rounded-rect/dist "@tsparticles/shape-spiral": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/spiral/dist "@tsparticles/shape-squircle": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/squircle/dist "@tsparticles/updater-gradient": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/gradient/dist "@tsparticles/updater-orbit": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/orbit/dist tsparticles: - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../full/dist publishDirectory: dist bundles/basic: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-hex-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/hex/dist "@tsparticles/plugin-hsl-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/hsl/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist "@tsparticles/plugin-rgb-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/rgb/dist "@tsparticles/shape-circle": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/circle/dist "@tsparticles/updater-fill-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/fillColor/dist "@tsparticles/updater-opacity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/opacity/dist "@tsparticles/updater-out-modes": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/outModes/dist "@tsparticles/updater-size": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/size/dist publishDirectory: dist bundles/confetti: dependencies: "@tsparticles/basic": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../basic/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-emitters": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emitters/dist "@tsparticles/plugin-motion": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/motion/dist "@tsparticles/shape-cards": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/cards/dist "@tsparticles/shape-emoji": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/emoji/dist "@tsparticles/shape-heart": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/heart/dist "@tsparticles/shape-image": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/image/dist "@tsparticles/shape-polygon": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/polygon/dist "@tsparticles/shape-square": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/square/dist "@tsparticles/shape-star": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/star/dist "@tsparticles/updater-life": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/life/dist "@tsparticles/updater-roll": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/roll/dist "@tsparticles/updater-rotate": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/rotate/dist "@tsparticles/updater-tilt": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/tilt/dist "@tsparticles/updater-wobble": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/wobble/dist publishDirectory: dist bundles/fireworks: dependencies: "@tsparticles/basic": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../basic/dist "@tsparticles/effect-trail": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../effects/trail/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-emitters": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emitters/dist "@tsparticles/plugin-emitters-shape-square": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emittersShapes/square/dist "@tsparticles/plugin-sounds": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/sounds/dist "@tsparticles/updater-destroy": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/destroy/dist "@tsparticles/updater-life": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/life/dist "@tsparticles/updater-rotate": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/rotate/dist publishDirectory: dist bundles/full: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/interaction-external-drag": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/drag/dist "@tsparticles/interaction-external-trail": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/trail/dist "@tsparticles/plugin-absorbers": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/absorbers/dist "@tsparticles/plugin-emitters": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emitters/dist "@tsparticles/plugin-emitters-shape-circle": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emittersShapes/circle/dist "@tsparticles/plugin-emitters-shape-square": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emittersShapes/square/dist "@tsparticles/shape-text": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/text/dist "@tsparticles/slim": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../slim/dist "@tsparticles/updater-destroy": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/destroy/dist "@tsparticles/updater-roll": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/roll/dist "@tsparticles/updater-tilt": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/tilt/dist "@tsparticles/updater-twinkle": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/twinkle/dist "@tsparticles/updater-wobble": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/wobble/dist publishDirectory: dist bundles/pjs: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-responsive": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/responsive/dist tsparticles: - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../full/dist devDependencies: "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/interactivity/dist publishDirectory: dist bundles/slim: dependencies: "@tsparticles/basic": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../basic/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/interaction-external-attract": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/attract/dist "@tsparticles/interaction-external-bounce": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/bounce/dist "@tsparticles/interaction-external-bubble": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/bubble/dist "@tsparticles/interaction-external-connect": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/connect/dist "@tsparticles/interaction-external-grab": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/grab/dist "@tsparticles/interaction-external-parallax": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/parallax/dist "@tsparticles/interaction-external-pause": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/pause/dist "@tsparticles/interaction-external-push": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/push/dist "@tsparticles/interaction-external-remove": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/remove/dist "@tsparticles/interaction-external-repulse": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/repulse/dist "@tsparticles/interaction-external-slow": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/slow/dist "@tsparticles/interaction-particles-attract": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/particles/attract/dist "@tsparticles/interaction-particles-collisions": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/particles/collisions/dist "@tsparticles/interaction-particles-links": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/particles/links/dist "@tsparticles/plugin-easing-quad": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/quad/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/interactivity/dist "@tsparticles/shape-emoji": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/emoji/dist "@tsparticles/shape-image": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/image/dist "@tsparticles/shape-line": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/line/dist "@tsparticles/shape-polygon": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/polygon/dist "@tsparticles/shape-square": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/square/dist "@tsparticles/shape-star": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/star/dist "@tsparticles/updater-life": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/life/dist "@tsparticles/updater-rotate": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/rotate/dist "@tsparticles/updater-stroke-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/strokeColor/dist publishDirectory: dist demo/electron: dependencies: "@tsparticles/configs": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/configs/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist tsparticles: - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../bundles/full/dist devDependencies: electron: @@ -686,412 +689,415 @@ importers: demo/vanilla: dependencies: "@tsparticles/all": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../bundles/all/dist "@tsparticles/basic": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../bundles/basic/dist "@tsparticles/canvas-utils": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/canvasUtils/dist "@tsparticles/confetti": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../bundles/confetti/dist "@tsparticles/configs": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/configs/dist "@tsparticles/effect-bubble": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../effects/bubble/dist "@tsparticles/effect-particles": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../effects/particles/dist "@tsparticles/effect-shadow": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../effects/shadow/dist "@tsparticles/effect-trail": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../effects/trail/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/fireworks": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../bundles/fireworks/dist "@tsparticles/fractal-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/fractalNoise/dist "@tsparticles/interaction-external-attract": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/attract/dist "@tsparticles/interaction-external-bounce": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/bounce/dist "@tsparticles/interaction-external-bubble": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/bubble/dist + "@tsparticles/interaction-external-cannon": + specifier: workspace:4.0.0-beta.1 + version: link:../../interactions/external/cannon/dist "@tsparticles/interaction-external-connect": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/connect/dist "@tsparticles/interaction-external-drag": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/drag/dist "@tsparticles/interaction-external-grab": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/grab/dist "@tsparticles/interaction-external-parallax": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/parallax/dist "@tsparticles/interaction-external-particle": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/particle/dist "@tsparticles/interaction-external-pause": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/pause/dist "@tsparticles/interaction-external-pop": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/pop/dist "@tsparticles/interaction-external-push": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/push/dist "@tsparticles/interaction-external-remove": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/remove/dist "@tsparticles/interaction-external-repulse": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/repulse/dist "@tsparticles/interaction-external-slow": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/slow/dist "@tsparticles/interaction-external-trail": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/external/trail/dist "@tsparticles/interaction-light": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/light/dist "@tsparticles/interaction-particles-attract": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/particles/attract/dist "@tsparticles/interaction-particles-collisions": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/particles/collisions/dist "@tsparticles/interaction-particles-links": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/particles/links/dist "@tsparticles/interaction-particles-repulse": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/particles/repulse/dist "@tsparticles/noise-field": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/noiseField/dist "@tsparticles/path-branches": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/branches/dist "@tsparticles/path-brownian": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/brownian/dist "@tsparticles/path-curl-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/curlNoise/dist "@tsparticles/path-curves": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/curves/dist "@tsparticles/path-fractal-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/fractalNoise/dist "@tsparticles/path-grid": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/grid/dist "@tsparticles/path-levy": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/levy/dist "@tsparticles/path-perlin-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/perlinNoise/dist "@tsparticles/path-polygon": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/polygon/dist "@tsparticles/path-random": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/random/dist "@tsparticles/path-simplex-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/simplexNoise/dist "@tsparticles/path-spiral": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/spiral/dist "@tsparticles/path-svg": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/svg/dist "@tsparticles/path-utils": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/pathUtils/dist "@tsparticles/path-zig-zag": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/zigzag/dist "@tsparticles/perlin-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/perlinNoise/dist "@tsparticles/pjs": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../bundles/pjs/dist "@tsparticles/plugin-absorbers": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/absorbers/dist "@tsparticles/plugin-background-mask": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/backgroundMask/dist "@tsparticles/plugin-blend": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/blend/dist "@tsparticles/plugin-canvas-mask": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/canvasMask/dist "@tsparticles/plugin-easing-back": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/back/dist "@tsparticles/plugin-easing-bounce": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/bounce/dist "@tsparticles/plugin-easing-circ": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/circ/dist "@tsparticles/plugin-easing-cubic": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/cubic/dist "@tsparticles/plugin-easing-elastic": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/elastic/dist "@tsparticles/plugin-easing-expo": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/expo/dist "@tsparticles/plugin-easing-gaussian": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/gaussian/dist "@tsparticles/plugin-easing-linear": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/linear/dist "@tsparticles/plugin-easing-quad": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/quad/dist "@tsparticles/plugin-easing-quart": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/quart/dist "@tsparticles/plugin-easing-quint": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/quint/dist "@tsparticles/plugin-easing-sigmoid": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/sigmoid/dist "@tsparticles/plugin-easing-sine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/sine/dist "@tsparticles/plugin-easing-smoothstep": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/easings/smoothstep/dist "@tsparticles/plugin-emitters": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emitters/dist "@tsparticles/plugin-emitters-shape-canvas": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emittersShapes/canvas/dist "@tsparticles/plugin-emitters-shape-circle": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emittersShapes/circle/dist "@tsparticles/plugin-emitters-shape-path": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emittersShapes/path/dist "@tsparticles/plugin-emitters-shape-polygon": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emittersShapes/polygon/dist "@tsparticles/plugin-emitters-shape-square": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/emittersShapes/square/dist "@tsparticles/plugin-export-image": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/exports/image/dist "@tsparticles/plugin-export-json": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/exports/json/dist "@tsparticles/plugin-export-video": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/exports/video/dist "@tsparticles/plugin-hex-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/hex/dist "@tsparticles/plugin-hsl-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/hsl/dist "@tsparticles/plugin-hsv-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/hsv/dist "@tsparticles/plugin-hwb-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/hwb/dist "@tsparticles/plugin-infection": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/infection/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/interactivity/dist "@tsparticles/plugin-lab-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/lab/dist "@tsparticles/plugin-lch-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/lch/dist "@tsparticles/plugin-manual-particles": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/manualParticles/dist "@tsparticles/plugin-motion": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/motion/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist "@tsparticles/plugin-named-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/named/dist "@tsparticles/plugin-oklab-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/oklab/dist "@tsparticles/plugin-oklch-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/oklch/dist "@tsparticles/plugin-poisson-disc": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/poisson/dist "@tsparticles/plugin-polygon-mask": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/polygonMask/dist "@tsparticles/plugin-responsive": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/responsive/dist "@tsparticles/plugin-rgb-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/rgb/dist "@tsparticles/plugin-sounds": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/sounds/dist "@tsparticles/plugin-themes": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/themes/dist "@tsparticles/plugin-trail": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/trail/dist "@tsparticles/plugin-zoom": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/zoom/dist "@tsparticles/shape-arrow": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/arrow/dist "@tsparticles/shape-cards": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/cards/dist "@tsparticles/shape-circle": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/circle/dist "@tsparticles/shape-cog": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/cog/dist "@tsparticles/shape-emoji": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/emoji/dist "@tsparticles/shape-heart": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/heart/dist "@tsparticles/shape-image": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/image/dist "@tsparticles/shape-infinity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/infinity/dist "@tsparticles/shape-line": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/line/dist "@tsparticles/shape-matrix": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/matrix/dist "@tsparticles/shape-path": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/path/dist "@tsparticles/shape-polygon": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/polygon/dist "@tsparticles/shape-rounded-polygon": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/rounded-polygon/dist "@tsparticles/shape-rounded-rect": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/rounded-rect/dist "@tsparticles/shape-spiral": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/spiral/dist "@tsparticles/shape-square": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/square/dist "@tsparticles/shape-squircle": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/squircle/dist "@tsparticles/shape-star": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/star/dist "@tsparticles/shape-text": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../shapes/text/dist "@tsparticles/simplex-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/simplexNoise/dist "@tsparticles/slim": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../bundles/slim/dist "@tsparticles/smooth-value-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/smoothValueNoise/dist "@tsparticles/updater-destroy": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/destroy/dist "@tsparticles/updater-fill-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/fillColor/dist "@tsparticles/updater-gradient": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/gradient/dist "@tsparticles/updater-life": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/life/dist "@tsparticles/updater-opacity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/opacity/dist "@tsparticles/updater-orbit": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/orbit/dist "@tsparticles/updater-out-modes": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/outModes/dist "@tsparticles/updater-roll": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/roll/dist "@tsparticles/updater-rotate": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/rotate/dist "@tsparticles/updater-size": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/size/dist "@tsparticles/updater-stroke-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/strokeColor/dist "@tsparticles/updater-tilt": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/tilt/dist "@tsparticles/updater-twinkle": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/twinkle/dist "@tsparticles/updater-wobble": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/wobble/dist tsparticles: - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../bundles/full/dist devDependencies: "@datalust/winston-seq": @@ -1170,40 +1176,40 @@ importers: demo/vanilla_new: dependencies: "@tsparticles/configs": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/configs/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/interaction-light": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/light/dist "@tsparticles/interaction-particles-repulse": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../interactions/particles/repulse/dist "@tsparticles/path-curves": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/curves/dist "@tsparticles/path-perlin-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/perlinNoise/dist "@tsparticles/path-polygon": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/polygon/dist "@tsparticles/path-simplex-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../paths/simplexNoise/dist "@tsparticles/plugin-infection": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/infection/dist "@tsparticles/updater-gradient": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/gradient/dist "@tsparticles/updater-orbit": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../updaters/orbit/dist tsparticles: - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../bundles/full/dist devDependencies: "@swc/core": @@ -1222,13 +1228,13 @@ importers: demo/vite: dependencies: "@tsparticles/all": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../bundles/all/dist "@tsparticles/configs": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/configs/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist devDependencies: typescript: @@ -1236,33 +1242,33 @@ importers: version: 5.9.3 vite: specifier: ^7.3.1 - version: 7.3.1(@types/node@25.5.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.1) + version: 7.3.1(@types/node@25.5.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.3) effects/bubble: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist effects/particles: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist effects/shadow: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist effects/trail: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist @@ -1272,1024 +1278,1034 @@ importers: interactions/external/attract: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/bounce: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/bubble: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 + version: link:../../../plugins/interactivity/dist + publishDirectory: dist + + interactions/external/cannon: + dependencies: + "@tsparticles/engine": + specifier: workspace:4.0.0-beta.1 + version: link:../../../engine/dist + "@tsparticles/plugin-interactivity": + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/connect: dependencies: "@tsparticles/canvas-utils": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../utils/canvasUtils/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/drag: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/grab: dependencies: "@tsparticles/canvas-utils": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../utils/canvasUtils/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/parallax: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/particle: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/pause: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/pop: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/push: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/remove: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/repulse: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/slow: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/external/trail: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/light: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/interactivity/dist publishDirectory: dist interactions/particles/attract: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/particles/collisions: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/particles/links: dependencies: "@tsparticles/canvas-utils": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../utils/canvasUtils/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist interactions/particles/repulse: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../plugins/interactivity/dist publishDirectory: dist paths/branches: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist paths/brownian: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist paths/curlNoise: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist "@tsparticles/simplex-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/simplexNoise/dist publishDirectory: dist paths/curves: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist paths/fractalNoise: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/fractal-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/fractalNoise/dist "@tsparticles/noise-field": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/noiseField/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist paths/grid: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist paths/levy: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist paths/perlinNoise: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/noise-field": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/noiseField/dist "@tsparticles/perlin-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/perlinNoise/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist paths/polygon: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist paths/random: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist paths/simplexNoise: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/noise-field": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/noiseField/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist "@tsparticles/simplex-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/simplexNoise/dist publishDirectory: dist paths/spiral: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist paths/svg: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist paths/zigzag: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist plugins/absorbers: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../interactivity/dist publishDirectory: dist plugins/backgroundMask: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/blend: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/canvasMask: dependencies: "@tsparticles/canvas-utils": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/canvasUtils/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/colors/hex: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/colors/hsl: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/colors/hsv: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/colors/hwb: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/colors/lab: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/colors/lch: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/colors/named: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/colors/oklab: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/colors/oklch: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/colors/rgb: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/back: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/bounce: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/circ: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/cubic: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/elastic: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/expo: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/gaussian: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/linear: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/quad: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/quart: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/quint: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/sigmoid: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/sine: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/easings/smoothstep: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/emitters: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../interactivity/dist publishDirectory: dist plugins/emittersShapes/canvas: dependencies: "@tsparticles/canvas-utils": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../utils/canvasUtils/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-emitters": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../emitters/dist publishDirectory: dist plugins/emittersShapes/circle: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-emitters": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../emitters/dist publishDirectory: dist plugins/emittersShapes/path: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-emitters": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../emitters/dist publishDirectory: dist plugins/emittersShapes/polygon: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-emitters": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../emitters/dist publishDirectory: dist plugins/emittersShapes/square: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist "@tsparticles/plugin-emitters": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../emitters/dist publishDirectory: dist plugins/exports/image: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/exports/json: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/exports/video: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../../engine/dist publishDirectory: dist plugins/infection: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-interactivity": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../interactivity/dist publishDirectory: dist plugins/interactivity: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/manualParticles: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/motion: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/move: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/poisson: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/polygonMask: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/responsive: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/sounds: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/themes: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/trail: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist plugins/zoom: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/arrow: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/cards: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/path-utils": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/pathUtils/dist publishDirectory: dist shapes/circle: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/cog: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/emoji: dependencies: "@tsparticles/canvas-utils": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/canvasUtils/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/heart: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/image: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/infinity: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/line: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/matrix: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/path: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/path-utils": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/pathUtils/dist publishDirectory: dist shapes/polygon: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/rounded-polygon: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/rounded-rect: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/spiral: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/square: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/squircle: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/star: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist shapes/text: dependencies: "@tsparticles/canvas-utils": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../utils/canvasUtils/dist "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/destroy: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/fillColor: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/gradient: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/life: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/opacity: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/orbit: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/outModes: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/roll: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/rotate: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/size: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/strokeColor: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/tilt: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/twinkle: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist updaters/wobble: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist utils/canvasUtils: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist utils/configs: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist utils/fractalNoise: dependencies: "@tsparticles/smooth-value-noise": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../smoothValueNoise/dist publishDirectory: dist utils/noiseField: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-move": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/move/dist publishDirectory: dist utils/pathUtils: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist publishDirectory: dist @@ -2305,19 +2321,19 @@ importers: utils/tests: dependencies: "@tsparticles/engine": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../engine/dist "@tsparticles/plugin-hex-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/hex/dist "@tsparticles/plugin-hsl-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/hsl/dist "@tsparticles/plugin-hsv-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/hsv/dist "@tsparticles/plugin-rgb-color": - specifier: workspace:4.0.0-beta.0 + specifier: workspace:4.0.0-beta.1 version: link:../../plugins/colors/rgb/dist packages: @@ -2561,10 +2577,10 @@ packages: { integrity: sha512-PwvII5Lo3dzZKpTIYHvPnrKQg6UlOY6V/z/ahPiSGt1HeAMlC96PPfuPZ9ZmzcrKQuAZgO9NzX67sXWRI3T62Q== } engines: { node: ">=22" } - "@discoveryjs/json-ext@0.5.7": + "@discoveryjs/json-ext@0.6.3": resolution: - { integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== } - engines: { node: ">=10.0.0" } + { integrity: sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ== } + engines: { node: ">=14.17.0" } "@discoveryjs/json-ext@1.0.0": resolution: @@ -2846,9 +2862,9 @@ packages: { integrity: sha512-3DguDv/oUE+7vjMeTSOjCSG+KeawgVQOHrKRnvUuqYh1mfArrh7s+s8hXW3e4RerBA1+Wh+hBqf8sJNpqNrBWg== } engines: { node: ">=6" } - "@gerrit0/mini-shiki@3.20.0": + "@gerrit0/mini-shiki@3.23.0": resolution: - { integrity: sha512-Wa57i+bMpK6PGJZ1f2myxo3iO+K/kZikcyvH8NIqNNZhQUbDav7V9LQmWOXhf946mz5c1NZ19WMsGYiDKTryzQ== } + { integrity: sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg== } "@humanfs/core@0.19.1": resolution: @@ -3238,67 +3254,67 @@ packages: peerDependencies: nx: ">= 21 <= 23 || ^22.0.0-0" - "@nx/nx-darwin-arm64@22.6.0": + "@nx/nx-darwin-arm64@22.6.3": resolution: - { integrity: sha512-sOlgi3ym6gA5ipMtTv39fC3+33KvNEAsI5CoVejVezLdVFjtSlS+ccR3OKZRZeuZuvpeOzKNqGtnqwE+UNtIhg== } + { integrity: sha512-m8hEp2WufqUJzrl2uI5OItkPqIo8+0lbOBEKI7yZN9uoL6FKzP5LF6WlMFPJ8FlajtjBzQqaoDwp04+bkuXeaw== } cpu: [arm64] os: [darwin] - "@nx/nx-darwin-x64@22.6.0": + "@nx/nx-darwin-x64@22.6.3": resolution: - { integrity: sha512-qg+wMRkgPazGG3dBKtP8mRFppLTigyGVJJnRfQquxnjXPY5oFVL9UZcKbISItAIdSk5jzxZ9SwAIMk2Ggeg36w== } + { integrity: sha512-biPybnU2qlNuP7ytBYmRuusrU5TWXqVKMHr7Kxrqlin87iJR5MosXSZ+Pjr8H+0zFrB4rGf/9yro3s/dYG40Yw== } cpu: [x64] os: [darwin] - "@nx/nx-freebsd-x64@22.6.0": + "@nx/nx-freebsd-x64@22.6.3": resolution: - { integrity: sha512-PjYRBZalFE2IGrZD7ukGXfRppPm21BpeGVqPH6BjcnB8dmyRx5cJG1uc6xom09yQK5X0Z+PPYzQhYGmZn5F4yQ== } + { integrity: sha512-8C6hhvVuqPwnvjHMPAA77DeEZ/WSY6AxuuIiyRje9uKF2B5F26sV89lRjBoEiWnV1dmLdy5YY5HJZEjwqjifAQ== } cpu: [x64] os: [freebsd] - "@nx/nx-linux-arm-gnueabihf@22.6.0": + "@nx/nx-linux-arm-gnueabihf@22.6.3": resolution: - { integrity: sha512-rb/KEq90/Su5mzPdDybURzHt8cTAqwJPd6K/Q1ojD9dmClYVsPUZjbGwNveeQRp/iD1kzbaUF2WcbJx1b87seg== } + { integrity: sha512-8gWDhe4lY3pegmKx5/z7z/h4adlmL+3wuPXMUlBtMkhJ5TX1z94PkVtHRprEsHuQHO7PsSFaOJdsIZbr/sx7SQ== } cpu: [arm] os: [linux] - "@nx/nx-linux-arm64-gnu@22.6.0": + "@nx/nx-linux-arm64-gnu@22.6.3": resolution: - { integrity: sha512-AfcY3cbtqwc43pIkI0vlgak70P7cQgt8RhfRpG9rd3LYEpdaVxxfKP+0unMFjT23UWEUfexHlJyLoam1lgIenQ== } + { integrity: sha512-ZRP5qf4lsk0HFuvhhSJc+t3a0NKc+WXElKPXTEK9DGOluY327lUogeZrSSJfxGf+dBTtpuRIO8rOIrnZOf5Xww== } cpu: [arm64] os: [linux] libc: [glibc] - "@nx/nx-linux-arm64-musl@22.6.0": + "@nx/nx-linux-arm64-musl@22.6.3": resolution: - { integrity: sha512-hvFMdPnS1nSnzyklOJMyQEC12ovC8h0JRAvdmpEKBPLiHV3Wjuj2IGSl0MCMI/YVMq3Y3uxRtwIKqHzYsZK8kw== } + { integrity: sha512-AcOf/5UJD7Fyc2ujHYajxLw+ajJ8C1IhHoCQyLwBpd/15lu3pii9Z9G4cNBm0ejKnnzofzRmhv2xka9qqCtpXQ== } cpu: [arm64] os: [linux] libc: [musl] - "@nx/nx-linux-x64-gnu@22.6.0": + "@nx/nx-linux-x64-gnu@22.6.3": resolution: - { integrity: sha512-1EM/M9RVVfqSWsSJAb8RLXGBGiVuwLb2AA4Dpv1pC+yjziAbfg9ERsVXuh14XaUTklBugI+Tm/k0dyZD2B22qw== } + { integrity: sha512-KxSdUCGOt2GGXzgggp9sSLJacWj7AAI410UPOEGw5F6GS5148e+kiy3piULF/0NE5/q40IK7gyS43HY99qgAqQ== } cpu: [x64] os: [linux] libc: [glibc] - "@nx/nx-linux-x64-musl@22.6.0": + "@nx/nx-linux-x64-musl@22.6.3": resolution: - { integrity: sha512-C33hO5YMv55K0XK+elkCUKEN3c/86KAVTpXRGr3Ywvw/5dftR4vYI/yfBUC/gbxW95AjzeX9fHtY1EThKUCvuA== } + { integrity: sha512-Tvlw6XvTj+5IQRkprV3AdCKnlQFYh2OJYn0wgHrvQWeV1Eks/RaCoRChfHXdAyE4S64YrBA6NAOxfXANh3yLTg== } cpu: [x64] os: [linux] libc: [musl] - "@nx/nx-win32-arm64-msvc@22.6.0": + "@nx/nx-win32-arm64-msvc@22.6.3": resolution: - { integrity: sha512-/NJ1CgAWBpR55PUENospq5sChxK9PC2NIgOI5BLZpyjClAW1dLwaKRr5EFDS4wBKzhz5Dp9ebmo92MiPEWsAvg== } + { integrity: sha512-9yRRuoVeQdV52GJtHo+vH6+es2PNF8skWlUa74jyWRsoZM9Ew8JmRZruRfhkUmhjJTrguqJLj9koa/NXgS0yeg== } cpu: [arm64] os: [win32] - "@nx/nx-win32-x64-msvc@22.6.0": + "@nx/nx-win32-x64-msvc@22.6.3": resolution: - { integrity: sha512-XY/csfuGjVwVFyFayU0ZWbnXPinVnP/AcjMi39SCWM72bxeSB1lKmPYo0z/18mJcGQRQC0mJrGpzr1YPlhW3mQ== } + { integrity: sha512-21wjiUSV5hMa1oj8UfpfMTxpROksWrr/minAv8ejmGFwUSoztSzAkNf5i4PESPsbYNytjKooDzzAiQMLo6b0kg== } cpu: [x64] os: [win32] @@ -3923,21 +3939,21 @@ packages: cpu: [x64] os: [win32] - "@shikijs/engine-oniguruma@3.20.0": + "@shikijs/engine-oniguruma@3.23.0": resolution: - { integrity: sha512-Yx3gy7xLzM0ZOjqoxciHjA7dAt5tyzJE3L4uQoM83agahy+PlW244XJSrmJRSBvGYELDhYXPacD4R/cauV5bzQ== } + { integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g== } - "@shikijs/langs@3.20.0": + "@shikijs/langs@3.23.0": resolution: - { integrity: sha512-le+bssCxcSHrygCWuOrYJHvjus6zhQ2K7q/0mgjiffRbkhM4o1EWu2m+29l0yEsHDbWaWPNnDUTRVVBvBBeKaA== } + { integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg== } - "@shikijs/themes@3.20.0": + "@shikijs/themes@3.23.0": resolution: - { integrity: sha512-U1NSU7Sl26Q7ErRvJUouArxfM2euWqq1xaSrbqMu2iqa+tSp0D1Yah8216sDYbdDHw4C8b75UpE65eWorm2erQ== } + { integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA== } - "@shikijs/types@3.20.0": + "@shikijs/types@3.23.0": resolution: - { integrity: sha512-lhYAATn10nkZcBQ0BlzSbJA3wcmL5MXUUF8d2Zzon6saZDlToKaiRX60n2+ZaHJCmXEcZRWNzn+k9vplr8Jhsw== } + { integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ== } "@shikijs/vscode-textmate@10.0.2": resolution: @@ -4023,6 +4039,13 @@ packages: cpu: [arm64] os: [darwin] + "@swc/core-darwin-arm64@1.15.21": + resolution: + { integrity: sha512-SA8SFg9dp0qKRH8goWsax6bptFE2EdmPf2YRAQW9WoHGf3XKM1bX0nd5UdwxmC5hXsBUZAYf7xSciCler6/oyA== } + engines: { node: ">=10" } + cpu: [arm64] + os: [darwin] + "@swc/core-darwin-x64@1.15.18": resolution: { integrity: sha512-wZle0eaQhnzxWX5V/2kEOI6Z9vl/lTFEC6V4EWcn+5pDjhemCpQv9e/TDJ0GIoiClX8EDWRvuZwh+Z3dhL1NAg== } @@ -4030,6 +4053,13 @@ packages: cpu: [x64] os: [darwin] + "@swc/core-darwin-x64@1.15.21": + resolution: + { integrity: sha512-//fOVntgowz9+V90lVsNCtyyrtbHp3jWH6Rch7MXHXbcvbLmbCTmssl5DeedUWLLGiAAW1wksBdqdGYOTjaNLw== } + engines: { node: ">=10" } + cpu: [x64] + os: [darwin] + "@swc/core-linux-arm-gnueabihf@1.15.18": resolution: { integrity: sha512-ao61HGXVqrJFHAcPtF4/DegmwEkVCo4HApnotLU8ognfmU8x589z7+tcf3hU+qBiU1WOXV5fQX6W9Nzs6hjxDw== } @@ -4037,6 +4067,13 @@ packages: cpu: [arm] os: [linux] + "@swc/core-linux-arm-gnueabihf@1.15.21": + resolution: + { integrity: sha512-meNI4Sh6h9h8DvIfEc0l5URabYMSuNvyisLmG6vnoYAS43s8ON3NJR8sDHvdP7NJTrLe0q/x2XCn6yL/BeHcZg== } + engines: { node: ">=10" } + cpu: [arm] + os: [linux] + "@swc/core-linux-arm64-gnu@1.15.18": resolution: { integrity: sha512-3xnctOBLIq3kj8PxOCgPrGjBLP/kNOddr6f5gukYt/1IZxsITQaU9TDyjeX6jG+FiCIHjCuWuffsyQDL5Ew1bg== } @@ -4045,6 +4082,14 @@ packages: os: [linux] libc: [glibc] + "@swc/core-linux-arm64-gnu@1.15.21": + resolution: + { integrity: sha512-QrXlNQnHeXqU2EzLlnsPoWEh8/GtNJLvfMiPsDhk+ht6Xv8+vhvZ5YZ/BokNWSIZiWPKLAqR0M7T92YF5tmD3g== } + engines: { node: ">=10" } + cpu: [arm64] + os: [linux] + libc: [glibc] + "@swc/core-linux-arm64-musl@1.15.18": resolution: { integrity: sha512-0a+Lix+FSSHBSBOA0XznCcHo5/1nA6oLLjcnocvzXeqtdjnPb+SvchItHI+lfeiuj1sClYPDvPMLSLyXFaiIKw== } @@ -4053,6 +4098,30 @@ packages: os: [linux] libc: [musl] + "@swc/core-linux-arm64-musl@1.15.21": + resolution: + { integrity: sha512-8/yGCMO333ultDaMQivE5CjO6oXDPeeg1IV4sphojPkb0Pv0i6zvcRIkgp60xDB+UxLr6VgHgt+BBgqS959E9g== } + engines: { node: ">=10" } + cpu: [arm64] + os: [linux] + libc: [musl] + + "@swc/core-linux-ppc64-gnu@1.15.21": + resolution: + { integrity: sha512-ucW0HzPx0s1dgRvcvuLSPSA/2Kk/VYTv9st8qe1Kc22Gu0Q0rH9+6TcBTmMuNIp0Xs4BPr1uBttmbO1wEGI49Q== } + engines: { node: ">=10" } + cpu: [ppc64] + os: [linux] + libc: [glibc] + + "@swc/core-linux-s390x-gnu@1.15.21": + resolution: + { integrity: sha512-ulTnOGc5I7YRObE/9NreAhQg94QkiR5qNhhcUZ1iFAYjzg/JGAi1ch+s/Ixe61pMIr8bfVrF0NOaB0f8wjaAfA== } + engines: { node: ">=10" } + cpu: [s390x] + os: [linux] + libc: [glibc] + "@swc/core-linux-x64-gnu@1.15.18": resolution: { integrity: sha512-wG9J8vReUlpaHz4KOD/5UE1AUgirimU4UFT9oZmupUDEofxJKYb1mTA/DrMj0s78bkBiNI+7Fo2EgPuvOJfuAA== } @@ -4061,6 +4130,14 @@ packages: os: [linux] libc: [glibc] + "@swc/core-linux-x64-gnu@1.15.21": + resolution: + { integrity: sha512-D0RokxtM+cPvSqJIKR6uja4hbD+scI9ezo95mBhfSyLUs9wnPPl26sLp1ZPR/EXRdYm3F3S6RUtVi+8QXhT24Q== } + engines: { node: ">=10" } + cpu: [x64] + os: [linux] + libc: [glibc] + "@swc/core-linux-x64-musl@1.15.18": resolution: { integrity: sha512-4nwbVvCphKzicwNWRmvD5iBaZj8JYsRGa4xOxJmOyHlMDpsvvJ2OR2cODlvWyGFH6BYL1MfIAK3qph3hp0Az6g== } @@ -4069,6 +4146,14 @@ packages: os: [linux] libc: [musl] + "@swc/core-linux-x64-musl@1.15.21": + resolution: + { integrity: sha512-nER8u7VeRfmU6fMDzl1NQAbbB/G7O2avmvCOwIul1uGkZ2/acbPH+DCL9h5+0yd/coNcxMBTL6NGepIew+7C2w== } + engines: { node: ">=10" } + cpu: [x64] + os: [linux] + libc: [musl] + "@swc/core-win32-arm64-msvc@1.15.18": resolution: { integrity: sha512-zk0RYO+LjiBCat2RTMHzAWaMky0cra9loH4oRrLKLLNuL+jarxKLFDA8xTZWEkCPLjUTwlRN7d28eDLLMgtUcQ== } @@ -4076,6 +4161,13 @@ packages: cpu: [arm64] os: [win32] + "@swc/core-win32-arm64-msvc@1.15.21": + resolution: + { integrity: sha512-+/AgNBnjYugUA8C0Do4YzymgvnGbztv7j8HKSQLvR/DQgZPoXQ2B3PqB2mTtGh/X5DhlJWiqnunN35JUgWcAeQ== } + engines: { node: ">=10" } + cpu: [arm64] + os: [win32] + "@swc/core-win32-ia32-msvc@1.15.18": resolution: { integrity: sha512-yVuTrZ0RccD5+PEkpcLOBAuPbYBXS6rslENvIXfvJGXSdX5QGi1ehC4BjAMl5FkKLiam4kJECUI0l7Hq7T1vwg== } @@ -4083,6 +4175,13 @@ packages: cpu: [ia32] os: [win32] + "@swc/core-win32-ia32-msvc@1.15.21": + resolution: + { integrity: sha512-IkSZj8PX/N4HcaFhMQtzmkV8YSnuNoJ0E6OvMwFiOfejPhiKXvl7CdDsn1f4/emYEIDO3fpgZW9DTaCRMDxaDA== } + engines: { node: ">=10" } + cpu: [ia32] + os: [win32] + "@swc/core-win32-x64-msvc@1.15.18": resolution: { integrity: sha512-7NRmE4hmUQNCbYU3Hn9Tz57mK9Qq4c97ZS+YlamlK6qG9Fb5g/BB3gPDe0iLlJkns/sYv2VWSkm8c3NmbEGjbg== } @@ -4090,6 +4189,13 @@ packages: cpu: [x64] os: [win32] + "@swc/core-win32-x64-msvc@1.15.21": + resolution: + { integrity: sha512-zUyWso7OOENB6e1N1hNuNn8vbvLsTdKQ5WKLgt/JcBNfJhKy/6jmBmqI3GXk/MyvQKd5SLvP7A0F36p7TeDqvw== } + engines: { node: ">=10" } + cpu: [x64] + os: [win32] + "@swc/core@1.15.18": resolution: { integrity: sha512-z87aF9GphWp//fnkRsqvtY+inMVPgYW3zSlXH1kJFvRT5H/wiAn+G32qW5l3oEk63KSF1x3Ov0BfHCObAmT8RA== } @@ -4100,6 +4206,16 @@ packages: "@swc/helpers": optional: true + "@swc/core@1.15.21": + resolution: + { integrity: sha512-fkk7NJcBscrR3/F8jiqlMptRHP650NxqDnspBMrRe5d8xOoCy9MLL5kOBLFXjFLfMo3KQQHhk+/jUULOMlR1uQ== } + engines: { node: ">=10" } + peerDependencies: + "@swc/helpers": ">=0.5.17" + peerDependenciesMeta: + "@swc/helpers": + optional: true + "@swc/counter@0.1.3": resolution: { integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ== } @@ -4240,9 +4356,9 @@ packages: resolution: { integrity: sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg== } - "@types/jsdom@28.0.0": + "@types/jsdom@28.0.1": resolution: - { integrity: sha512-A8TBQQC/xAOojy9kM8E46cqT00sF0h7dWjV8t8BJhUi2rG6JRh7XXQo/oLoENuZIQEpXsxLccLCnknyQd7qssQ== } + { integrity: sha512-GJq2QE4TAZ5ajSoCasn5DOFm8u1mI3tIFvM5tIq3W5U/RTB6gsHwc6Yhpl91X9VSDOUVblgXmG+2+sSvFQrdlw== } "@types/json-schema@7.0.15": resolution: @@ -4308,9 +4424,9 @@ packages: resolution: { integrity: sha512-72dv/zdhuyXWVHUXG2VTPEQdOG+oen95/DNFx2aMFFaY6LoITI6PwEqf5x31JF49kp2w9hvUzkNfTGBIeg61LQ== } - "@types/tough-cookie@4.0.2": + "@types/tough-cookie@4.0.5": resolution: - { integrity: sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw== } + { integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== } "@types/triple-beam@1.3.2": resolution: @@ -4450,57 +4566,57 @@ packages: { integrity: sha512-YWnmJkXbofiz9KbnbbwuA2rpGkFPLbAIetcCNO6mJ8gdhdZ/v7WDXsoGFAJuM6ikUFKTlSQnjWnVO4ux+UzS6A== } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } - "@vitest/coverage-v8@4.1.0": + "@vitest/coverage-v8@4.1.2": resolution: - { integrity: sha512-nDWulKeik2bL2Va/Wl4x7DLuTKAXa906iRFooIRPR+huHkcvp9QDkPQ2RJdmjOFrqOqvNfoSQLF68deE3xC3CQ== } + { integrity: sha512-sPK//PHO+kAkScb8XITeB1bf7fsk85Km7+rt4eeuRR3VS1/crD47cmV5wicisJmjNdfeokTZwjMk4Mj2d58Mgg== } peerDependencies: - "@vitest/browser": 4.1.0 - vitest: 4.1.0 + "@vitest/browser": 4.1.2 + vitest: 4.1.2 peerDependenciesMeta: "@vitest/browser": optional: true - "@vitest/expect@4.1.0": + "@vitest/expect@4.1.2": resolution: - { integrity: sha512-EIxG7k4wlWweuCLG9Y5InKFwpMEOyrMb6ZJ1ihYu02LVj/bzUwn2VMU+13PinsjRW75XnITeFrQBMH5+dLvCDA== } + { integrity: sha512-gbu+7B0YgUJ2nkdsRJrFFW6X7NTP44WlhiclHniUhxADQJH5Szt9mZ9hWnJPJ8YwOK5zUOSSlSvyzRf0u1DSBQ== } - "@vitest/mocker@4.1.0": + "@vitest/mocker@4.1.2": resolution: - { integrity: sha512-evxREh+Hork43+Y4IOhTo+h5lGmVRyjqI739Rz4RlUPqwrkFFDF6EMvOOYjTx4E8Tl6gyCLRL8Mu7Ry12a13Tw== } + { integrity: sha512-Ize4iQtEALHDttPRCmN+FKqOl2vxTiNUhzobQFFt/BM1lRUTG7zRCLOykG/6Vo4E4hnUdfVLo5/eqKPukcWW7Q== } peerDependencies: msw: ^2.4.9 - vite: ^6.0.0 || ^7.0.0 || ^8.0.0-0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: msw: optional: true vite: optional: true - "@vitest/pretty-format@4.1.0": + "@vitest/pretty-format@4.1.2": resolution: - { integrity: sha512-3RZLZlh88Ib0J7NQTRATfc/3ZPOnSUn2uDBUoGNn5T36+bALixmzphN26OUD3LRXWkJu4H0s5vvUeqBiw+kS0A== } + { integrity: sha512-dwQga8aejqeuB+TvXCMzSQemvV9hNEtDDpgUKDzOmNQayl2OG241PSWeJwKRH3CiC+sESrmoFd49rfnq7T4RnA== } - "@vitest/runner@4.1.0": + "@vitest/runner@4.1.2": resolution: - { integrity: sha512-Duvx2OzQ7d6OjchL+trw+aSrb9idh7pnNfxrklo14p3zmNL4qPCDeIJAK+eBKYjkIwG96Bc6vYuxhqDXQOWpoQ== } + { integrity: sha512-Gr+FQan34CdiYAwpGJmQG8PgkyFVmARK8/xSijia3eTFgVfpcpztWLuP6FttGNfPLJhaZVP/euvujeNYar36OQ== } - "@vitest/snapshot@4.1.0": + "@vitest/snapshot@4.1.2": resolution: - { integrity: sha512-0Vy9euT1kgsnj1CHttwi9i9o+4rRLEaPRSOJ5gyv579GJkNpgJK+B4HSv/rAWixx2wdAFci1X4CEPjiu2bXIMg== } + { integrity: sha512-g7yfUmxYS4mNxk31qbOYsSt2F4m1E02LFqO53Xpzg3zKMhLAPZAjjfyl9e6z7HrW6LvUdTwAQR3HHfLjpko16A== } - "@vitest/spy@4.1.0": + "@vitest/spy@4.1.2": resolution: - { integrity: sha512-pz77k+PgNpyMDv2FV6qmk5ZVau6c3R8HC8v342T2xlFxQKTrSeYw9waIJG8KgV9fFwAtTu4ceRzMivPTH6wSxw== } + { integrity: sha512-DU4fBnbVCJGNBwVA6xSToNXrkZNSiw59H8tcuUspVMsBDBST4nfvsPsEHDHGtWRRnqBERBQu7TrTKskmjqTXKA== } - "@vitest/ui@4.1.0": + "@vitest/ui@4.1.2": resolution: - { integrity: sha512-sTSDtVM1GOevRGsCNhp1mBUHKo9Qlc55+HCreFT4fe99AHxl1QQNXSL3uj4Pkjh5yEuWZIx8E2tVC94nnBZECQ== } + { integrity: sha512-/irhyeAcKS2u6Zokagf9tqZJ0t8S6kMZq4ZG9BHZv7I+fkRrYfQX4w7geYeC2r6obThz39PDxvXQzZX+qXqGeg== } peerDependencies: - vitest: 4.1.0 + vitest: 4.1.2 - "@vitest/utils@4.1.0": + "@vitest/utils@4.1.2": resolution: - { integrity: sha512-XfPXT6a8TZY3dcGY8EdwsBulFCIw+BeeX0RZn2x/BtiY/75YGh8FeWGG8QISN/WhaqSrE2OrlDgtF8q5uhOTmw== } + { integrity: sha512-xw2/TiX82lQHA06cgbqRKFb5lCAy3axQ4H4SoUFhUsg+wztiet+co86IAMDtF6Vm1hc7J6j09oh/rgDn+JdKIQ== } "@webassemblyjs/ast@1.14.1": resolution: @@ -4977,9 +5093,9 @@ packages: resolution: { integrity: sha512-JF9ptu1vP2coz98+5051jZ4PwQgd2ni8A+gYSN7EA7dPKIMf0pDlSUxhdmVOaV3/fYK5uWBkgSXJaRLr4+3A6g== } - canvas@3.2.1: + canvas@3.2.2: resolution: - { integrity: sha512-ej1sPFR5+0YWtaVp6S1N1FVz69TQCqmrkGeRvQxZeAB1nAIcjNTHVwrZtYtWFFBmQsF40/uDLehsW5KuYC99mg== } + { integrity: sha512-duEt4h1HHu9sJZyVKfLRXR6tsKPY7cEELzxSRJkwddOXYvQT3P/+es98SV384JA0zMOZ5s+9gatnGfM6sL4Drg== } engines: { node: ^18.12.0 || >= 20.9.0 } chai@6.2.2: @@ -5175,11 +5291,6 @@ packages: resolution: { integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== } - commander@7.2.0: - resolution: - { integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== } - engines: { node: ">= 10" } - comment-parser@1.4.5: resolution: { integrity: sha512-aRDkn3uyIlCFfk5NUA+VdwMmMsh8JGhc4hapfV4yxymHGQ3BVskMQfoXGpCo5IoBuQ9tS5iiVKhCpTcB4pW4qw== } @@ -5409,10 +5520,6 @@ packages: resolution: { integrity: sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== } - debounce@1.2.1: - resolution: - { integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug== } - debug@4.3.6: resolution: { integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== } @@ -5770,6 +5877,11 @@ packages: { integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== } engines: { node: ">=10" } + escape-string-regexp@5.0.0: + resolution: + { integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw== } + engines: { node: ">=12" } + eslint-config-prettier@10.1.8: resolution: { integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w== } @@ -5777,9 +5889,9 @@ packages: peerDependencies: eslint: ">=7.0.0" - eslint-plugin-jsdoc@62.8.0: + eslint-plugin-jsdoc@62.8.1: resolution: - { integrity: sha512-hu3r9/6JBmPG6wTcqtYzgZAnjEG2eqRUATfkFscokESg1VDxZM21ZaMire0KjeMwfj+SXvgB4Rvh5LBuesj92w== } + { integrity: sha512-e9358PdHgvcMF98foNd3L7hVCw70Lt+YcSL7JzlJebB8eT5oRJtW6bHMQKoAwJtw6q0q0w/fRIr2kwnHdFDI6A== } engines: { node: ^20.19.0 || ^22.13.0 || >=24 } peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 @@ -5833,9 +5945,9 @@ packages: { integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA== } engines: { node: ^20.19.0 || ^22.13.0 || >=24 } - eslint@10.0.3: + eslint@10.1.0: resolution: - { integrity: sha512-COV33RzXZkqhG9P2rZCFl9ZmJ7WL+gQSCRzE7RhkbclbQPtLAWReL7ysA0Sh4c8Im2U9ynybdR56PV0XcKvqaQ== } + { integrity: sha512-S9jlY/ELKEUwwQnqWDO+f+m6sercqOPSqXM5Go94l7DOmxHVDgmSFGWEzeE/gwgTAr0W103BWt0QLe/7mabIvA== } engines: { node: ^20.19.0 || ^22.13.0 || >=24 } hasBin: true peerDependencies: @@ -6070,14 +6182,14 @@ packages: { integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== } hasBin: true - flatted@3.3.3: - resolution: - { integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg== } - flatted@3.4.0: resolution: { integrity: sha512-kC6Bb+ooptOIvWj5B63EQWkF0FEnNjV2ZNkLMLZRDDduIiWeFF4iKnslwhiWxjAdbg4NzTNo6h0qLuvFrcx+Sw== } + flatted@3.4.2: + resolution: + { integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA== } + fn.name@1.1.0: resolution: { integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== } @@ -6399,6 +6511,10 @@ packages: resolution: { integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== } + html-escaper@3.0.3: + resolution: + { integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ== } + html-minifier-next@5.2.0: resolution: { integrity: sha512-11wQG8dw+sIEdIt8LNBdV8R8nyXwAX4ni8WSpTdulP3RN4evUSx12cwe0FuO9HRsteBTKUUlKZkS/2XRBSYfLg== } @@ -6816,9 +6932,9 @@ packages: peerDependencies: jsdom: ">=10.0.0" - jsdom@29.0.0: + jsdom@29.0.1: resolution: - { integrity: sha512-9FshNB6OepopZ08unmmGpsF7/qCjxGPbo3NbgfJAnPeHXnsODE9WWffXZtRFRFe0ntzaAOcSKNJFz8wiyvF1jQ== } + { integrity: sha512-z6JOK5gRO7aMybVq/y/MlIpKh8JIi68FBKMUtKkK2KH/wMSRlCxQ682d08LB9fYXplyY/UXG8P4XXTScmdjApg== } engines: { node: ^20.19.0 || ^22.13.0 || >=24.0.0 } peerDependencies: canvas: ^3.0.0 @@ -7308,9 +7424,9 @@ packages: { integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== } engines: { node: ">=8" } - markdown-it@14.1.0: + markdown-it@14.1.1: resolution: - { integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== } + { integrity: sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA== } hasBin: true matcher@3.0.0: @@ -7734,9 +7850,9 @@ packages: { integrity: sha512-f24vd5/57/MFSXNMfkerdDiK0EvScGOKO71iOWgJNgI1xVweDRmOA/EfjnPMRd5m+pnoPs/4A7DzuwSW0jZVyw== } hasBin: true - nx@22.6.0: + nx@22.6.3: resolution: - { integrity: sha512-pKkq/ZP2/4YcAQlDOQvtCmPz/gpTgn1AfBiYhcyKX970MilvK6lqb9u/PTLfbi146oqPyEmphupV8YsORDvJ6A== } + { integrity: sha512-8eIkEAlvkTvR2zY+yjhuTxMD6z4AtM1SumSBbwMmUMEXMtXE88fH0RL59T5V6MLjaov1exUM3lhUqPE3IyuBPg== } hasBin: true peerDependencies: "@swc-node/register": ^1.11.1 @@ -7973,9 +8089,9 @@ packages: resolution: { integrity: sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w== } - parse5@7.2.1: + parse5@7.3.0: resolution: - { integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ== } + { integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw== } parse5@8.0.0: resolution: @@ -8993,9 +9109,9 @@ packages: { integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ== } engines: { node: ">=12.0.0" } - tinyrainbow@3.0.3: + tinyrainbow@3.1.0: resolution: - { integrity: sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q== } + { integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw== } engines: { node: ">=14.0.0" } tldts-core@7.0.19: @@ -9227,13 +9343,13 @@ packages: peerDependencies: typedoc: ^0.28.1 - typedoc@0.28.17: + typedoc@0.28.18: resolution: - { integrity: sha512-ZkJ2G7mZrbxrKxinTQMjFqsCoYY6a5Luwv2GKbTnBCEgV2ihYm5CflA9JnJAwH0pZWavqfYxmDkFHPt4yx2oDQ== } + { integrity: sha512-NTWTUOFRQ9+SGKKTuWKUioUkjxNwtS3JDRPVKZAXGHZy2wCA8bdv2iJiyeePn0xkmK+TCCqZFT0X7+2+FLjngA== } engines: { node: ">= 18", pnpm: ">= 10" } hasBin: true peerDependencies: - typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x typescript-eslint@8.57.1: resolution: @@ -9286,13 +9402,13 @@ packages: resolution: { integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w== } - undici-types@7.22.0: + undici-types@7.24.5: resolution: - { integrity: sha512-RKZvifiL60xdsIuC80UY0dq8Z7DbJUV8/l2hOVbyZAxBzEeQU4Z58+4ZzJ6WN2Lidi9KzT5EbiGX+PI/UGYuRw== } + { integrity: sha512-kNh333UBSbgK35OIW7FwJTr9tTfVIG51Fm1tSVT7m8foPHfDVjsb7OIee/q/rs3bB2aV/3qOPgG5mHNWl1odiA== } - undici@7.24.3: + undici@7.24.6: resolution: - { integrity: sha512-eJdUmK/Wrx2d+mnWWmwwLRyA7OQCkLap60sk3dOK4ViZR7DKwwptwuIvFBg2HaiP9ESaEdhtpSymQPvytpmkCA== } + { integrity: sha512-Xi4agocCbRzt0yYMZGMA6ApD7gvtUFaxm4ZmeacWI4cZxaF6C+8I8QfofC20NAePiB/IcvZmzkJ7XPa471AEtA== } engines: { node: ">=20.18.1" } unicorn-magic@0.3.0: @@ -9461,22 +9577,22 @@ packages: yaml: optional: true - vitest@4.1.0: + vitest@4.1.2: resolution: - { integrity: sha512-YbDrMF9jM2Lqc++2530UourxZHmkKLxrs4+mYhEwqWS97WJ7wOYEkcr+QfRgJ3PW9wz3odRijLZjHEaRLTNbqw== } + { integrity: sha512-xjR1dMTVHlFLh98JE3i/f/WePqJsah4A0FK9cc8Ehp9Udk0AZk6ccpIZhh1qJ/yxVWRZ+Q54ocnD8TXmkhspGg== } engines: { node: ^20.0.0 || ^22.0.0 || >=24.0.0 } hasBin: true peerDependencies: "@edge-runtime/vm": "*" "@opentelemetry/api": ^1.9.0 "@types/node": ^20.0.0 || ^22.0.0 || >=24.0.0 - "@vitest/browser-playwright": 4.1.0 - "@vitest/browser-preview": 4.1.0 - "@vitest/browser-webdriverio": 4.1.0 - "@vitest/ui": 4.1.0 + "@vitest/browser-playwright": 4.1.2 + "@vitest/browser-preview": 4.1.2 + "@vitest/browser-webdriverio": 4.1.2 + "@vitest/ui": 4.1.2 happy-dom: "*" jsdom: "*" - vite: ^6.0.0 || ^7.0.0 || ^8.0.0-0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: "@edge-runtime/vm": optional: true @@ -9542,9 +9658,9 @@ packages: { integrity: sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ== } engines: { node: ">=20" } - webpack-bundle-analyzer@5.2.0: + webpack-bundle-analyzer@5.3.0: resolution: - { integrity: sha512-Etrauj1wYO/xjiz/Vfd6bW1lG9fEhrJpNmu10tv0X9kv+gyY3qiE09uYepqg1Xd0PxOvllRXwWYWjtQYoO/glQ== } + { integrity: sha512-PEhAoqiJ+47d0uLMx/+zo5XOvaU+Vk6N2ZLht7H3n09QLy/fhyvqGNwjdRUHJDgMN8crBR2ZwVHkIswT3Xuawg== } engines: { node: ">= 20.9.0" } hasBin: true @@ -9743,6 +9859,12 @@ packages: engines: { node: ">= 14.6" } hasBin: true + yaml@2.8.3: + resolution: + { integrity: sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg== } + engines: { node: ">= 14.6" } + hasBin: true + yargs-parser@20.2.9: resolution: { integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== } @@ -10044,7 +10166,7 @@ snapshots: luxon: 3.7.2 type-fest: 5.4.4 - "@discoveryjs/json-ext@0.5.7": {} + "@discoveryjs/json-ext@0.6.3": {} "@discoveryjs/json-ext@1.0.0": {} @@ -10080,7 +10202,7 @@ snapshots: "@es-joy/jsdoccomment@0.84.0": dependencies: "@types/estree": 1.0.8 - "@typescript-eslint/types": 8.57.0 + "@typescript-eslint/types": 8.57.1 comment-parser: 1.4.5 esquery: 1.7.0 jsdoc-type-pratt-parser: 7.1.1 @@ -10165,9 +10287,9 @@ snapshots: "@esbuild/win32-x64@0.27.2": optional: true - "@eslint-community/eslint-utils@4.9.1(eslint@10.0.3(jiti@2.6.1))": + "@eslint-community/eslint-utils@4.9.1(eslint@10.1.0(jiti@2.6.1))": dependencies: - eslint: 10.0.3(jiti@2.6.1) + eslint: 10.1.0(jiti@2.6.1) eslint-visitor-keys: 3.4.3 "@eslint-community/regexpp@4.12.2": {} @@ -10188,9 +10310,9 @@ snapshots: dependencies: "@types/json-schema": 7.0.15 - "@eslint/js@10.0.1(eslint@10.0.3(jiti@2.6.1))": + "@eslint/js@10.0.1(eslint@10.1.0(jiti@2.6.1))": optionalDependencies: - eslint: 10.0.3(jiti@2.6.1) + eslint: 10.1.0(jiti@2.6.1) "@eslint/object-schema@3.0.3": {} @@ -10203,12 +10325,12 @@ snapshots: "@fortawesome/fontawesome-free@7.2.0": {} - "@gerrit0/mini-shiki@3.20.0": + "@gerrit0/mini-shiki@3.23.0": dependencies: - "@shikijs/engine-oniguruma": 3.20.0 - "@shikijs/langs": 3.20.0 - "@shikijs/themes": 3.20.0 - "@shikijs/types": 3.20.0 + "@shikijs/engine-oniguruma": 3.23.0 + "@shikijs/langs": 3.23.0 + "@shikijs/themes": 3.23.0 + "@shikijs/types": 3.23.0 "@shikijs/vscode-textmate": 10.0.2 "@humanfs/core@0.19.1": {} @@ -10591,45 +10713,45 @@ snapshots: transitivePeerDependencies: - debug - "@nx/devkit@22.3.3(nx@22.6.0(@swc/core@1.15.18))": + "@nx/devkit@22.3.3(nx@22.6.3(@swc/core@1.15.21))": dependencies: "@zkochan/js-yaml": 0.0.7 ejs: 3.1.9 enquirer: 2.3.6 minimatch: 9.0.3 - nx: 22.6.0(@swc/core@1.15.18) + nx: 22.6.3(@swc/core@1.15.21) semver: 7.7.4 tslib: 2.8.1 yargs-parser: 21.1.1 - "@nx/nx-darwin-arm64@22.6.0": + "@nx/nx-darwin-arm64@22.6.3": optional: true - "@nx/nx-darwin-x64@22.6.0": + "@nx/nx-darwin-x64@22.6.3": optional: true - "@nx/nx-freebsd-x64@22.6.0": + "@nx/nx-freebsd-x64@22.6.3": optional: true - "@nx/nx-linux-arm-gnueabihf@22.6.0": + "@nx/nx-linux-arm-gnueabihf@22.6.3": optional: true - "@nx/nx-linux-arm64-gnu@22.6.0": + "@nx/nx-linux-arm64-gnu@22.6.3": optional: true - "@nx/nx-linux-arm64-musl@22.6.0": + "@nx/nx-linux-arm64-musl@22.6.3": optional: true - "@nx/nx-linux-x64-gnu@22.6.0": + "@nx/nx-linux-x64-gnu@22.6.3": optional: true - "@nx/nx-linux-x64-musl@22.6.0": + "@nx/nx-linux-x64-musl@22.6.3": optional: true - "@nx/nx-win32-arm64-msvc@22.6.0": + "@nx/nx-win32-arm64-msvc@22.6.3": optional: true - "@nx/nx-win32-x64-msvc@22.6.0": + "@nx/nx-win32-x64-msvc@22.6.3": optional: true "@octokit/auth-token@4.0.0": {} @@ -10957,20 +11079,20 @@ snapshots: "@rollup/rollup-win32-x64-msvc@4.59.0": optional: true - "@shikijs/engine-oniguruma@3.20.0": + "@shikijs/engine-oniguruma@3.23.0": dependencies: - "@shikijs/types": 3.20.0 + "@shikijs/types": 3.23.0 "@shikijs/vscode-textmate": 10.0.2 - "@shikijs/langs@3.20.0": + "@shikijs/langs@3.23.0": dependencies: - "@shikijs/types": 3.20.0 + "@shikijs/types": 3.23.0 - "@shikijs/themes@3.20.0": + "@shikijs/themes@3.23.0": dependencies: - "@shikijs/types": 3.20.0 + "@shikijs/types": 3.23.0 - "@shikijs/types@3.20.0": + "@shikijs/types@3.23.0": dependencies: "@shikijs/vscode-textmate": 10.0.2 "@types/hast": 3.0.4 @@ -11030,11 +11152,11 @@ snapshots: "@standard-schema/spec@1.1.0": {} - "@stylistic/eslint-plugin@5.10.0(eslint@10.0.3(jiti@2.6.1))": + "@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1))": dependencies: - "@eslint-community/eslint-utils": 4.9.1(eslint@10.0.3(jiti@2.6.1)) + "@eslint-community/eslint-utils": 4.9.1(eslint@10.1.0(jiti@2.6.1)) "@typescript-eslint/types": 8.57.0 - eslint: 10.0.3(jiti@2.6.1) + eslint: 10.1.0(jiti@2.6.1) eslint-visitor-keys: 4.2.1 espree: 10.4.0 estraverse: 5.3.0 @@ -11043,33 +11165,69 @@ snapshots: "@swc/core-darwin-arm64@1.15.18": optional: true + "@swc/core-darwin-arm64@1.15.21": + optional: true + "@swc/core-darwin-x64@1.15.18": optional: true + "@swc/core-darwin-x64@1.15.21": + optional: true + "@swc/core-linux-arm-gnueabihf@1.15.18": optional: true + "@swc/core-linux-arm-gnueabihf@1.15.21": + optional: true + "@swc/core-linux-arm64-gnu@1.15.18": optional: true + "@swc/core-linux-arm64-gnu@1.15.21": + optional: true + "@swc/core-linux-arm64-musl@1.15.18": optional: true + "@swc/core-linux-arm64-musl@1.15.21": + optional: true + + "@swc/core-linux-ppc64-gnu@1.15.21": + optional: true + + "@swc/core-linux-s390x-gnu@1.15.21": + optional: true + "@swc/core-linux-x64-gnu@1.15.18": optional: true + "@swc/core-linux-x64-gnu@1.15.21": + optional: true + "@swc/core-linux-x64-musl@1.15.18": optional: true + "@swc/core-linux-x64-musl@1.15.21": + optional: true + "@swc/core-win32-arm64-msvc@1.15.18": optional: true + "@swc/core-win32-arm64-msvc@1.15.21": + optional: true + "@swc/core-win32-ia32-msvc@1.15.18": optional: true + "@swc/core-win32-ia32-msvc@1.15.21": + optional: true + "@swc/core-win32-x64-msvc@1.15.18": optional: true + "@swc/core-win32-x64-msvc@1.15.21": + optional: true + "@swc/core@1.15.18": dependencies: "@swc/counter": 0.1.3 @@ -11086,6 +11244,24 @@ snapshots: "@swc/core-win32-ia32-msvc": 1.15.18 "@swc/core-win32-x64-msvc": 1.15.18 + "@swc/core@1.15.21": + dependencies: + "@swc/counter": 0.1.3 + "@swc/types": 0.1.25 + optionalDependencies: + "@swc/core-darwin-arm64": 1.15.21 + "@swc/core-darwin-x64": 1.15.21 + "@swc/core-linux-arm-gnueabihf": 1.15.21 + "@swc/core-linux-arm64-gnu": 1.15.21 + "@swc/core-linux-arm64-musl": 1.15.21 + "@swc/core-linux-ppc64-gnu": 1.15.21 + "@swc/core-linux-s390x-gnu": 1.15.21 + "@swc/core-linux-x64-gnu": 1.15.21 + "@swc/core-linux-x64-musl": 1.15.21 + "@swc/core-win32-arm64-msvc": 1.15.21 + "@swc/core-win32-ia32-msvc": 1.15.21 + "@swc/core-win32-x64-msvc": 1.15.21 + "@swc/counter@0.1.3": {} "@swc/types@0.1.25": @@ -11106,19 +11282,19 @@ snapshots: "@tsparticles/cli@3.3.8(@types/eslint@8.56.6)(esbuild@0.27.2)(jiti@2.6.1)(webpack-cli@7.0.2)": dependencies: - "@swc/core": 1.15.18 + "@swc/core": 1.15.21 "@tsparticles/depcruise-config": 3.3.5(dependency-cruiser@17.3.9) - "@tsparticles/eslint-config": 3.3.5(@types/eslint@8.56.6)(eslint@10.0.3(jiti@2.6.1)) + "@tsparticles/eslint-config": 3.3.5(@types/eslint@8.56.6)(eslint@10.1.0(jiti@2.6.1)) "@tsparticles/prettier-config": 3.3.5(prettier@3.8.1) "@tsparticles/tsconfig": 3.3.5(typescript@5.9.3) "@tsparticles/webpack-plugin": 3.3.5(@types/eslint@8.56.6)(esbuild@0.27.2)(jiti@2.6.1) commander: 14.0.3 dependency-cruiser: 17.3.9 - eslint: 10.0.3(jiti@2.6.1) - eslint-config-prettier: 10.1.8(eslint@10.0.3(jiti@2.6.1)) - eslint-plugin-jsdoc: 62.8.0(eslint@10.0.3(jiti@2.6.1)) - eslint-plugin-prettier: 5.5.5(@types/eslint@8.56.6)(eslint-config-prettier@10.1.8(eslint@10.0.3(jiti@2.6.1)))(eslint@10.0.3(jiti@2.6.1))(prettier@3.8.1) - eslint-plugin-tsdoc: 0.5.2(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) + eslint: 10.1.0(jiti@2.6.1) + eslint-config-prettier: 10.1.8(eslint@10.1.0(jiti@2.6.1)) + eslint-plugin-jsdoc: 62.8.1(eslint@10.1.0(jiti@2.6.1)) + eslint-plugin-prettier: 5.5.5(@types/eslint@8.56.6)(eslint-config-prettier@10.1.8(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(prettier@3.8.1) + eslint-plugin-tsdoc: 0.5.2(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) klaw: 4.1.0 lookpath: 1.2.3 path-scurry: 2.0.2 @@ -11126,10 +11302,10 @@ snapshots: prettier-plugin-multiline-arrays: 4.1.5(prettier@3.8.1) prompts: 2.4.2 rimraf: 6.1.3 - swc-loader: 0.2.7(@swc/core@1.15.18)(webpack@5.105.4) + swc-loader: 0.2.7(@swc/core@1.15.21)(webpack@5.105.4) typescript: 5.9.3 - typescript-eslint: 8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) - webpack: 5.105.4(@swc/core@1.15.18)(esbuild@0.27.2)(webpack-cli@7.0.2) + typescript-eslint: 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + webpack: 5.105.4(@swc/core@1.15.21)(esbuild@0.27.2)(webpack-cli@7.0.2) transitivePeerDependencies: - "@swc/helpers" - "@types/eslint" @@ -11146,21 +11322,21 @@ snapshots: dependencies: dependency-cruiser: 17.3.9 - "@tsparticles/eslint-config@3.3.5(@types/eslint@8.56.6)(eslint@10.0.3(jiti@2.6.1))": + "@tsparticles/eslint-config@3.3.5(@types/eslint@8.56.6)(eslint@10.1.0(jiti@2.6.1))": dependencies: - "@eslint/js": 10.0.1(eslint@10.0.3(jiti@2.6.1)) - "@stylistic/eslint-plugin": 5.10.0(eslint@10.0.3(jiti@2.6.1)) + "@eslint/js": 10.0.1(eslint@10.1.0(jiti@2.6.1)) + "@stylistic/eslint-plugin": 5.10.0(eslint@10.1.0(jiti@2.6.1)) "@tsparticles/prettier-config": 3.3.5(prettier@3.8.1) - eslint: 10.0.3(jiti@2.6.1) - eslint-config-prettier: 10.1.8(eslint@10.0.3(jiti@2.6.1)) - eslint-plugin-jsdoc: 62.8.0(eslint@10.0.3(jiti@2.6.1)) - eslint-plugin-prettier: 5.5.5(@types/eslint@8.56.6)(eslint-config-prettier@10.1.8(eslint@10.0.3(jiti@2.6.1)))(eslint@10.0.3(jiti@2.6.1))(prettier@3.8.1) - eslint-plugin-tsdoc: 0.5.2(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) + eslint: 10.1.0(jiti@2.6.1) + eslint-config-prettier: 10.1.8(eslint@10.1.0(jiti@2.6.1)) + eslint-plugin-jsdoc: 62.8.1(eslint@10.1.0(jiti@2.6.1)) + eslint-plugin-prettier: 5.5.5(@types/eslint@8.56.6)(eslint-config-prettier@10.1.8(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(prettier@3.8.1) + eslint-plugin-tsdoc: 0.5.2(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) jiti: 2.6.1 prettier: 3.8.1 prettier-plugin-multiline-arrays: 4.1.5(prettier@3.8.1) typescript: 5.9.3 - typescript-eslint: 8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) + typescript-eslint: 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - "@types/eslint" - supports-color @@ -11176,24 +11352,24 @@ snapshots: "@tsparticles/webpack-plugin@3.3.5(@types/eslint@8.56.6)(esbuild@0.27.2)(jiti@2.6.1)": dependencies: - "@stylistic/eslint-plugin": 5.10.0(eslint@10.0.3(jiti@2.6.1)) - "@swc/core": 1.15.18 - "@tsparticles/eslint-config": 3.3.5(@types/eslint@8.56.6)(eslint@10.0.3(jiti@2.6.1)) + "@stylistic/eslint-plugin": 5.10.0(eslint@10.1.0(jiti@2.6.1)) + "@swc/core": 1.15.21 + "@tsparticles/eslint-config": 3.3.5(@types/eslint@8.56.6)(eslint@10.1.0(jiti@2.6.1)) "@tsparticles/prettier-config": 3.3.5(prettier@3.8.1) browserslist: 4.28.1 - eslint: 10.0.3(jiti@2.6.1) - eslint-config-prettier: 10.1.8(eslint@10.0.3(jiti@2.6.1)) - eslint-plugin-jsdoc: 62.8.0(eslint@10.0.3(jiti@2.6.1)) - eslint-plugin-tsdoc: 0.5.2(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) + eslint: 10.1.0(jiti@2.6.1) + eslint-config-prettier: 10.1.8(eslint@10.1.0(jiti@2.6.1)) + eslint-plugin-jsdoc: 62.8.1(eslint@10.1.0(jiti@2.6.1)) + eslint-plugin-tsdoc: 0.5.2(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) prettier: 3.8.1 prettier-plugin-multiline-arrays: 4.1.5(prettier@3.8.1) - swc-loader: 0.2.7(@swc/core@1.15.18)(webpack@5.105.4) - terser-webpack-plugin: 5.4.0(@swc/core@1.15.18)(esbuild@0.27.2)(webpack@5.105.4) + swc-loader: 0.2.7(@swc/core@1.15.21)(webpack@5.105.4) + terser-webpack-plugin: 5.4.0(@swc/core@1.15.21)(esbuild@0.27.2)(webpack@5.105.4) typescript: 5.9.3 - typescript-eslint: 8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) - webpack: 5.105.4(@swc/core@1.15.18)(esbuild@0.27.2)(webpack-cli@7.0.2) - webpack-bundle-analyzer: 5.2.0 - webpack-cli: 7.0.2(webpack-bundle-analyzer@5.2.0)(webpack@5.105.4) + typescript-eslint: 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + webpack: 5.105.4(@swc/core@1.15.21)(esbuild@0.27.2)(webpack-cli@7.0.2) + webpack-bundle-analyzer: 5.3.0 + webpack-cli: 7.0.2(webpack-bundle-analyzer@5.3.0)(webpack@5.105.4) transitivePeerDependencies: - "@swc/helpers" - "@types/eslint" @@ -11282,12 +11458,12 @@ snapshots: "@types/http-errors@2.0.5": {} - "@types/jsdom@28.0.0": + "@types/jsdom@28.0.1": dependencies: "@types/node": 25.5.0 - "@types/tough-cookie": 4.0.2 - parse5: 7.2.1 - undici-types: 7.22.0 + "@types/tough-cookie": 4.0.5 + parse5: 7.3.0 + undici-types: 7.24.5 "@types/json-schema@7.0.15": {} @@ -11341,7 +11517,7 @@ snapshots: dependencies: "@types/node": 25.5.0 - "@types/tough-cookie@4.0.2": {} + "@types/tough-cookie@4.0.5": {} "@types/triple-beam@1.3.2": {} @@ -11358,15 +11534,15 @@ snapshots: "@types/node": 25.5.0 optional: true - "@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3))(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3)": + "@typescript-eslint/eslint-plugin@8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)": dependencies: "@eslint-community/regexpp": 4.12.2 - "@typescript-eslint/parser": 8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) + "@typescript-eslint/parser": 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) "@typescript-eslint/scope-manager": 8.57.1 - "@typescript-eslint/type-utils": 8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) - "@typescript-eslint/utils": 8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) + "@typescript-eslint/type-utils": 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + "@typescript-eslint/utils": 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) "@typescript-eslint/visitor-keys": 8.57.1 - eslint: 10.0.3(jiti@2.6.1) + eslint: 10.1.0(jiti@2.6.1) ignore: 7.0.5 natural-compare: 1.4.0 ts-api-utils: 2.4.0(typescript@5.9.3) @@ -11374,14 +11550,14 @@ snapshots: transitivePeerDependencies: - supports-color - "@typescript-eslint/parser@8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3)": + "@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)": dependencies: "@typescript-eslint/scope-manager": 8.57.1 "@typescript-eslint/types": 8.57.1 "@typescript-eslint/typescript-estree": 8.57.1(typescript@5.9.3) "@typescript-eslint/visitor-keys": 8.57.1 debug: 4.4.3(supports-color@5.5.0) - eslint: 10.0.3(jiti@2.6.1) + eslint: 10.1.0(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -11422,13 +11598,13 @@ snapshots: dependencies: typescript: 5.9.3 - "@typescript-eslint/type-utils@8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3)": + "@typescript-eslint/type-utils@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)": dependencies: "@typescript-eslint/types": 8.57.1 "@typescript-eslint/typescript-estree": 8.57.1(typescript@5.9.3) - "@typescript-eslint/utils": 8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) + "@typescript-eslint/utils": 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) debug: 4.4.3(supports-color@5.5.0) - eslint: 10.0.3(jiti@2.6.1) + eslint: 10.1.0(jiti@2.6.1) ts-api-utils: 2.4.0(typescript@5.9.3) typescript: 5.9.3 transitivePeerDependencies: @@ -11470,24 +11646,24 @@ snapshots: transitivePeerDependencies: - supports-color - "@typescript-eslint/utils@8.56.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3)": + "@typescript-eslint/utils@8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)": dependencies: - "@eslint-community/eslint-utils": 4.9.1(eslint@10.0.3(jiti@2.6.1)) + "@eslint-community/eslint-utils": 4.9.1(eslint@10.1.0(jiti@2.6.1)) "@typescript-eslint/scope-manager": 8.56.1 "@typescript-eslint/types": 8.56.1 "@typescript-eslint/typescript-estree": 8.56.1(typescript@5.9.3) - eslint: 10.0.3(jiti@2.6.1) + eslint: 10.1.0(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - "@typescript-eslint/utils@8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3)": + "@typescript-eslint/utils@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3)": dependencies: - "@eslint-community/eslint-utils": 4.9.1(eslint@10.0.3(jiti@2.6.1)) + "@eslint-community/eslint-utils": 4.9.1(eslint@10.1.0(jiti@2.6.1)) "@typescript-eslint/scope-manager": 8.57.1 "@typescript-eslint/types": 8.57.1 "@typescript-eslint/typescript-estree": 8.57.1(typescript@5.9.3) - eslint: 10.0.3(jiti@2.6.1) + eslint: 10.1.0(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color @@ -11502,10 +11678,10 @@ snapshots: "@typescript-eslint/types": 8.57.1 eslint-visitor-keys: 5.0.1 - "@vitest/coverage-v8@4.1.0(vitest@4.1.0)": + "@vitest/coverage-v8@4.1.2(vitest@4.1.2)": dependencies: "@bcoe/v8-coverage": 1.0.2 - "@vitest/utils": 4.1.0 + "@vitest/utils": 4.1.2 ast-v8-to-istanbul: 1.0.0 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 @@ -11513,60 +11689,60 @@ snapshots: magicast: 0.5.2 obug: 2.1.1 std-env: 4.0.0 - tinyrainbow: 3.0.3 - vitest: 4.1.0(@types/node@25.5.0)(@vitest/ui@4.1.0)(jsdom@29.0.0(canvas@3.2.1))(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.1)) + tinyrainbow: 3.1.0 + vitest: 4.1.2(@types/node@25.5.0)(@vitest/ui@4.1.2)(jsdom@29.0.1(canvas@3.2.2))(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.3)) - "@vitest/expect@4.1.0": + "@vitest/expect@4.1.2": dependencies: "@standard-schema/spec": 1.1.0 "@types/chai": 5.2.2 - "@vitest/spy": 4.1.0 - "@vitest/utils": 4.1.0 + "@vitest/spy": 4.1.2 + "@vitest/utils": 4.1.2 chai: 6.2.2 - tinyrainbow: 3.0.3 + tinyrainbow: 3.1.0 - "@vitest/mocker@4.1.0(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.1))": + "@vitest/mocker@4.1.2(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.3))": dependencies: - "@vitest/spy": 4.1.0 + "@vitest/spy": 4.1.2 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.1) + vite: 8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.3) - "@vitest/pretty-format@4.1.0": + "@vitest/pretty-format@4.1.2": dependencies: - tinyrainbow: 3.0.3 + tinyrainbow: 3.1.0 - "@vitest/runner@4.1.0": + "@vitest/runner@4.1.2": dependencies: - "@vitest/utils": 4.1.0 + "@vitest/utils": 4.1.2 pathe: 2.0.3 - "@vitest/snapshot@4.1.0": + "@vitest/snapshot@4.1.2": dependencies: - "@vitest/pretty-format": 4.1.0 - "@vitest/utils": 4.1.0 + "@vitest/pretty-format": 4.1.2 + "@vitest/utils": 4.1.2 magic-string: 0.30.21 pathe: 2.0.3 - "@vitest/spy@4.1.0": {} + "@vitest/spy@4.1.2": {} - "@vitest/ui@4.1.0(vitest@4.1.0)": + "@vitest/ui@4.1.2(vitest@4.1.2)": dependencies: - "@vitest/utils": 4.1.0 + "@vitest/utils": 4.1.2 fflate: 0.8.2 - flatted: 3.4.0 + flatted: 3.4.2 pathe: 2.0.3 sirv: 3.0.2 tinyglobby: 0.2.15 - tinyrainbow: 3.0.3 - vitest: 4.1.0(@types/node@25.5.0)(@vitest/ui@4.1.0)(jsdom@29.0.0(canvas@3.2.1))(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.1)) + tinyrainbow: 3.1.0 + vitest: 4.1.2(@types/node@25.5.0)(@vitest/ui@4.1.2)(jsdom@29.0.1(canvas@3.2.2))(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.3)) - "@vitest/utils@4.1.0": + "@vitest/utils@4.1.2": dependencies: - "@vitest/pretty-format": 4.1.0 + "@vitest/pretty-format": 4.1.2 convert-source-map: 2.0.0 - tinyrainbow: 3.0.3 + tinyrainbow: 3.1.0 "@webassemblyjs/ast@1.14.1": dependencies: @@ -11964,7 +12140,7 @@ snapshots: caniuse-lite@1.0.30001761: {} - canvas@3.2.1: + canvas@3.2.2: dependencies: node-addon-api: 7.1.1 prebuild-install: 7.1.3 @@ -12105,8 +12281,6 @@ snapshots: commander@2.20.3: {} - commander@7.2.0: {} - comment-parser@1.4.5: {} common-ancestor-path@1.0.1: {} @@ -12314,8 +12488,6 @@ snapshots: dateformat@3.0.3: {} - debounce@1.2.1: {} - debug@4.3.6: dependencies: ms: 2.1.2 @@ -12578,11 +12750,13 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-prettier@10.1.8(eslint@10.0.3(jiti@2.6.1)): + escape-string-regexp@5.0.0: {} + + eslint-config-prettier@10.1.8(eslint@10.1.0(jiti@2.6.1)): dependencies: - eslint: 10.0.3(jiti@2.6.1) + eslint: 10.1.0(jiti@2.6.1) - eslint-plugin-jsdoc@62.8.0(eslint@10.0.3(jiti@2.6.1)): + eslint-plugin-jsdoc@62.8.1(eslint@10.1.0(jiti@2.6.1)): dependencies: "@es-joy/jsdoccomment": 0.84.0 "@es-joy/resolve.exports": 1.2.0 @@ -12590,7 +12764,7 @@ snapshots: comment-parser: 1.4.5 debug: 4.4.3(supports-color@5.5.0) escape-string-regexp: 4.0.0 - eslint: 10.0.3(jiti@2.6.1) + eslint: 10.1.0(jiti@2.6.1) espree: 11.2.0 esquery: 1.7.0 html-entities: 2.6.0 @@ -12602,21 +12776,21 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-prettier@5.5.5(@types/eslint@8.56.6)(eslint-config-prettier@10.1.8(eslint@10.0.3(jiti@2.6.1)))(eslint@10.0.3(jiti@2.6.1))(prettier@3.8.1): + eslint-plugin-prettier@5.5.5(@types/eslint@8.56.6)(eslint-config-prettier@10.1.8(eslint@10.1.0(jiti@2.6.1)))(eslint@10.1.0(jiti@2.6.1))(prettier@3.8.1): dependencies: - eslint: 10.0.3(jiti@2.6.1) + eslint: 10.1.0(jiti@2.6.1) prettier: 3.8.1 prettier-linter-helpers: 1.0.1 synckit: 0.11.12 optionalDependencies: "@types/eslint": 8.56.6 - eslint-config-prettier: 10.1.8(eslint@10.0.3(jiti@2.6.1)) + eslint-config-prettier: 10.1.8(eslint@10.1.0(jiti@2.6.1)) - eslint-plugin-tsdoc@0.5.2(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-tsdoc@0.5.2(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3): dependencies: "@microsoft/tsdoc": 0.16.0 "@microsoft/tsdoc-config": 0.18.1 - "@typescript-eslint/utils": 8.56.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) + "@typescript-eslint/utils": 8.56.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) transitivePeerDependencies: - eslint - supports-color @@ -12642,9 +12816,9 @@ snapshots: eslint-visitor-keys@5.0.1: {} - eslint@10.0.3(jiti@2.6.1): + eslint@10.1.0(jiti@2.6.1): dependencies: - "@eslint-community/eslint-utils": 4.9.1(eslint@10.0.3(jiti@2.6.1)) + "@eslint-community/eslint-utils": 4.9.1(eslint@10.1.0(jiti@2.6.1)) "@eslint-community/regexpp": 4.12.2 "@eslint/config-array": 0.23.3 "@eslint/config-helpers": 0.5.3 @@ -12883,15 +13057,15 @@ snapshots: flat-cache@4.0.1: dependencies: - flatted: 3.3.3 + flatted: 3.4.0 keyv: 4.5.4 flat@5.0.2: {} - flatted@3.3.3: {} - flatted@3.4.0: {} + flatted@3.4.2: {} + fn.name@1.1.0: {} follow-redirects@1.15.6: {} @@ -13184,7 +13358,9 @@ snapshots: html-escaper@2.0.2: {} - html-minifier-next@5.2.0(@swc/core@1.15.18): + html-escaper@3.0.3: {} + + html-minifier-next@5.2.0(@swc/core@1.15.21): dependencies: commander: 14.0.3 entities: 7.0.1 @@ -13192,7 +13368,7 @@ snapshots: svgo: 4.0.1 terser: 5.46.0 optionalDependencies: - "@swc/core": 1.15.18 + "@swc/core": 1.15.21 http-cache-semantics@4.2.0: {} @@ -13476,11 +13652,11 @@ snapshots: jsdoc-type-pratt-parser@7.1.1: {} - jsdom-global@3.0.2(jsdom@29.0.0(canvas@3.2.1)): + jsdom-global@3.0.2(jsdom@29.0.1(canvas@3.2.2)): dependencies: - jsdom: 29.0.0(canvas@3.2.1) + jsdom: 29.0.1(canvas@3.2.2) - jsdom@29.0.0(canvas@3.2.1): + jsdom@29.0.1(canvas@3.2.2): dependencies: "@asamuzakjp/css-color": 5.0.1 "@asamuzakjp/dom-selector": 7.0.3 @@ -13497,14 +13673,14 @@ snapshots: saxes: 6.0.0 symbol-tree: 3.2.4 tough-cookie: 6.0.1 - undici: 7.24.3 + undici: 7.24.6 w3c-xmlserializer: 5.0.0 webidl-conversions: 8.0.1 whatwg-mimetype: 5.0.0 whatwg-url: 16.0.1 xml-name-validator: 5.0.0 optionalDependencies: - canvas: 3.2.1 + canvas: 3.2.2 transitivePeerDependencies: - "@noble/hashes" @@ -13580,12 +13756,12 @@ snapshots: kuler@2.0.0: {} - lerna@9.0.7(@swc/core@1.15.18)(@types/node@25.5.0): + lerna@9.0.7(@swc/core@1.15.21)(@types/node@25.5.0): dependencies: "@npmcli/arborist": 9.1.6 "@npmcli/package-json": 7.0.2 "@npmcli/run-script": 10.0.3 - "@nx/devkit": 22.3.3(nx@22.6.0(@swc/core@1.15.18)) + "@nx/devkit": 22.3.3(nx@22.6.3(@swc/core@1.15.21)) "@octokit/plugin-enterprise-rest": 6.0.1 "@octokit/rest": 20.1.2 aproba: 2.0.0 @@ -13623,7 +13799,7 @@ snapshots: npm-package-arg: 13.0.1 npm-packlist: 10.0.3 npm-registry-fetch: 19.1.0 - nx: 22.6.0(@swc/core@1.15.18) + nx: 22.6.3(@swc/core@1.15.21) p-map: 4.0.0 p-map-series: 2.1.0 p-pipe: 3.1.0 @@ -13934,7 +14110,7 @@ snapshots: map-obj@4.3.0: {} - markdown-it@14.1.0: + markdown-it@14.1.1: dependencies: argparse: 2.0.1 entities: 4.5.0 @@ -14010,13 +14186,13 @@ snapshots: minify@15.2.0: dependencies: "@putout/minify": 6.0.0 - "@swc/core": 1.15.18 + "@swc/core": 1.15.21 clean-css: 5.3.3 css-b64-images: 0.2.5 debug: 4.4.3(supports-color@5.5.0) esbuild: 0.27.2 find-up: 8.0.0 - html-minifier-next: 5.2.0(@swc/core@1.15.18) + html-minifier-next: 5.2.0(@swc/core@1.15.21) lightningcss: 1.30.2 montag: 1.2.1 oxc-minify: 0.116.0 @@ -14309,7 +14485,7 @@ snapshots: transitivePeerDependencies: - debug - nx@22.6.0(@swc/core@1.15.18): + nx@22.6.3(@swc/core@1.15.21): dependencies: "@ltd/j-toml": 1.38.0 "@napi-rs/wasm-runtime": 0.2.4 @@ -14332,7 +14508,6 @@ snapshots: jsonc-parser: 3.2.0 lines-and-columns: 2.0.3 minimatch: 10.2.4 - node-machine-id: 1.1.12 npm-run-path: 4.0.1 open: 8.4.2 ora: 5.3.0 @@ -14349,17 +14524,17 @@ snapshots: yargs: 17.7.2 yargs-parser: 21.1.1 optionalDependencies: - "@nx/nx-darwin-arm64": 22.6.0 - "@nx/nx-darwin-x64": 22.6.0 - "@nx/nx-freebsd-x64": 22.6.0 - "@nx/nx-linux-arm-gnueabihf": 22.6.0 - "@nx/nx-linux-arm64-gnu": 22.6.0 - "@nx/nx-linux-arm64-musl": 22.6.0 - "@nx/nx-linux-x64-gnu": 22.6.0 - "@nx/nx-linux-x64-musl": 22.6.0 - "@nx/nx-win32-arm64-msvc": 22.6.0 - "@nx/nx-win32-x64-msvc": 22.6.0 - "@swc/core": 1.15.18 + "@nx/nx-darwin-arm64": 22.6.3 + "@nx/nx-darwin-x64": 22.6.3 + "@nx/nx-freebsd-x64": 22.6.3 + "@nx/nx-linux-arm-gnueabihf": 22.6.3 + "@nx/nx-linux-arm64-gnu": 22.6.3 + "@nx/nx-linux-arm64-musl": 22.6.3 + "@nx/nx-linux-x64-gnu": 22.6.3 + "@nx/nx-linux-x64-musl": 22.6.3 + "@nx/nx-win32-arm64-msvc": 22.6.3 + "@nx/nx-win32-x64-msvc": 22.6.3 + "@swc/core": 1.15.21 transitivePeerDependencies: - debug @@ -14592,9 +14767,9 @@ snapshots: dependencies: parse-path: 7.0.0 - parse5@7.2.1: + parse5@7.3.0: dependencies: - entities: 4.5.0 + entities: 6.0.1 parse5@8.0.0: dependencies: @@ -15399,11 +15574,11 @@ snapshots: picocolors: 1.1.1 sax: 1.5.0 - swc-loader@0.2.7(@swc/core@1.15.18)(webpack@5.105.4): + swc-loader@0.2.7(@swc/core@1.15.21)(webpack@5.105.4): dependencies: - "@swc/core": 1.15.18 + "@swc/core": 1.15.21 "@swc/counter": 0.1.3 - webpack: 5.105.4(@swc/core@1.15.18)(esbuild@0.27.2)(webpack-cli@7.0.2) + webpack: 5.105.4(@swc/core@1.15.21)(esbuild@0.27.2)(webpack-cli@7.0.2) symbol-tree@3.2.4: {} @@ -15447,15 +15622,15 @@ snapshots: minizlib: 3.1.0 yallist: 5.0.0 - terser-webpack-plugin@5.4.0(@swc/core@1.15.18)(esbuild@0.27.2)(webpack@5.105.4): + terser-webpack-plugin@5.4.0(@swc/core@1.15.21)(esbuild@0.27.2)(webpack@5.105.4): dependencies: "@jridgewell/trace-mapping": 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 terser: 5.46.0 - webpack: 5.105.4(@swc/core@1.15.18)(esbuild@0.27.2)(webpack-cli@7.0.2) + webpack: 5.105.4(@swc/core@1.15.21)(esbuild@0.27.2)(webpack-cli@7.0.2) optionalDependencies: - "@swc/core": 1.15.18 + "@swc/core": 1.15.21 esbuild: 0.27.2 terser@5.44.1: @@ -15497,7 +15672,7 @@ snapshots: fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 - tinyrainbow@3.0.3: {} + tinyrainbow@3.1.0: {} tldts-core@7.0.19: {} @@ -15571,7 +15746,7 @@ snapshots: tslib: 2.8.1 typescript: 5.9.3 - ts-node@10.9.2(@swc/core@1.15.18)(@types/node@18.19.45)(typescript@5.5.4): + ts-node@10.9.2(@swc/core@1.15.21)(@types/node@18.19.45)(typescript@5.5.4): dependencies: "@cspotcode/source-map-support": 0.8.1 "@tsconfig/node10": 1.0.9 @@ -15589,9 +15764,9 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: - "@swc/core": 1.15.18 + "@swc/core": 1.15.21 - ts-node@10.9.2(@swc/core@1.15.18)(@types/node@25.5.0)(typescript@5.9.3): + ts-node@10.9.2(@swc/core@1.15.21)(@types/node@25.5.0)(typescript@5.9.3): dependencies: "@cspotcode/source-map-support": 0.8.1 "@tsconfig/node10": 1.0.9 @@ -15609,7 +15784,7 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: - "@swc/core": 1.15.18 + "@swc/core": 1.15.21 tsconfig-paths-webpack-plugin@4.2.0: dependencies: @@ -15669,61 +15844,61 @@ snapshots: typedarray@0.0.6: {} - typedoc-plugin-clarity@1.6.0(typedoc@0.28.17(typescript@5.9.3)): + typedoc-plugin-clarity@1.6.0(typedoc@0.28.18(typescript@5.9.3)): dependencies: - typedoc: 0.28.17(typescript@5.9.3) + typedoc: 0.28.18(typescript@5.9.3) typescript: 5.9.3 - typedoc-plugin-coverage@4.0.2(typedoc@0.28.17(typescript@5.9.3)): + typedoc-plugin-coverage@4.0.2(typedoc@0.28.18(typescript@5.9.3)): dependencies: - typedoc: 0.28.17(typescript@5.9.3) + typedoc: 0.28.18(typescript@5.9.3) - typedoc-plugin-google-ads@1.6.0(typedoc@0.28.17(typescript@5.9.3)): + typedoc-plugin-google-ads@1.6.0(typedoc@0.28.18(typescript@5.9.3)): dependencies: - typedoc: 0.28.17(typescript@5.9.3) + typedoc: 0.28.18(typescript@5.9.3) typescript: 5.9.3 - typedoc-plugin-keywords@1.6.0(typedoc@0.28.17(typescript@5.9.3)): + typedoc-plugin-keywords@1.6.0(typedoc@0.28.18(typescript@5.9.3)): dependencies: - typedoc: 0.28.17(typescript@5.9.3) + typedoc: 0.28.18(typescript@5.9.3) typescript: 5.9.3 - typedoc-plugin-mdn-links@5.1.1(typedoc@0.28.17(typescript@5.9.3)): + typedoc-plugin-mdn-links@5.1.1(typedoc@0.28.18(typescript@5.9.3)): dependencies: - typedoc: 0.28.17(typescript@5.9.3) + typedoc: 0.28.18(typescript@5.9.3) - typedoc-plugin-missing-exports@4.1.2(typedoc@0.28.17(typescript@5.9.3)): + typedoc-plugin-missing-exports@4.1.2(typedoc@0.28.18(typescript@5.9.3)): dependencies: - typedoc: 0.28.17(typescript@5.9.3) + typedoc: 0.28.18(typescript@5.9.3) - typedoc@0.28.17(typescript@5.9.3): + typedoc@0.28.18(typescript@5.9.3): dependencies: - "@gerrit0/mini-shiki": 3.20.0 + "@gerrit0/mini-shiki": 3.23.0 lunr: 2.3.9 - markdown-it: 14.1.0 - minimatch: 9.0.5 + markdown-it: 14.1.1 + minimatch: 10.2.4 typescript: 5.9.3 - yaml: 2.8.1 + yaml: 2.8.3 - typescript-eslint@8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3): + typescript-eslint@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3): dependencies: - "@typescript-eslint/eslint-plugin": 8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3))(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) - "@typescript-eslint/parser": 8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) + "@typescript-eslint/eslint-plugin": 8.57.1(@typescript-eslint/parser@8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + "@typescript-eslint/parser": 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) "@typescript-eslint/typescript-estree": 8.57.1(typescript@5.9.3) - "@typescript-eslint/utils": 8.57.1(eslint@10.0.3(jiti@2.6.1))(typescript@5.9.3) - eslint: 10.0.3(jiti@2.6.1) + "@typescript-eslint/utils": 8.57.1(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3) + eslint: 10.1.0(jiti@2.6.1) typescript: 5.9.3 transitivePeerDependencies: - supports-color - typescript-json-schema@0.67.1(@swc/core@1.15.18): + typescript-json-schema@0.67.1(@swc/core@1.15.21): dependencies: "@types/json-schema": 7.0.15 "@types/node": 18.19.45 glob: 7.2.3 path-equal: 1.2.5 safe-stable-stringify: 2.5.0 - ts-node: 10.9.2(@swc/core@1.15.18)(@types/node@18.19.45)(typescript@5.5.4) + ts-node: 10.9.2(@swc/core@1.15.21)(@types/node@18.19.45)(typescript@5.5.4) typescript: 5.5.4 vm2: 3.10.0 yargs: 17.7.2 @@ -15748,9 +15923,9 @@ snapshots: undici-types@7.18.2: {} - undici-types@7.22.0: {} + undici-types@7.24.5: {} - undici@7.24.3: {} + undici@7.24.6: {} unicorn-magic@0.3.0: {} @@ -15801,7 +15976,7 @@ snapshots: vary@1.1.2: {} - vite@7.3.1(@types/node@25.5.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.1): + vite@7.3.1(@types/node@25.5.0)(jiti@2.6.1)(lightningcss@1.32.0)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.3): dependencies: esbuild: 0.27.2 fdir: 6.5.0(picomatch@4.0.3) @@ -15817,9 +15992,9 @@ snapshots: sass: 1.98.0 stylus: 0.64.0 terser: 5.46.0 - yaml: 2.8.1 + yaml: 2.8.3 - vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.1): + vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.3): dependencies: lightningcss: 1.32.0 picomatch: 4.0.3 @@ -15834,17 +16009,17 @@ snapshots: sass: 1.98.0 stylus: 0.64.0 terser: 5.46.0 - yaml: 2.8.1 + yaml: 2.8.3 - vitest@4.1.0(@types/node@25.5.0)(@vitest/ui@4.1.0)(jsdom@29.0.0(canvas@3.2.1))(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.1)): + vitest@4.1.2(@types/node@25.5.0)(@vitest/ui@4.1.2)(jsdom@29.0.1(canvas@3.2.2))(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.3)): dependencies: - "@vitest/expect": 4.1.0 - "@vitest/mocker": 4.1.0(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.1)) - "@vitest/pretty-format": 4.1.0 - "@vitest/runner": 4.1.0 - "@vitest/snapshot": 4.1.0 - "@vitest/spy": 4.1.0 - "@vitest/utils": 4.1.0 + "@vitest/expect": 4.1.2 + "@vitest/mocker": 4.1.2(vite@8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.3)) + "@vitest/pretty-format": 4.1.2 + "@vitest/runner": 4.1.2 + "@vitest/snapshot": 4.1.2 + "@vitest/spy": 4.1.2 + "@vitest/utils": 4.1.2 es-module-lexer: 2.0.0 expect-type: 1.3.0 magic-string: 0.30.21 @@ -15855,13 +16030,13 @@ snapshots: tinybench: 2.9.0 tinyexec: 1.0.2 tinyglobby: 0.2.15 - tinyrainbow: 3.0.3 - vite: 8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.1) + tinyrainbow: 3.1.0 + vite: 8.0.1(@types/node@25.5.0)(esbuild@0.27.2)(jiti@2.6.1)(sass@1.98.0)(stylus@0.64.0)(terser@5.46.0)(yaml@2.8.3) why-is-node-running: 2.3.0 optionalDependencies: "@types/node": 25.5.0 - "@vitest/ui": 4.1.0(vitest@4.1.0) - jsdom: 29.0.0(canvas@3.2.1) + "@vitest/ui": 4.1.2(vitest@4.1.2) + jsdom: 29.0.1(canvas@3.2.2) transitivePeerDependencies: - msw @@ -15893,15 +16068,14 @@ snapshots: webidl-conversions@8.0.1: {} - webpack-bundle-analyzer@5.2.0: + webpack-bundle-analyzer@5.3.0: dependencies: - "@discoveryjs/json-ext": 0.5.7 - acorn: 8.15.0 - acorn-walk: 8.3.4 - commander: 7.2.0 - debounce: 1.2.1 - escape-string-regexp: 4.0.0 - html-escaper: 2.0.2 + "@discoveryjs/json-ext": 0.6.3 + acorn: 8.16.0 + acorn-walk: 8.3.5 + commander: 14.0.3 + escape-string-regexp: 5.0.0 + html-escaper: 3.0.3 opener: 1.5.2 picocolors: 1.1.1 sirv: 3.0.2 @@ -15910,7 +16084,7 @@ snapshots: - bufferutil - utf-8-validate - webpack-cli@7.0.2(webpack-bundle-analyzer@5.2.0)(webpack@5.105.4): + webpack-cli@7.0.2(webpack-bundle-analyzer@5.3.0)(webpack@5.105.4): dependencies: "@discoveryjs/json-ext": 1.0.0 commander: 14.0.3 @@ -15920,10 +16094,10 @@ snapshots: import-local: 3.1.0 interpret: 3.1.1 rechoir: 0.8.0 - webpack: 5.105.4(@swc/core@1.15.18)(esbuild@0.27.2)(webpack-cli@7.0.2) + webpack: 5.105.4(@swc/core@1.15.21)(esbuild@0.27.2)(webpack-cli@7.0.2) webpack-merge: 6.0.1 optionalDependencies: - webpack-bundle-analyzer: 5.2.0 + webpack-bundle-analyzer: 5.3.0 webpack-merge@6.0.1: dependencies: @@ -15933,7 +16107,7 @@ snapshots: webpack-sources@3.3.4: {} - webpack@5.105.4(@swc/core@1.15.18)(esbuild@0.27.2)(webpack-cli@7.0.2): + webpack@5.105.4(@swc/core@1.15.21)(esbuild@0.27.2)(webpack-cli@7.0.2): dependencies: "@types/eslint-scope": 3.7.7 "@types/estree": 1.0.8 @@ -15957,11 +16131,11 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.0 - terser-webpack-plugin: 5.4.0(@swc/core@1.15.18)(esbuild@0.27.2)(webpack@5.105.4) + terser-webpack-plugin: 5.4.0(@swc/core@1.15.21)(esbuild@0.27.2)(webpack@5.105.4) watchpack: 2.5.1 webpack-sources: 3.3.4 optionalDependencies: - webpack-cli: 7.0.2(webpack-bundle-analyzer@5.2.0)(webpack@5.105.4) + webpack-cli: 7.0.2(webpack-bundle-analyzer@5.3.0)(webpack@5.105.4) transitivePeerDependencies: - "@swc/core" - esbuild @@ -16088,6 +16262,8 @@ snapshots: yaml@2.8.1: {} + yaml@2.8.3: {} + yargs-parser@20.2.9: {} yargs-parser@21.1.1: {} diff --git a/shapes/arrow/CHANGELOG.md b/shapes/arrow/CHANGELOG.md index 1bb25988668..8d24e315cba 100644 --- a/shapes/arrow/CHANGELOG.md +++ b/shapes/arrow/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-arrow + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-arrow diff --git a/shapes/arrow/package.dist.json b/shapes/arrow/package.dist.json index 631abc0f051..d274165ef35 100644 --- a/shapes/arrow/package.dist.json +++ b/shapes/arrow/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-arrow", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles arrow shape", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/arrow/package.json b/shapes/arrow/package.json index 2ac980559a4..d4fc8311b70 100644 --- a/shapes/arrow/package.json +++ b/shapes/arrow/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-arrow", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles arrow shape", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/arrow/src/index.ts b/shapes/arrow/src/index.ts index f6a21f194e3..71195ce01ce 100644 --- a/shapes/arrow/src/index.ts +++ b/shapes/arrow/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadArrowShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["arrow"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["arrow"], async () => { const { ArrowDrawer } = await import("./ArrowDrawer.js"); return new ArrowDrawer(); diff --git a/shapes/cards/CHANGELOG.md b/shapes/cards/CHANGELOG.md index 3c643e0c44a..bf06e4f5c84 100644 --- a/shapes/cards/CHANGELOG.md +++ b/shapes/cards/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-cards + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-cards diff --git a/shapes/cards/package.dist.json b/shapes/cards/package.dist.json index 97de6deddb4..98eb6224bba 100644 --- a/shapes/cards/package.dist.json +++ b/shapes/cards/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-cards", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles cards shape", "homepage": "https://particles.js.org", "repository": { @@ -100,8 +100,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/path-utils": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/path-utils": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/cards/package.json b/shapes/cards/package.json index 9b423102942..af49c0a59d1 100644 --- a/shapes/cards/package.json +++ b/shapes/cards/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-cards", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles cards shape", "homepage": "https://particles.js.org", "scripts": { @@ -108,8 +108,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/path-utils": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/path-utils": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/cards/src/cards/CardDrawer.ts b/shapes/cards/src/cards/CardDrawer.ts index 0b49aac78b7..3762b7ca1bc 100644 --- a/shapes/cards/src/cards/CardDrawer.ts +++ b/shapes/cards/src/cards/CardDrawer.ts @@ -4,6 +4,12 @@ import type { ICardData } from "../ICardData.js"; import { drawRoundedCard } from "../utils.js"; export class CardDrawer implements IShapeDrawer { + private readonly _container; + + constructor(container: Container) { + this._container = container; + } + draw(data: IShapeDrawData): void { const { context, particle, opacity, radius } = data; @@ -11,7 +17,8 @@ export class CardDrawer implements IShapeDrawer { return; } - const defaultOpacity = context.globalAlpha; + const defaultOpacity = context.globalAlpha, + container = this._container; context.globalAlpha = opacity; @@ -19,9 +26,9 @@ export class CardDrawer implements IShapeDrawer { context, radius, particle.cardData, - particle.container.hdr, + container.hdr, particle.isShowingBack(), - particle.container.canvas.settings, + container.canvas.render.settings, ); context.globalAlpha = defaultOpacity; diff --git a/shapes/cards/src/cards/index.ts b/shapes/cards/src/cards/index.ts index 0af7b98c5f6..851678b86c8 100644 --- a/shapes/cards/src/cards/index.ts +++ b/shapes/cards/src/cards/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadFullCardsShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["card"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["card"], async container => { const { CardDrawer } = await import("./CardDrawer.js"); - return new CardDrawer(); + return new CardDrawer(container); }); }); } diff --git a/shapes/cards/src/clubs/index.ts b/shapes/cards/src/clubs/index.ts index 07911293eae..e5a56dfd320 100644 --- a/shapes/cards/src/clubs/index.ts +++ b/shapes/cards/src/clubs/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadClubsSuitShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["club", "clubs"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["club", "clubs"], async () => { const { ClubDrawer } = await import("./ClubDrawer.js"); return new ClubDrawer(); diff --git a/shapes/cards/src/diamonds/index.ts b/shapes/cards/src/diamonds/index.ts index d0b51fdcad9..e96e01549ca 100644 --- a/shapes/cards/src/diamonds/index.ts +++ b/shapes/cards/src/diamonds/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadDiamondsSuitShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["diamond", "diamonds"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["diamond", "diamonds"], async () => { const { DiamondDrawer } = await import("./DiamondDrawer.js"); return new DiamondDrawer(); diff --git a/shapes/cards/src/hearts/index.ts b/shapes/cards/src/hearts/index.ts index c884bad6b2b..adf6d091ca5 100644 --- a/shapes/cards/src/hearts/index.ts +++ b/shapes/cards/src/hearts/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadHeartsSuitShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["heart", "hearts"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["heart", "hearts"], async () => { const { HeartDrawer } = await import("./HeartDrawer.js"); return new HeartDrawer(); diff --git a/shapes/cards/src/index.ts b/shapes/cards/src/index.ts index 9df7292e41a..7ae17617dbb 100644 --- a/shapes/cards/src/index.ts +++ b/shapes/cards/src/index.ts @@ -8,7 +8,7 @@ declare const __VERSION__: string; export async function loadCardSuitsShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const [ { loadClubsSuitShape }, { loadDiamondsSuitShape }, @@ -36,7 +36,7 @@ export async function loadCardSuitsShape(engine: Engine): Promise { export async function loadCardsShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { loadFullCardsShape } = await import("./cards/index.js"); await Promise.all([ diff --git a/shapes/cards/src/spades/index.ts b/shapes/cards/src/spades/index.ts index fbe80568598..a124b65437c 100644 --- a/shapes/cards/src/spades/index.ts +++ b/shapes/cards/src/spades/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadSpadesSuitShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["spade", "spades"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["spade", "spades"], async () => { const { SpadeDrawer } = await import("./SpadeDrawer.js"); return new SpadeDrawer(); diff --git a/shapes/cards/src/utils.ts b/shapes/cards/src/utils.ts index e93a0a85f01..38ae249b32a 100644 --- a/shapes/cards/src/utils.ts +++ b/shapes/cards/src/utils.ts @@ -1,4 +1,5 @@ import { + type CanvasContextType, type IRgb, double, doublePI, @@ -41,7 +42,7 @@ const cardWidthRatio = (double * double) / triple, * @param canvasSettings - */ export function drawRoundedCard( - ctx: CanvasRenderingContext2D, + ctx: CanvasContextType, radius: number, cardData: ICardData, hdr: boolean, @@ -60,8 +61,7 @@ export function drawRoundedCard( let cachedData = cardsCache.get(cacheKey); if (!cachedData) { - let cacheCanvas: HTMLCanvasElement | OffscreenCanvas, - cacheCtx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D | null; + let cacheCanvas: HTMLCanvasElement | OffscreenCanvas, cacheCtx: CanvasContextType | null; if (typeof OffscreenCanvas === "undefined") { cacheCanvas = safeDocument().createElement("canvas"); @@ -108,7 +108,7 @@ function getCacheKey(radius: number, hdr: boolean, cardData: ICardData): string * @param ctx - * @param radius - */ -function drawRoundedCardBack(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, radius: number): void { +function drawRoundedCardBack(ctx: CanvasContextType, radius: number): void { drawCardBody(ctx, radius); } @@ -118,12 +118,7 @@ function drawRoundedCardBack(ctx: CanvasRenderingContext2D | OffscreenCanvasRend * @param cardData - * @param hdr - */ -function drawRoundedCardFront( - ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, - radius: number, - cardData: ICardData, - hdr: boolean, -): void { +function drawRoundedCardFront(ctx: CanvasContextType, radius: number, cardData: ICardData, hdr: boolean): void { const { suit, value } = cardData, cardWidth = radius * cardWidthRatio, cardHeight = radius * cardHeightRatio, @@ -207,7 +202,7 @@ function drawRoundedCardFront( * @param ctx - * @param radius - */ -function drawCardBody(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, radius: number): void { +function drawCardBody(ctx: CanvasContextType, radius: number): void { const cardWidth = radius * cardWidthRatio, cardHeight = radius * cardHeightRatio, halfWidth = cardWidth * half, diff --git a/shapes/circle/CHANGELOG.md b/shapes/circle/CHANGELOG.md index 5204503427d..1c3a258abbf 100644 --- a/shapes/circle/CHANGELOG.md +++ b/shapes/circle/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-circle + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-circle diff --git a/shapes/circle/package.dist.json b/shapes/circle/package.dist.json index 986f383e3c4..daeeb1aa711 100644 --- a/shapes/circle/package.dist.json +++ b/shapes/circle/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-circle", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles circle shape", "homepage": "https://particles.js.org", "repository": { @@ -59,7 +59,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/circle/package.json b/shapes/circle/package.json index 618c0c4d837..5614a2189ee 100644 --- a/shapes/circle/package.json +++ b/shapes/circle/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-circle", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles circle shape", "homepage": "https://particles.js.org", "scripts": { @@ -64,7 +64,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/circle/src/index.ts b/shapes/circle/src/index.ts index 46bebc31df8..d53acffa8e3 100644 --- a/shapes/circle/src/index.ts +++ b/shapes/circle/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadCircleShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["circle"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["circle"], async () => { const { CircleDrawer } = await import("./CircleDrawer.js"); return new CircleDrawer(); diff --git a/shapes/cog/CHANGELOG.md b/shapes/cog/CHANGELOG.md index 3a99107a372..e27592b1454 100644 --- a/shapes/cog/CHANGELOG.md +++ b/shapes/cog/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-cog + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-cog diff --git a/shapes/cog/package.dist.json b/shapes/cog/package.dist.json index 0180b11624d..1dcd71b8b20 100644 --- a/shapes/cog/package.dist.json +++ b/shapes/cog/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-cog", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles cog shape", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/cog/package.json b/shapes/cog/package.json index 41ae9a2b79b..afebb6e0628 100644 --- a/shapes/cog/package.json +++ b/shapes/cog/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-cog", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles cog shape", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/cog/src/index.ts b/shapes/cog/src/index.ts index 0c5b7a4ce4c..c5d0d2fc32f 100644 --- a/shapes/cog/src/index.ts +++ b/shapes/cog/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadCogShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["cog"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["cog"], async () => { const { CogDrawer } = await import("./CogDrawer.js"); return new CogDrawer(); diff --git a/shapes/emoji/CHANGELOG.md b/shapes/emoji/CHANGELOG.md index ad10c08dade..fc09746911e 100644 --- a/shapes/emoji/CHANGELOG.md +++ b/shapes/emoji/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-emoji + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-emoji diff --git a/shapes/emoji/package.dist.json b/shapes/emoji/package.dist.json index 1e301eb3c3b..1724830bae1 100644 --- a/shapes/emoji/package.dist.json +++ b/shapes/emoji/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-emoji", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emoji shape", "homepage": "https://particles.js.org", "repository": { @@ -59,8 +59,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "4.0.0-beta.0", - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/canvas-utils": "4.0.0-beta.1", + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/emoji/package.json b/shapes/emoji/package.json index 430c851cb60..6a5686f7974 100644 --- a/shapes/emoji/package.json +++ b/shapes/emoji/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-emoji", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles emoji shape", "homepage": "https://particles.js.org", "scripts": { @@ -67,8 +67,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/canvas-utils": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/emoji/src/EmojiDrawer.ts b/shapes/emoji/src/EmojiDrawer.ts index f69eab46c13..b02464f1657 100644 --- a/shapes/emoji/src/EmojiDrawer.ts +++ b/shapes/emoji/src/EmojiDrawer.ts @@ -1,4 +1,5 @@ import { + type CanvasContextType, type Container, type IShapeDrawData, type IShapeDrawer, @@ -113,8 +114,7 @@ export class EmojiDrawer implements IShapeDrawer { fullSize = maxSize + padding, canvasSize = fullSize * double; - let cacheCanvas: HTMLCanvasElement | OffscreenCanvas, - context: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D | null; + let cacheCanvas: HTMLCanvasElement | OffscreenCanvas, context: CanvasContextType | null; if (typeof OffscreenCanvas === "undefined") { const canvas = safeDocument().createElement("canvas"); @@ -122,11 +122,11 @@ export class EmojiDrawer implements IShapeDrawer { canvas.width = canvasSize; canvas.height = canvasSize; - context = canvas.getContext("2d", container.canvas.settings); + context = canvas.getContext("2d", container.canvas.render.settings); cacheCanvas = canvas; } else { cacheCanvas = new OffscreenCanvas(canvasSize, canvasSize); - context = cacheCanvas.getContext("2d", container.canvas.settings); + context = cacheCanvas.getContext("2d", container.canvas.render.settings); } if (!context) { diff --git a/shapes/emoji/src/index.ts b/shapes/emoji/src/index.ts index fb8a2e8ffb9..6924dcf9cc9 100644 --- a/shapes/emoji/src/index.ts +++ b/shapes/emoji/src/index.ts @@ -9,8 +9,8 @@ declare const __VERSION__: string; export async function loadEmojiShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(validTypes, async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(validTypes, async () => { const { EmojiDrawer } = await import("./EmojiDrawer.js"); return new EmojiDrawer(); diff --git a/shapes/heart/CHANGELOG.md b/shapes/heart/CHANGELOG.md index 353cb664bf8..fc7c6677d34 100644 --- a/shapes/heart/CHANGELOG.md +++ b/shapes/heart/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-heart + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-heart diff --git a/shapes/heart/package.dist.json b/shapes/heart/package.dist.json index a8e1759793a..6b1892491d6 100644 --- a/shapes/heart/package.dist.json +++ b/shapes/heart/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-heart", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles heart shape", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/heart/package.json b/shapes/heart/package.json index 187b9c1f059..27a3063838b 100644 --- a/shapes/heart/package.json +++ b/shapes/heart/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-heart", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles heart shape", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/heart/src/index.ts b/shapes/heart/src/index.ts index ac8a27d93b7..3764317047f 100644 --- a/shapes/heart/src/index.ts +++ b/shapes/heart/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadHeartShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["heart"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["heart"], async () => { const { HeartDrawer } = await import("./HeartDrawer.js"); return new HeartDrawer(); diff --git a/shapes/image/CHANGELOG.md b/shapes/image/CHANGELOG.md index e0e6737b5d6..f12dca539e4 100644 --- a/shapes/image/CHANGELOG.md +++ b/shapes/image/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-image + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-image diff --git a/shapes/image/package.dist.json b/shapes/image/package.dist.json index d7759c4fb3a..9a1c846a262 100644 --- a/shapes/image/package.dist.json +++ b/shapes/image/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-image", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles image shape", "homepage": "https://particles.js.org", "repository": { @@ -59,7 +59,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/image/package.json b/shapes/image/package.json index 6a1126fda7f..27fa5854a7f 100644 --- a/shapes/image/package.json +++ b/shapes/image/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-image", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles image shape", "homepage": "https://particles.js.org", "scripts": { @@ -67,7 +67,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/image/src/ImageDrawer.ts b/shapes/image/src/ImageDrawer.ts index 1c2288f54e2..0a349c1cf85 100644 --- a/shapes/image/src/ImageDrawer.ts +++ b/shapes/image/src/ImageDrawer.ts @@ -17,14 +17,17 @@ const sides = 12; * Particles Image Drawer */ export class ImageDrawer implements IShapeDrawer { - private readonly _engine: ImageEngine; + private readonly _container; + private readonly _engine; /** * Image drawer constructor, initializing the image set collection * @param engine - + * @param container - */ - constructor(engine: ImageEngine) { + constructor(engine: ImageEngine, container: ImageContainer) { this._engine = engine; + this._container = container; } /** @@ -43,7 +46,7 @@ export class ImageDrawer implements IShapeDrawer { context.globalAlpha = opacity; if (image.gif && image.gifData) { - drawGif(data, particle.container.canvas.settings); + drawGif(data, this._container.canvas.render.settings); } else if (element) { const ratio = image.ratio, pos = { @@ -84,7 +87,7 @@ export class ImageDrawer implements IShapeDrawer { } loadShape(particle: ImageParticle): void { - const { container } = particle; + const { _container: container } = this; if (!particle.shape || !shapeTypes.includes(particle.shape)) { return; diff --git a/shapes/image/src/index.ts b/shapes/image/src/index.ts index 5387a0608f0..17c73d8cdb6 100644 --- a/shapes/image/src/index.ts +++ b/shapes/image/src/index.ts @@ -88,16 +88,16 @@ declare const __VERSION__: string; export async function loadImageShape(engine: ImageEngine): Promise { engine.checkVersion(__VERSION__); - await engine.register(async e => { + await engine.pluginManager.register(async e => { const { ImagePreloaderPlugin } = await import("./ImagePreloader.js"); addLoadImageToEngine(e); - e.addPlugin(new ImagePreloaderPlugin(e)); - e.addShape(shapeTypes, async () => { + e.pluginManager.addPlugin(new ImagePreloaderPlugin(e)); + e.pluginManager.addShape(shapeTypes, async container => { const { ImageDrawer } = await import("./ImageDrawer.js"); - return new ImageDrawer(e); + return new ImageDrawer(e, container); }); }); } diff --git a/shapes/infinity/CHANGELOG.md b/shapes/infinity/CHANGELOG.md index f3de0e905bf..dc4d3c7b292 100644 --- a/shapes/infinity/CHANGELOG.md +++ b/shapes/infinity/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-infinity + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-infinity diff --git a/shapes/infinity/package.dist.json b/shapes/infinity/package.dist.json index b5e953792bc..d16da756255 100644 --- a/shapes/infinity/package.dist.json +++ b/shapes/infinity/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-infinity", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles infinity shape", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/infinity/package.json b/shapes/infinity/package.json index e546e063672..a069c7d2c00 100644 --- a/shapes/infinity/package.json +++ b/shapes/infinity/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-infinity", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles infinity shape", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/infinity/src/index.ts b/shapes/infinity/src/index.ts index 9abf8cdf43d..c27dad5e797 100644 --- a/shapes/infinity/src/index.ts +++ b/shapes/infinity/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadInfinityShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["infinity"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["infinity"], async () => { const { InfinityDrawer } = await import("./InfinityDrawer.js"); return new InfinityDrawer(); diff --git a/shapes/line/CHANGELOG.md b/shapes/line/CHANGELOG.md index 9cfb1db89f8..4342d33948c 100644 --- a/shapes/line/CHANGELOG.md +++ b/shapes/line/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-line + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-line diff --git a/shapes/line/package.dist.json b/shapes/line/package.dist.json index e0eab24480e..4fcb0f20848 100644 --- a/shapes/line/package.dist.json +++ b/shapes/line/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-line", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles line shape", "homepage": "https://particles.js.org", "repository": { @@ -59,7 +59,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/line/package.json b/shapes/line/package.json index 11431e439b9..478fd4a18db 100644 --- a/shapes/line/package.json +++ b/shapes/line/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-line", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles line shape", "homepage": "https://particles.js.org", "scripts": { @@ -72,7 +72,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "type": "module" } diff --git a/shapes/line/src/index.ts b/shapes/line/src/index.ts index ba194632b37..21d08ecac15 100644 --- a/shapes/line/src/index.ts +++ b/shapes/line/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadLineShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["line"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["line"], async () => { const { LineDrawer } = await import("./LineDrawer.js"); return new LineDrawer(); diff --git a/shapes/matrix/CHANGELOG.md b/shapes/matrix/CHANGELOG.md index 4b12d0ca040..1b49e513121 100644 --- a/shapes/matrix/CHANGELOG.md +++ b/shapes/matrix/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-matrix + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-matrix diff --git a/shapes/matrix/package.dist.json b/shapes/matrix/package.dist.json index dddbed182b8..af928fcccb8 100644 --- a/shapes/matrix/package.dist.json +++ b/shapes/matrix/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-matrix", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles matrix shape", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/matrix/package.json b/shapes/matrix/package.json index b27c1fe38c4..d6fe1b22451 100644 --- a/shapes/matrix/package.json +++ b/shapes/matrix/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-matrix", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles matrix shape", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/matrix/src/index.ts b/shapes/matrix/src/index.ts index 45708ddf28f..bbd771a9f01 100644 --- a/shapes/matrix/src/index.ts +++ b/shapes/matrix/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadMatrixShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["matrix"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["matrix"], async () => { const { MatrixDrawer } = await import("./MatrixDrawer.js"); return new MatrixDrawer(); diff --git a/shapes/path/CHANGELOG.md b/shapes/path/CHANGELOG.md index 81a87f05da0..2fcd1b94234 100644 --- a/shapes/path/CHANGELOG.md +++ b/shapes/path/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-path + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-path diff --git a/shapes/path/package.dist.json b/shapes/path/package.dist.json index 3e19782819a..0f8e65fe1cb 100644 --- a/shapes/path/package.dist.json +++ b/shapes/path/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-path", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles path shape", "homepage": "https://particles.js.org", "repository": { @@ -100,8 +100,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/path-utils": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/path-utils": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/path/package.json b/shapes/path/package.json index 54cc658b2bc..4db00feea96 100644 --- a/shapes/path/package.json +++ b/shapes/path/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-path", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles path shape", "homepage": "https://particles.js.org", "scripts": { @@ -108,8 +108,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/path-utils": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/path-utils": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/path/src/index.ts b/shapes/path/src/index.ts index 69058ad0f3d..6dccbd7f8dc 100644 --- a/shapes/path/src/index.ts +++ b/shapes/path/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadPathShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["path"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["path"], async () => { const { PathDrawer } = await import("./PathDrawer.js"); return new PathDrawer(); diff --git a/shapes/polygon/CHANGELOG.md b/shapes/polygon/CHANGELOG.md index 175614af716..1ec2c8b6f47 100644 --- a/shapes/polygon/CHANGELOG.md +++ b/shapes/polygon/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-polygon + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-polygon diff --git a/shapes/polygon/package.dist.json b/shapes/polygon/package.dist.json index cee0f202ba3..c1e9b09a503 100644 --- a/shapes/polygon/package.dist.json +++ b/shapes/polygon/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-polygon", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles polygon shape", "homepage": "https://particles.js.org", "repository": { @@ -59,7 +59,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/polygon/package.json b/shapes/polygon/package.json index 8b6bff3e634..be9b312d4d0 100644 --- a/shapes/polygon/package.json +++ b/shapes/polygon/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-polygon", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles polygon shape", "homepage": "https://particles.js.org", "scripts": { @@ -67,7 +67,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/polygon/src/index.ts b/shapes/polygon/src/index.ts index 5be1d48225f..3616bb95e17 100644 --- a/shapes/polygon/src/index.ts +++ b/shapes/polygon/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadGenericPolygonShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["polygon"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["polygon"], async () => { const { PolygonDrawer } = await import("./PolygonDrawer.js"); return new PolygonDrawer(); @@ -23,8 +23,8 @@ export async function loadGenericPolygonShape(engine: Engine): Promise { export async function loadTriangleShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["triangle"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["triangle"], async () => { const { TriangleDrawer } = await import("./TriangleDrawer.js"); return new TriangleDrawer(); diff --git a/shapes/rounded-polygon/CHANGELOG.md b/shapes/rounded-polygon/CHANGELOG.md index e82a2697f88..59294c96c00 100644 --- a/shapes/rounded-polygon/CHANGELOG.md +++ b/shapes/rounded-polygon/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-rounded-polygon + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-rounded-polygon diff --git a/shapes/rounded-polygon/package.dist.json b/shapes/rounded-polygon/package.dist.json index e5ce46f681b..2dde0b04d7b 100644 --- a/shapes/rounded-polygon/package.dist.json +++ b/shapes/rounded-polygon/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-rounded-polygon", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles rounded polygon shape", "homepage": "https://particles.js.org", "repository": { @@ -59,7 +59,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/rounded-polygon/package.json b/shapes/rounded-polygon/package.json index aa9b4827721..0373df6430a 100644 --- a/shapes/rounded-polygon/package.json +++ b/shapes/rounded-polygon/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-rounded-polygon", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles rounded polygon shape", "homepage": "https://particles.js.org", "scripts": { @@ -67,7 +67,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/rounded-polygon/src/Utils.ts b/shapes/rounded-polygon/src/Utils.ts index a5ceffe3491..2a3ab07601c 100644 --- a/shapes/rounded-polygon/src/Utils.ts +++ b/shapes/rounded-polygon/src/Utils.ts @@ -1,4 +1,4 @@ -import { type ICoordinates, doublePI, half } from "@tsparticles/engine"; +import { type CanvasContextType, type ICoordinates, doublePI, half } from "@tsparticles/engine"; const defaultRotation = 0; @@ -24,7 +24,7 @@ export function polygon(sides: number, radius: number, rot = defaultRotation): I * @param path - * @param radius - */ -export function roundedPath(context: CanvasRenderingContext2D, path: ICoordinates[], radius: number): void { +export function roundedPath(context: CanvasContextType, path: ICoordinates[], radius: number): void { const index1 = 0, index2 = 1, increment = 1; diff --git a/shapes/rounded-polygon/src/index.ts b/shapes/rounded-polygon/src/index.ts index 453cec5d90b..4493fbb01a5 100644 --- a/shapes/rounded-polygon/src/index.ts +++ b/shapes/rounded-polygon/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadRoundedPolygonShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["rounded-polygon"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["rounded-polygon"], async () => { const { RoundedPolygonDrawer } = await import("./RoundedPolygonDrawer.js"); return new RoundedPolygonDrawer(); diff --git a/shapes/rounded-rect/CHANGELOG.md b/shapes/rounded-rect/CHANGELOG.md index 9c60f1f2387..819e2275757 100644 --- a/shapes/rounded-rect/CHANGELOG.md +++ b/shapes/rounded-rect/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-rounded-rect + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-rounded-rect diff --git a/shapes/rounded-rect/package.dist.json b/shapes/rounded-rect/package.dist.json index 4fd0af126ab..38ea3fc865d 100644 --- a/shapes/rounded-rect/package.dist.json +++ b/shapes/rounded-rect/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-rounded-rect", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles rounded rect shape", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/rounded-rect/package.json b/shapes/rounded-rect/package.json index 3e6e9babe3a..0e14f20f054 100644 --- a/shapes/rounded-rect/package.json +++ b/shapes/rounded-rect/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-rounded-rect", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles rounded rect shape", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/rounded-rect/src/Utils.ts b/shapes/rounded-rect/src/Utils.ts index 3730e5e9289..4ac73b41ba0 100644 --- a/shapes/rounded-rect/src/Utils.ts +++ b/shapes/rounded-rect/src/Utils.ts @@ -1,3 +1,4 @@ +import type { CanvasContextType } from "@tsparticles/engine"; import type { RadiusInfo } from "./RadiusInfo.js"; import type { RectInfo } from "./RectInfo.js"; @@ -9,7 +10,7 @@ import type { RectInfo } from "./RectInfo.js"; * @param borderRadius - */ export function drawRoundedRect( - ctx: CanvasRenderingContext2D, + ctx: CanvasContextType, fixedRadius: number, fixedDiameter: number, borderRadius: number, diff --git a/shapes/rounded-rect/src/index.ts b/shapes/rounded-rect/src/index.ts index a1cf73f64f8..63b0349b6b6 100644 --- a/shapes/rounded-rect/src/index.ts +++ b/shapes/rounded-rect/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadRoundedRectShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["rounded-rect"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["rounded-rect"], async () => { const { RoundedRectDrawer } = await import("./RoundedRectDrawer.js"); return new RoundedRectDrawer(); diff --git a/shapes/spiral/CHANGELOG.md b/shapes/spiral/CHANGELOG.md index 7b6ddb61305..994887dd614 100644 --- a/shapes/spiral/CHANGELOG.md +++ b/shapes/spiral/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-spiral + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-spiral diff --git a/shapes/spiral/package.dist.json b/shapes/spiral/package.dist.json index 7d5fc6f339f..4b8801485ae 100644 --- a/shapes/spiral/package.dist.json +++ b/shapes/spiral/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-spiral", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles spiral shape", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/spiral/package.json b/shapes/spiral/package.json index 5629387e1ab..94a950517a2 100644 --- a/shapes/spiral/package.json +++ b/shapes/spiral/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-spiral", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles spiral shape", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/spiral/src/index.ts b/shapes/spiral/src/index.ts index 1c0f6729302..4723c1d6ef4 100644 --- a/shapes/spiral/src/index.ts +++ b/shapes/spiral/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadSpiralShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["spiral"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["spiral"], async () => { const { SpiralDrawer } = await import("./SpiralDrawer.js"); return new SpiralDrawer(); diff --git a/shapes/square/CHANGELOG.md b/shapes/square/CHANGELOG.md index 010d6b2a488..7734d96b27a 100644 --- a/shapes/square/CHANGELOG.md +++ b/shapes/square/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-square + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-square diff --git a/shapes/square/package.dist.json b/shapes/square/package.dist.json index 752da447128..e5e969b1edb 100644 --- a/shapes/square/package.dist.json +++ b/shapes/square/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-square", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles square shape", "homepage": "https://particles.js.org", "repository": { @@ -59,7 +59,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/square/package.json b/shapes/square/package.json index 196cde13b61..8f27f953fe6 100644 --- a/shapes/square/package.json +++ b/shapes/square/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-square", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles square shape", "homepage": "https://particles.js.org", "scripts": { @@ -72,7 +72,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "type": "module" } diff --git a/shapes/square/src/index.ts b/shapes/square/src/index.ts index b978c557acc..f9b017a73ab 100644 --- a/shapes/square/src/index.ts +++ b/shapes/square/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadSquareShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["edge", "square"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["edge", "square"], async () => { const { SquareDrawer } = await import("./SquareDrawer.js"); return new SquareDrawer(); diff --git a/shapes/squircle/CHANGELOG.md b/shapes/squircle/CHANGELOG.md index b06147d36fa..dda966636c4 100644 --- a/shapes/squircle/CHANGELOG.md +++ b/shapes/squircle/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-squircle + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-squircle diff --git a/shapes/squircle/package.dist.json b/shapes/squircle/package.dist.json index bff95dc8227..6e28c77e540 100644 --- a/shapes/squircle/package.dist.json +++ b/shapes/squircle/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-squircle", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles squircle shape", "homepage": "https://particles.js.org", "repository": { @@ -100,7 +100,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/squircle/package.json b/shapes/squircle/package.json index d326471f4d1..64a9d359287 100644 --- a/shapes/squircle/package.json +++ b/shapes/squircle/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-squircle", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles squircle shape", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/squircle/src/index.ts b/shapes/squircle/src/index.ts index 9c4ce012433..9f2a37ee088 100644 --- a/shapes/squircle/src/index.ts +++ b/shapes/squircle/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadSquircleShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["squircle"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["squircle"], async () => { const { SquircleDrawer } = await import("./SquircleDrawer.js"); return new SquircleDrawer(); diff --git a/shapes/star/CHANGELOG.md b/shapes/star/CHANGELOG.md index 13fc910710b..efd1cb3e27c 100644 --- a/shapes/star/CHANGELOG.md +++ b/shapes/star/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-star + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-star diff --git a/shapes/star/package.dist.json b/shapes/star/package.dist.json index 5f3720c32d0..fdd6de87a3e 100644 --- a/shapes/star/package.dist.json +++ b/shapes/star/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-star", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles star shape", "homepage": "https://particles.js.org", "repository": { @@ -59,7 +59,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/star/package.json b/shapes/star/package.json index ed97a731ac0..f2eadb0e063 100644 --- a/shapes/star/package.json +++ b/shapes/star/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-star", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles star shape", "homepage": "https://particles.js.org", "scripts": { @@ -67,7 +67,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/star/src/index.ts b/shapes/star/src/index.ts index 771c4bc472e..eae8a7a4b52 100644 --- a/shapes/star/src/index.ts +++ b/shapes/star/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadStarShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(["star"], async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(["star"], async () => { const { StarDrawer } = await import("./StarDrawer.js"); return new StarDrawer(); diff --git a/shapes/text/CHANGELOG.md b/shapes/text/CHANGELOG.md index 7725f087ed0..4588d6aa3e2 100644 --- a/shapes/text/CHANGELOG.md +++ b/shapes/text/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/shape-text + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/shape-text diff --git a/shapes/text/package.dist.json b/shapes/text/package.dist.json index 9839b0b3e18..ab4da25b91e 100644 --- a/shapes/text/package.dist.json +++ b/shapes/text/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-text", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles text shape", "homepage": "https://particles.js.org", "repository": { @@ -59,8 +59,8 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "4.0.0-beta.0", - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/canvas-utils": "4.0.0-beta.1", + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/shapes/text/package.json b/shapes/text/package.json index 3df917beb0e..4e4d6808377 100644 --- a/shapes/text/package.json +++ b/shapes/text/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/shape-text", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles text shape", "homepage": "https://particles.js.org", "scripts": { @@ -67,8 +67,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/canvas-utils": "workspace:4.0.0-beta.0", - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/canvas-utils": "workspace:4.0.0-beta.1", + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/shapes/text/src/Utils.ts b/shapes/text/src/Utils.ts index 33986f28eb4..632af9c14f9 100644 --- a/shapes/text/src/Utils.ts +++ b/shapes/text/src/Utils.ts @@ -1,4 +1,10 @@ -import { type IShapeDrawData, double, half, itemFromSingleOrMultiple } from "@tsparticles/engine"; +import { + type CanvasContextType, + type IShapeDrawData, + double, + half, + itemFromSingleOrMultiple, +} from "@tsparticles/engine"; import type { ITextShape } from "./ITextShape.js"; import type { TextParticle } from "./TextParticle.js"; @@ -64,7 +70,7 @@ export function drawText(data: IShapeDrawData): void { * @param stroke - */ function drawTextLine( - context: CanvasRenderingContext2D, + context: CanvasContextType, line: string, size: number, index: number, diff --git a/shapes/text/src/index.ts b/shapes/text/src/index.ts index fe3ea2d149c..e3ffd6a52e0 100644 --- a/shapes/text/src/index.ts +++ b/shapes/text/src/index.ts @@ -9,8 +9,8 @@ declare const __VERSION__: string; export async function loadTextShape(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addShape(validTypes, async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addShape(validTypes, async () => { const { TextDrawer } = await import("./TextDrawer.js"); return new TextDrawer(); diff --git a/updaters/destroy/CHANGELOG.md b/updaters/destroy/CHANGELOG.md index de5d52fe043..33137465ace 100644 --- a/updaters/destroy/CHANGELOG.md +++ b/updaters/destroy/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-destroy + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-destroy diff --git a/updaters/destroy/package.dist.json b/updaters/destroy/package.dist.json index 0de20f9cf4f..b9053c5675e 100644 --- a/updaters/destroy/package.dist.json +++ b/updaters/destroy/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-destroy", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles destroy updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/destroy/package.json b/updaters/destroy/package.json index 1ac0c1a6c2b..0770af35e9e 100644 --- a/updaters/destroy/package.json +++ b/updaters/destroy/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-destroy", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles destroy updater", "homepage": "https://particles.js.org", "scripts": { @@ -95,7 +95,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/destroy/src/DestroyUpdater.ts b/updaters/destroy/src/DestroyUpdater.ts index 8897c600daa..529aa0d10f0 100644 --- a/updaters/destroy/src/DestroyUpdater.ts +++ b/updaters/destroy/src/DestroyUpdater.ts @@ -1,8 +1,8 @@ import { type Container, - type Engine, type IParticleUpdater, type Particle, + type PluginManager, type RecursivePartial, getRangeValue, percentDenominator, @@ -13,16 +13,16 @@ import { DestroyMode } from "./Enums/DestroyMode.js"; import { split } from "./Utils.js"; export class DestroyUpdater implements IParticleUpdater { - private readonly container; - private readonly engine; + private readonly _container; + private readonly _pluginManager; - constructor(engine: Engine, container: Container) { - this.container = container; - this.engine = engine; + constructor(pluginManager: PluginManager, container: Container) { + this._container = container; + this._pluginManager = pluginManager; } init(particle: DestroyParticle): void { - const container = this.container, + const container = this._container, particlesOptions = particle.options, destroyOptions = particlesOptions.destroy; @@ -80,7 +80,7 @@ export class DestroyUpdater implements IParticleUpdater { const destroyOptions = particle.options.destroy; if (destroyOptions?.mode === DestroyMode.split) { - split(this.engine, this.container, particle); + split(this._pluginManager, this._container, particle); } } diff --git a/updaters/destroy/src/Utils.ts b/updaters/destroy/src/Utils.ts index 84ce3c99dc6..da59084bdc5 100644 --- a/updaters/destroy/src/Utils.ts +++ b/updaters/destroy/src/Utils.ts @@ -1,10 +1,10 @@ import { AnimatableColor, type Container, - type Engine, type IParticlesOptions, type Particle, PixelMode, + type PluginManager, type RecursivePartial, getRangeValue, identity, @@ -24,14 +24,14 @@ const defaultOffset = 0, minSplitCount = 0; /** - * @param engine - + * @param pluginManager - * @param container - * @param parent - * @param splitParticlesOptions - * @returns the added particle if any */ function addSplitParticle( - engine: Engine, + pluginManager: PluginManager, container: Container, parent: DestroyParticle, splitParticlesOptions?: RecursivePartial, @@ -43,7 +43,7 @@ function addSplitParticle( } const splitOptions = destroyOptions.split, - options = loadParticlesOptions(engine, container, parent.options), + options = loadParticlesOptions(pluginManager, container, parent.options), fillOptions = itemFromSingleOrMultiple(options.fill), strokeOptions = itemFromSingleOrMultiple(options.stroke); @@ -138,11 +138,11 @@ function addSplitParticle( /** * - * @param engine - + * @param pluginManager - * @param container - * @param particle - */ -export function split(engine: Engine, container: Container, particle: DestroyParticle): void { +export function split(pluginManager: PluginManager, container: Container, particle: DestroyParticle): void { const destroyOptions = particle.options.destroy; if (!destroyOptions) { @@ -163,6 +163,6 @@ export function split(engine: Engine, container: Container, particle: DestroyPar particlesSplitOptions = itemFromSingleOrMultiple(splitOptions.particles); for (let i = 0; i < rate; i++) { - addSplitParticle(engine, container, particle, particlesSplitOptions); + addSplitParticle(pluginManager, container, particle, particlesSplitOptions); } } diff --git a/updaters/destroy/src/index.ts b/updaters/destroy/src/index.ts index 8452d452702..a9a7a1851d3 100644 --- a/updaters/destroy/src/index.ts +++ b/updaters/destroy/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadDestroyUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("destroy", async container => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("destroy", async container => { const { DestroyUpdater } = await import("./DestroyUpdater.js"); - return new DestroyUpdater(e, container); + return new DestroyUpdater(e.pluginManager, container); }); }); } diff --git a/updaters/fillColor/CHANGELOG.md b/updaters/fillColor/CHANGELOG.md index 16a67801449..53ad445ae87 100644 --- a/updaters/fillColor/CHANGELOG.md +++ b/updaters/fillColor/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-fill-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-fill-color diff --git a/updaters/fillColor/package.dist.json b/updaters/fillColor/package.dist.json index 12aaab5d244..6fe1cccb581 100644 --- a/updaters/fillColor/package.dist.json +++ b/updaters/fillColor/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-fill-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles fill color updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/fillColor/package.json b/updaters/fillColor/package.json index 609ceb07520..58e8eaaddc9 100644 --- a/updaters/fillColor/package.json +++ b/updaters/fillColor/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-fill-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles fill color updater", "homepage": "https://particles.js.org", "scripts": { @@ -97,7 +97,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "type": "module" } diff --git a/updaters/fillColor/src/FillColorUpdater.ts b/updaters/fillColor/src/FillColorUpdater.ts index 14fa585b6d5..4bc2c76832b 100644 --- a/updaters/fillColor/src/FillColorUpdater.ts +++ b/updaters/fillColor/src/FillColorUpdater.ts @@ -1,9 +1,9 @@ import { type Container, - type Engine, type IDelta, type IParticleUpdater, type Particle, + type PluginManager, getHslAnimationFromHsl, getRangeValue, itemFromSingleOrMultiple, @@ -14,11 +14,11 @@ import type { FillParticle } from "./Types.js"; export class FillColorUpdater implements IParticleUpdater { private readonly _container; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: Engine, container: Container) { + constructor(pluginManager: PluginManager, container: Container) { this._container = container; - this._engine = engine; + this._pluginManager = pluginManager; } init(particle: FillParticle): void { @@ -35,7 +35,7 @@ export class FillColorUpdater implements IParticleUpdater { particle.fillOpacity = getRangeValue(fill.opacity); particle.fillAnimation = fill.color.animation; - const fillHslColor = rangeColorToHsl(this._engine, fill.color); + const fillHslColor = rangeColorToHsl(this._pluginManager, fill.color); if (fillHslColor) { particle.fillColor = getHslAnimationFromHsl(fillHslColor, particle.fillAnimation, container.retina.reduceFactor); diff --git a/updaters/fillColor/src/index.ts b/updaters/fillColor/src/index.ts index a4956102de0..1c2555b7e6a 100644 --- a/updaters/fillColor/src/index.ts +++ b/updaters/fillColor/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadFillColorUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("color", async container => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("color", async container => { const { FillColorUpdater } = await import("./FillColorUpdater.js"); - return new FillColorUpdater(e, container); + return new FillColorUpdater(e.pluginManager, container); }); }); } diff --git a/updaters/gradient/CHANGELOG.md b/updaters/gradient/CHANGELOG.md index 39b3895ed04..f31ae63fdc7 100644 --- a/updaters/gradient/CHANGELOG.md +++ b/updaters/gradient/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-gradient + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-gradient diff --git a/updaters/gradient/package.dist.json b/updaters/gradient/package.dist.json index 66e48c77e2d..fe7bcae157c 100644 --- a/updaters/gradient/package.dist.json +++ b/updaters/gradient/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-gradient", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles gradient updater", "homepage": "https://particles.js.org", "repository": { @@ -101,7 +101,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/gradient/package.json b/updaters/gradient/package.json index aef5644ef3b..4ce245453a7 100644 --- a/updaters/gradient/package.json +++ b/updaters/gradient/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-gradient", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles gradient updater", "homepage": "https://particles.js.org", "scripts": { @@ -109,7 +109,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/gradient/src/GradientUpdater.ts b/updaters/gradient/src/GradientUpdater.ts index 594243f05ce..c397bd7c8cb 100644 --- a/updaters/gradient/src/GradientUpdater.ts +++ b/updaters/gradient/src/GradientUpdater.ts @@ -1,11 +1,13 @@ import { AnimationStatus, - type Engine, + type CanvasContextType, + type Container, GradientType, type ICoordinates, type IDelta, type IParticleColorStyle, type IParticleUpdater, + type PluginManager, type RecursivePartial, RotateDirection, StartValueType, @@ -29,15 +31,17 @@ import { AnimatableGradient } from "./Options/Classes/AnimatableGradient.js"; import { updateGradient } from "./Utils.js"; export class GradientUpdater implements IParticleUpdater { - private readonly _engine; + private readonly _container; + private readonly _pluginManager; - constructor(engine: Engine) { - this._engine = engine; + constructor(pluginManager: PluginManager, container: Container) { + this._pluginManager = pluginManager; + this._container = container; } getColorStyles( particle: GradientParticle, - context: CanvasRenderingContext2D, + context: CanvasContextType, radius: number, opacity: number, ): IParticleColorStyle { @@ -47,7 +51,7 @@ export class GradientUpdater implements IParticleUpdater { return {}; } - const { container } = particle, + const { _container: container } = this, gradientAngle = gradient.angle.value, origin: ICoordinates = { x: 0, y: 0 }, minRadius = 0, @@ -81,7 +85,8 @@ export class GradientUpdater implements IParticleUpdater { return; } - const { angle } = gradient, + const container = this._container, + { angle } = gradient, speedFactor = 360, delayOffset = 1; @@ -89,7 +94,7 @@ export class GradientUpdater implements IParticleUpdater { angle: { value: getRangeValue(angle.value), enable: angle.animation.enable, - velocity: (getRangeValue(angle.animation.speed) / speedFactor) * particle.container.retina.reduceFactor, + velocity: (getRangeValue(angle.animation.speed) / speedFactor) * container.retina.reduceFactor, decay: delayOffset - getRangeValue(angle.animation.decay), delayTime: getRangeValue(angle.animation.delay) * millisecondsToSeconds, max: doublePI, @@ -122,17 +127,13 @@ export class GradientUpdater implements IParticleUpdater { const reduceDuplicates = particle.options.reduceDuplicates; for (const grColor of gradient.colors) { - const grHslColor = rangeColorToHsl(this._engine, grColor.value, particle.id, reduceDuplicates); + const grHslColor = rangeColorToHsl(this._pluginManager, grColor.value, particle.id, reduceDuplicates); if (!grHslColor) { continue; } - const grHslAnimation = getHslAnimationFromHsl( - grHslColor, - grColor.value.animation, - particle.container.retina.reduceFactor, - ), + const grHslAnimation = getHslAnimationFromHsl(grHslColor, grColor.value.animation, container.retina.reduceFactor), addColor = { stop: grColor.stop, value: grHslAnimation, @@ -144,8 +145,7 @@ export class GradientUpdater implements IParticleUpdater { status: AnimationStatus.increasing, value: getRangeValue(grColor.opacity.value), velocity: - (getRangeValue(grColor.opacity.animation.speed) / percentDenominator) * - particle.container.retina.reduceFactor, + (getRangeValue(grColor.opacity.animation.speed) / percentDenominator) * container.retina.reduceFactor, decay: delayOffset - getRangeValue(grColor.opacity.animation.decay), delayTime: getRangeValue(grColor.opacity.animation.delay) * millisecondsToSeconds, time: 0, diff --git a/updaters/gradient/src/index.ts b/updaters/gradient/src/index.ts index dbbe8db83f5..417182523b0 100644 --- a/updaters/gradient/src/index.ts +++ b/updaters/gradient/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadGradientUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("gradient", async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("gradient", async container => { const { GradientUpdater } = await import("./GradientUpdater.js"); - return new GradientUpdater(e); + return new GradientUpdater(e.pluginManager, container); }); }); } diff --git a/updaters/life/CHANGELOG.md b/updaters/life/CHANGELOG.md index 5307e2d3cdc..2d4d9e584c6 100644 --- a/updaters/life/CHANGELOG.md +++ b/updaters/life/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-life + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-life diff --git a/updaters/life/package.dist.json b/updaters/life/package.dist.json index 78558bdeb92..fb8418cf0fb 100644 --- a/updaters/life/package.dist.json +++ b/updaters/life/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-life", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles life updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/life/package.json b/updaters/life/package.json index 247a37e902a..413aaa2f20d 100644 --- a/updaters/life/package.json +++ b/updaters/life/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-life", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles life updater", "homepage": "https://particles.js.org", "scripts": { @@ -95,7 +95,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/life/src/index.ts b/updaters/life/src/index.ts index e2d24f3d52c..44b654ff89b 100644 --- a/updaters/life/src/index.ts +++ b/updaters/life/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadLifeUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("life", async container => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("life", async container => { const { LifeUpdater } = await import("./LifeUpdater.js"); return new LifeUpdater(container); diff --git a/updaters/opacity/CHANGELOG.md b/updaters/opacity/CHANGELOG.md index 32dd4145a26..1c958cb9f24 100644 --- a/updaters/opacity/CHANGELOG.md +++ b/updaters/opacity/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-opacity + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-opacity diff --git a/updaters/opacity/package.dist.json b/updaters/opacity/package.dist.json index 810a661b190..5dc796825f2 100644 --- a/updaters/opacity/package.dist.json +++ b/updaters/opacity/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-opacity", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles opacity updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/opacity/package.json b/updaters/opacity/package.json index d6f6078574d..ce2cb016664 100644 --- a/updaters/opacity/package.json +++ b/updaters/opacity/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-opacity", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles opacity updater", "homepage": "https://particles.js.org", "scripts": { @@ -92,7 +92,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/opacity/src/OpacityUpdater.ts b/updaters/opacity/src/OpacityUpdater.ts index 6127505ec10..087052c4189 100644 --- a/updaters/opacity/src/OpacityUpdater.ts +++ b/updaters/opacity/src/OpacityUpdater.ts @@ -71,10 +71,12 @@ export class OpacityUpdater implements IParticleUpdater { * @param particle - */ reset(particle: Particle): void { - if (particle.opacity) { - particle.opacity.time = 0; - particle.opacity.loops = 0; + if (!particle.opacity) { + return; } + + particle.opacity.time = 0; + particle.opacity.loops = 0; } /** diff --git a/updaters/opacity/src/index.ts b/updaters/opacity/src/index.ts index 8a17202dcac..0fc3b6dfa05 100644 --- a/updaters/opacity/src/index.ts +++ b/updaters/opacity/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadOpacityUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("opacity", async container => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("opacity", async container => { const { OpacityUpdater } = await import("./OpacityUpdater.js"); return new OpacityUpdater(container); diff --git a/updaters/orbit/CHANGELOG.md b/updaters/orbit/CHANGELOG.md index 1b84d1f5df9..6aa49602226 100644 --- a/updaters/orbit/CHANGELOG.md +++ b/updaters/orbit/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-orbit + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-orbit diff --git a/updaters/orbit/package.dist.json b/updaters/orbit/package.dist.json index 9716ec99189..ac8b1a43a44 100644 --- a/updaters/orbit/package.dist.json +++ b/updaters/orbit/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-orbit", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles orbit updater", "homepage": "https://particles.js.org", "repository": { @@ -101,7 +101,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/orbit/package.json b/updaters/orbit/package.json index ec9d3f7fe76..68679dce205 100644 --- a/updaters/orbit/package.json +++ b/updaters/orbit/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-orbit", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles orbit updater", "homepage": "https://particles.js.org", "scripts": { @@ -109,7 +109,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/orbit/src/OrbitUpdater.ts b/updaters/orbit/src/OrbitUpdater.ts index 1ea368f7f8d..2b490c79d5e 100644 --- a/updaters/orbit/src/OrbitUpdater.ts +++ b/updaters/orbit/src/OrbitUpdater.ts @@ -1,7 +1,7 @@ import { - type Engine, type IDelta, type IParticleUpdater, + type PluginManager, type RecursivePartial, defaultOpacity, doublePI, @@ -23,10 +23,10 @@ const defaultOrbitSpeed = 0, export class OrbitUpdater implements IParticleUpdater { private readonly _container; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: Engine, container: OrbitContainer) { - this._engine = engine; + constructor(pluginManager: PluginManager, container: OrbitContainer) { + this._pluginManager = pluginManager; this._container = container; } @@ -65,8 +65,9 @@ export class OrbitUpdater implements IParticleUpdater { end = doublePI; } - container.canvas.draw(ctx => { + container.canvas.render.draw(ctx => { drawEllipse( + container, ctx, particle, particle.orbitColor ?? particle.getFillColor(), @@ -91,7 +92,7 @@ export class OrbitUpdater implements IParticleUpdater { } particle.orbitRotation = getRangeValue(orbitOptions.rotation.value); - particle.orbitColor = rangeColorToHsl(this._engine, orbitOptions.color); + particle.orbitColor = rangeColorToHsl(this._pluginManager, orbitOptions.color); particle.retina.orbitRadius = orbitOptions.radius !== undefined ? getRangeValue(orbitOptions.radius) * container.retina.pixelRatio : undefined; container.retina.orbitRadius = particle.retina.orbitRadius; diff --git a/updaters/orbit/src/Utils.ts b/updaters/orbit/src/Utils.ts index 7019318a687..5401164622c 100644 --- a/updaters/orbit/src/Utils.ts +++ b/updaters/orbit/src/Utils.ts @@ -1,9 +1,19 @@ -import { type IHsl, type Particle, degToRad, double, getStyleFromHsl, half } from "@tsparticles/engine"; +import { + type CanvasContextType, + type IHsl, + type Particle, + degToRad, + double, + getStyleFromHsl, + half, +} from "@tsparticles/engine"; +import type { OrbitContainer } from "./Types.js"; const minWidth = 0; /** * Draws an ellipse for the given particle. + * @param container - The container * @param context - The canvas context. * @param particle - The particle to draw. * @param fillColorValue - The particle fill color. @@ -15,7 +25,8 @@ const minWidth = 0; * @param end - The end angle of the particle. */ export function drawEllipse( - context: CanvasRenderingContext2D, + container: OrbitContainer, + context: CanvasContextType, particle: Particle, fillColorValue: IHsl | undefined, radius: number, @@ -29,8 +40,7 @@ export function drawEllipse( return; } - const pos = particle.getPosition(), - { container } = particle; + const pos = particle.getPosition(); if (fillColorValue) { context.strokeStyle = getStyleFromHsl(fillColorValue, container.hdr, opacity); diff --git a/updaters/orbit/src/index.ts b/updaters/orbit/src/index.ts index 61d87d3c067..a34807bc1c7 100644 --- a/updaters/orbit/src/index.ts +++ b/updaters/orbit/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadOrbitUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("orbit", async container => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("orbit", async container => { const { OrbitUpdater } = await import("./OrbitUpdater.js"); - return new OrbitUpdater(e, container); + return new OrbitUpdater(e.pluginManager, container); }); }); } diff --git a/updaters/outModes/CHANGELOG.md b/updaters/outModes/CHANGELOG.md index 96f52e1f457..3d3f004a070 100644 --- a/updaters/outModes/CHANGELOG.md +++ b/updaters/outModes/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-out-modes + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-out-modes diff --git a/updaters/outModes/package.dist.json b/updaters/outModes/package.dist.json index aed6f9b0b5a..4ca176ee58e 100644 --- a/updaters/outModes/package.dist.json +++ b/updaters/outModes/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-out-modes", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles out modes updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/outModes/package.json b/updaters/outModes/package.json index dd0115802bd..31699cc6333 100644 --- a/updaters/outModes/package.json +++ b/updaters/outModes/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-out-modes", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles out modes updater", "homepage": "https://particles.js.org", "scripts": { @@ -92,7 +92,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/outModes/src/DestroyOutMode.ts b/updaters/outModes/src/DestroyOutMode.ts index b4fb6972ce9..0107f37ebf3 100644 --- a/updaters/outModes/src/DestroyOutMode.ts +++ b/updaters/outModes/src/DestroyOutMode.ts @@ -57,6 +57,6 @@ export class DestroyOutMode implements IOutModeManager { } } - container.particles.remove(particle, particle.group, true); + particle.destroy(true); } } diff --git a/updaters/outModes/src/NoneOutMode.ts b/updaters/outModes/src/NoneOutMode.ts index c1953f893ad..e81f87adbcb 100644 --- a/updaters/outModes/src/NoneOutMode.ts +++ b/updaters/outModes/src/NoneOutMode.ts @@ -53,7 +53,7 @@ export class NoneOutMode implements IOutModeManager { } if (!isPointInside(particle.position, container.canvas.size, originPoint, pRadius, direction)) { - container.particles.remove(particle); + particle.destroy(); } } else { const position = particle.position; @@ -64,7 +64,7 @@ export class NoneOutMode implements IOutModeManager { direction === OutModeDirection.bottom) || (gravityOptions.inverse && position.y < -pRadius && direction === OutModeDirection.top) ) { - container.particles.remove(particle); + particle.destroy(); } } } diff --git a/updaters/outModes/src/index.ts b/updaters/outModes/src/index.ts index 2a77a5ed827..e1708df1f1a 100644 --- a/updaters/outModes/src/index.ts +++ b/updaters/outModes/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadOutModesUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("outModes", async container => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("outModes", async container => { const { OutOfCanvasUpdater } = await import("./OutOfCanvasUpdater.js"); return new OutOfCanvasUpdater(container); diff --git a/updaters/roll/CHANGELOG.md b/updaters/roll/CHANGELOG.md index 112470cb14d..8114898b238 100644 --- a/updaters/roll/CHANGELOG.md +++ b/updaters/roll/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-roll + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-roll diff --git a/updaters/roll/package.dist.json b/updaters/roll/package.dist.json index 9ba28b011c1..bd00935e764 100644 --- a/updaters/roll/package.dist.json +++ b/updaters/roll/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-roll", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles roll updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/roll/package.json b/updaters/roll/package.json index adff8e7c0cf..b2f92b62a10 100644 --- a/updaters/roll/package.json +++ b/updaters/roll/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-roll", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles roll updater", "homepage": "https://particles.js.org", "scripts": { @@ -95,7 +95,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/roll/src/RollUpdater.ts b/updaters/roll/src/RollUpdater.ts index 2e510f4edf9..b59d67ef1b8 100644 --- a/updaters/roll/src/RollUpdater.ts +++ b/updaters/roll/src/RollUpdater.ts @@ -1,9 +1,9 @@ import { - type Engine, type IDelta, type IParticleTransformValues, type IParticleUpdater, type Particle, + type PluginManager, type RecursivePartial, } from "@tsparticles/engine"; import type { IRollParticlesOptions, RollParticle, RollParticlesOptions } from "./Types.js"; @@ -11,10 +11,10 @@ import { initParticle, updateRoll } from "./Utils.js"; import { Roll } from "./Options/Classes/Roll.js"; export class RollUpdater implements IParticleUpdater { - private readonly _engine; + private readonly _pluginManager; - constructor(engine: Engine) { - this._engine = engine; + constructor(pluginManager: PluginManager) { + this._pluginManager = pluginManager; } getTransformValues(particle: Particle): Partial { @@ -29,7 +29,7 @@ export class RollUpdater implements IParticleUpdater { } init(particle: RollParticle): void { - initParticle(this._engine, particle); + initParticle(this._pluginManager, particle); } isEnabled(particle: RollParticle): boolean { diff --git a/updaters/roll/src/Utils.ts b/updaters/roll/src/Utils.ts index 706c7324fa9..9511e2b0776 100644 --- a/updaters/roll/src/Utils.ts +++ b/updaters/roll/src/Utils.ts @@ -1,7 +1,7 @@ import { AlterType, - type Engine, type IDelta, + type PluginManager, doublePI, getRandom, getRangeValue, @@ -14,10 +14,10 @@ import type { RollParticle } from "./Types.js"; const maxAngle = 360; /** - * @param engine - + * @param pluginManager - * @param particle - */ -export function initParticle(engine: Engine, particle: RollParticle): void { +export function initParticle(pluginManager: PluginManager, particle: RollParticle): void { const rollOpt = particle.options.roll; if (!rollOpt?.enable) { @@ -41,7 +41,7 @@ export function initParticle(engine: Engine, particle: RollParticle): void { }; if (rollOpt.backColor) { - particle.backColor = rangeColorToHsl(engine, rollOpt.backColor); + particle.backColor = rangeColorToHsl(pluginManager, rollOpt.backColor); } else if (rollOpt.darken.enable && rollOpt.enlighten.enable) { const alterType = getRandom() >= half ? AlterType.darken : AlterType.enlighten; diff --git a/updaters/roll/src/index.ts b/updaters/roll/src/index.ts index 439b5cc43dd..e3552e351e1 100644 --- a/updaters/roll/src/index.ts +++ b/updaters/roll/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadRollUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("roll", async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("roll", async () => { const { RollUpdater } = await import("./RollUpdater.js"); - return new RollUpdater(e); + return new RollUpdater(e.pluginManager); }); }); } diff --git a/updaters/rotate/CHANGELOG.md b/updaters/rotate/CHANGELOG.md index 5b75dd3852c..d24643a8f68 100644 --- a/updaters/rotate/CHANGELOG.md +++ b/updaters/rotate/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-rotate + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-rotate diff --git a/updaters/rotate/package.dist.json b/updaters/rotate/package.dist.json index ba3808de7f1..5b3bf2f861c 100644 --- a/updaters/rotate/package.dist.json +++ b/updaters/rotate/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-rotate", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles rotate updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/rotate/package.json b/updaters/rotate/package.json index 8bfb330e38b..5b893acb2ac 100644 --- a/updaters/rotate/package.json +++ b/updaters/rotate/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-rotate", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles rotate updater", "homepage": "https://particles.js.org", "scripts": { @@ -95,7 +95,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/rotate/src/index.ts b/updaters/rotate/src/index.ts index 2100aa04a01..224ab32dd66 100644 --- a/updaters/rotate/src/index.ts +++ b/updaters/rotate/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadRotateUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("rotate", async container => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("rotate", async container => { const { RotateUpdater } = await import("./RotateUpdater.js"); return new RotateUpdater(container); diff --git a/updaters/size/CHANGELOG.md b/updaters/size/CHANGELOG.md index 66ab6d530bd..aaa7f30aa5c 100644 --- a/updaters/size/CHANGELOG.md +++ b/updaters/size/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-size + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-size diff --git a/updaters/size/package.dist.json b/updaters/size/package.dist.json index 66f0db26249..d16dbbacaa4 100644 --- a/updaters/size/package.dist.json +++ b/updaters/size/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-size", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles size updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/size/package.json b/updaters/size/package.json index 7f547ffece8..a420e5ca7dc 100644 --- a/updaters/size/package.json +++ b/updaters/size/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-size", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles size updater", "homepage": "https://particles.js.org", "scripts": { @@ -92,7 +92,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/size/src/SizeUpdater.ts b/updaters/size/src/SizeUpdater.ts index e09c3d80528..13ac7f9cc6c 100644 --- a/updaters/size/src/SizeUpdater.ts +++ b/updaters/size/src/SizeUpdater.ts @@ -1,4 +1,5 @@ import { + type Container, type IDelta, type IParticleUpdater, type Particle, @@ -10,15 +11,20 @@ import { const minLoops = 0; export class SizeUpdater implements IParticleUpdater { + private readonly _container; + + constructor(container: Container) { + this._container = container; + } + init(particle: Particle): void { - const container = particle.container, + const container = this._container, sizeOptions = particle.options.size, sizeAnimation = sizeOptions.animation; if (sizeAnimation.enable) { particle.size.velocity = - ((particle.retina.sizeAnimationSpeed ?? container.retina.sizeAnimationSpeed) / percentDenominator) * - container.retina.reduceFactor; + (particle.retina.sizeAnimationSpeed / percentDenominator) * container.retina.reduceFactor; if (!sizeAnimation.sync) { particle.size.velocity *= getRandom(); @@ -38,7 +44,8 @@ export class SizeUpdater implements IParticleUpdater { } reset(particle: Particle): void { - particle.size.loops = minLoops; + particle.size.time = 0; + particle.size.loops = 0; } update(particle: Particle, delta: IDelta): void { diff --git a/updaters/size/src/index.ts b/updaters/size/src/index.ts index 26c9a921e67..fd572de518e 100644 --- a/updaters/size/src/index.ts +++ b/updaters/size/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadSizeUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("size", async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("size", async container => { const { SizeUpdater } = await import("./SizeUpdater.js"); - return new SizeUpdater(); + return new SizeUpdater(container); }); }); } diff --git a/updaters/strokeColor/CHANGELOG.md b/updaters/strokeColor/CHANGELOG.md index d5d0182d6de..5ed4bd3c51a 100644 --- a/updaters/strokeColor/CHANGELOG.md +++ b/updaters/strokeColor/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-stroke-color + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-stroke-color diff --git a/updaters/strokeColor/package.dist.json b/updaters/strokeColor/package.dist.json index b72aac092ec..84b85ae9102 100644 --- a/updaters/strokeColor/package.dist.json +++ b/updaters/strokeColor/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-stroke-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles stroke color updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/strokeColor/package.json b/updaters/strokeColor/package.json index 9db39c7cf27..3d54cefebb1 100644 --- a/updaters/strokeColor/package.json +++ b/updaters/strokeColor/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-stroke-color", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles stroke color updater", "homepage": "https://particles.js.org", "scripts": { @@ -95,7 +95,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/strokeColor/src/StrokeColorUpdater.ts b/updaters/strokeColor/src/StrokeColorUpdater.ts index deef143aef6..5f86f178fd0 100644 --- a/updaters/strokeColor/src/StrokeColorUpdater.ts +++ b/updaters/strokeColor/src/StrokeColorUpdater.ts @@ -1,9 +1,9 @@ import { type Container, - type Engine, type IDelta, type IParticleUpdater, type Particle, + type PluginManager, getHslAnimationFromHsl, getRangeValue, itemFromSingleOrMultiple, @@ -16,11 +16,11 @@ const defaultOpacity = 1; export class StrokeColorUpdater implements IParticleUpdater { private readonly _container; - private readonly _engine; + private readonly _pluginManager; - constructor(engine: Engine, container: Container) { + constructor(pluginManager: PluginManager, container: Container) { this._container = container; - this._engine = engine; + this._pluginManager = pluginManager; } init(particle: StrokeParticle): void { @@ -37,7 +37,7 @@ export class StrokeColorUpdater implements IParticleUpdater { particle.strokeOpacity = getRangeValue(stroke.opacity ?? defaultOpacity); particle.strokeAnimation = stroke.color?.animation; - const strokeHslColor = rangeColorToHsl(this._engine, stroke.color) ?? particle.getFillColor(); + const strokeHslColor = rangeColorToHsl(this._pluginManager, stroke.color) ?? particle.getFillColor(); if (strokeHslColor) { particle.strokeColor = getHslAnimationFromHsl( diff --git a/updaters/strokeColor/src/index.ts b/updaters/strokeColor/src/index.ts index 83919ee3ee0..1d5d0c751bb 100644 --- a/updaters/strokeColor/src/index.ts +++ b/updaters/strokeColor/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadStrokeColorUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("strokeColor", async container => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("strokeColor", async container => { const { StrokeColorUpdater } = await import("./StrokeColorUpdater.js"); - return new StrokeColorUpdater(e, container); + return new StrokeColorUpdater(e.pluginManager, container); }); }); } diff --git a/updaters/tilt/CHANGELOG.md b/updaters/tilt/CHANGELOG.md index fdc6cb6145a..2901e40482b 100644 --- a/updaters/tilt/CHANGELOG.md +++ b/updaters/tilt/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-tilt + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-tilt diff --git a/updaters/tilt/package.dist.json b/updaters/tilt/package.dist.json index 7ebb99104b1..e8813fed03c 100644 --- a/updaters/tilt/package.dist.json +++ b/updaters/tilt/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-tilt", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles tilt updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/tilt/package.json b/updaters/tilt/package.json index 04f1299eb41..f7637e63932 100644 --- a/updaters/tilt/package.json +++ b/updaters/tilt/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-tilt", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles tilt updater", "homepage": "https://particles.js.org", "scripts": { @@ -95,7 +95,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/tilt/src/index.ts b/updaters/tilt/src/index.ts index 04b1c0fa557..b3141bab3bc 100644 --- a/updaters/tilt/src/index.ts +++ b/updaters/tilt/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadTiltUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("tilt", async container => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("tilt", async container => { const { TiltUpdater } = await import("./TiltUpdater.js"); return new TiltUpdater(container); diff --git a/updaters/twinkle/CHANGELOG.md b/updaters/twinkle/CHANGELOG.md index 95e9f6788d9..ccf9469b1dc 100644 --- a/updaters/twinkle/CHANGELOG.md +++ b/updaters/twinkle/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-twinkle + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-twinkle diff --git a/updaters/twinkle/package.dist.json b/updaters/twinkle/package.dist.json index 7506099a442..84d4ca2ffd8 100644 --- a/updaters/twinkle/package.dist.json +++ b/updaters/twinkle/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-twinkle", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles twinkle updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/twinkle/package.json b/updaters/twinkle/package.json index fb335cecd46..0ed2d4154e0 100644 --- a/updaters/twinkle/package.json +++ b/updaters/twinkle/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-twinkle", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles twinkle updater", "homepage": "https://particles.js.org", "scripts": { @@ -95,7 +95,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/twinkle/src/TwinkleUpdater.ts b/updaters/twinkle/src/TwinkleUpdater.ts index 395011f4b83..cc5b64ff3fc 100644 --- a/updaters/twinkle/src/TwinkleUpdater.ts +++ b/updaters/twinkle/src/TwinkleUpdater.ts @@ -1,8 +1,10 @@ import { - type Engine, + type CanvasContextType, + type Container, type IParticleColorStyle, type IParticleUpdater, type Particle, + type PluginManager, type RecursivePartial, getRandom, getRangeValue, @@ -13,20 +15,22 @@ import type { ITwinkleParticlesOptions, TwinkeParticle, TwinkleParticlesOptions import { Twinkle } from "./Options/Classes/Twinkle.js"; export class TwinkleUpdater implements IParticleUpdater { - private readonly _engine; + private readonly _container; + private readonly _pluginManager; - constructor(engine: Engine) { - this._engine = engine; + constructor(pluginManager: PluginManager, container: Container) { + this._pluginManager = pluginManager; + this._container = container; } getColorStyles( particle: Particle, - _context: CanvasRenderingContext2D, + _context: CanvasContextType, _radius: number, opacity: number, ): IParticleColorStyle { const pOptions = particle.options, - { container } = particle, + { _container: container } = this, twinkleOptions = pOptions["twinkle"] as Twinkle | undefined; if (!twinkleOptions) { @@ -39,8 +43,8 @@ export class TwinkleUpdater implements IParticleUpdater { zOffset = 1, zOpacityFactor = (zOffset - particle.zIndexFactor) ** zIndexOptions.opacityRate, twinklingOpacity = twinkling ? getRangeValue(twinkle.opacity) * zOpacityFactor : opacity, - twinkleFillRgb = rangeColorToHsl(this._engine, twinkle.fillColor), - twinkleStrokeRgb = rangeColorToHsl(this._engine, twinkle.strokeColor), + twinkleFillRgb = rangeColorToHsl(this._pluginManager, twinkle.fillColor), + twinkleStrokeRgb = rangeColorToHsl(this._pluginManager, twinkle.strokeColor), getTwinkleFillStyle = (): string | undefined => { if (!twinkleFillRgb) { return undefined; diff --git a/updaters/twinkle/src/index.ts b/updaters/twinkle/src/index.ts index d5ed43b39f3..c85d1c636fb 100644 --- a/updaters/twinkle/src/index.ts +++ b/updaters/twinkle/src/index.ts @@ -8,11 +8,11 @@ declare const __VERSION__: string; export async function loadTwinkleUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("twinkle", async () => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("twinkle", async container => { const { TwinkleUpdater } = await import("./TwinkleUpdater.js"); - return new TwinkleUpdater(e); + return new TwinkleUpdater(e.pluginManager, container); }); }); } diff --git a/updaters/wobble/CHANGELOG.md b/updaters/wobble/CHANGELOG.md index a494db534c7..a06ff13c213 100644 --- a/updaters/wobble/CHANGELOG.md +++ b/updaters/wobble/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/updater-wobble + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/updater-wobble diff --git a/updaters/wobble/package.dist.json b/updaters/wobble/package.dist.json index 3724b9bdb67..4822bedc9b5 100644 --- a/updaters/wobble/package.dist.json +++ b/updaters/wobble/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-wobble", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles wobble updater", "homepage": "https://particles.js.org", "repository": { @@ -87,7 +87,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/updaters/wobble/package.json b/updaters/wobble/package.json index b2155d153a2..d210717163d 100644 --- a/updaters/wobble/package.json +++ b/updaters/wobble/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/updater-wobble", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles particles wobble updater", "homepage": "https://particles.js.org", "scripts": { @@ -95,7 +95,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/updaters/wobble/src/Utils.ts b/updaters/wobble/src/Utils.ts index 298b2051811..d152dbc3370 100644 --- a/updaters/wobble/src/Utils.ts +++ b/updaters/wobble/src/Utils.ts @@ -1,4 +1,4 @@ -import { type IDelta, doublePI, millisecondsToSeconds } from "@tsparticles/engine"; +import { type Container, type IDelta, doublePI, millisecondsToSeconds } from "@tsparticles/engine"; import type { WobbleParticle } from "./Types.js"; const defaultDistance = 0, @@ -6,12 +6,13 @@ const defaultDistance = 0, /** * Updates particle wobbling values + * @param container - the particles container * @param particle - the particle to update * @param delta - this variable contains the delta between the current frame and the previous frame */ -export function updateWobble(particle: WobbleParticle, delta: IDelta): void { +export function updateWobble(container: Container, particle: WobbleParticle, delta: IDelta): void { const { wobble: wobbleOptions } = particle.options, - { container, wobble } = particle; + { wobble } = particle; if (!wobbleOptions?.enable || !wobble) { return; diff --git a/updaters/wobble/src/WobbleUpdater.ts b/updaters/wobble/src/WobbleUpdater.ts index e2bd913275a..40a5cad1b14 100644 --- a/updaters/wobble/src/WobbleUpdater.ts +++ b/updaters/wobble/src/WobbleUpdater.ts @@ -19,14 +19,14 @@ const maxAngle = 360, * The Wobble updater plugin */ export class WobbleUpdater implements IParticleUpdater { - private readonly container; + private readonly _container; /** * The Wobble updater plugin constructor, assigns the container using the plugin * @param container - the container using the plugin */ constructor(container: Container) { - this.container = container; + this._container = container; } /** @@ -51,7 +51,7 @@ export class WobbleUpdater implements IParticleUpdater { } particle.retina.wobbleDistance = - getRangeValue(wobbleOpt?.distance ?? defaultDistance) * this.container.retina.pixelRatio; + getRangeValue(wobbleOpt?.distance ?? defaultDistance) * this._container.retina.pixelRatio; } /** @@ -84,6 +84,6 @@ export class WobbleUpdater implements IParticleUpdater { return; } - updateWobble(particle, delta); + updateWobble(this._container, particle, delta); } } diff --git a/updaters/wobble/src/index.ts b/updaters/wobble/src/index.ts index 4ebd76d0416..c208c248745 100644 --- a/updaters/wobble/src/index.ts +++ b/updaters/wobble/src/index.ts @@ -8,8 +8,8 @@ declare const __VERSION__: string; export async function loadWobbleUpdater(engine: Engine): Promise { engine.checkVersion(__VERSION__); - await engine.register(e => { - e.addParticleUpdater("wobble", async container => { + await engine.pluginManager.register(e => { + e.pluginManager.addParticleUpdater("wobble", async container => { const { WobbleUpdater } = await import("./WobbleUpdater.js"); return new WobbleUpdater(container); diff --git a/utils/canvasUtils/CHANGELOG.md b/utils/canvasUtils/CHANGELOG.md index fa7efd490de..33d60063c7d 100644 --- a/utils/canvasUtils/CHANGELOG.md +++ b/utils/canvasUtils/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/canvas-utils + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/canvas-utils diff --git a/utils/canvasUtils/package.dist.json b/utils/canvasUtils/package.dist.json index 947679bb182..7dd52631ba2 100644 --- a/utils/canvasUtils/package.dist.json +++ b/utils/canvasUtils/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/canvas-utils", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles canvas utils library", "homepage": "https://particles.js.org", "repository": { @@ -103,7 +103,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "type": "module" } diff --git a/utils/canvasUtils/package.json b/utils/canvasUtils/package.json index c0fe3f969c6..b16d9ee731d 100644 --- a/utils/canvasUtils/package.json +++ b/utils/canvasUtils/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/canvas-utils", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles canvas utils path", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/utils/canvasUtils/src/Utils.ts b/utils/canvasUtils/src/Utils.ts index 89d014afbe7..d2d140f0fe5 100644 --- a/utils/canvasUtils/src/Utils.ts +++ b/utils/canvasUtils/src/Utils.ts @@ -1,16 +1,26 @@ -import type { CanvasPixelData, ITextDataOptions, TextLineData } from "./types.js"; import { + type CanvasContextType, type ICoordinates, type IDimension, type IRgba, defaultAlpha, defaultRgbMin, + identity, isNumber, originPoint, safeDocument, } from "@tsparticles/engine"; +import type { CanvasPixelData, ITextDataOptions, TextLineData } from "./types.js"; -const defaultWidth = 0; +const defaultWidth = 0, + indexesOffset = { + r: 0, + g: 1, + b: 2, + a: 3, + }, + alphaMax = 255, + alphaFactor = identity / alphaMax; /** * Draws a line between two points using canvas API in the given context. @@ -18,7 +28,7 @@ const defaultWidth = 0; * @param begin - The start point of the line. * @param end - The end point of the line. */ -export function drawLine(context: CanvasRenderingContext2D, begin: ICoordinates, end: ICoordinates): void { +export function drawLine(context: CanvasContextType, begin: ICoordinates, end: ICoordinates): void { context.beginPath(); context.moveTo(begin.x, begin.y); context.lineTo(end.x, end.y); @@ -33,7 +43,7 @@ export function drawLine(context: CanvasRenderingContext2D, begin: ICoordinates, * @returns the canvas pixel data */ export function getCanvasImageData( - ctx: CanvasRenderingContext2D, + ctx: CanvasContextType, size: IDimension, offset: number, clear = true, @@ -55,14 +65,7 @@ export function getCanvasImageData( pixels[pos.y] ??= []; - const indexesOffset = { - r: 0, - g: 1, - b: 2, - a: 3, - }, - alphaFactor = 255, - row = pixels[pos.y]; + const row = pixels[pos.y]; if (!row) { continue; @@ -72,7 +75,7 @@ export function getCanvasImageData( r: imageData[i + indexesOffset.r] ?? defaultRgbMin, g: imageData[i + indexesOffset.g] ?? defaultRgbMin, b: imageData[i + indexesOffset.b] ?? defaultRgbMin, - a: (imageData[i + indexesOffset.a] ?? defaultAlpha) / alphaFactor, + a: (imageData[i + indexesOffset.a] ?? defaultAlpha) * alphaFactor, }; } @@ -110,6 +113,7 @@ export function getImageData( if (!context) { reject(new Error("Could not get canvas context")); + return; } diff --git a/utils/configs/CHANGELOG.md b/utils/configs/CHANGELOG.md index aeebed1e2be..4f5a48af48b 100644 --- a/utils/configs/CHANGELOG.md +++ b/utils/configs/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +### Features + +- added cannon external interaction ([e133ab3](https://github.com/tsparticles/tsparticles/commit/e133ab35835b6411c0da1b151b046a36bcfd9ee1)) + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) ### Features diff --git a/utils/configs/package.dist.json b/utils/configs/package.dist.json index 08c31e456f3..aa5335597cb 100644 --- a/utils/configs/package.dist.json +++ b/utils/configs/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/configs", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles demo configurations", "homepage": "https://particles.js.org", "repository": { @@ -99,7 +99,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "publishConfig": { "access": "public" diff --git a/utils/configs/package.json b/utils/configs/package.json index 9b6f562f555..5e95bde0553 100644 --- a/utils/configs/package.json +++ b/utils/configs/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/configs", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "homepage": "https://particles.js.org", "scripts": { "build": "tsparticles-cli build", @@ -106,7 +106,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/utils/configs/src/b/basic.ts b/utils/configs/src/b/basic.ts index 830e25c33cc..47dcdb2371b 100644 --- a/utils/configs/src/b/basic.ts +++ b/utils/configs/src/b/basic.ts @@ -35,7 +35,7 @@ const options: ISourceOptions = { }, links: { enable: true, - distance: 200, + distance: 150, color: "#ffffff", opacity: 0.4, width: 1, diff --git a/utils/configs/src/b/blackHole.ts b/utils/configs/src/b/blackHole.ts index 491f5f651e0..cc7303e67d0 100644 --- a/utils/configs/src/b/blackHole.ts +++ b/utils/configs/src/b/blackHole.ts @@ -28,16 +28,9 @@ const options: ISourceOptions = { max: 10, }, }, - links: { - enable: false, - distance: 150, - color: "#ffffff", - opacity: 0.4, - width: 1, - }, move: { enable: true, - speed: 0.5, + speed: { max: 2, min: 0 }, warp: true, }, }, diff --git a/utils/configs/src/index.ts b/utils/configs/src/index.ts index af02eb1e5b7..cb143b5c0f5 100644 --- a/utils/configs/src/index.ts +++ b/utils/configs/src/index.ts @@ -34,7 +34,7 @@ for (const key of Object.keys(palettes)) { continue; } - tsParticles.addPalette(key, palette); + tsParticles.pluginManager.addPalette(key, palette); } const configs = { @@ -73,7 +73,7 @@ for (const key of Object.keys(configs)) { continue; } - tsParticles.addConfig(config); + tsParticles.pluginManager.addConfig(config); } export default configs; diff --git a/utils/configs/src/m/index.ts b/utils/configs/src/m/index.ts index d23125a5cb2..c5c668d8171 100644 --- a/utils/configs/src/m/index.ts +++ b/utils/configs/src/m/index.ts @@ -4,6 +4,7 @@ import motionDisable from "./motionDisable.js"; import motionReduce from "./motionReduce.js"; import mouseAttract from "./mouseAttract.js"; import mouseBounce from "./mouseBounce.js"; +import mouseCannon from "./mouseCannon.js"; import mouseDrag from "./mouseDrag.js"; import mouseDragMomentum from "./mouseDragMomentum.js"; import mouseFollow from "./mouseFollow.js"; @@ -25,6 +26,7 @@ export default { motionReduce, mouseAttract, mouseBounce, + mouseCannon, mouseDrag, mouseDragMomentum, mouseFollow, diff --git a/utils/configs/src/m/mouseCannon.ts b/utils/configs/src/m/mouseCannon.ts new file mode 100644 index 00000000000..3d75793dbae --- /dev/null +++ b/utils/configs/src/m/mouseCannon.ts @@ -0,0 +1,103 @@ +import type { ISourceOptions } from "@tsparticles/engine"; + +const options: ISourceOptions = { + key: "mouseCannon", + name: "Mouse Cannon", + particles: { + number: { + value: 0, + density: { + enable: true, + }, + }, + fill: { + color: { + value: ["#ffffff", "#ff0000"], + }, + enable: true, + }, + shape: { + type: ["square", "circle"], + }, + size: { + value: { + min: 3, + max: 5, + }, + }, + move: { + enable: true, + speed: 1, + decay: 0.1, + gravity: { + enable: true, + }, + outModes: { + default: "destroy", + top: "none", + }, + }, + rotate: { + value: { + min: 0, + max: 360, + }, + direction: "random", + move: true, + animation: { + enable: true, + speed: 60, + }, + }, + tilt: { + direction: "random", + enable: true, + value: { + min: 0, + max: 360, + }, + animation: { + enable: true, + speed: 60, + }, + }, + roll: { + darken: { + enable: true, + value: 30, + }, + enlighten: { + enable: true, + value: 30, + }, + enable: true, + mode: "both", + speed: { + min: 15, + max: 25, + }, + }, + wobble: { + distance: 30, + enable: true, + move: true, + speed: { + min: -15, + max: 15, + }, + }, + }, + interactivity: { + events: { + onClick: { + enable: true, + mode: "cannon", + }, + }, + }, + background: { + color: "#000000", + }, +}; + +export default options; diff --git a/utils/fractalNoise/CHANGELOG.md b/utils/fractalNoise/CHANGELOG.md index f030692e93a..bb8088ddc15 100644 --- a/utils/fractalNoise/CHANGELOG.md +++ b/utils/fractalNoise/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/fractal-noise + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/fractal-noise diff --git a/utils/fractalNoise/package.dist.json b/utils/fractalNoise/package.dist.json index ff314157499..a22c1e17e80 100644 --- a/utils/fractalNoise/package.dist.json +++ b/utils/fractalNoise/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/fractal-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles fractal noise library", "homepage": "https://particles.js.org", "repository": { @@ -92,7 +92,7 @@ "module": "esm/index.js", "types": "types/index.d.ts", "dependencies": { - "@tsparticles/smooth-value-noise": "4.0.0-beta.0" + "@tsparticles/smooth-value-noise": "4.0.0-beta.1" }, "exports": { ".": { diff --git a/utils/fractalNoise/package.json b/utils/fractalNoise/package.json index d59bc95932f..e4d41208be2 100644 --- a/utils/fractalNoise/package.json +++ b/utils/fractalNoise/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/fractal-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles fractal noise path", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/smooth-value-noise": "workspace:4.0.0-beta.0" + "@tsparticles/smooth-value-noise": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/utils/fractalNoise/src/FractalNoise.ts b/utils/fractalNoise/src/FractalNoise.ts index 24e0a489978..20b5d679d44 100644 --- a/utils/fractalNoise/src/FractalNoise.ts +++ b/utils/fractalNoise/src/FractalNoise.ts @@ -8,7 +8,7 @@ export class FractalNoise { this._smoothValueNoise = new SmoothValueNoise(); } - noise2d(x: number, y: number, octaves = 5, persistence = 0.5, lacunarity = 2.0): number { + noise2d(x: number, y: number, octaves = 5, persistence = 0.5, lacunarity = 2): number { let total = 0, frequency = 1, amplitude = 1, @@ -24,7 +24,7 @@ export class FractalNoise { return total / maxValue; } - noise3d(x: number, y: number, z: number, octaves = 5, persistence = 0.5, lacunarity = 2.0): number { + noise3d(x: number, y: number, z: number, octaves = 5, persistence = 0.5, lacunarity = 2): number { let total = 0, frequency = 1, amplitude = 1, @@ -40,7 +40,7 @@ export class FractalNoise { return total / maxValue; } - noise4d(x: number, y: number, z: number, w: number, octaves = 5, persistence = 0.5, lacunarity = 2.0): number { + noise4d(x: number, y: number, z: number, w: number, octaves = 5, persistence = 0.5, lacunarity = 2): number { let total = 0, frequency = 1, amplitude = 1, diff --git a/utils/noiseField/CHANGELOG.md b/utils/noiseField/CHANGELOG.md index 5e5bab8317e..6eb0fa0d73b 100644 --- a/utils/noiseField/CHANGELOG.md +++ b/utils/noiseField/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/noise-field + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/noise-field diff --git a/utils/noiseField/package.dist.json b/utils/noiseField/package.dist.json index 67d02f4634b..4eb6e89d2b6 100644 --- a/utils/noiseField/package.dist.json +++ b/utils/noiseField/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/noise-field", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles noise field library", "homepage": "https://particles.js.org", "repository": { @@ -92,8 +92,8 @@ "module": "esm/index.js", "types": "types/index.d.ts", "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0", - "@tsparticles/plugin-move": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1", + "@tsparticles/plugin-move": "4.0.0-beta.1" }, "exports": { ".": { diff --git a/utils/noiseField/package.json b/utils/noiseField/package.json index 668a830cc66..80bea069ddb 100644 --- a/utils/noiseField/package.json +++ b/utils/noiseField/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/noise-field", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles noise field library", "homepage": "https://particles.js.org", "scripts": { @@ -108,8 +108,8 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-move": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-move": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/utils/noiseField/src/NoiseFieldGenerator.ts b/utils/noiseField/src/NoiseFieldGenerator.ts index 30371adda36..a511a9fc60d 100644 --- a/utils/noiseField/src/NoiseFieldGenerator.ts +++ b/utils/noiseField/src/NoiseFieldGenerator.ts @@ -1,4 +1,13 @@ -import { type Container, type Particle, Vector, deepExtend, doublePI, getRandom } from "@tsparticles/engine"; +import { + type CanvasContextType, + type Container, + type Particle, + Vector, + deepExtend, + doublePI, + getRandom, + identity, +} from "@tsparticles/engine"; import type { IFactorValues, IOffsetValues } from "./IFactorOffsetValues.js"; import { type IMovePathGenerator } from "@tsparticles/plugin-move"; import type { INoiseFieldOptions } from "./INoiseFieldOptions.js"; @@ -56,10 +65,11 @@ export abstract class NoiseFieldGenerator implements IMovePathGenerator { generate(particle: Particle): Vector { const pos = particle.getPosition(), { size } = this.options, + sizeFactor = identity / size, point = { - x: Math.max(Math.floor(pos.x / size), originCoordinate), - y: Math.max(Math.floor(pos.y / size), originCoordinate), - z: Math.max(Math.floor(pos.z / size), originCoordinate), + x: Math.max(Math.floor(pos.x * sizeFactor), originCoordinate), + y: Math.max(Math.floor(pos.y * sizeFactor), originCoordinate), + z: Math.max(Math.floor(pos.z * sizeFactor), originCoordinate), }, { field } = this, fieldPoint = field[point.x]?.[point.y]?.[point.z]; @@ -92,7 +102,7 @@ export abstract class NoiseFieldGenerator implements IMovePathGenerator { return; } - this.container.canvas.draw(ctx => { + this.container.canvas.render.draw(ctx => { this._drawField(ctx); }); } @@ -135,7 +145,7 @@ export abstract class NoiseFieldGenerator implements IMovePathGenerator { } } - private _drawField(ctx: CanvasRenderingContext2D): void { + private _drawField(ctx: CanvasContextType): void { const { field, options } = this; for (let x = 0; x < options.columns; x++) { @@ -215,7 +225,6 @@ export abstract class NoiseFieldGenerator implements IMovePathGenerator { options.width = container.canvas.size.width; options.height = container.canvas.size.height; - options.size = (sourceOptions["size"] as number) > empty ? (sourceOptions["size"] as number) : defaultOptions.size; options.increment = (sourceOptions["increment"] as number) > empty @@ -233,7 +242,6 @@ export abstract class NoiseFieldGenerator implements IMovePathGenerator { options.factor.angle = factor?.angle ?? defaultOptions.factor.angle; options.factor.length = factor?.length ?? defaultOptions.factor.length; - options.seed = sourceOptions["seed"] as number | undefined; this.noiseGen.seed(options.seed ?? getRandom()); diff --git a/utils/pathUtils/CHANGELOG.md b/utils/pathUtils/CHANGELOG.md index af3593dca6b..38d03a43b62 100644 --- a/utils/pathUtils/CHANGELOG.md +++ b/utils/pathUtils/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/path-utils + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/path-utils diff --git a/utils/pathUtils/package.dist.json b/utils/pathUtils/package.dist.json index 813c88caebd..9032f48b123 100644 --- a/utils/pathUtils/package.dist.json +++ b/utils/pathUtils/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-utils", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles path utils library", "homepage": "https://particles.js.org", "repository": { @@ -103,7 +103,7 @@ "./package.json": "./package.json" }, "dependencies": { - "@tsparticles/engine": "4.0.0-beta.0" + "@tsparticles/engine": "4.0.0-beta.1" }, "type": "module" } diff --git a/utils/pathUtils/package.json b/utils/pathUtils/package.json index cf62ece0bd0..ec77663a46b 100644 --- a/utils/pathUtils/package.json +++ b/utils/pathUtils/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/path-utils", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles path utils path", "homepage": "https://particles.js.org", "scripts": { @@ -108,7 +108,7 @@ "./package.json": "./dist/package.json" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1" }, "publishConfig": { "access": "public", diff --git a/utils/pathUtils/src/Utils.ts b/utils/pathUtils/src/Utils.ts index 06b7ce3915c..e912df769cd 100644 --- a/utils/pathUtils/src/Utils.ts +++ b/utils/pathUtils/src/Utils.ts @@ -1,3 +1,4 @@ +import type { CanvasContextType } from "@tsparticles/engine"; import type { IPathData } from "./IPathData.js"; import { SegmentType } from "./SegmentType.js"; @@ -11,11 +12,7 @@ const firstIndex = 0, * @param radius - * @param path - */ -export function drawPath( - ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, - radius: number, - path: IPathData, -): void { +export function drawPath(ctx: CanvasContextType, radius: number, path: IPathData): void { const firstSegment = path.segments[firstIndex]; if (!firstSegment) { diff --git a/utils/perlinNoise/CHANGELOG.md b/utils/perlinNoise/CHANGELOG.md index 5443ff433ba..b131ab47f7b 100644 --- a/utils/perlinNoise/CHANGELOG.md +++ b/utils/perlinNoise/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/perlin-noise + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/perlin-noise diff --git a/utils/perlinNoise/package.dist.json b/utils/perlinNoise/package.dist.json index 056870412ae..4c8504d6613 100644 --- a/utils/perlinNoise/package.dist.json +++ b/utils/perlinNoise/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/perlin-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles perlin noise library", "homepage": "https://particles.js.org", "repository": { diff --git a/utils/perlinNoise/package.json b/utils/perlinNoise/package.json index 1a686072106..6c935468c5c 100644 --- a/utils/perlinNoise/package.json +++ b/utils/perlinNoise/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/perlin-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles perlin noise path", "homepage": "https://particles.js.org", "scripts": { diff --git a/utils/simplexNoise/CHANGELOG.md b/utils/simplexNoise/CHANGELOG.md index b9a8e1e8fd5..c35544bd893 100644 --- a/utils/simplexNoise/CHANGELOG.md +++ b/utils/simplexNoise/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/simplex-noise + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/simplex-noise diff --git a/utils/simplexNoise/package.dist.json b/utils/simplexNoise/package.dist.json index 993ac20e9ac..767f6a9a2cf 100644 --- a/utils/simplexNoise/package.dist.json +++ b/utils/simplexNoise/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/simplex-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles simplex noise library", "homepage": "https://particles.js.org", "repository": { diff --git a/utils/simplexNoise/package.json b/utils/simplexNoise/package.json index 5c4352a3981..a7e4b56583d 100644 --- a/utils/simplexNoise/package.json +++ b/utils/simplexNoise/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/simplex-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles simplex noise library", "homepage": "https://particles.js.org", "scripts": { diff --git a/utils/simplexNoise/src/Classes/SimplexNoise2D.ts b/utils/simplexNoise/src/Classes/SimplexNoise2D.ts index 6d3c78d1603..d2eb053ca78 100644 --- a/utils/simplexNoise/src/Classes/SimplexNoise2D.ts +++ b/utils/simplexNoise/src/Classes/SimplexNoise2D.ts @@ -1,9 +1,10 @@ /* eslint-disable @typescript-eslint/no-magic-numbers */ /* eslint-disable @typescript-eslint/no-non-null-assertion */ - import type { Contribution2D } from "../Contributions.js"; import { shuffleSeed } from "../utils.js"; +const half = 0.5; + export class SimplexNoise2D { private readonly _NORM_2D; private readonly _SQUISH_2D; @@ -18,9 +19,9 @@ export class SimplexNoise2D { private _perm2D: Uint8Array; constructor() { - this._NORM_2D = 1.0 / 47.0; - this._SQUISH_2D = (Math.sqrt(2 + 1) - 1) / 2; - this._STRETCH_2D = (1 / Math.sqrt(2 + 1) - 1) / 2; + this._NORM_2D = 1 / 47; + this._SQUISH_2D = (Math.sqrt(2 + 1) - 1) * half; + this._STRETCH_2D = (1 / Math.sqrt(2 + 1) - 1) * half; this._base2D = [ [1, 1, 0, 1, 0, 1, 0, 0, 0], [1, 1, 0, 1, 0, 1, 2, 1, 1], @@ -122,15 +123,17 @@ export class SimplexNoise2D { dy = dy0 + c.dy, attn = 2 - dx * dx - dy * dy; - if (attn > 0) { - const px = xsb + c.xsb, - py = ysb + c.ysb, - indexPartA = _perm[px & 0xff]!, - index = _perm2D[(indexPartA + py) & 0xff]!, - valuePart = _gradients2D[index]! * dx + _gradients2D[index + 1]! * dy; - - value += attn * attn * attn * attn * valuePart; + if (attn <= 0) { + continue; } + + const px = xsb + c.xsb, + py = ysb + c.ysb, + indexPartA = _perm[px & 0xff]!, + index = _perm2D[(indexPartA + py) & 0xff]!, + valuePart = _gradients2D[index]! * dx + _gradients2D[index + 1]! * dy; + + value += attn * attn * attn * attn * valuePart; } return value * _NORM_2D; @@ -196,6 +199,7 @@ export class SimplexNoise2D { this._perm[i] = source[r[0]]!; this._perm2D[i] = this._perm[i]! & 0x0e; + source[r[0]] = source[i]!; } } diff --git a/utils/simplexNoise/src/Classes/SimplexNoise3D.ts b/utils/simplexNoise/src/Classes/SimplexNoise3D.ts index bd0505ea242..8c868398167 100644 --- a/utils/simplexNoise/src/Classes/SimplexNoise3D.ts +++ b/utils/simplexNoise/src/Classes/SimplexNoise3D.ts @@ -1,9 +1,10 @@ /* eslint-disable @typescript-eslint/no-magic-numbers */ /* eslint-disable @typescript-eslint/no-non-null-assertion */ - import type { Contribution3D } from "../Contributions.js"; import { shuffleSeed } from "../utils.js"; +const third = 1 / 3; + export class SimplexNoise3D { private readonly _NORM_3D; private readonly _SQUISH_3D; @@ -18,9 +19,9 @@ export class SimplexNoise3D { private _perm3D: Uint8Array; constructor() { - this._NORM_3D = 1.0 / 103.0; - this._SQUISH_3D = (Math.sqrt(3 + 1) - 1) / 3; - this._STRETCH_3D = (1 / Math.sqrt(3 + 1) - 1) / 3; + this._NORM_3D = 1 / 103; + this._SQUISH_3D = (Math.sqrt(3 + 1) - 1) * third; + this._STRETCH_3D = (1 / Math.sqrt(3 + 1) - 1) * third; this._base3D = [ [0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1], @@ -580,6 +581,7 @@ export class SimplexNoise3D { this._perm[i] = source[r[0]]!; this._perm3D[i] = (this._perm[i]! % 24) * 3; + source[r[0]] = source[i]!; } } diff --git a/utils/simplexNoise/src/Classes/SimplexNoise4D.ts b/utils/simplexNoise/src/Classes/SimplexNoise4D.ts index baf9021065f..7a7bac712b3 100644 --- a/utils/simplexNoise/src/Classes/SimplexNoise4D.ts +++ b/utils/simplexNoise/src/Classes/SimplexNoise4D.ts @@ -4,6 +4,8 @@ import type { Contribution4D } from "../Contributions.js"; import { shuffleSeed } from "../utils.js"; +const quarter = 0.25; + export class SimplexNoise4D { private readonly _NORM_4D; private readonly _SQUISH_4D; @@ -18,9 +20,9 @@ export class SimplexNoise4D { private _perm4D: Uint8Array; constructor() { - this._NORM_4D = 1.0 / 30.0; - this._SQUISH_4D = (Math.sqrt(4 + 1) - 1) * 0.25; - this._STRETCH_4D = (1 / Math.sqrt(4 + 1) - 1) * 0.25; + this._NORM_4D = 1 / 30; + this._SQUISH_4D = (Math.sqrt(4 + 1) - 1) * quarter; + this._STRETCH_4D = (1 / Math.sqrt(4 + 1) - 1) * quarter; this._lookup = []; this._perm = new Uint8Array(0); this._perm4D = new Uint8Array(0); @@ -2798,7 +2800,6 @@ export class SimplexNoise4D { } /** - * * @param x - * @param y - * @param z - @@ -2866,12 +2867,14 @@ export class SimplexNoise4D { value += attn * attn * attn * attn * valuePart; } } + return value * _NORM_4D; } seed(clientSeed: number): void { const { _p4D, _base4D, _lookupPairs4D } = this, contributions: Contribution4D[] = []; + for (let i = 0; i < _p4D.length; i += 16) { const baseSet = _base4D[_p4D[i]!]!; @@ -2911,6 +2914,7 @@ export class SimplexNoise4D { this._perm = new Uint8Array(256); this._perm4D = new Uint8Array(256); + const source = new Uint8Array(256); for (let i = 0; i < 256; i++) { @@ -2935,6 +2939,7 @@ export class SimplexNoise4D { this._perm[i] = source[r[0]]!; this._perm4D[i] = this._perm[i]! & 0xfc; + source[r[0]] = source[i]!; } } diff --git a/utils/smoothValueNoise/CHANGELOG.md b/utils/smoothValueNoise/CHANGELOG.md index fb192bb3b2d..0e761712853 100644 --- a/utils/smoothValueNoise/CHANGELOG.md +++ b/utils/smoothValueNoise/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/smooth-value-noise + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/smooth-value-noise diff --git a/utils/smoothValueNoise/package.dist.json b/utils/smoothValueNoise/package.dist.json index c79d48fd141..ae1e9a78895 100644 --- a/utils/smoothValueNoise/package.dist.json +++ b/utils/smoothValueNoise/package.dist.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/smooth-value-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles smooth value noise library", "homepage": "https://particles.js.org", "repository": { diff --git a/utils/smoothValueNoise/package.json b/utils/smoothValueNoise/package.json index 0641b6e1ead..f3927b2bb37 100644 --- a/utils/smoothValueNoise/package.json +++ b/utils/smoothValueNoise/package.json @@ -1,6 +1,6 @@ { "name": "@tsparticles/smooth-value-noise", - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "description": "tsParticles smooth value noise path", "homepage": "https://particles.js.org", "scripts": { diff --git a/utils/tests/CHANGELOG.md b/utils/tests/CHANGELOG.md index 99c683f9e82..6aa0c524198 100644 --- a/utils/tests/CHANGELOG.md +++ b/utils/tests/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [4.0.0-beta.1](https://github.com/tsparticles/tsparticles/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2026-03-31) + +**Note:** Version bump only for package @tsparticles/tests + # [4.0.0-beta.0](https://github.com/tsparticles/tsparticles/compare/v4.0.0-alpha.28...v4.0.0-beta.0) (2026-03-19) **Note:** Version bump only for package @tsparticles/tests diff --git a/utils/tests/package.json b/utils/tests/package.json index f237cc8aaf2..6465055ae34 100644 --- a/utils/tests/package.json +++ b/utils/tests/package.json @@ -1,7 +1,7 @@ { "name": "@tsparticles/tests", "private": true, - "version": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "scripts": { "prettify:ci": "prettier --check ./src", "prettify": "prettier --write ./src", @@ -16,11 +16,11 @@ "test:ci": "NODE_ENV=test vitest run --maxConcurrency=2" }, "dependencies": { - "@tsparticles/engine": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-hex-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-hsl-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-hsv-color": "workspace:4.0.0-beta.0", - "@tsparticles/plugin-rgb-color": "workspace:4.0.0-beta.0" + "@tsparticles/engine": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-hex-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-hsl-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-hsv-color": "workspace:4.0.0-beta.1", + "@tsparticles/plugin-rgb-color": "workspace:4.0.0-beta.1" }, "type": "module" } diff --git a/utils/tests/src/tests/ColorUtils.ts b/utils/tests/src/tests/ColorUtils.ts index 7d8a84c2827..23ee9fdb7e9 100644 --- a/utils/tests/src/tests/ColorUtils.ts +++ b/utils/tests/src/tests/ColorUtils.ts @@ -21,7 +21,9 @@ import { loadHsvColorPlugin } from "@tsparticles/plugin-hsv-color"; import { loadRgbColorPlugin } from "@tsparticles/plugin-rgb-color"; describe("ColorUtils", async () => { - await tsParticles.register(async engine => { + const pluginManager = tsParticles.pluginManager; + + await pluginManager.register(async engine => { await loadHexColorPlugin(engine); await loadHslColorPlugin(engine); await loadHsvColorPlugin(engine); @@ -42,7 +44,7 @@ describe("ColorUtils", async () => { value: "#ff0000", }; - expect(colorToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("string value 2", () => { @@ -50,7 +52,7 @@ describe("ColorUtils", async () => { value: "rgb(255, 0, 0)", }; - expect(colorToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("string value 3", () => { @@ -58,7 +60,7 @@ describe("ColorUtils", async () => { value: "rgba(255, 0, 0, 1)", }; - expect(colorToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("string value 4", () => { @@ -66,7 +68,7 @@ describe("ColorUtils", async () => { value: "rgb(255 0 0)", }; - expect(colorToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("string value 5", () => { @@ -74,7 +76,7 @@ describe("ColorUtils", async () => { value: "rgba(255 0 0 1)", }; - expect(colorToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("string value 6", () => { @@ -82,7 +84,7 @@ describe("ColorUtils", async () => { value: "hsla(0, 100%, 50%, 1)", }; - expect(colorToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("string value 7", () => { @@ -90,7 +92,7 @@ describe("ColorUtils", async () => { value: "hsla(0 100% 50% 1)", }; - expect(colorToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("array string value", () => { @@ -98,7 +100,7 @@ describe("ColorUtils", async () => { value: ["#ff0000", "#00ff00", "#0000ff"], }; - expect(colorToRgb(tsParticles, color)).to.satisfy((rgb: IRgb) => { + expect(colorToRgb(pluginManager, color)).to.satisfy((rgb: IRgb) => { return rgb.r === 255 || rgb.g === 255 || rgb.b === 255; }).and.not.be.undefined.and.not.be.null; }); @@ -114,7 +116,7 @@ describe("ColorUtils", async () => { }, }; - expect(colorToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("IValueColor w/ hsl value", () => { @@ -128,7 +130,7 @@ describe("ColorUtils", async () => { }, }; - expect(colorToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("rgb value", () => { @@ -140,7 +142,7 @@ describe("ColorUtils", async () => { }, }; - expect(colorToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("hsl value", () => { @@ -152,7 +154,7 @@ describe("ColorUtils", async () => { }, }; - expect(colorToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("invalid string value", () => { @@ -160,19 +162,19 @@ describe("ColorUtils", async () => { value: "hello world", }; - expect(colorToRgb(tsParticles, color)).to.be.undefined; + expect(colorToRgb(pluginManager, color)).to.be.undefined; }); it("input undefined", () => { const color = undefined; - expect(colorToRgb(tsParticles, color)).to.be.undefined; + expect(colorToRgb(pluginManager, color)).to.be.undefined; }); it("random value", () => { const color = "random"; - expect(colorToRgb(tsParticles, color)).not.be.undefined.and.not.be.null; + expect(colorToRgb(pluginManager, color)).not.be.undefined.and.not.be.null; }); }); @@ -180,19 +182,19 @@ describe("ColorUtils", async () => { it("from hex with alpha string to alpha value", () => { const value = "#ff0000ff"; - expect(stringToAlpha(tsParticles, value)).to.equal(1).and.be.not.undefined; + expect(stringToAlpha(pluginManager, value)).to.equal(1).and.be.not.undefined; }); it("from hex without alpha string to alpha value", () => { const value = "#ff0000"; - expect(stringToAlpha(tsParticles, value)).to.equal(1).and.be.not.undefined; + expect(stringToAlpha(pluginManager, value)).to.equal(1).and.be.not.undefined; }); it("invalid string value", () => { const value = "hello world"; - expect(stringToAlpha(tsParticles, value)).to.be.undefined; + expect(stringToAlpha(pluginManager, value)).to.be.undefined; }); }); @@ -200,13 +202,13 @@ describe("ColorUtils", async () => { it("from hex string to rgb value", () => { const color = "#ff0000"; - expect(stringToRgb(tsParticles, color)).to.include(red).and.not.be.undefined.and.not.be.null; + expect(stringToRgb(pluginManager, color)).to.include(red).and.not.be.undefined.and.not.be.null; }); it("invalid string value", () => { const value = "hello world"; - expect(stringToRgb(tsParticles, value)).to.be.undefined; + expect(stringToRgb(pluginManager, value)).to.be.undefined; }); });