From 7ce506631f5a7109ccbb369150f1b161560bc87f Mon Sep 17 00:00:00 2001 From: Matteo Bruni <176620+matteobruni@users.noreply.github.com> Date: Sun, 17 May 2026 14:34:55 +0200 Subject: [PATCH 1/4] build: added some configs from old website --- utils/configs/src/c/colors.ts | 109 ++++++++++++++++++++++++++++++++++ utils/configs/src/c/index.ts | 2 + utils/configs/src/t/index.ts | 2 + utils/configs/src/t/tunnel.ts | 88 +++++++++++++++++++++++++++ 4 files changed, 201 insertions(+) create mode 100644 utils/configs/src/c/colors.ts create mode 100644 utils/configs/src/t/tunnel.ts diff --git a/utils/configs/src/c/colors.ts b/utils/configs/src/c/colors.ts new file mode 100644 index 00000000000..0773cd83973 --- /dev/null +++ b/utils/configs/src/c/colors.ts @@ -0,0 +1,109 @@ +import type { ISourceOptions } from "@tsparticles/engine"; + +const options: ISourceOptions = { + key: "colors", + name: "Colors", + background: { + color: "#000", + }, + interactivity: { + events: { + onHover: { + mode: "trail", + enable: true, + }, + }, + modes: { + trail: { + delay: 0.005, + quantity: 5, + pauseOnStop: true, + particles: { + paint: { + color: { + value: "#ff0000", + animation: { + enable: true, + speed: 400, + sync: true, + }, + }, + }, + collisions: { + enable: false, + }, + links: { + enable: false, + }, + move: { + outModes: { + default: "destroy", + }, + speed: 2, + }, + size: { + value: { + min: 1, + max: 5, + }, + animation: { + enable: true, + speed: 5, + sync: true, + startValue: "min", + destroy: "max", + }, + }, + }, + }, + }, + }, + particles: { + paint: { + color: { + animation: { + enable: true, + sync: false, + speed: 50, + }, + value: "#ff0000", + }, + }, + links: { + color: "random", + enable: true, + }, + move: { + enable: true, + }, + number: { + value: 100, + density: { + enable: true, + }, + }, + opacity: { + animation: { + enable: true, + speed: 0.1, + }, + value: { + min: 0.3, + max: 0.8, + }, + }, + size: { + animation: { + enable: true, + speed: 3, + }, + value: { + min: 1, + max: 3, + }, + }, + }, + emitters: [], +}; + +export default options; diff --git a/utils/configs/src/c/index.ts b/utils/configs/src/c/index.ts index 349aa0607cc..80fe2a148e8 100644 --- a/utils/configs/src/c/index.ts +++ b/utils/configs/src/c/index.ts @@ -7,6 +7,7 @@ import collisionsAbsorb from "./collisionsAbsorb.js"; import collisionsBounce from "./collisionsBounce.js"; import collisionsDestroy from "./collisionsDestroy.js"; import colorAnimation from "./colorAnimation.js"; +import colors from "./colors.js"; import confettiExplosions from "./confettiExplosions.js"; import connect from "./connect.js"; import curlNoise from "./curlNoise.js"; @@ -21,6 +22,7 @@ export default { collisionsBounce, collisionsDestroy, colorAnimation, + colors, confettiExplosions, connect, curlNoise, diff --git a/utils/configs/src/t/index.ts b/utils/configs/src/t/index.ts index c085d2e5f04..e619292a517 100644 --- a/utils/configs/src/t/index.ts +++ b/utils/configs/src/t/index.ts @@ -6,6 +6,7 @@ import tilt from "./tilt.js"; import trail from "./trail.js"; import trailImage from "./trailImage.js"; import triangles from "./triangles.js"; +import tunnel from "./tunnel.js"; import twinkle from "./twinkle.js"; export default { @@ -17,5 +18,6 @@ export default { trail, trailImage, triangles, + tunnel, twinkle, }; diff --git a/utils/configs/src/t/tunnel.ts b/utils/configs/src/t/tunnel.ts new file mode 100644 index 00000000000..a6e8435ac08 --- /dev/null +++ b/utils/configs/src/t/tunnel.ts @@ -0,0 +1,88 @@ +import type { ISourceOptions } from "@tsparticles/engine"; + +const options: ISourceOptions = { + key: "tunnel", + name: "Tunnel", + particles: { + number: { + value: 0, + }, + paint: { + color: { + value: "#ffffff", + }, + }, + shape: { + type: "circle", + }, + opacity: { + value: { + min: 0.3, + max: 0.8, + }, + }, + size: { + value: { + min: 1, + max: 10, + }, + }, + move: { + enable: true, + size: true, + speed: 5, + direction: "none", + outModes: { + default: "destroy", + }, + }, + }, + background: { + color: "#000", + }, + trail: { + enable: true, + fill: { + color: "#000000", + }, + length: 3, + }, + emitters: { + direction: "none", + rate: { + delay: 0.25, + quantity: 10, + }, + position: { + x: 50, + y: 50, + }, + size: { + width: 0, + height: 0, + }, + spawn: { + fill: { + color: { + value: "#ff0000", + animation: { + h: { + enable: true, + speed: 5, + }, + l: { + enable: true, + speed: 0, + offset: { + min: 20, + max: 80, + }, + }, + }, + }, + }, + }, + }, +}; + +export default options; From 4792477b5269238b9c751969ef777761652af3a3 Mon Sep 17 00:00:00 2001 From: Matteo Bruni <176620+matteobruni@users.noreply.github.com> Date: Sun, 17 May 2026 15:21:46 +0200 Subject: [PATCH 2/4] build: updated website --- websites/website/docs/.vitepress/config.ts | 27 +- .../.vitepress/theme/components/MyHome.vue | 29 ++ .../theme/components/RandomDemo.vue | 168 ++++++++ .../theme/components/RandomDemoHero.vue | 375 ++++++++++++++++++ .../website/docs/.vitepress/theme/index.ts | 4 + .../website/docs/de/guide/getting-started.md | 2 +- .../website/docs/de/guide/installation.md | 2 +- .../website/docs/de/guide/migrate-from-v3.md | 30 -- websites/website/docs/de/guide/migrations.md | 22 - websites/website/docs/de/index.md | 2 +- .../docs/de/{ => migrations}/changelog.md | 0 .../from-v1.md} | 4 +- .../from-v2.md} | 4 +- .../website/docs/de/migrations/from-v3.md | 86 ++++ websites/website/docs/de/migrations/index.md | 34 ++ .../option-rename-matrix.md | 0 .../index.md => migrations/particles-js.md} | 0 .../index.md => migrations/releases.md} | 0 .../website/docs/es/guide/getting-started.md | 2 +- .../website/docs/es/guide/installation.md | 2 +- .../website/docs/es/guide/migrate-from-v3.md | 30 -- websites/website/docs/es/guide/migrations.md | 22 - websites/website/docs/es/index.md | 2 +- .../docs/es/{ => migrations}/changelog.md | 0 .../from-v1.md} | 4 +- .../from-v2.md} | 4 +- .../website/docs/es/migrations/from-v3.md | 86 ++++ websites/website/docs/es/migrations/index.md | 34 ++ .../option-rename-matrix.md | 0 .../index.md => migrations/particles-js.md} | 0 .../index.md => migrations/releases.md} | 0 .../website/docs/fr/guide/getting-started.md | 2 +- .../website/docs/fr/guide/installation.md | 2 +- .../website/docs/fr/guide/migrate-from-v3.md | 30 -- websites/website/docs/fr/guide/migrations.md | 22 - websites/website/docs/fr/index.md | 2 +- .../docs/fr/{ => migrations}/changelog.md | 0 .../from-v1.md} | 4 +- .../from-v2.md} | 4 +- .../website/docs/fr/migrations/from-v3.md | 86 ++++ websites/website/docs/fr/migrations/index.md | 34 ++ .../option-rename-matrix.md | 0 .../index.md => migrations/particles-js.md} | 0 .../index.md => migrations/releases.md} | 0 .../website/docs/guide/getting-started.md | 2 +- websites/website/docs/guide/installation.md | 2 +- websites/website/docs/guide/migrations.md | 32 -- .../website/docs/hi/guide/getting-started.md | 2 +- .../website/docs/hi/guide/installation.md | 2 +- .../website/docs/hi/guide/migrate-from-v3.md | 30 -- websites/website/docs/hi/guide/migrations.md | 22 - websites/website/docs/hi/index.md | 2 +- .../docs/hi/{ => migrations}/changelog.md | 0 .../from-v1.md} | 4 +- .../from-v2.md} | 4 +- .../website/docs/hi/migrations/from-v3.md | 86 ++++ websites/website/docs/hi/migrations/index.md | 34 ++ .../option-rename-matrix.md | 0 .../index.md => migrations/particles-js.md} | 0 .../index.md => migrations/releases.md} | 0 websites/website/docs/index.md | 17 +- .../website/docs/it/guide/getting-started.md | 2 +- .../website/docs/it/guide/installation.md | 2 +- .../website/docs/it/guide/migrate-from-v3.md | 30 -- websites/website/docs/it/guide/migrations.md | 22 - websites/website/docs/it/index.md | 2 +- .../docs/it/{ => migrations}/changelog.md | 0 .../from-v1.md} | 4 +- .../from-v2.md} | 4 +- .../website/docs/it/migrations/from-v3.md | 86 ++++ websites/website/docs/it/migrations/index.md | 34 ++ .../option-rename-matrix.md | 0 .../index.md => migrations/particles-js.md} | 0 .../index.md => migrations/releases.md} | 0 .../website/docs/ja/guide/getting-started.md | 2 +- .../website/docs/ja/guide/installation.md | 2 +- .../website/docs/ja/guide/migrate-from-v3.md | 30 -- websites/website/docs/ja/guide/migrations.md | 22 - websites/website/docs/ja/index.md | 2 +- .../docs/ja/{ => migrations}/changelog.md | 0 .../from-v1.md} | 4 +- .../from-v2.md} | 4 +- .../website/docs/ja/migrations/from-v3.md | 86 ++++ websites/website/docs/ja/migrations/index.md | 34 ++ .../option-rename-matrix.md | 0 .../index.md => migrations/particles-js.md} | 0 .../index.md => migrations/releases.md} | 0 .../docs/{ => migrations}/changelog.md | 0 .../from-v1.md} | 4 +- .../from-v2.md} | 4 +- .../from-v3.md} | 21 +- websites/website/docs/migrations/index.md | 34 ++ .../option-rename-matrix.md | 8 +- .../index.md => migrations/particles-js.md} | 0 .../index.md => migrations/releases.md} | 0 .../website/docs/pt/guide/getting-started.md | 2 +- .../website/docs/pt/guide/installation.md | 2 +- .../website/docs/pt/guide/migrate-from-v3.md | 30 -- websites/website/docs/pt/guide/migrations.md | 22 - websites/website/docs/pt/index.md | 2 +- .../docs/pt/{ => migrations}/changelog.md | 0 .../from-v1.md} | 4 +- .../from-v2.md} | 4 +- .../website/docs/pt/migrations/from-v3.md | 86 ++++ websites/website/docs/pt/migrations/index.md | 34 ++ .../option-rename-matrix.md | 0 .../index.md => migrations/particles-js.md} | 0 .../index.md => migrations/releases.md} | 0 .../website/docs/ru/guide/getting-started.md | 2 +- .../website/docs/ru/guide/installation.md | 2 +- .../website/docs/ru/guide/migrate-from-v3.md | 30 -- websites/website/docs/ru/guide/migrations.md | 22 - websites/website/docs/ru/index.md | 2 +- .../docs/ru/{ => migrations}/changelog.md | 0 .../from-v1.md} | 4 +- .../from-v2.md} | 4 +- .../website/docs/ru/migrations/from-v3.md | 86 ++++ websites/website/docs/ru/migrations/index.md | 34 ++ .../option-rename-matrix.md | 0 .../index.md => migrations/particles-js.md} | 0 .../index.md => migrations/releases.md} | 0 .../website/docs/zh/guide/getting-started.md | 2 +- .../website/docs/zh/guide/installation.md | 2 +- .../website/docs/zh/guide/migrate-from-v3.md | 30 -- websites/website/docs/zh/guide/migrations.md | 22 - websites/website/docs/zh/index.md | 2 +- .../docs/zh/{ => migrations}/changelog.md | 0 .../from-v1.md} | 4 +- .../from-v2.md} | 4 +- .../website/docs/zh/migrations/from-v3.md | 86 ++++ websites/website/docs/zh/migrations/index.md | 34 ++ .../option-rename-matrix.md | 0 .../index.md => migrations/particles-js.md} | 0 .../index.md => migrations/releases.md} | 0 134 files changed, 1804 insertions(+), 597 deletions(-) create mode 100644 websites/website/docs/.vitepress/theme/components/MyHome.vue create mode 100644 websites/website/docs/.vitepress/theme/components/RandomDemo.vue create mode 100644 websites/website/docs/.vitepress/theme/components/RandomDemoHero.vue delete mode 100644 websites/website/docs/de/guide/migrate-from-v3.md delete mode 100644 websites/website/docs/de/guide/migrations.md rename websites/website/docs/de/{ => migrations}/changelog.md (100%) rename websites/website/docs/de/{guide/migrate-from-v1.md => migrations/from-v1.md} (70%) rename websites/website/docs/de/{guide/migrate-from-v2.md => migrations/from-v2.md} (75%) create mode 100644 websites/website/docs/de/migrations/from-v3.md create mode 100644 websites/website/docs/de/migrations/index.md rename websites/website/docs/de/{guide => migrations}/option-rename-matrix.md (100%) rename websites/website/docs/de/{migration/index.md => migrations/particles-js.md} (100%) rename websites/website/docs/de/{releases/index.md => migrations/releases.md} (100%) delete mode 100644 websites/website/docs/es/guide/migrate-from-v3.md delete mode 100644 websites/website/docs/es/guide/migrations.md rename websites/website/docs/es/{ => migrations}/changelog.md (100%) rename websites/website/docs/es/{guide/migrate-from-v1.md => migrations/from-v1.md} (69%) rename websites/website/docs/es/{guide/migrate-from-v2.md => migrations/from-v2.md} (76%) create mode 100644 websites/website/docs/es/migrations/from-v3.md create mode 100644 websites/website/docs/es/migrations/index.md rename websites/website/docs/es/{guide => migrations}/option-rename-matrix.md (100%) rename websites/website/docs/es/{migration/index.md => migrations/particles-js.md} (100%) rename websites/website/docs/es/{releases/index.md => migrations/releases.md} (100%) delete mode 100644 websites/website/docs/fr/guide/migrate-from-v3.md delete mode 100644 websites/website/docs/fr/guide/migrations.md rename websites/website/docs/fr/{ => migrations}/changelog.md (100%) rename websites/website/docs/fr/{guide/migrate-from-v1.md => migrations/from-v1.md} (69%) rename websites/website/docs/fr/{guide/migrate-from-v2.md => migrations/from-v2.md} (76%) create mode 100644 websites/website/docs/fr/migrations/from-v3.md create mode 100644 websites/website/docs/fr/migrations/index.md rename websites/website/docs/fr/{guide => migrations}/option-rename-matrix.md (100%) rename websites/website/docs/fr/{migration/index.md => migrations/particles-js.md} (100%) rename websites/website/docs/fr/{releases/index.md => migrations/releases.md} (100%) delete mode 100644 websites/website/docs/guide/migrations.md delete mode 100644 websites/website/docs/hi/guide/migrate-from-v3.md delete mode 100644 websites/website/docs/hi/guide/migrations.md rename websites/website/docs/hi/{ => migrations}/changelog.md (100%) rename websites/website/docs/hi/{guide/migrate-from-v1.md => migrations/from-v1.md} (74%) rename websites/website/docs/hi/{guide/migrate-from-v2.md => migrations/from-v2.md} (78%) create mode 100644 websites/website/docs/hi/migrations/from-v3.md create mode 100644 websites/website/docs/hi/migrations/index.md rename websites/website/docs/hi/{guide => migrations}/option-rename-matrix.md (100%) rename websites/website/docs/hi/{migration/index.md => migrations/particles-js.md} (100%) rename websites/website/docs/hi/{releases/index.md => migrations/releases.md} (100%) delete mode 100644 websites/website/docs/it/guide/migrate-from-v3.md delete mode 100644 websites/website/docs/it/guide/migrations.md rename websites/website/docs/it/{ => migrations}/changelog.md (100%) rename websites/website/docs/it/{guide/migrate-from-v1.md => migrations/from-v1.md} (70%) rename websites/website/docs/it/{guide/migrate-from-v2.md => migrations/from-v2.md} (76%) create mode 100644 websites/website/docs/it/migrations/from-v3.md create mode 100644 websites/website/docs/it/migrations/index.md rename websites/website/docs/it/{guide => migrations}/option-rename-matrix.md (100%) rename websites/website/docs/it/{migration/index.md => migrations/particles-js.md} (100%) rename websites/website/docs/it/{releases/index.md => migrations/releases.md} (100%) delete mode 100644 websites/website/docs/ja/guide/migrate-from-v3.md delete mode 100644 websites/website/docs/ja/guide/migrations.md rename websites/website/docs/ja/{ => migrations}/changelog.md (100%) rename websites/website/docs/ja/{guide/migrate-from-v1.md => migrations/from-v1.md} (71%) rename websites/website/docs/ja/{guide/migrate-from-v2.md => migrations/from-v2.md} (76%) create mode 100644 websites/website/docs/ja/migrations/from-v3.md create mode 100644 websites/website/docs/ja/migrations/index.md rename websites/website/docs/ja/{guide => migrations}/option-rename-matrix.md (100%) rename websites/website/docs/ja/{migration/index.md => migrations/particles-js.md} (100%) rename websites/website/docs/ja/{releases/index.md => migrations/releases.md} (100%) rename websites/website/docs/{ => migrations}/changelog.md (100%) rename websites/website/docs/{guide/migrate-from-v1.md => migrations/from-v1.md} (91%) rename websites/website/docs/{guide/migrate-from-v2.md => migrations/from-v2.md} (92%) rename websites/website/docs/{guide/migrate-from-v3.md => migrations/from-v3.md} (67%) create mode 100644 websites/website/docs/migrations/index.md rename websites/website/docs/{guide => migrations}/option-rename-matrix.md (87%) rename websites/website/docs/{migration/index.md => migrations/particles-js.md} (100%) rename websites/website/docs/{releases/index.md => migrations/releases.md} (100%) delete mode 100644 websites/website/docs/pt/guide/migrate-from-v3.md delete mode 100644 websites/website/docs/pt/guide/migrations.md rename websites/website/docs/pt/{ => migrations}/changelog.md (100%) rename websites/website/docs/pt/{guide/migrate-from-v1.md => migrations/from-v1.md} (69%) rename websites/website/docs/pt/{guide/migrate-from-v2.md => migrations/from-v2.md} (75%) create mode 100644 websites/website/docs/pt/migrations/from-v3.md create mode 100644 websites/website/docs/pt/migrations/index.md rename websites/website/docs/pt/{guide => migrations}/option-rename-matrix.md (100%) rename websites/website/docs/pt/{migration/index.md => migrations/particles-js.md} (100%) rename websites/website/docs/pt/{releases/index.md => migrations/releases.md} (100%) delete mode 100644 websites/website/docs/ru/guide/migrate-from-v3.md delete mode 100644 websites/website/docs/ru/guide/migrations.md rename websites/website/docs/ru/{ => migrations}/changelog.md (100%) rename websites/website/docs/ru/{guide/migrate-from-v1.md => migrations/from-v1.md} (69%) rename websites/website/docs/ru/{guide/migrate-from-v2.md => migrations/from-v2.md} (75%) create mode 100644 websites/website/docs/ru/migrations/from-v3.md create mode 100644 websites/website/docs/ru/migrations/index.md rename websites/website/docs/ru/{guide => migrations}/option-rename-matrix.md (100%) rename websites/website/docs/ru/{migration/index.md => migrations/particles-js.md} (100%) rename websites/website/docs/ru/{releases/index.md => migrations/releases.md} (100%) delete mode 100644 websites/website/docs/zh/guide/migrate-from-v3.md delete mode 100644 websites/website/docs/zh/guide/migrations.md rename websites/website/docs/zh/{ => migrations}/changelog.md (100%) rename websites/website/docs/zh/{guide/migrate-from-v1.md => migrations/from-v1.md} (70%) rename websites/website/docs/zh/{guide/migrate-from-v2.md => migrations/from-v2.md} (76%) create mode 100644 websites/website/docs/zh/migrations/from-v3.md create mode 100644 websites/website/docs/zh/migrations/index.md rename websites/website/docs/zh/{guide => migrations}/option-rename-matrix.md (100%) rename websites/website/docs/zh/{migration/index.md => migrations/particles-js.md} (100%) rename websites/website/docs/zh/{releases/index.md => migrations/releases.md} (100%) diff --git a/websites/website/docs/.vitepress/config.ts b/websites/website/docs/.vitepress/config.ts index 250a21f69dc..e89def58925 100644 --- a/websites/website/docs/.vitepress/config.ts +++ b/websites/website/docs/.vitepress/config.ts @@ -18,8 +18,7 @@ const nav: DefaultTheme.NavItem[] = [ { text: "@tsparticles", link: "https://github.com/tsparticles" }, ], }, - { text: "Changelog", link: "/changelog" }, - { text: "Releases", link: "/releases/" }, + { text: "Versioning & Migration", link: "/migrations/" }, ]; const baseSidebar: DefaultTheme.Sidebar = { @@ -66,11 +65,7 @@ const baseSidebar: DefaultTheme.Sidebar = { items: [ { text: "Getting Started", link: "/guide/getting-started" }, { text: "Installation", link: "/guide/installation" }, - { text: "Migrations", link: "/guide/migrations" }, - { text: "Option Rename Matrix", link: "/guide/option-rename-matrix" }, - { text: "Migrate from v3.x", link: "/guide/migrate-from-v3" }, - { text: "Migrate from v2.x", link: "/guide/migrate-from-v2" }, - { text: "Migrate from v1.x", link: "/guide/migrate-from-v1" }, + { text: "Bundles", link: "/guide/bundles" }, { text: "Bundle: Basic", link: "/guide/bundles-basic" }, { text: "Bundle: Slim", link: "/guide/bundles-slim" }, @@ -239,9 +234,21 @@ const baseSidebar: DefaultTheme.Sidebar = { ], }, ], - "/migration/": [{ text: "Migration", items: [{ text: "Compatibility & Migrations", link: "/migration/" }] }], - "/changelog": [{ text: "Changelog", items: [{ text: "Latest Release", link: "/changelog" }] }], - "/releases/": [{ text: "Releases", items: [{ text: "Versioning & Release", link: "/releases/" }] }], + "/migrations/": [ + { + text: "Versioning & Migration", + items: [ + { text: "Overview", link: "/migrations/" }, + { text: "Migrate from v3.x", link: "/migrations/from-v3" }, + { text: "Migrate from v2.x", link: "/migrations/from-v2" }, + { text: "Migrate from v1.x", link: "/migrations/from-v1" }, + { text: "Option Rename Matrix", link: "/migrations/option-rename-matrix" }, + { text: "Changelog", link: "/migrations/changelog" }, + { text: "Releases", link: "/migrations/releases" }, + { text: "particles.js Migration", link: "/migrations/particles-js" }, + ], + }, + ], }; function prefixSidebarItems(items: DefaultTheme.SidebarItem[], prefix: string): DefaultTheme.SidebarItem[] { diff --git a/websites/website/docs/.vitepress/theme/components/MyHome.vue b/websites/website/docs/.vitepress/theme/components/MyHome.vue new file mode 100644 index 00000000000..7f205b3e6ff --- /dev/null +++ b/websites/website/docs/.vitepress/theme/components/MyHome.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/websites/website/docs/.vitepress/theme/components/RandomDemo.vue b/websites/website/docs/.vitepress/theme/components/RandomDemo.vue new file mode 100644 index 00000000000..bee4a4add67 --- /dev/null +++ b/websites/website/docs/.vitepress/theme/components/RandomDemo.vue @@ -0,0 +1,168 @@ + + + + + diff --git a/websites/website/docs/.vitepress/theme/components/RandomDemoHero.vue b/websites/website/docs/.vitepress/theme/components/RandomDemoHero.vue new file mode 100644 index 00000000000..4a7ade13a4f --- /dev/null +++ b/websites/website/docs/.vitepress/theme/components/RandomDemoHero.vue @@ -0,0 +1,375 @@ + + + + + diff --git a/websites/website/docs/.vitepress/theme/index.ts b/websites/website/docs/.vitepress/theme/index.ts index 755fcb27a0e..992223f1141 100644 --- a/websites/website/docs/.vitepress/theme/index.ts +++ b/websites/website/docs/.vitepress/theme/index.ts @@ -3,8 +3,10 @@ import type { Theme } from "vitepress"; import "./custom.css"; import AppLayout from "./components/AppLayout.vue"; +import MyHome from "./components/MyHome.vue"; import PlaygroundBundlesPanel from "./components/PlaygroundBundlesPanel.vue"; import PlaygroundPanel from "./components/PlaygroundPanel.vue"; +import RandomDemo from "./components/RandomDemo.vue"; import WebsiteVersionInfo from "./components/WebsiteVersionInfo.vue"; import { initPlaygroundFeaturesOnce } from "./components/playgroundLoaders"; @@ -12,8 +14,10 @@ const theme: Theme = { extends: DefaultTheme, Layout: AppLayout, enhanceApp({ app }) { + app.component("MyHome", MyHome); app.component("PlaygroundBundlesPanel", PlaygroundBundlesPanel); app.component("PlaygroundPanel", PlaygroundPanel); + app.component("RandomDemo", RandomDemo); app.component("WebsiteVersionInfo", WebsiteVersionInfo); if (typeof globalThis.window !== "undefined") { diff --git a/websites/website/docs/de/guide/getting-started.md b/websites/website/docs/de/guide/getting-started.md index 647524b60e6..02f974bf45b 100644 --- a/websites/website/docs/de/guide/getting-started.md +++ b/websites/website/docs/de/guide/getting-started.md @@ -94,7 +94,7 @@ Wenn Sie Setups bevorzugen, die auf Preset-Namen basieren, verwenden Sie den off - Voreinstellungskatalog: [`/demos/presets`](/de/demos/presets) - Palettenkatalog: [`/demos/palettes`](/de/demos/palettes) - Formenkatalog: [`/demos/shapes`](/de/demos/shapes) -- Migration von particles.js: [`/migration/`](/de/migration/) +- Migration von particles.js: [`/migrations/particles-js`](/de/migrations/particles-js) - Farbformate: [`/guide/color-formats`](/de/guide/color-formats) - Container-Lebenszyklus: [`/guide/container-lifecycle`](/de/guide/container-lifecycle) - Plugins und Anpassungen: [`/guide/plugins-customization`](/de/guide/plugins-customization) diff --git a/websites/website/docs/de/guide/installation.md b/websites/website/docs/de/guide/installation.md index ed9e0a88f3a..292edcd4ff9 100644 --- a/websites/website/docs/de/guide/installation.md +++ b/websites/website/docs/de/guide/installation.md @@ -99,7 +99,7 @@ await tsParticles.load({ - [`/guide/getting-started`](/de/guide/getting-started) - [`/guide/wrappers`](/de/guide/wrappers) - [`/demos/presets`](/de/demos/presets) -- [`/migration/`](/de/migration/) +- [`/migrations/particles-js`](/de/migrations/particles-js) ## Legacy-Kompatibilitat diff --git a/websites/website/docs/de/guide/migrate-from-v3.md b/websites/website/docs/de/guide/migrate-from-v3.md deleted file mode 100644 index fb8a41a0707..00000000000 --- a/websites/website/docs/de/guide/migrate-from-v3.md +++ /dev/null @@ -1,30 +0,0 @@ -# Migration von v3.x - -Bei `v3.x` ist das groesste Migrationsrisiko meist die Options-Kompatibilitaet. - -## Prioritaere Aenderungen - -- `particles.color` -> `particles.paint.fill` -- `particles.stroke` -> `particles.paint.stroke` - -## Load-API-Migration - -Vorher: - -```ts -await tsParticles.load("tsparticles", options); -``` - -Nachher: - -```ts -await tsParticles.load({ - id: "tsparticles", - options, -}); -``` - -## Ressourcen - -- Option-Rename-Matrix: [`/guide/option-rename-matrix`](/de/guide/option-rename-matrix) -- `particles.paint`: [`/options/particles-paint`](/de/options/particles-paint) diff --git a/websites/website/docs/de/guide/migrations.md b/websites/website/docs/de/guide/migrations.md deleted file mode 100644 index 1a0492d4733..00000000000 --- a/websites/website/docs/de/guide/migrations.md +++ /dev/null @@ -1,22 +0,0 @@ -# Migrationen - -Nutze diesen Bereich, um zwischen Major-Versionen von `tsParticles` zu migrieren. - -- [`Migration von v3.x`](/de/guide/migrate-from-v3) -- [`Migration von v2.x`](/de/guide/migrate-from-v2) -- [`Migration von v1.x`](/de/guide/migrate-from-v1) - -## Haufige Bruchstellen - -1. **Load-API-Form** (alte Positionsparameter vs neues Objekt). -2. **Options-Schema** (umbenannte/verschobene Keys). - -## Schneller Lookup - -- Option-Rename-Matrix: [`/guide/option-rename-matrix`](/de/guide/option-rename-matrix) - -## Ebenfalls hilfreich - -- Migration von particles.js: [`/migration/`](/de/migration/) -- Releases und Versionierung: [`/releases/`](/de/releases/) -- Neueste Release Notes: [`/changelog`](/de/changelog) diff --git a/websites/website/docs/de/index.md b/websites/website/docs/de/index.md index 82a1fbca58b..bd4d544431b 100644 --- a/websites/website/docs/de/index.md +++ b/websites/website/docs/de/index.md @@ -49,7 +49,7 @@ Die Website wurde um die haufigste Frage herum neu aufgebaut: **"Wie nutze ich t 3. [`/playground/`](/de/playground/): Starte Demos per Befehl und bearbeite JSON live. 4. [`/demos/`](/de/demos/): Ubernehme produktionsreife Rezepte. 5. [`/options/`](/de/options/): Ubersicht der Root-Optionen und Deep Links. -6. [`/migration/`](/de/migration/): Migration von particles.js mit Kompatibilitats-Hinweisen. +6. [`/migrations/particles-js`](/de/migrations/particles-js): Migration von particles.js mit Kompatibilitats-Hinweisen. 7. [`/guide/wrappers`](/de/guide/wrappers): Offizielle Wrapper-Pakete und Framework-Links. 8. [`/guide/plugins-customization`](/de/guide/plugins-customization): Eigene Shapes, Presets und Plugin-Erweiterung. 9. [`/guide/templates-resources`](/de/guide/templates-resources): Starter-Repositories und teilbare Ressourcen. diff --git a/websites/website/docs/de/changelog.md b/websites/website/docs/de/migrations/changelog.md similarity index 100% rename from websites/website/docs/de/changelog.md rename to websites/website/docs/de/migrations/changelog.md diff --git a/websites/website/docs/de/guide/migrate-from-v1.md b/websites/website/docs/de/migrations/from-v1.md similarity index 70% rename from websites/website/docs/de/guide/migrate-from-v1.md rename to websites/website/docs/de/migrations/from-v1.md index a64edea5f02..a9b5f6657de 100644 --- a/websites/website/docs/de/guide/migrate-from-v1.md +++ b/websites/website/docs/de/migrations/from-v1.md @@ -26,5 +26,5 @@ await tsParticles.load({ ## Ressourcen -- Option-Rename-Matrix: [`/guide/option-rename-matrix`](/de/guide/option-rename-matrix) -- Migration von particles.js: [`/migration/`](/de/migration/) +- Option-Rename-Matrix: [`/migrations/option-rename-matrix`](/de/migrations/option-rename-matrix) +- Migration von particles.js: [`/migrations/particles-js`](/de/migrations/particles-js) diff --git a/websites/website/docs/de/guide/migrate-from-v2.md b/websites/website/docs/de/migrations/from-v2.md similarity index 75% rename from websites/website/docs/de/guide/migrate-from-v2.md rename to websites/website/docs/de/migrations/from-v2.md index 536436b977c..459f24df6da 100644 --- a/websites/website/docs/de/guide/migrate-from-v2.md +++ b/websites/website/docs/de/migrations/from-v2.md @@ -34,5 +34,5 @@ await tsParticles.load({ ## Ressourcen -- Option-Rename-Matrix: [`/guide/option-rename-matrix`](/de/guide/option-rename-matrix) -- Migration v1: [`/guide/migrate-from-v1`](/de/guide/migrate-from-v1) +- Option-Rename-Matrix: [`/migrations/option-rename-matrix`](/de/migrations/option-rename-matrix) +- Migration v1: [`/migrations/from-v1`](/de/migrations/from-v1) diff --git a/websites/website/docs/de/migrations/from-v3.md b/websites/website/docs/de/migrations/from-v3.md new file mode 100644 index 00000000000..95b575d4f3e --- /dev/null +++ b/websites/website/docs/de/migrations/from-v3.md @@ -0,0 +1,86 @@ +# Migration von v3.x + +Bei `v3.x` sind die groessten Migrationsrisiken die **Options-Kompatibilitaet** und die **Paket-Aenderungen**. + +## Prioritaere Aenderungen + +- `particles.color` -> `particles.paint.fill` +- `particles.stroke` -> `particles.paint.stroke` + +## Paket-Umbenennungen + +Einige `v3.x`-Pakete wurden umbenannt oder umstrukturiert: + +| v3-Paket | Aktuelles Paket | Hinweis | +|---|---|---| +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | In einem einzigen Plugin zusammengefuehrt | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | In einem einzigen Plugin zusammengefuehrt | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Durch Paint-System ersetzt | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Durch Paint-System ersetzt | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Nach `plugins/colors/hsv/` verschoben, gleicher Name | + +## Beispiele fuer Optionszuordnung + +Vorher (`v3.x`-Stil): + +```ts +const options = { + particles: { + color: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, +}; +``` + +Nachher (aktuell): + +```ts +const options = { + particles: { + paint: { + fill: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, + }, +}; +``` + +## Load-API-Migration + +Vorher (legacy positional): + +```ts +await tsParticles.load("tsparticles", options); +``` + +Nachher (Objekt-Parameter): + +```ts +await tsParticles.load({ + id: "tsparticles", + options, +}); +``` + +## Empfohlene Schritte + +1. Alle `@tsparticles/*`-Pakete auf die neueste Version bringen. +2. Veraltete Optionsschluessel (`particles.color`, `particles.stroke`) durch `particles.paint.*` ersetzen. +3. Umbenannte Pakete in `package.json` aktualisieren (siehe Tabelle oben). +4. Pruefen, dass benutzerdefinierte Plugins/Formen vor `tsParticles.load(...)` geladen werden. +5. Interaktionen und leistungskritische Szenarien erneut testen. + +## Ressourcen + +- Option-Rename-Matrix: [`/migrations/option-rename-matrix`](/de/migrations/option-rename-matrix) +- `particles.paint`: [`/options/particles-paint`](/de/options/particles-paint) diff --git a/websites/website/docs/de/migrations/index.md b/websites/website/docs/de/migrations/index.md new file mode 100644 index 00000000000..fe5ab13f48e --- /dev/null +++ b/websites/website/docs/de/migrations/index.md @@ -0,0 +1,34 @@ +# Versioning & Migration + +Nutzen Sie diesen Bereich, um zwischen den Hauptversionen von `tsParticles` zu navigieren, Releases zu verfolgen und das Versionierungssystem zu verstehen. + +## Migrationsanleitungen + +- [`Migration von v3.x`](/de/migrations/from-v3) +- [`Migration von v2.x`](/de/migrations/from-v2) +- [`Migration von v1.x`](/de/migrations/from-v1) + +## Schnelleinstieg + +- Von `v3.x`: beginnen Sie mit [`/de/migrations/from-v3`](/de/migrations/from-v3) (Schwerpunkt: Optionsschlüssel-Änderungen + Paketumbenennungen). +- Von `v2.x`: beginnen Sie mit [`/de/migrations/from-v2`](/de/migrations/from-v2) (Schwerpunkt: `load(...)`-API + Optionen). +- Von `v1.x`: beginnen Sie mit [`/de/migrations/from-v1`](/de/migrations/from-v1) (Schwerpunkt: Pakete, Loader, Optionen). + +## Wo Migrationen normalerweise brechen + +Die meisten Migrationen zwischen Hauptversionen brechen an zwei Stellen: + +1. **Load-API-Form** (alte Positionsparameter vs neuer Objektparameter). +2. **Optionsschema** (umbenannte/verschobene Schlüssel). + +Wenn Ihre App kompiliert aber falsch rendert, beginnen Sie mit den Optionszuordnungen. + +## Schnellsuche + +- [Option-Rename-Matrix](/de/migrations/option-rename-matrix) — schnelle Zuordnung von Legacy- zu aktuellen Optionsschlüsseln. + +## Auch nützlich + +- [Changelog](/de/migrations/changelog) — neueste Release-Notizen. +- [Releases und Versionierung](/de/migrations/releases) — Versionsangleichungsregeln und Release-Checkliste. +- [Migration von particles.js](/de/migrations/particles-js) — Migration von Legacy `particles.js` oder `canvas-confetti`. diff --git a/websites/website/docs/de/guide/option-rename-matrix.md b/websites/website/docs/de/migrations/option-rename-matrix.md similarity index 100% rename from websites/website/docs/de/guide/option-rename-matrix.md rename to websites/website/docs/de/migrations/option-rename-matrix.md diff --git a/websites/website/docs/de/migration/index.md b/websites/website/docs/de/migrations/particles-js.md similarity index 100% rename from websites/website/docs/de/migration/index.md rename to websites/website/docs/de/migrations/particles-js.md diff --git a/websites/website/docs/de/releases/index.md b/websites/website/docs/de/migrations/releases.md similarity index 100% rename from websites/website/docs/de/releases/index.md rename to websites/website/docs/de/migrations/releases.md diff --git a/websites/website/docs/es/guide/getting-started.md b/websites/website/docs/es/guide/getting-started.md index d33e3a0216f..34d35be985f 100644 --- a/websites/website/docs/es/guide/getting-started.md +++ b/websites/website/docs/es/guide/getting-started.md @@ -94,7 +94,7 @@ Si prefieres configuraciones basadas en nombre de preset, usa el catalogo oficia - Catalogo de presets: [`/demos/presets`](/es/demos/presets) - Catalogo de paletas: [`/demos/palettes`](/es/demos/palettes) - Catalogo de formas: [`/demos/shapes`](/es/demos/shapes) -- Migracion desde particles.js: [`/migration/`](/es/migration/) +- Migracion desde particles.js: [`/migrations/particles-js`](/es/migrations/particles-js) - Formatos de color: [`/guide/color-formats`](/es/guide/color-formats) - Ciclo de vida del contenedor: [`/guide/container-lifecycle`](/es/guide/container-lifecycle) - Plugins y personalizacion: [`/guide/plugins-customization`](/es/guide/plugins-customization) diff --git a/websites/website/docs/es/guide/installation.md b/websites/website/docs/es/guide/installation.md index db531153514..557e88fb7d0 100644 --- a/websites/website/docs/es/guide/installation.md +++ b/websites/website/docs/es/guide/installation.md @@ -99,7 +99,7 @@ await tsParticles.load({ - [`/guide/getting-started`](/es/guide/getting-started) - [`/guide/wrappers`](/es/guide/wrappers) - [`/demos/presets`](/es/demos/presets) -- [`/migration/`](/es/migration/) +- [`/migrations/particles-js`](/es/migrations/particles-js) ## Compatibilidad legacy diff --git a/websites/website/docs/es/guide/migrate-from-v3.md b/websites/website/docs/es/guide/migrate-from-v3.md deleted file mode 100644 index baed5bdb5ee..00000000000 --- a/websites/website/docs/es/guide/migrate-from-v3.md +++ /dev/null @@ -1,30 +0,0 @@ -# Migrar desde v3.x - -Desde `v3.x`, el principal riesgo suele estar en la compatibilidad de opciones. - -## Cambios prioritarios - -- `particles.color` -> `particles.paint.fill` -- `particles.stroke` -> `particles.paint.stroke` - -## Migracion de API load - -Antes: - -```ts -await tsParticles.load("tsparticles", options); -``` - -Despues: - -```ts -await tsParticles.load({ - id: "tsparticles", - options, -}); -``` - -## Recursos - -- Matriz de renombres: [`/guide/option-rename-matrix`](/es/guide/option-rename-matrix) -- `particles.paint`: [`/options/particles-paint`](/es/options/particles-paint) diff --git a/websites/website/docs/es/guide/migrations.md b/websites/website/docs/es/guide/migrations.md deleted file mode 100644 index 6a7bbf79edd..00000000000 --- a/websites/website/docs/es/guide/migrations.md +++ /dev/null @@ -1,22 +0,0 @@ -# Migraciones - -Usa esta seccion para migrar entre versiones major de `tsParticles`. - -- [`Migrar desde v3.x`](/es/guide/migrate-from-v3) -- [`Migrar desde v2.x`](/es/guide/migrate-from-v2) -- [`Migrar desde v1.x`](/es/guide/migrate-from-v1) - -## Donde suele romperse - -1. **Forma de la Load API** (parametros posicionales vs objeto unico). -2. **Esquema de opciones** (claves renombradas o movidas). - -## Consulta rapida - -- Matriz de renombres: [`/guide/option-rename-matrix`](/es/guide/option-rename-matrix) - -## Tambien util - -- Migracion desde particles.js: [`/migration/`](/es/migration/) -- Releases y versionado: [`/releases/`](/es/releases/) -- Ultimas notas de version: [`/changelog`](/es/changelog) diff --git a/websites/website/docs/es/index.md b/websites/website/docs/es/index.md index 8e8b3d077a9..6dbe132ab00 100644 --- a/websites/website/docs/es/index.md +++ b/websites/website/docs/es/index.md @@ -49,7 +49,7 @@ El sitio se rediseno alrededor de la pregunta mas comun: **"Como uso tsParticles 3. [`/playground/`](/es/playground/): lanza demos por comando y edita JSON en vivo. 4. [`/demos/`](/es/demos/): copia recetas listas para produccion. 5. [`/options/`](/es/options/): mapa de opciones raiz y enlaces a secciones profundas. -6. [`/migration/`](/es/migration/): migra desde particles.js con notas de compatibilidad. +6. [`/migrations/particles-js`](/es/migrations/particles-js): migra desde particles.js con notas de compatibilidad. 7. [`/guide/wrappers`](/es/guide/wrappers): wrappers oficiales y enlaces por framework. 8. [`/guide/plugins-customization`](/es/guide/plugins-customization): formas personalizadas, presets y extension por plugins. 9. [`/guide/templates-resources`](/es/guide/templates-resources): repositorios de inicio y recursos para compartir. diff --git a/websites/website/docs/es/changelog.md b/websites/website/docs/es/migrations/changelog.md similarity index 100% rename from websites/website/docs/es/changelog.md rename to websites/website/docs/es/migrations/changelog.md diff --git a/websites/website/docs/es/guide/migrate-from-v1.md b/websites/website/docs/es/migrations/from-v1.md similarity index 69% rename from websites/website/docs/es/guide/migrate-from-v1.md rename to websites/website/docs/es/migrations/from-v1.md index b83482565b9..4b20d769b60 100644 --- a/websites/website/docs/es/guide/migrate-from-v1.md +++ b/websites/website/docs/es/migrations/from-v1.md @@ -26,5 +26,5 @@ await tsParticles.load({ ## Recursos -- Matriz de renombres: [`/guide/option-rename-matrix`](/es/guide/option-rename-matrix) -- Migracion desde particles.js: [`/migration/`](/es/migration/) +- Matriz de renombres: [`/migrations/option-rename-matrix`](/es/migrations/option-rename-matrix) +- Migracion desde particles.js: [`/migrations/particles-js`](/es/migrations/particles-js) diff --git a/websites/website/docs/es/guide/migrate-from-v2.md b/websites/website/docs/es/migrations/from-v2.md similarity index 76% rename from websites/website/docs/es/guide/migrate-from-v2.md rename to websites/website/docs/es/migrations/from-v2.md index 6ae870458b3..fc390e33049 100644 --- a/websites/website/docs/es/guide/migrate-from-v2.md +++ b/websites/website/docs/es/migrations/from-v2.md @@ -34,5 +34,5 @@ await tsParticles.load({ ## Recursos -- Matriz de renombres: [`/guide/option-rename-matrix`](/es/guide/option-rename-matrix) -- Migracion v1: [`/guide/migrate-from-v1`](/es/guide/migrate-from-v1) +- Matriz de renombres: [`/migrations/option-rename-matrix`](/es/migrations/option-rename-matrix) +- Migracion v1: [`/migrations/from-v1`](/es/migrations/from-v1) diff --git a/websites/website/docs/es/migrations/from-v3.md b/websites/website/docs/es/migrations/from-v3.md new file mode 100644 index 00000000000..7187ec98a5e --- /dev/null +++ b/websites/website/docs/es/migrations/from-v3.md @@ -0,0 +1,86 @@ +# Migrar desde v3.x + +Desde `v3.x`, los principales riesgos son la **compatibilidad de opciones** y los **cambios de paquetes**. + +## Cambios prioritarios + +- `particles.color` -> `particles.paint.fill` +- `particles.stroke` -> `particles.paint.stroke` + +## Renombrado de paquetes + +Algunos paquetes de `v3.x` han sido renombrados o reestructurados: + +| Paquete v3 | Paquete actual | Nota | +|---|---|---| +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Fusionados en un solo plugin | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Fusionados en un solo plugin | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Reemplazado por el sistema paint | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Reemplazado por el sistema paint | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Movido a `plugins/colors/hsv/`, mismo nombre | + +## Ejemplos de mapeo de opciones + +Antes (estilo `v3.x`): + +```ts +const options = { + particles: { + color: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, +}; +``` + +Despues (actual): + +```ts +const options = { + particles: { + paint: { + fill: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, + }, +}; +``` + +## Migracion de API load + +Antes (llamada posicional legacy): + +```ts +await tsParticles.load("tsparticles", options); +``` + +Despues (parametro objeto): + +```ts +await tsParticles.load({ + id: "tsparticles", + options, +}); +``` + +## Pasos recomendados + +1. Alinea todos los paquetes `@tsparticles/*` a la ultima version disponible. +2. Reemplaza las claves de opciones obsoletas (`particles.color`, `particles.stroke`) con `particles.paint.*`. +3. Actualiza los paquetes renombrados en `package.json` (ver tabla arriba). +4. Verifica que los plugins/formas personalizados se carguen antes de `tsParticles.load(...)`. +5. Vuelve a probar interacciones y escenas criticas de rendimiento. + +## Recursos + +- Matriz de renombres: [`/migrations/option-rename-matrix`](/es/migrations/option-rename-matrix) +- `particles.paint`: [`/options/particles-paint`](/es/options/particles-paint) diff --git a/websites/website/docs/es/migrations/index.md b/websites/website/docs/es/migrations/index.md new file mode 100644 index 00000000000..bad60926b40 --- /dev/null +++ b/websites/website/docs/es/migrations/index.md @@ -0,0 +1,34 @@ +# Versioning & Migration + +Usa esta seccion para navegar entre las versiones principales de `tsParticles`, seguir las releases y entender el versionado. + +## Guias de migracion + +- [`Migrar desde v3.x`](/es/migrations/from-v3) +- [`Migrar desde v2.x`](/es/migrations/from-v2) +- [`Migrar desde v1.x`](/es/migrations/from-v1) + +## Ruta rapida + +- Desde `v3.x`: empieza por [`/es/migrations/from-v3`](/es/migrations/from-v3) (enfoque: cambios de claves de opciones + renombrados de paquetes). +- Desde `v2.x`: empieza por [`/es/migrations/from-v2`](/es/migrations/from-v2) (enfoque: API `load(...)` + opciones). +- Desde `v1.x`: empieza por [`/es/migrations/from-v1`](/es/migrations/from-v1) (enfoque: paquetes, loaders, opciones). + +## Donde suele romperse la migracion + +Las migraciones entre versiones principales suelen romperse en dos puntos: + +1. **Forma de la API Load** (viejos parametros posicionales vs nuevo parametro objeto). +2. **Esquema de opciones** (claves renombradas/movidas). + +Si tu app compila pero el renderizado es incorrecto, empieza por las opciones. + +## Busqueda rapida + +- [Matriz de renombres de opciones](/es/migrations/option-rename-matrix) — mapeo entre claves legacy y actuales. + +## Tambien util + +- [Changelog](/es/migrations/changelog) — ultimas notas de version. +- [Releases y Versionado](/es/migrations/releases) — reglas de alineacion de versiones y checklist de publicacion. +- [Migracion desde particles.js](/es/migrations/particles-js) — migrar desde `particles.js` o `canvas-confetti`. diff --git a/websites/website/docs/es/guide/option-rename-matrix.md b/websites/website/docs/es/migrations/option-rename-matrix.md similarity index 100% rename from websites/website/docs/es/guide/option-rename-matrix.md rename to websites/website/docs/es/migrations/option-rename-matrix.md diff --git a/websites/website/docs/es/migration/index.md b/websites/website/docs/es/migrations/particles-js.md similarity index 100% rename from websites/website/docs/es/migration/index.md rename to websites/website/docs/es/migrations/particles-js.md diff --git a/websites/website/docs/es/releases/index.md b/websites/website/docs/es/migrations/releases.md similarity index 100% rename from websites/website/docs/es/releases/index.md rename to websites/website/docs/es/migrations/releases.md diff --git a/websites/website/docs/fr/guide/getting-started.md b/websites/website/docs/fr/guide/getting-started.md index 76e9506b41c..85ffecb4f72 100644 --- a/websites/website/docs/fr/guide/getting-started.md +++ b/websites/website/docs/fr/guide/getting-started.md @@ -94,7 +94,7 @@ Si vous préférez les configurations basées sur les noms de préréglages, uti - Catalogue de préréglages : [`/demos/presets`](/fr/demos/presets) - Catalogue de palettes : [`/demos/palettes`](/fr/demos/palettes) - Catalogue de formes : [`/demos/shapes`](/fr/demos/shapes) -- Migration depuis particles.js : [`/migration/`](/fr/migration/) +- Migration depuis particles.js : [`/migrations/particles-js`](/fr/migrations/particles-js) - Formats couleur : [`/guide/color-formats`](/fr/guide/color-formats) - Cycle de vie du conteneur : [`/guide/container-lifecycle`](/fr/guide/container-lifecycle) - Plugins et personnalisation : [`/guide/plugins-customization`](/fr/guide/plugins-customization) diff --git a/websites/website/docs/fr/guide/installation.md b/websites/website/docs/fr/guide/installation.md index 978440c671a..5004ca88e97 100644 --- a/websites/website/docs/fr/guide/installation.md +++ b/websites/website/docs/fr/guide/installation.md @@ -99,7 +99,7 @@ await tsParticles.load({ - [`/guide/getting-started`](/fr/guide/getting-started) - [`/guide/wrappers`](/fr/guide/wrappers) - [`/demos/presets`](/fr/demos/presets) -- [`/migration/`](/fr/migration/) +- [`/migrations/particles-js`](/fr/migrations/particles-js) ## Compatibilite legacy diff --git a/websites/website/docs/fr/guide/migrate-from-v3.md b/websites/website/docs/fr/guide/migrate-from-v3.md deleted file mode 100644 index f786c5c350a..00000000000 --- a/websites/website/docs/fr/guide/migrate-from-v3.md +++ /dev/null @@ -1,30 +0,0 @@ -# Migrer depuis v3.x - -Depuis `v3.x`, le principal risque de migration est souvent la compatibilite des options. - -## Changements prioritaires - -- `particles.color` -> `particles.paint.fill` -- `particles.stroke` -> `particles.paint.stroke` - -## Migration de la Load API - -Avant: - -```ts -await tsParticles.load("tsparticles", options); -``` - -Apres: - -```ts -await tsParticles.load({ - id: "tsparticles", - options, -}); -``` - -## Ressources - -- Matrice des renommages: [`/guide/option-rename-matrix`](/fr/guide/option-rename-matrix) -- `particles.paint`: [`/options/particles-paint`](/fr/options/particles-paint) diff --git a/websites/website/docs/fr/guide/migrations.md b/websites/website/docs/fr/guide/migrations.md deleted file mode 100644 index c96f00d39bd..00000000000 --- a/websites/website/docs/fr/guide/migrations.md +++ /dev/null @@ -1,22 +0,0 @@ -# Migrations - -Utilisez cette section pour migrer entre les versions majeures de `tsParticles`. - -- [`Migrer depuis v3.x`](/fr/guide/migrate-from-v3) -- [`Migrer depuis v2.x`](/fr/guide/migrate-from-v2) -- [`Migrer depuis v1.x`](/fr/guide/migrate-from-v1) - -## Points de rupture frequents - -1. **Forme de la Load API** (anciens parametres positionnels vs objet unique). -2. **Schema des options** (cles renommees/deplacees). - -## Recherche rapide - -- Matrice des renommages: [`/guide/option-rename-matrix`](/fr/guide/option-rename-matrix) - -## Egalement utile - -- Migration depuis particles.js: [`/migration/`](/fr/migration/) -- Releases et versioning: [`/releases/`](/fr/releases/) -- Dernieres notes de release: [`/changelog`](/fr/changelog) diff --git a/websites/website/docs/fr/index.md b/websites/website/docs/fr/index.md index 6aad466977c..b52b22207f5 100644 --- a/websites/website/docs/fr/index.md +++ b/websites/website/docs/fr/index.md @@ -49,7 +49,7 @@ Le site a ete repense autour de la question la plus frequente : **"Comment utili 3. [`/playground/`](/fr/playground/) : lancez les demos a la demande et editez le JSON en direct. 4. [`/demos/`](/fr/demos/) : copiez des recettes prates pour la production. 5. [`/options/`](/fr/options/) : carte des options racine et liens directs. -6. [`/migration/`](/fr/migration/) : migrez depuis particles.js avec des notes de compatibilite. +6. [`/migrations/particles-js`](/fr/migrations/particles-js) : migrez depuis particles.js avec des notes de compatibilite. 7. [`/guide/wrappers`](/fr/guide/wrappers) : wrappers officiels et liens frameworks. 8. [`/guide/plugins-customization`](/fr/guide/plugins-customization) : formes personnalisees, presets et extensions plugin. 9. [`/guide/templates-resources`](/fr/guide/templates-resources) : repositories de demarrage et ressources partageables. diff --git a/websites/website/docs/fr/changelog.md b/websites/website/docs/fr/migrations/changelog.md similarity index 100% rename from websites/website/docs/fr/changelog.md rename to websites/website/docs/fr/migrations/changelog.md diff --git a/websites/website/docs/fr/guide/migrate-from-v1.md b/websites/website/docs/fr/migrations/from-v1.md similarity index 69% rename from websites/website/docs/fr/guide/migrate-from-v1.md rename to websites/website/docs/fr/migrations/from-v1.md index 5a217cfafc6..feb404fa020 100644 --- a/websites/website/docs/fr/guide/migrate-from-v1.md +++ b/websites/website/docs/fr/migrations/from-v1.md @@ -26,5 +26,5 @@ await tsParticles.load({ ## Ressources -- Matrice des renommages: [`/guide/option-rename-matrix`](/fr/guide/option-rename-matrix) -- Migration depuis particles.js: [`/migration/`](/fr/migration/) +- Matrice des renommages: [`/migrations/option-rename-matrix`](/fr/migrations/option-rename-matrix) +- Migration depuis particles.js: [`/migrations/particles-js`](/fr/migrations/particles-js) diff --git a/websites/website/docs/fr/guide/migrate-from-v2.md b/websites/website/docs/fr/migrations/from-v2.md similarity index 76% rename from websites/website/docs/fr/guide/migrate-from-v2.md rename to websites/website/docs/fr/migrations/from-v2.md index ad544355b33..73d64ccb3f6 100644 --- a/websites/website/docs/fr/guide/migrate-from-v2.md +++ b/websites/website/docs/fr/migrations/from-v2.md @@ -34,5 +34,5 @@ await tsParticles.load({ ## Ressources -- Matrice des renommages: [`/guide/option-rename-matrix`](/fr/guide/option-rename-matrix) -- Migration v1: [`/guide/migrate-from-v1`](/fr/guide/migrate-from-v1) +- Matrice des renommages: [`/migrations/option-rename-matrix`](/fr/migrations/option-rename-matrix) +- Migration v1: [`/migrations/from-v1`](/fr/migrations/from-v1) diff --git a/websites/website/docs/fr/migrations/from-v3.md b/websites/website/docs/fr/migrations/from-v3.md new file mode 100644 index 00000000000..2dfc87e9a32 --- /dev/null +++ b/websites/website/docs/fr/migrations/from-v3.md @@ -0,0 +1,86 @@ +# Migrer depuis v3.x + +Depuis `v3.x`, les principaux risques de migration sont la **compatibilité des options** et les **changements de paquets**. + +## Changements prioritaires + +- `particles.color` -> `particles.paint.fill` +- `particles.stroke` -> `particles.paint.stroke` + +## Renommage des paquets + +Certains paquets `v3.x` ont été renommés ou restructurés : + +| Paquet v3 | Paquet actuel | Note | +|---|---|---| +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Fusionnés en un seul plugin | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Fusionnés en un seul plugin | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Remplacé par le système paint | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Remplacé par le système paint | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Déplacé dans `plugins/colors/hsv/`, même nom | + +## Exemples de correspondance des options + +Avant (style `v3.x`) : + +```ts +const options = { + particles: { + color: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, +}; +``` + +Après (actuel) : + +```ts +const options = { + particles: { + paint: { + fill: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, + }, +}; +``` + +## Migration de la Load API + +Avant (appel positionnel legacy) : + +```ts +await tsParticles.load("tsparticles", options); +``` + +Après (paramètre objet) : + +```ts +await tsParticles.load({ + id: "tsparticles", + options, +}); +``` + +## Étapes recommandées + +1. Alignez tous les paquets `@tsparticles/*` sur la dernière version disponible. +2. Remplacez les clés d'options obsolètes (`particles.color`, `particles.stroke`) par `particles.paint.*`. +3. Mettez à jour les paquets renommés dans `package.json` (voir tableau ci-dessus). +4. Vérifiez que les plugins/formes personnalisés sont chargés avant `tsParticles.load(...)`. +5. Retestez les interactions et les scènes critiques pour les performances. + +## Ressources + +- Matrice des renommages: [`/migrations/option-rename-matrix`](/fr/migrations/option-rename-matrix) +- `particles.paint`: [`/options/particles-paint`](/fr/options/particles-paint) diff --git a/websites/website/docs/fr/migrations/index.md b/websites/website/docs/fr/migrations/index.md new file mode 100644 index 00000000000..d44f5079296 --- /dev/null +++ b/websites/website/docs/fr/migrations/index.md @@ -0,0 +1,34 @@ +# Versioning & Migration + +Utilisez cette section pour naviguer entre les versions majeures de `tsParticles`, suivre les releases et comprendre le versioning. + +## Guides de migration + +- [`Migrer depuis v3.x`](/fr/migrations/from-v3) +- [`Migrer depuis v2.x`](/fr/migrations/from-v2) +- [`Migrer depuis v1.x`](/fr/migrations/from-v1) + +## Parcours rapide + +- Depuis `v3.x`: commencez par [`/fr/migrations/from-v3`](/fr/migrations/from-v3) (focus: changements de clés d'options + renommages de paquets). +- Depuis `v2.x`: commencez par [`/fr/migrations/from-v2`](/fr/migrations/from-v2) (focus: API `load(...)` + options). +- Depuis `v1.x`: commencez par [`/fr/migrations/from-v1`](/fr/migrations/from-v1) (focus: paquets, loaders, options). + +## Où la migration casse généralement + +Les migrations majeures cassent à deux endroits : + +1. **Forme de l'API Load** (anciens paramètres positionnels vs nouveau paramètre objet). +2. **Schéma des options** (clés renommées/déplacées). + +Si votre application compile mais affiche un rendu incorrect, commencez par les options. + +## Recherche rapide + +- [Matrice des renommages d'options](/fr/migrations/option-rename-matrix) — correspondance entre clés legacy et actuelles. + +## Aussi utile + +- [Changelog](/fr/migrations/changelog) — dernières notes de version. +- [Releases et Versioning](/fr/migrations/releases) — règles d'alignement des versions et checklist de publication. +- [Migration depuis particles.js](/fr/migrations/particles-js) — migrer depuis `particles.js` ou `canvas-confetti`. diff --git a/websites/website/docs/fr/guide/option-rename-matrix.md b/websites/website/docs/fr/migrations/option-rename-matrix.md similarity index 100% rename from websites/website/docs/fr/guide/option-rename-matrix.md rename to websites/website/docs/fr/migrations/option-rename-matrix.md diff --git a/websites/website/docs/fr/migration/index.md b/websites/website/docs/fr/migrations/particles-js.md similarity index 100% rename from websites/website/docs/fr/migration/index.md rename to websites/website/docs/fr/migrations/particles-js.md diff --git a/websites/website/docs/fr/releases/index.md b/websites/website/docs/fr/migrations/releases.md similarity index 100% rename from websites/website/docs/fr/releases/index.md rename to websites/website/docs/fr/migrations/releases.md diff --git a/websites/website/docs/guide/getting-started.md b/websites/website/docs/guide/getting-started.md index 9cc3b7cff42..70c93bb0f8f 100644 --- a/websites/website/docs/guide/getting-started.md +++ b/websites/website/docs/guide/getting-started.md @@ -94,7 +94,7 @@ If you prefer preset-name based setups, use the official presets catalog in [`/d - Presets catalog: [`/demos/presets`](/demos/presets) - Palettes catalog: [`/demos/palettes`](/demos/palettes) - Shapes catalog: [`/demos/shapes`](/demos/shapes) -- Migration from particles.js: [`/migration/`](/migration/) +- Migration from particles.js: [`/migrations/particles-js`](/migrations/particles-js) - Color formats: [`/guide/color-formats`](/guide/color-formats) - Container lifecycle: [`/guide/container-lifecycle`](/guide/container-lifecycle) - Plugins and customization: [`/guide/plugins-customization`](/guide/plugins-customization) diff --git a/websites/website/docs/guide/installation.md b/websites/website/docs/guide/installation.md index effd0def8c7..17a244f8947 100644 --- a/websites/website/docs/guide/installation.md +++ b/websites/website/docs/guide/installation.md @@ -99,7 +99,7 @@ await tsParticles.load({ - [`/guide/getting-started`](/guide/getting-started) - [`/guide/wrappers`](/guide/wrappers) - [`/demos/presets`](/demos/presets) -- [`/migration/`](/migration/) +- [`/migrations/particles-js`](/migrations/particles-js) ## Legacy compatibility diff --git a/websites/website/docs/guide/migrations.md b/websites/website/docs/guide/migrations.md deleted file mode 100644 index e33d5be9fb3..00000000000 --- a/websites/website/docs/guide/migrations.md +++ /dev/null @@ -1,32 +0,0 @@ -# Migrations - -Use this section to migrate between major `tsParticles` versions. - -- [`Migrate from v3.x`](/guide/migrate-from-v3) -- [`Migrate from v2.x`](/guide/migrate-from-v2) -- [`Migrate from v1.x`](/guide/migrate-from-v1) - -## Where migrations usually break - -Most major migrations break in two places: - -1. **Load API shape** (old positional params vs new object params). -2. **Options schema** (renamed/moved keys). - -If your app compiles but renders wrong visuals, start from option mappings first. - -## Quick route - -- Coming from `v3.x`: start with [`/guide/migrate-from-v3`](/guide/migrate-from-v3) (focus: option key changes). -- Coming from `v2.x`: start with [`/guide/migrate-from-v2`](/guide/migrate-from-v2) (focus: `load(...)` API + options). -- Coming from `v1.x`: start with [`/guide/migrate-from-v1`](/guide/migrate-from-v1) (focus: packages, loaders, options audit). - -## Fast lookup - -- Option rename matrix: [`/guide/option-rename-matrix`](/guide/option-rename-matrix) - -## Also useful - -- Legacy `particles.js` migration: [`/migration/`](/migration/) -- Releases and versioning: [`/releases/`](/releases/) -- Latest release notes: [`/changelog`](/changelog) diff --git a/websites/website/docs/hi/guide/getting-started.md b/websites/website/docs/hi/guide/getting-started.md index f91c7c25fca..6f68eb52a44 100644 --- a/websites/website/docs/hi/guide/getting-started.md +++ b/websites/website/docs/hi/guide/getting-started.md @@ -94,7 +94,7 @@ pnpm add @tsparticles/configs - प्रीसेट कैटलॉग: [`/demos/presets`](/hi/demos/presets) - पैलेट कैटलॉग: [`/demos/palettes`](/hi/demos/palettes) - शेप कैटलॉग: [`/demos/shapes`](/hi/demos/shapes) -- particles.js से माइग्रेशन: [`/migration/`](/hi/migration/) +- particles.js से माइग्रेशन: [`/migrations/particles-js`](/hi/migrations/particles-js) - रंग प्रारूप: [`/guide/color-formats`](/hi/guide/color-formats) - कंटेनर जीवनचक्र: [`/guide/container-lifecycle`](/hi/guide/container-lifecycle) - प्लगइन्स और अनुकूलन: [`/guide/plugins-customization`](/hi/guide/plugins-customization) diff --git a/websites/website/docs/hi/guide/installation.md b/websites/website/docs/hi/guide/installation.md index 2b2cfc0e366..2b5acaf1cd6 100644 --- a/websites/website/docs/hi/guide/installation.md +++ b/websites/website/docs/hi/guide/installation.md @@ -99,7 +99,7 @@ await tsParticles.load({ - [`/guide/getting-started`](/hi/guide/getting-started) - [`/guide/wrappers`](/hi/guide/wrappers) - [`/demos/presets`](/hi/demos/presets) -- [`/migration/`](/hi/migration/) +- [`/migrations/particles-js`](/hi/migrations/particles-js) ## Legacy compatibility diff --git a/websites/website/docs/hi/guide/migrate-from-v3.md b/websites/website/docs/hi/guide/migrate-from-v3.md deleted file mode 100644 index f4a958aa3dd..00000000000 --- a/websites/website/docs/hi/guide/migrate-from-v3.md +++ /dev/null @@ -1,30 +0,0 @@ -# v3.x से माइग्रेट करें - -`v3.x` से माइग्रेशन में सबसे common issue options compatibility है। - -## प्राथमिक बदलाव - -- `particles.color` -> `particles.paint.fill` -- `particles.stroke` -> `particles.paint.stroke` - -## Load API migration - -पहले: - -```ts -await tsParticles.load("tsparticles", options); -``` - -अब: - -```ts -await tsParticles.load({ - id: "tsparticles", - options, -}); -``` - -## Resources - -- Option rename matrix: [`/guide/option-rename-matrix`](/hi/guide/option-rename-matrix) -- `particles.paint`: [`/options/particles-paint`](/hi/options/particles-paint) diff --git a/websites/website/docs/hi/guide/migrations.md b/websites/website/docs/hi/guide/migrations.md deleted file mode 100644 index cf43d5fba80..00000000000 --- a/websites/website/docs/hi/guide/migrations.md +++ /dev/null @@ -1,22 +0,0 @@ -# माइग्रेशन्स - -`tsParticles` के major versions के बीच माइग्रेट करने के लिए इस सेक्शन का उपयोग करें। - -- [`v3.x से माइग्रेट करें`](/hi/guide/migrate-from-v3) -- [`v2.x से माइग्रेट करें`](/hi/guide/migrate-from-v2) -- [`v1.x से माइग्रेट करें`](/hi/guide/migrate-from-v1) - -## जहां अक्सर break होता है - -1. **Load API का shape** (पुराने positional params vs नया single object). -2. **Options schema** (renamed/moved keys). - -## त्वरित lookup - -- Option rename matrix: [`/guide/option-rename-matrix`](/hi/guide/option-rename-matrix) - -## यह भी उपयोगी - -- particles.js से migration: [`/migration/`](/hi/migration/) -- Releases और versioning: [`/releases/`](/hi/releases/) -- Latest release notes: [`/changelog`](/hi/changelog) diff --git a/websites/website/docs/hi/index.md b/websites/website/docs/hi/index.md index 6e525e7bd40..272959c4e92 100644 --- a/websites/website/docs/hi/index.md +++ b/websites/website/docs/hi/index.md @@ -49,7 +49,7 @@ features: 3. [`/playground/`](/hi/playground/): command से demos चलाएं और JSON live edit करें। 4. [`/demos/`](/hi/demos/): production-ready recipes कॉपी करें। 5. [`/options/`](/hi/options/): root options का map और सीधे links। -6. [`/migration/`](/hi/migration/): particles.js से migration और compatibility notes। +6. [`/migrations/particles-js`](/hi/migrations/particles-js): particles.js से migration और compatibility notes। 7. [`/guide/wrappers`](/hi/guide/wrappers): official wrappers और framework links। 8. [`/guide/plugins-customization`](/hi/guide/plugins-customization): custom shapes, presets और plugin extensions। 9. [`/guide/templates-resources`](/hi/guide/templates-resources): शुरुआती repositories और reusable resources। diff --git a/websites/website/docs/hi/changelog.md b/websites/website/docs/hi/migrations/changelog.md similarity index 100% rename from websites/website/docs/hi/changelog.md rename to websites/website/docs/hi/migrations/changelog.md diff --git a/websites/website/docs/hi/guide/migrate-from-v1.md b/websites/website/docs/hi/migrations/from-v1.md similarity index 74% rename from websites/website/docs/hi/guide/migrate-from-v1.md rename to websites/website/docs/hi/migrations/from-v1.md index b92b77c230f..83e93e904cd 100644 --- a/websites/website/docs/hi/guide/migrate-from-v1.md +++ b/websites/website/docs/hi/migrations/from-v1.md @@ -26,5 +26,5 @@ await tsParticles.load({ ## Resources -- Option rename matrix: [`/guide/option-rename-matrix`](/hi/guide/option-rename-matrix) -- particles.js migration: [`/migration/`](/hi/migration/) +- Option rename matrix: [`/migrations/option-rename-matrix`](/hi/migrations/option-rename-matrix) +- particles.js migration: [`/migrations/particles-js`](/hi/migrations/particles-js) diff --git a/websites/website/docs/hi/guide/migrate-from-v2.md b/websites/website/docs/hi/migrations/from-v2.md similarity index 78% rename from websites/website/docs/hi/guide/migrate-from-v2.md rename to websites/website/docs/hi/migrations/from-v2.md index 3b0ebbf6199..94cc5fca0fb 100644 --- a/websites/website/docs/hi/guide/migrate-from-v2.md +++ b/websites/website/docs/hi/migrations/from-v2.md @@ -34,5 +34,5 @@ await tsParticles.load({ ## Resources -- Option rename matrix: [`/guide/option-rename-matrix`](/hi/guide/option-rename-matrix) -- v1 migration: [`/guide/migrate-from-v1`](/hi/guide/migrate-from-v1) +- Option rename matrix: [`/migrations/option-rename-matrix`](/hi/migrations/option-rename-matrix) +- v1 migration: [`/migrations/from-v1`](/hi/migrations/from-v1) diff --git a/websites/website/docs/hi/migrations/from-v3.md b/websites/website/docs/hi/migrations/from-v3.md new file mode 100644 index 00000000000..324520eef27 --- /dev/null +++ b/websites/website/docs/hi/migrations/from-v3.md @@ -0,0 +1,86 @@ +# v3.x से माइग्रेट करें + +`v3.x` से माइग्रेशन में मुख्य जोखिम **options compatibility** और **package changes** हैं। + +## प्राथमिक बदलाव + +- `particles.color` -> `particles.paint.fill` +- `particles.stroke` -> `particles.paint.stroke` + +## पैकेज का नाम बदलना + +कुछ `v3.x` पैकेजों का नाम बदल दिया गया है या पुनर्गठित किया गया है: + +| v3 पैकेज | वर्तमान पैकेज | नोट | +|---|---|---| +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | एकल प्लगइन में विलय | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | एकल प्लगइन में विलय | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | paint सिस्टम से बदला गया | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | paint सिस्टम से बदला गया | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | `plugins/colors/hsv/` में स्थानांतरित, same name | + +## ऑप्शन मैपिंग उदाहरण + +पहले (`v3.x` स्टाइल): + +```ts +const options = { + particles: { + color: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, +}; +``` + +अब (वर्तमान): + +```ts +const options = { + particles: { + paint: { + fill: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, + }, +}; +``` + +## Load API migration + +पहले (legacy positional): + +```ts +await tsParticles.load("tsparticles", options); +``` + +अब (object params): + +```ts +await tsParticles.load({ + id: "tsparticles", + options, +}); +``` + +## अनुशंसित कदम + +1. सभी `@tsparticles/*` पैकेजों को नवीनतम संस्करण पर लाएं। +2. deprecated option keys (`particles.color`, `particles.stroke`) को `particles.paint.*` से बदलें। +3. नाम बदले गए पैकेजों को `package.json` में अपडेट करें (ऊपर तालिका देखें)। +4. सुनिश्चित करें कि custom plugins/shapes `tsParticles.load(...)` से पहले लोड हों। +5. इंटरैक्शन और performance-sensitive scenes को दोबारा जांचें। + +## Resources + +- Option rename matrix: [`/migrations/option-rename-matrix`](/hi/migrations/option-rename-matrix) +- `particles.paint`: [`/options/particles-paint`](/hi/options/particles-paint) diff --git a/websites/website/docs/hi/migrations/index.md b/websites/website/docs/hi/migrations/index.md new file mode 100644 index 00000000000..ddf652dc292 --- /dev/null +++ b/websites/website/docs/hi/migrations/index.md @@ -0,0 +1,34 @@ +# Versioning & Migration + +`tsParticles` के मुख्य वर्जनों के बीच नेविगेट करने, रिलीज़ ट्रैक करने और वर्जनिंग समझने के लिए इस सेक्शन का उपयोग करें। + +## माइग्रेशन गाइड + +- [`v3.x से माइग्रेट करें`](/hi/migrations/from-v3) +- [`v2.x से माइग्रेट करें`](/hi/migrations/from-v2) +- [`v1.x से माइग्रेट करें`](/hi/migrations/from-v1) + +## त्वरित मार्ग + +- `v3.x` से: [`/hi/migrations/from-v3`](/hi/migrations/from-v3) से शुरू करें (फोकस: option key changes + package renames)। +- `v2.x` से: [`/hi/migrations/from-v2`](/hi/migrations/from-v2) से शुरू करें (फोकस: `load(...)` API + options)। +- `v1.x` से: [`/hi/migrations/from-v1`](/hi/migrations/from-v1) से शुरू करें (फोकस: packages, loaders, options)। + +## माइग्रेशन आमतौर पर कहाँ टूटता है + +अधिकांश मेजर वर्जन माइग्रेशन दो जगहों पर टूटते हैं: + +1. **Load API आकार** (पुराने positional params vs नए object params)। +2. **Options schema** (नाम बदले/स्थानांतरित keys)। + +अगर आपकी app compile होती है लेकिन गलत render करती है, तो option mappings से शुरू करें। + +## त्वरित खोज + +- [Option Rename Matrix](/hi/migrations/option-rename-matrix) — legacy और current option keys का त्वरित मैपिंग। + +## उपयोगी भी + +- [Changelog](/hi/migrations/changelog) — नवीनतम रिलीज़ नोट्स। +- [Releases और Versioning](/hi/migrations/releases) — वर्जन अलाइनमेंट नियम और रिलीज़ चेकलिस्ट। +- [particles.js माइग्रेशन](/hi/migrations/particles-js) — legacy `particles.js` या `canvas-confetti` से माइग्रेट करना। diff --git a/websites/website/docs/hi/guide/option-rename-matrix.md b/websites/website/docs/hi/migrations/option-rename-matrix.md similarity index 100% rename from websites/website/docs/hi/guide/option-rename-matrix.md rename to websites/website/docs/hi/migrations/option-rename-matrix.md diff --git a/websites/website/docs/hi/migration/index.md b/websites/website/docs/hi/migrations/particles-js.md similarity index 100% rename from websites/website/docs/hi/migration/index.md rename to websites/website/docs/hi/migrations/particles-js.md diff --git a/websites/website/docs/hi/releases/index.md b/websites/website/docs/hi/migrations/releases.md similarity index 100% rename from websites/website/docs/hi/releases/index.md rename to websites/website/docs/hi/migrations/releases.md diff --git a/websites/website/docs/index.md b/websites/website/docs/index.md index a2cb19d9c15..bfc935d6da7 100644 --- a/websites/website/docs/index.md +++ b/websites/website/docs/index.md @@ -1,15 +1,12 @@ --- -layout: home - -title: tsParticles -titleTemplate: Build expressive particle backgrounds in minutes +layout: MyHome hero: name: tsParticles text: Powerful particle engine, simple developer workflow tagline: Ship interactive backgrounds, effects, and confetti on any framework. image: - src: https://particles.js.org/images/banner3.png + src: /images/banner3.png alt: tsParticles actions: - theme: brand @@ -49,8 +46,8 @@ The website has been redesigned around the most common question: **"How do I use 3. [`/playground/`](/playground/): launch demos only on command and edit JSON live. 4. [`/demos/`](/demos/): copy ready-to-use recipes for production. 5. [`/options/`](/options/): map of root options and deep links. -6. [`/guide/migrations`](/guide/migrations): migrate from tsParticles v1/v2/v3 to current. -7. [`/migration/`](/migration/): migrate from particles.js with compatibility notes. +6. [`/migrations/`](/migrations/): migrate from tsParticles v1/v2/v3 to current. +7. [`/migrations/particles-js`](/migrations/particles-js): migrate from particles.js with compatibility notes. 8. [`/guide/wrappers`](/guide/wrappers): official wrapper packages and framework links. 9. [`/guide/plugins-customization`](/guide/plugins-customization): custom shapes, presets, and plugin extension. 10. [`/guide/templates-resources`](/guide/templates-resources): starter repos and shareable resources. @@ -60,7 +57,7 @@ The website has been redesigned around the most common question: **"How do I use ## Core source and folders - Main monorepo: [github.com/tsparticles/tsparticles](https://github.com/tsparticles/tsparticles) -- Main README (quick start, wrappers, presets): [README.md](https://github.com/tsparticles/tsparticles/blob/main/README.md) +- Main README: [README.md](https://github.com/tsparticles/tsparticles/blob/main/README.md) - Wrappers folder: [`tsparticles/wrappers`](https://github.com/tsparticles/tsparticles/tree/main/wrappers) - Demo apps folder: [`tsparticles/demo`](https://github.com/tsparticles/tsparticles/tree/main/demo) - Presets workspace folders: [`tsparticles/presets`](https://github.com/tsparticles/tsparticles/tree/main/presets) @@ -70,5 +67,5 @@ The website has been redesigned around the most common question: **"How do I use ## Support the project -- Sponsor Matteo Bruni: -- Sponsor tsParticles org: +- Sponsor Matteo Bruni: [https://github.com/matteobruni](https://github.com/matteobruni) +- Sponsor tsParticles org: [https://github.com/tsparticles](https://github.com/tsparticles) diff --git a/websites/website/docs/it/guide/getting-started.md b/websites/website/docs/it/guide/getting-started.md index a72bbd6ca20..9232b7071bb 100644 --- a/websites/website/docs/it/guide/getting-started.md +++ b/websites/website/docs/it/guide/getting-started.md @@ -94,7 +94,7 @@ Se preferisci configurazioni basate sul nome preimpostato, utilizza il catalogo - Catalogo preimpostazioni: [`/demos/presets`](/it/demos/presets) - Catalogo tavolozze: [`/demos/palettes`](/it/demos/palettes) - Catalogo forme: [`/demos/shapes`](/it/demos/shapes) -- Migrazione da particles.js: [`/migration/`](/it/migration/) +- Migrazione da particles.js: [`/migrations/particles-js`](/it/migrations/particles-js) - Formati colore: [`/guide/color-formats`](/it/guide/color-formats) - Ciclo di vita del contenitore: [`/guide/container-lifecycle`](/it/guide/container-lifecycle) - Plugin e personalizzazione: [`/guide/plugins-customization`](/it/guide/plugins-customization) diff --git a/websites/website/docs/it/guide/installation.md b/websites/website/docs/it/guide/installation.md index 2655c49db23..3b51a735971 100644 --- a/websites/website/docs/it/guide/installation.md +++ b/websites/website/docs/it/guide/installation.md @@ -99,7 +99,7 @@ await tsParticles.load({ - [`/guide/getting-started`](/it/guide/getting-started) - [`/guide/wrappers`](/it/guide/wrappers) - [`/demos/presets`](/it/demos/presets) -- [`/migration/`](/it/migration/) +- [`/migrations/particles-js`](/it/migrations/particles-js) ## Compatibilita legacy diff --git a/websites/website/docs/it/guide/migrate-from-v3.md b/websites/website/docs/it/guide/migrate-from-v3.md deleted file mode 100644 index e6b5a341269..00000000000 --- a/websites/website/docs/it/guide/migrate-from-v3.md +++ /dev/null @@ -1,30 +0,0 @@ -# Migra da v3.x - -Da `v3.x`, il rischio principale in migrazione e la compatibilita delle opzioni. - -## Cambi prioritari - -- `particles.color` -> `particles.paint.fill` -- `particles.stroke` -> `particles.paint.stroke` - -## Migrazione API load - -Prima: - -```ts -await tsParticles.load("tsparticles", options); -``` - -Dopo: - -```ts -await tsParticles.load({ - id: "tsparticles", - options, -}); -``` - -## Risorse - -- Matrice rename: [`/guide/option-rename-matrix`](/it/guide/option-rename-matrix) -- `particles.paint`: [`/options/particles-paint`](/it/options/particles-paint) diff --git a/websites/website/docs/it/guide/migrations.md b/websites/website/docs/it/guide/migrations.md deleted file mode 100644 index 38f4fad44f6..00000000000 --- a/websites/website/docs/it/guide/migrations.md +++ /dev/null @@ -1,22 +0,0 @@ -# Migrazioni - -Usa questa sezione per migrare tra versioni major di `tsParticles`. - -- [`Migra da v3.x`](/it/guide/migrate-from-v3) -- [`Migra da v2.x`](/it/guide/migrate-from-v2) -- [`Migra da v1.x`](/it/guide/migrate-from-v1) - -## Dove si rompe piu spesso - -1. **Shape della Load API** (parametri posizionali vecchi vs oggetto parametri nuovo). -2. **Schema delle opzioni** (chiavi rinominate/spostate). - -## Lookup rapido - -- Matrice rename opzioni: [`/guide/option-rename-matrix`](/it/guide/option-rename-matrix) - -## Utile anche - -- Migrazione da particles.js: [`/migration/`](/it/migration/) -- Releases e versioning: [`/releases/`](/it/releases/) -- Ultime note release: [`/changelog`](/it/changelog) diff --git a/websites/website/docs/it/index.md b/websites/website/docs/it/index.md index dc0c5eb982e..e01104056ca 100644 --- a/websites/website/docs/it/index.md +++ b/websites/website/docs/it/index.md @@ -49,7 +49,7 @@ Il sito è stato riprogettato intorno alla domanda più comune: **"Come uso tsPa 3. [`/playground/`](/it/playground/): avvia demo su comando e modifica JSON live. 4. [`/demos/`](/it/demos/): copia ricette pronte per la produzione. 5. [`/options/`](/it/options/): mappa delle opzioni root e deep link. -6. [`/migration/`](/it/migration/): migra da particles.js con note di compatibilita. +6. [`/migrations/particles-js`](/it/migrations/particles-js): migra da particles.js con note di compatibilita. 7. [`/guide/wrappers`](/it/guide/wrappers): wrapper ufficiali e link framework. 8. [`/guide/plugins-customization`](/it/guide/plugins-customization): forme personalizzate, preset ed estensioni plugin. 9. [`/guide/templates-resources`](/it/guide/templates-resources): repository iniziali e risorse condivisibili. diff --git a/websites/website/docs/it/changelog.md b/websites/website/docs/it/migrations/changelog.md similarity index 100% rename from websites/website/docs/it/changelog.md rename to websites/website/docs/it/migrations/changelog.md diff --git a/websites/website/docs/it/guide/migrate-from-v1.md b/websites/website/docs/it/migrations/from-v1.md similarity index 70% rename from websites/website/docs/it/guide/migrate-from-v1.md rename to websites/website/docs/it/migrations/from-v1.md index d96b7142c03..bcc92302eb2 100644 --- a/websites/website/docs/it/guide/migrate-from-v1.md +++ b/websites/website/docs/it/migrations/from-v1.md @@ -26,5 +26,5 @@ await tsParticles.load({ ## Risorse -- Matrice rename: [`/guide/option-rename-matrix`](/it/guide/option-rename-matrix) -- Migrazione da particles.js: [`/migration/`](/it/migration/) +- Matrice rename: [`/migrations/option-rename-matrix`](/it/migrations/option-rename-matrix) +- Migrazione da particles.js: [`/migrations/particles-js`](/it/migrations/particles-js) diff --git a/websites/website/docs/it/guide/migrate-from-v2.md b/websites/website/docs/it/migrations/from-v2.md similarity index 76% rename from websites/website/docs/it/guide/migrate-from-v2.md rename to websites/website/docs/it/migrations/from-v2.md index dea37222a90..aed5e0f6f47 100644 --- a/websites/website/docs/it/guide/migrate-from-v2.md +++ b/websites/website/docs/it/migrations/from-v2.md @@ -34,5 +34,5 @@ await tsParticles.load({ ## Risorse -- Matrice rename: [`/guide/option-rename-matrix`](/it/guide/option-rename-matrix) -- Migrazione v1: [`/guide/migrate-from-v1`](/it/guide/migrate-from-v1) +- Matrice rename: [`/migrations/option-rename-matrix`](/it/migrations/option-rename-matrix) +- Migrazione v1: [`/migrations/from-v1`](/it/migrations/from-v1) diff --git a/websites/website/docs/it/migrations/from-v3.md b/websites/website/docs/it/migrations/from-v3.md new file mode 100644 index 00000000000..7265b700c7d --- /dev/null +++ b/websites/website/docs/it/migrations/from-v3.md @@ -0,0 +1,86 @@ +# Migra da v3.x + +Da `v3.x`, i rischi principali in migrazione sono la **compatibilità delle opzioni** e i **cambi dei pacchetti**. + +## Cambi prioritari + +- `particles.color` -> `particles.paint.fill` +- `particles.stroke` -> `particles.paint.stroke` + +## Cambi dei pacchetti + +Alcuni pacchetti di `v3.x` sono stati rinominati o ristrutturati: + +| Pacchetto v3 | Pacchetto attuale | Note | +|---|---|---| +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Uniti in un singolo plugin | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Uniti in un singolo plugin | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Sostituito dal sistema paint | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Sostituito dal sistema paint | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Spostato in `plugins/colors/hsv/`, stesso nome | + +## Esempi mappatura opzioni + +Prima (stile `v3.x`): + +```ts +const options = { + particles: { + color: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, +}; +``` + +Dopo (attuale): + +```ts +const options = { + particles: { + paint: { + fill: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, + }, +}; +``` + +## Migrazione API load + +Prima (chiamata posizionale legacy): + +```ts +await tsParticles.load("tsparticles", options); +``` + +Dopo (parametro oggetto): + +```ts +await tsParticles.load({ + id: "tsparticles", + options, +}); +``` + +## Passaggi consigliati + +1. Allinea tutti i pacchetti `@tsparticles/*` all'ultima versione disponibile. +2. Sostituisci le chiavi opzione deprecate (`particles.color`, `particles.stroke`) con `particles.paint.*`. +3. Aggiorna i pacchetti rinominati in `package.json` (vedi tabella sopra). +4. Verifica che plugin/shape personalizzati siano caricati prima di `tsParticles.load(...)`. +5. Ricontrolla interazioni e scene critiche per le performance. + +## Risorse + +- Matrice rename: [`/migrations/option-rename-matrix`](/it/migrations/option-rename-matrix) +- `particles.paint`: [`/options/particles-paint`](/it/options/particles-paint) diff --git a/websites/website/docs/it/migrations/index.md b/websites/website/docs/it/migrations/index.md new file mode 100644 index 00000000000..ebc07ee529c --- /dev/null +++ b/websites/website/docs/it/migrations/index.md @@ -0,0 +1,34 @@ +# Versioning & Migration + +Usa questa sezione per navigare tra le versioni principali di `tsParticles`, seguire le release e capire il versioning. + +## Guide alla migrazione + +- [`Migra da v3.x`](/it/migrations/from-v3) +- [`Migra da v2.x`](/it/migrations/from-v2) +- [`Migra da v1.x`](/it/migrations/from-v1) + +## Percorso rapido + +- Da `v3.x`: inizia da [`/it/migrations/from-v3`](/it/migrations/from-v3) (focus: chiavi opzione + cambi pacchetti). +- Da `v2.x`: inizia da [`/it/migrations/from-v2`](/it/migrations/from-v2) (focus: API `load(...)` + opzioni). +- Da `v1.x`: inizia da [`/it/migrations/from-v1`](/it/migrations/from-v1) (focus: pacchetti, loader, opzioni). + +## Dove di solito si rompe la migrazione + +Le migrazioni tra major version si rompono in due punti: + +1. **Forma dell'API Load** (vecchi parametri posizionali vs nuovo parametro oggetto). +2. **Schema delle opzioni** (chiavi rinominate/spostate). + +Se l'app compila ma il rendering è errato, inizia dalle opzioni. + +## Ricerca rapida + +- [Matrice rename opzioni](/it/migrations/option-rename-matrix) — mapping tra chiavi legacy e attuali. + +## Utile anche + +- [Changelog](/it/migrations/changelog) — ultime note di release. +- [Release e Versioning](/it/migrations/releases) — regole di allineamento versioni e checklist di rilascio. +- [Migrazione da particles.js](/it/migrations/particles-js) — migrare da `particles.js` o `canvas-confetti`. diff --git a/websites/website/docs/it/guide/option-rename-matrix.md b/websites/website/docs/it/migrations/option-rename-matrix.md similarity index 100% rename from websites/website/docs/it/guide/option-rename-matrix.md rename to websites/website/docs/it/migrations/option-rename-matrix.md diff --git a/websites/website/docs/it/migration/index.md b/websites/website/docs/it/migrations/particles-js.md similarity index 100% rename from websites/website/docs/it/migration/index.md rename to websites/website/docs/it/migrations/particles-js.md diff --git a/websites/website/docs/it/releases/index.md b/websites/website/docs/it/migrations/releases.md similarity index 100% rename from websites/website/docs/it/releases/index.md rename to websites/website/docs/it/migrations/releases.md diff --git a/websites/website/docs/ja/guide/getting-started.md b/websites/website/docs/ja/guide/getting-started.md index ec9a140b63c..2bb60c754ac 100644 --- a/websites/website/docs/ja/guide/getting-started.md +++ b/websites/website/docs/ja/guide/getting-started.md @@ -94,7 +94,7 @@ pnpm add @tsparticles/configs - プリセットカタログ: [`/demos/presets`](/ja/demos/presets) - パレット カタログ: [`/demos/palettes`](/ja/demos/palettes) - シェイプ カタログ: [`/demos/shapes`](/ja/demos/shapes) -- particles.js からの移行: [`/migration/`](/ja/migration/) +- particles.js からの移行: [`/migrations/particles-js`](/ja/migrations/particles-js) - カラー形式: [`/guide/color-formats`](/ja/guide/color-formats) - コンテナのライフサイクル: [`/guide/container-lifecycle`](/ja/guide/container-lifecycle) - プラグインとカスタマイズ: [`/guide/plugins-customization`](/ja/guide/plugins-customization) diff --git a/websites/website/docs/ja/guide/installation.md b/websites/website/docs/ja/guide/installation.md index 3ec0d63b9e4..ec8fefc6a09 100644 --- a/websites/website/docs/ja/guide/installation.md +++ b/websites/website/docs/ja/guide/installation.md @@ -99,7 +99,7 @@ await tsParticles.load({ - [`/guide/getting-started`](/ja/guide/getting-started) - [`/guide/wrappers`](/ja/guide/wrappers) - [`/demos/presets`](/ja/demos/presets) -- [`/migration/`](/ja/migration/) +- [`/migrations/particles-js`](/ja/migrations/particles-js) ## legacy 互換 diff --git a/websites/website/docs/ja/guide/migrate-from-v3.md b/websites/website/docs/ja/guide/migrate-from-v3.md deleted file mode 100644 index 5dca941fdc2..00000000000 --- a/websites/website/docs/ja/guide/migrate-from-v3.md +++ /dev/null @@ -1,30 +0,0 @@ -# v3.x から移行 - -`v3.x` からの移行では、主にオプション互換が問題になります。 - -## 優先して確認する変更 - -- `particles.color` -> `particles.paint.fill` -- `particles.stroke` -> `particles.paint.stroke` - -## Load API 移行 - -Before: - -```ts -await tsParticles.load("tsparticles", options); -``` - -After: - -```ts -await tsParticles.load({ - id: "tsparticles", - options, -}); -``` - -## リソース - -- 改名マトリクス: [`/guide/option-rename-matrix`](/ja/guide/option-rename-matrix) -- `particles.paint`: [`/options/particles-paint`](/ja/options/particles-paint) diff --git a/websites/website/docs/ja/guide/migrations.md b/websites/website/docs/ja/guide/migrations.md deleted file mode 100644 index 81c9833aa14..00000000000 --- a/websites/website/docs/ja/guide/migrations.md +++ /dev/null @@ -1,22 +0,0 @@ -# マイグレーション - -このセクションは、`tsParticles` のメジャーバージョン間移行に使います。 - -- [`v3.x から移行`](/ja/guide/migrate-from-v3) -- [`v2.x から移行`](/ja/guide/migrate-from-v2) -- [`v1.x から移行`](/ja/guide/migrate-from-v1) - -## よく壊れるポイント - -1. **Load API の形**(旧: 位置引数 / 新: 単一オブジェクト)。 -2. **オプションスキーマ**(キーの改名・移動)。 - -## クイック参照 - -- オプション改名マトリクス: [`/guide/option-rename-matrix`](/ja/guide/option-rename-matrix) - -## あわせて読む - -- particles.js からの移行: [`/migration/`](/ja/migration/) -- リリースとバージョニング: [`/releases/`](/ja/releases/) -- 最新リリースノート: [`/changelog`](/ja/changelog) diff --git a/websites/website/docs/ja/index.md b/websites/website/docs/ja/index.md index 1cc54cbfe42..02dfa25d885 100644 --- a/websites/website/docs/ja/index.md +++ b/websites/website/docs/ja/index.md @@ -49,7 +49,7 @@ features: 3. [`/playground/`](/ja/playground/): コマンドでデモを起動し、JSON をライブ編集。 4. [`/demos/`](/ja/demos/): 本番向けレシピをそのまま利用。 5. [`/options/`](/ja/options/): ルート options の地図と詳細ページへの導線。 -6. [`/migration/`](/ja/migration/): particles.js からの移行手順と互換性メモ。 +6. [`/migrations/particles-js`](/ja/migrations/particles-js): particles.js からの移行手順と互換性メモ。 7. [`/guide/wrappers`](/ja/guide/wrappers): 公式 wrappers と framework 別リンク。 8. [`/guide/plugins-customization`](/ja/guide/plugins-customization): カスタム shape、presets、plugin 拡張。 9. [`/guide/templates-resources`](/ja/guide/templates-resources): スターターリポジトリと共有リソース。 diff --git a/websites/website/docs/ja/changelog.md b/websites/website/docs/ja/migrations/changelog.md similarity index 100% rename from websites/website/docs/ja/changelog.md rename to websites/website/docs/ja/migrations/changelog.md diff --git a/websites/website/docs/ja/guide/migrate-from-v1.md b/websites/website/docs/ja/migrations/from-v1.md similarity index 71% rename from websites/website/docs/ja/guide/migrate-from-v1.md rename to websites/website/docs/ja/migrations/from-v1.md index 58f4eb95c7e..9f06e2c5416 100644 --- a/websites/website/docs/ja/guide/migrate-from-v1.md +++ b/websites/website/docs/ja/migrations/from-v1.md @@ -26,5 +26,5 @@ await tsParticles.load({ ## リソース -- 改名マトリクス: [`/guide/option-rename-matrix`](/ja/guide/option-rename-matrix) -- particles.js からの移行: [`/migration/`](/ja/migration/) +- 改名マトリクス: [`/migrations/option-rename-matrix`](/ja/migrations/option-rename-matrix) +- particles.js からの移行: [`/migrations/particles-js`](/ja/migrations/particles-js) diff --git a/websites/website/docs/ja/guide/migrate-from-v2.md b/websites/website/docs/ja/migrations/from-v2.md similarity index 76% rename from websites/website/docs/ja/guide/migrate-from-v2.md rename to websites/website/docs/ja/migrations/from-v2.md index b9b0ad7ab14..d36cb709b53 100644 --- a/websites/website/docs/ja/guide/migrate-from-v2.md +++ b/websites/website/docs/ja/migrations/from-v2.md @@ -34,5 +34,5 @@ await tsParticles.load({ ## リソース -- 改名マトリクス: [`/guide/option-rename-matrix`](/ja/guide/option-rename-matrix) -- v1 移行: [`/guide/migrate-from-v1`](/ja/guide/migrate-from-v1) +- 改名マトリクス: [`/migrations/option-rename-matrix`](/ja/migrations/option-rename-matrix) +- v1 移行: [`/migrations/from-v1`](/ja/migrations/from-v1) diff --git a/websites/website/docs/ja/migrations/from-v3.md b/websites/website/docs/ja/migrations/from-v3.md new file mode 100644 index 00000000000..40535b19175 --- /dev/null +++ b/websites/website/docs/ja/migrations/from-v3.md @@ -0,0 +1,86 @@ +# v3.x から移行 + +`v3.x` からの移行では、**オプション互換**と**パッケージ変更**が主なリスクです。 + +## 優先して確認する変更 + +- `particles.color` -> `particles.paint.fill` +- `particles.stroke` -> `particles.paint.stroke` + +## パッケージの名称変更 + +一部の `v3.x` パッケージは名称変更または再構成されました: + +| v3 パッケージ | 現在のパッケージ | 備考 | +|---|---|---| +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | 1つのプラグインに統合 | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | 1つのプラグインに統合 | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | paint システムに置き換え | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | paint システムに置き換え | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | `plugins/colors/hsv/` に移動、名前は同じ | + +## オプション対応例 + +Before(`v3.x` スタイル): + +```ts +const options = { + particles: { + color: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, +}; +``` + +After(現在): + +```ts +const options = { + particles: { + paint: { + fill: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, + }, +}; +``` + +## Load API 移行 + +Before(レガシー位置引数): + +```ts +await tsParticles.load("tsparticles", options); +``` + +After(オブジェクト引数): + +```ts +await tsParticles.load({ + id: "tsparticles", + options, +}); +``` + +## 推奨手順 + +1. すべての `@tsparticles/*` パッケージを最新バージョンに揃える。 +2. 非推奨のオプションキー(`particles.color`、`particles.stroke`)を `particles.paint.*` に置き換える。 +3. 名称変更されたパッケージを `package.json` で更新する(上の表を参照)。 +4. カスタムプラグイン/シェイプが `tsParticles.load(...)` の前に読み込まれていることを確認する。 +5. インタラクションとパフォーマンス重視のシーンを再テストする。 + +## リソース + +- 改名マトリクス: [`/migrations/option-rename-matrix`](/ja/migrations/option-rename-matrix) +- `particles.paint`: [`/options/particles-paint`](/ja/options/particles-paint) diff --git a/websites/website/docs/ja/migrations/index.md b/websites/website/docs/ja/migrations/index.md new file mode 100644 index 00000000000..6a860284ac4 --- /dev/null +++ b/websites/website/docs/ja/migrations/index.md @@ -0,0 +1,34 @@ +# Versioning & Migration + +このセクションでは、`tsParticles` のメジャーバージョン間の移行、リリースの追跡、バージョニングの理解に使用します。 + +## 移行ガイド + +- [`v3.x から移行`](/ja/migrations/from-v3) +- [`v2.x から移行`](/ja/migrations/from-v2) +- [`v1.x から移行`](/ja/migrations/from-v1) + +## クイックルート + +- `v3.x` から: [`/ja/migrations/from-v3`](/ja/migrations/from-v3) から開始(焦点:オプションキーの変更 + パッケージ名変更)。 +- `v2.x` から: [`/ja/migrations/from-v2`](/ja/migrations/from-v2) から開始(焦点:`load(...)` API + オプション)。 +- `v1.x` から: [`/ja/migrations/from-v1`](/ja/migrations/from-v1) から開始(焦点:パッケージ、ローダー、オプション)。 + +## 移行で通常発生する問題 + +ほとんどのメジャーバージョン移行は2箇所で問題が発生します: + +1. **Load API の形式**(古い位置引数 vs 新しいオブジェクト引数)。 +2. **オプションスキーマ**(名前変更/移動されたキー)。 + +アプリがコンパイルできても表示がおかしい場合は、オプションマッピングから始めてください。 + +## クイックルックアップ + +- [オプション名変更マトリックス](/ja/migrations/option-rename-matrix) — レガシーと現在のオプションキーのクイックマッピング。 + +## 参考情報 + +- [Changelog](/ja/migrations/changelog) — 最新リリースノート。 +- [リリースとバージョニング](/ja/migrations/releases) — バージョン調整ルールとリリースチェックリスト。 +- [particles.js からの移行](/ja/migrations/particles-js) — レガシー `particles.js` または `canvas-confetti` からの移行。 diff --git a/websites/website/docs/ja/guide/option-rename-matrix.md b/websites/website/docs/ja/migrations/option-rename-matrix.md similarity index 100% rename from websites/website/docs/ja/guide/option-rename-matrix.md rename to websites/website/docs/ja/migrations/option-rename-matrix.md diff --git a/websites/website/docs/ja/migration/index.md b/websites/website/docs/ja/migrations/particles-js.md similarity index 100% rename from websites/website/docs/ja/migration/index.md rename to websites/website/docs/ja/migrations/particles-js.md diff --git a/websites/website/docs/ja/releases/index.md b/websites/website/docs/ja/migrations/releases.md similarity index 100% rename from websites/website/docs/ja/releases/index.md rename to websites/website/docs/ja/migrations/releases.md diff --git a/websites/website/docs/changelog.md b/websites/website/docs/migrations/changelog.md similarity index 100% rename from websites/website/docs/changelog.md rename to websites/website/docs/migrations/changelog.md diff --git a/websites/website/docs/guide/migrate-from-v1.md b/websites/website/docs/migrations/from-v1.md similarity index 91% rename from websites/website/docs/guide/migrate-from-v1.md rename to websites/website/docs/migrations/from-v1.md index 9ed811d3028..d55f926b7d0 100644 --- a/websites/website/docs/guide/migrate-from-v1.md +++ b/websites/website/docs/migrations/from-v1.md @@ -77,13 +77,13 @@ particles: { ## Useful option docs -- Option rename matrix: [`/guide/option-rename-matrix`](/guide/option-rename-matrix) +- Option rename matrix: [`/migrations/option-rename-matrix`](/migrations/option-rename-matrix) - `particles.paint`: [`/options/particles-paint`](/options/particles-paint) - `particles.color` migration note: [`/options/particles-color`](/options/particles-color) - `particles.stroke` migration note: [`/options/particles-stroke`](/options/particles-stroke) ## References -- Legacy compatibility and particles.js bridge: [`/migration/`](/migration/) +- Legacy compatibility and particles.js bridge: [`/migrations/particles-js`](/migrations/particles-js) - Installation matrix: [`/guide/installation`](/guide/installation) - Root repository releases: diff --git a/websites/website/docs/guide/migrate-from-v2.md b/websites/website/docs/migrations/from-v2.md similarity index 92% rename from websites/website/docs/guide/migrate-from-v2.md rename to websites/website/docs/migrations/from-v2.md index 3369cd00a9a..cbbcaaf0531 100644 --- a/websites/website/docs/guide/migrate-from-v2.md +++ b/websites/website/docs/migrations/from-v2.md @@ -87,12 +87,12 @@ particles: { ## Useful option docs -- Option rename matrix: [`/guide/option-rename-matrix`](/guide/option-rename-matrix) +- Option rename matrix: [`/migrations/option-rename-matrix`](/migrations/option-rename-matrix) - `particles.paint`: [`/options/particles-paint`](/options/particles-paint) - `particles.color` migration note: [`/options/particles-color`](/options/particles-color) - `particles.stroke` migration note: [`/options/particles-stroke`](/options/particles-stroke) ## References -- Version alignment rule: [`/releases/`](/releases/) +- Version alignment rule: [`/migrations/releases`](/migrations/releases) - Root repository releases: diff --git a/websites/website/docs/guide/migrate-from-v3.md b/websites/website/docs/migrations/from-v3.md similarity index 67% rename from websites/website/docs/guide/migrate-from-v3.md rename to websites/website/docs/migrations/from-v3.md index 57a208ac55b..3ee9a98ad7c 100644 --- a/websites/website/docs/guide/migrate-from-v3.md +++ b/websites/website/docs/migrations/from-v3.md @@ -74,12 +74,25 @@ await tsParticles.load({ }); ``` +## Package renaming + +Some `v3.x` packages have been renamed or restructured: + +| v3 package | Current package | Note | +|---|---|---| +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Merged into single plugin | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Merged into single plugin | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Replaced by paint system | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Replaced by paint system | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Moved to `plugins/colors/hsv/`, still the same package name | + ## Recommended steps 1. Align all `@tsparticles/*` packages to the same latest version line. 2. Replace deprecated option keys (`particles.color`, `particles.stroke`) with `particles.paint.*`. -3. Verify custom plugins/shapes are loaded before `tsParticles.load(...)`. -4. Re-test interactions and performance-sensitive scenes. +3. Update renamed packages in `package.json` (see table above). +4. Verify custom plugins/shapes are loaded before `tsParticles.load(...)`. +5. Re-test interactions and performance-sensitive scenes. ## Checklist @@ -89,12 +102,12 @@ await tsParticles.load({ ## Useful option docs -- Option rename matrix: [`/guide/option-rename-matrix`](/guide/option-rename-matrix) +- Option rename matrix: [`/migrations/option-rename-matrix`](/migrations/option-rename-matrix) - `particles.paint`: [`/options/particles-paint`](/options/particles-paint) - `particles.color` migration note: [`/options/particles-color`](/options/particles-color) - `particles.stroke` migration note: [`/options/particles-stroke`](/options/particles-stroke) ## References -- Versioning notes: [`/releases/`](/releases/) +- Versioning notes: [`/migrations/releases`](/migrations/releases) - Root repository releases: diff --git a/websites/website/docs/migrations/index.md b/websites/website/docs/migrations/index.md new file mode 100644 index 00000000000..942dc4b4bac --- /dev/null +++ b/websites/website/docs/migrations/index.md @@ -0,0 +1,34 @@ +# Versioning & Migration + +Use this section to navigate between major `tsParticles` versions, track releases, and understand versioning. + +## Migration guides + +- [`Migrate from v3.x`](/migrations/from-v3) +- [`Migrate from v2.x`](/migrations/from-v2) +- [`Migrate from v1.x`](/migrations/from-v1) + +## Quick route + +- Coming from `v3.x`: start with [`/migrations/from-v3`](/migrations/from-v3) (focus: option key changes + package renames). +- Coming from `v2.x`: start with [`/migrations/from-v2`](/migrations/from-v2) (focus: `load(...)` API + options). +- Coming from `v1.x`: start with [`/migrations/from-v1`](/migrations/from-v1) (focus: packages, loaders, options audit). + +## Where migrations usually break + +Most major migrations break in two places: + +1. **Load API shape** (old positional params vs new object params). +2. **Options schema** (renamed/moved keys). + +If your app compiles but renders wrong visuals, start from option mappings first. + +## Fast lookup + +- [Option Rename Matrix](/migrations/option-rename-matrix) — quick mapping of legacy vs current option keys. + +## Also useful + +- [Changelog](/migrations/changelog) — latest release notes. +- [Releases & Versioning](/migrations/releases) — version alignment rules and release checklist. +- [particles.js Migration](/migrations/particles-js) — migrating from legacy `particles.js` or `canvas-confetti`. diff --git a/websites/website/docs/guide/option-rename-matrix.md b/websites/website/docs/migrations/option-rename-matrix.md similarity index 87% rename from websites/website/docs/guide/option-rename-matrix.md rename to websites/website/docs/migrations/option-rename-matrix.md index 03aa4c79102..6c7b5c78fd9 100644 --- a/websites/website/docs/guide/option-rename-matrix.md +++ b/websites/website/docs/migrations/option-rename-matrix.md @@ -29,7 +29,7 @@ This is not an option key rename, but it is one of the most common migration bre ## See also -- [`/guide/migrate-from-v3`](/guide/migrate-from-v3) -- [`/guide/migrate-from-v2`](/guide/migrate-from-v2) -- [`/guide/migrate-from-v1`](/guide/migrate-from-v1) -- [`/migration/`](/migration/) +- [`/migrations/from-v3`](/migrations/from-v3) +- [`/migrations/from-v2`](/migrations/from-v2) +- [`/migrations/from-v1`](/migrations/from-v1) +- [`/migrations/particles-js`](/migrations/particles-js) diff --git a/websites/website/docs/migration/index.md b/websites/website/docs/migrations/particles-js.md similarity index 100% rename from websites/website/docs/migration/index.md rename to websites/website/docs/migrations/particles-js.md diff --git a/websites/website/docs/releases/index.md b/websites/website/docs/migrations/releases.md similarity index 100% rename from websites/website/docs/releases/index.md rename to websites/website/docs/migrations/releases.md diff --git a/websites/website/docs/pt/guide/getting-started.md b/websites/website/docs/pt/guide/getting-started.md index e34f2f7c7fb..7204c4bd361 100644 --- a/websites/website/docs/pt/guide/getting-started.md +++ b/websites/website/docs/pt/guide/getting-started.md @@ -94,7 +94,7 @@ Se você preferir configurações baseadas em nomes de predefinições, use o ca - Catálogo de predefinições: [`/demos/presets`](/pt/demos/presets) - Catálogo de paletas: [`/demos/palettes`](/pt/demos/palettes) - Catalogo de formas: [`/demos/shapes`](/pt/demos/shapes) -- Migração de particles.js: [`/migration/`](/pt/migration/) +- Migração de particles.js: [`/migrations/particles-js`](/pt/migrations/particles-js) - Formatos de cores: [`/guide/color-formats`](/pt/guide/color-formats) - Ciclo de vida do contêiner: [`/guide/container-lifecycle`](/pt/guide/container-lifecycle) - Plug-ins e personalização: [`/guide/plugins-customization`](/pt/guide/plugins-customization) diff --git a/websites/website/docs/pt/guide/installation.md b/websites/website/docs/pt/guide/installation.md index bff8b7140f9..e32df0c8312 100644 --- a/websites/website/docs/pt/guide/installation.md +++ b/websites/website/docs/pt/guide/installation.md @@ -99,7 +99,7 @@ await tsParticles.load({ - [`/guide/getting-started`](/pt/guide/getting-started) - [`/guide/wrappers`](/pt/guide/wrappers) - [`/demos/presets`](/pt/demos/presets) -- [`/migration/`](/pt/migration/) +- [`/migrations/particles-js`](/pt/migrations/particles-js) ## Compatibilidade legada diff --git a/websites/website/docs/pt/guide/migrate-from-v3.md b/websites/website/docs/pt/guide/migrate-from-v3.md deleted file mode 100644 index fb6c67ba64e..00000000000 --- a/websites/website/docs/pt/guide/migrate-from-v3.md +++ /dev/null @@ -1,30 +0,0 @@ -# Migrar de v3.x - -Em `v3.x`, o maior risco de migracao costuma ser a compatibilidade das opcoes. - -## Mudancas prioritarias - -- `particles.color` -> `particles.paint.fill` -- `particles.stroke` -> `particles.paint.stroke` - -## Migracao da Load API - -Antes: - -```ts -await tsParticles.load("tsparticles", options); -``` - -Depois: - -```ts -await tsParticles.load({ - id: "tsparticles", - options, -}); -``` - -## Recursos - -- Matriz de renomeacao: [`/guide/option-rename-matrix`](/pt/guide/option-rename-matrix) -- `particles.paint`: [`/options/particles-paint`](/pt/options/particles-paint) diff --git a/websites/website/docs/pt/guide/migrations.md b/websites/website/docs/pt/guide/migrations.md deleted file mode 100644 index 0cbd2817803..00000000000 --- a/websites/website/docs/pt/guide/migrations.md +++ /dev/null @@ -1,22 +0,0 @@ -# Migracoes - -Use esta secao para migrar entre versoes major do `tsParticles`. - -- [`Migrar de v3.x`](/pt/guide/migrate-from-v3) -- [`Migrar de v2.x`](/pt/guide/migrate-from-v2) -- [`Migrar de v1.x`](/pt/guide/migrate-from-v1) - -## Onde costuma quebrar - -1. **Formato da Load API** (parametros posicionais antigos vs objeto unico). -2. **Schema de opcoes** (chaves renomeadas/movidas). - -## Consulta rapida - -- Matriz de renomeacao: [`/guide/option-rename-matrix`](/pt/guide/option-rename-matrix) - -## Tambem util - -- Migracao de particles.js: [`/migration/`](/pt/migration/) -- Releases e versionamento: [`/releases/`](/pt/releases/) -- Ultimas notas de release: [`/changelog`](/pt/changelog) diff --git a/websites/website/docs/pt/index.md b/websites/website/docs/pt/index.md index ce1c4c61c73..bb9ed43c484 100644 --- a/websites/website/docs/pt/index.md +++ b/websites/website/docs/pt/index.md @@ -49,7 +49,7 @@ O site foi redesenhado em torno da pergunta mais comum: **"Como uso tsParticles 3. [`/playground/`](/pt/playground/): rode demos por comando e edite JSON ao vivo. 4. [`/demos/`](/pt/demos/): copie receitas prontas para producao. 5. [`/options/`](/pt/options/): mapa das opcoes raiz e links profundos. -6. [`/migration/`](/pt/migration/): migre de particles.js com notas de compatibilidade. +6. [`/migrations/particles-js`](/pt/migrations/particles-js): migre de particles.js com notas de compatibilidade. 7. [`/guide/wrappers`](/pt/guide/wrappers): wrappers oficiais e links por framework. 8. [`/guide/plugins-customization`](/pt/guide/plugins-customization): formas personalizadas, presets e extensao por plugins. 9. [`/guide/templates-resources`](/pt/guide/templates-resources): repositorios iniciais e recursos compartilhaveis. diff --git a/websites/website/docs/pt/changelog.md b/websites/website/docs/pt/migrations/changelog.md similarity index 100% rename from websites/website/docs/pt/changelog.md rename to websites/website/docs/pt/migrations/changelog.md diff --git a/websites/website/docs/pt/guide/migrate-from-v1.md b/websites/website/docs/pt/migrations/from-v1.md similarity index 69% rename from websites/website/docs/pt/guide/migrate-from-v1.md rename to websites/website/docs/pt/migrations/from-v1.md index 43b7e99cb69..592a62d4524 100644 --- a/websites/website/docs/pt/guide/migrate-from-v1.md +++ b/websites/website/docs/pt/migrations/from-v1.md @@ -26,5 +26,5 @@ await tsParticles.load({ ## Recursos -- Matriz de renomeacao: [`/guide/option-rename-matrix`](/pt/guide/option-rename-matrix) -- Migracao de particles.js: [`/migration/`](/pt/migration/) +- Matriz de renomeacao: [`/migrations/option-rename-matrix`](/pt/migrations/option-rename-matrix) +- Migracao de particles.js: [`/migrations/particles-js`](/pt/migrations/particles-js) diff --git a/websites/website/docs/pt/guide/migrate-from-v2.md b/websites/website/docs/pt/migrations/from-v2.md similarity index 75% rename from websites/website/docs/pt/guide/migrate-from-v2.md rename to websites/website/docs/pt/migrations/from-v2.md index d7a799392b9..9e6684f4e4c 100644 --- a/websites/website/docs/pt/guide/migrate-from-v2.md +++ b/websites/website/docs/pt/migrations/from-v2.md @@ -34,5 +34,5 @@ await tsParticles.load({ ## Recursos -- Matriz de renomeacao: [`/guide/option-rename-matrix`](/pt/guide/option-rename-matrix) -- Migracao v1: [`/guide/migrate-from-v1`](/pt/guide/migrate-from-v1) +- Matriz de renomeacao: [`/migrations/option-rename-matrix`](/pt/migrations/option-rename-matrix) +- Migracao v1: [`/migrations/from-v1`](/pt/migrations/from-v1) diff --git a/websites/website/docs/pt/migrations/from-v3.md b/websites/website/docs/pt/migrations/from-v3.md new file mode 100644 index 00000000000..0c5564144cf --- /dev/null +++ b/websites/website/docs/pt/migrations/from-v3.md @@ -0,0 +1,86 @@ +# Migrar de v3.x + +Em `v3.x`, os maiores riscos de migracao sao a **compatibilidade das opcoes** e as **alteracoes de pacotes**. + +## Mudancas prioritarias + +- `particles.color` -> `particles.paint.fill` +- `particles.stroke` -> `particles.paint.stroke` + +## Renomeacao de pacotes + +Alguns pacotes `v3.x` foram renomeados ou reestruturados: + +| Pacote v3 | Pacote atual | Nota | +|---|---|---| +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Unificados em um unico plugin | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Unificados em um unico plugin | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Substituido pelo sistema paint | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Substituido pelo sistema paint | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Movido para `plugins/colors/hsv/`, mesmo nome | + +## Exemplos de mapeamento de opcoes + +Antes (estilo `v3.x`): + +```ts +const options = { + particles: { + color: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, +}; +``` + +Depois (atual): + +```ts +const options = { + particles: { + paint: { + fill: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, + }, +}; +``` + +## Migracao da Load API + +Antes (chamada posicional legada): + +```ts +await tsParticles.load("tsparticles", options); +``` + +Depois (parametro objeto): + +```ts +await tsParticles.load({ + id: "tsparticles", + options, +}); +``` + +## Passos recomendados + +1. Alinhe todos os pacotes `@tsparticles/*` para a versao mais recente. +2. Substitua as chaves de opcao obsoletas (`particles.color`, `particles.stroke`) por `particles.paint.*`. +3. Atualize os pacotes renomeados em `package.json` (ver tabela acima). +4. Verifique se plugins/formas personalizados sao carregados antes de `tsParticles.load(...)`. +5. Reteste interacoes e cenas criticas de desempenho. + +## Recursos + +- Matriz de renomeacao: [`/migrations/option-rename-matrix`](/pt/migrations/option-rename-matrix) +- `particles.paint`: [`/options/particles-paint`](/pt/options/particles-paint) diff --git a/websites/website/docs/pt/migrations/index.md b/websites/website/docs/pt/migrations/index.md new file mode 100644 index 00000000000..b9caa49d98c --- /dev/null +++ b/websites/website/docs/pt/migrations/index.md @@ -0,0 +1,34 @@ +# Versioning & Migration + +Use esta secao para navegar entre as versoes principais do `tsParticles`, acompanhar as releases e entender o versionamento. + +## Guias de migracao + +- [`Migrar de v3.x`](/pt/migrations/from-v3) +- [`Migrar de v2.x`](/pt/migrations/from-v2) +- [`Migrar de v1.x`](/pt/migrations/from-v1) + +## Rota rapida + +- De `v3.x`: comecar por [`/pt/migrations/from-v3`](/pt/migrations/from-v3) (foco: mudancas de chaves de opcao + renomeacao de pacotes). +- De `v2.x`: comecar por [`/pt/migrations/from-v2`](/pt/migrations/from-v2) (foco: API `load(...)` + opcoes). +- De `v1.x`: comecar por [`/pt/migrations/from-v1`](/pt/migrations/from-v1) (foco: pacotes, loaders, opcoes). + +## Onde a migracao normalmente quebra + +As migracoes entre versoes principais quebram em dois lugares: + +1. **Forma da API Load** (antigos parametros posicionais vs novo parametro objeto). +2. **Esquema de opcoes** (chaves renomeadas/movidas). + +Se sua app compila mas a renderizacao esta errada, comecar pelas opcoes. + +## Busca rapida + +- [Matriz de renomeacao de opcoes](/pt/migrations/option-rename-matrix) — mapeamento entre chaves legacy e atuais. + +## Tambem util + +- [Changelog](/pt/migrations/changelog) — ultimas notas de versao. +- [Releases e Versionamento](/pt/migrations/releases) — regras de alinhamento de versoes e checklist de publicacao. +- [Migracao de particles.js](/pt/migrations/particles-js) — migrar de `particles.js` ou `canvas-confetti`. diff --git a/websites/website/docs/pt/guide/option-rename-matrix.md b/websites/website/docs/pt/migrations/option-rename-matrix.md similarity index 100% rename from websites/website/docs/pt/guide/option-rename-matrix.md rename to websites/website/docs/pt/migrations/option-rename-matrix.md diff --git a/websites/website/docs/pt/migration/index.md b/websites/website/docs/pt/migrations/particles-js.md similarity index 100% rename from websites/website/docs/pt/migration/index.md rename to websites/website/docs/pt/migrations/particles-js.md diff --git a/websites/website/docs/pt/releases/index.md b/websites/website/docs/pt/migrations/releases.md similarity index 100% rename from websites/website/docs/pt/releases/index.md rename to websites/website/docs/pt/migrations/releases.md diff --git a/websites/website/docs/ru/guide/getting-started.md b/websites/website/docs/ru/guide/getting-started.md index e0d860d9c2b..41d31c6bc3e 100644 --- a/websites/website/docs/ru/guide/getting-started.md +++ b/websites/website/docs/ru/guide/getting-started.md @@ -94,7 +94,7 @@ pnpm add @tsparticles/configs - Каталог пресетов: [`/demos/presets`](/ru/demos/presets) - Каталог палитр: [`/demos/palettes`](/ru/demos/palettes) - Каталог форм: [`/demos/shapes`](/ru/demos/shapes) -- Миграция с particles.js: [`/migration/`](/ru/migration/) +- Миграция с particles.js: [`/migrations/particles-js`](/ru/migrations/particles-js) - Цветовые форматы: [`/guide/color-formats`](/ru/guide/color-formats) - Жизненный цикл контейнера: [`/guide/container-lifecycle`](/ru/guide/container-lifecycle) - Плагины и настройка: [`/guide/plugins-customization`](/ru/guide/plugins-customization) diff --git a/websites/website/docs/ru/guide/installation.md b/websites/website/docs/ru/guide/installation.md index 3fd2928a2e3..742dbf688a9 100644 --- a/websites/website/docs/ru/guide/installation.md +++ b/websites/website/docs/ru/guide/installation.md @@ -99,7 +99,7 @@ await tsParticles.load({ - [`/guide/getting-started`](/ru/guide/getting-started) - [`/guide/wrappers`](/ru/guide/wrappers) - [`/demos/presets`](/ru/demos/presets) -- [`/migration/`](/ru/migration/) +- [`/migrations/particles-js`](/ru/migrations/particles-js) ## Legacy-совместимость diff --git a/websites/website/docs/ru/guide/migrate-from-v3.md b/websites/website/docs/ru/guide/migrate-from-v3.md deleted file mode 100644 index 29dd1c88e44..00000000000 --- a/websites/website/docs/ru/guide/migrate-from-v3.md +++ /dev/null @@ -1,30 +0,0 @@ -# Миграция с v3.x - -Для `v3.x` главный риск миграции обычно связан с совместимостью опций. - -## Приоритетные изменения - -- `particles.color` -> `particles.paint.fill` -- `particles.stroke` -> `particles.paint.stroke` - -## Миграция Load API - -До: - -```ts -await tsParticles.load("tsparticles", options); -``` - -После: - -```ts -await tsParticles.load({ - id: "tsparticles", - options, -}); -``` - -## Ресурсы - -- Матрица переименований: [`/guide/option-rename-matrix`](/ru/guide/option-rename-matrix) -- `particles.paint`: [`/options/particles-paint`](/ru/options/particles-paint) diff --git a/websites/website/docs/ru/guide/migrations.md b/websites/website/docs/ru/guide/migrations.md deleted file mode 100644 index a0c9fda22e0..00000000000 --- a/websites/website/docs/ru/guide/migrations.md +++ /dev/null @@ -1,22 +0,0 @@ -# Миграции - -Используйте этот раздел для миграции между major-версиями `tsParticles`. - -- [`Миграция с v3.x`](/ru/guide/migrate-from-v3) -- [`Миграция с v2.x`](/ru/guide/migrate-from-v2) -- [`Миграция с v1.x`](/ru/guide/migrate-from-v1) - -## Где чаще всего ломается - -1. **Форма Load API** (позиционные параметры vs единый объект). -2. **Схема опций** (переименованные/перемещенные ключи). - -## Быстрый поиск - -- Матрица переименований: [`/guide/option-rename-matrix`](/ru/guide/option-rename-matrix) - -## Также полезно - -- Миграция с particles.js: [`/migration/`](/ru/migration/) -- Релизы и версионирование: [`/releases/`](/ru/releases/) -- Последние заметки релиза: [`/changelog`](/ru/changelog) diff --git a/websites/website/docs/ru/index.md b/websites/website/docs/ru/index.md index a406c2598b0..b26e5c4ede7 100644 --- a/websites/website/docs/ru/index.md +++ b/websites/website/docs/ru/index.md @@ -49,7 +49,7 @@ features: 3. [`/playground/`](/ru/playground/): запускайте демо по команде и редактируйте JSON вживую. 4. [`/demos/`](/ru/demos/): готовые рецепты для продакшена. 5. [`/options/`](/ru/options/): карта корневых опций и прямые ссылки. -6. [`/migration/`](/ru/migration/): миграция с particles.js с заметками по совместимости. +6. [`/migrations/particles-js`](/ru/migrations/particles-js): миграция с particles.js с заметками по совместимости. 7. [`/guide/wrappers`](/ru/guide/wrappers): официальные wrappers и ссылки по framework. 8. [`/guide/plugins-customization`](/ru/guide/plugins-customization): пользовательские shapes, presets и расширение через plugins. 9. [`/guide/templates-resources`](/ru/guide/templates-resources): стартовые репозитории и полезные ресурсы. diff --git a/websites/website/docs/ru/changelog.md b/websites/website/docs/ru/migrations/changelog.md similarity index 100% rename from websites/website/docs/ru/changelog.md rename to websites/website/docs/ru/migrations/changelog.md diff --git a/websites/website/docs/ru/guide/migrate-from-v1.md b/websites/website/docs/ru/migrations/from-v1.md similarity index 69% rename from websites/website/docs/ru/guide/migrate-from-v1.md rename to websites/website/docs/ru/migrations/from-v1.md index 9ee915414f5..aeb46ae3e9c 100644 --- a/websites/website/docs/ru/guide/migrate-from-v1.md +++ b/websites/website/docs/ru/migrations/from-v1.md @@ -26,5 +26,5 @@ await tsParticles.load({ ## Ресурсы -- Матрица переименований: [`/guide/option-rename-matrix`](/ru/guide/option-rename-matrix) -- Миграция с particles.js: [`/migration/`](/ru/migration/) +- Матрица переименований: [`/migrations/option-rename-matrix`](/ru/migrations/option-rename-matrix) +- Миграция с particles.js: [`/migrations/particles-js`](/ru/migrations/particles-js) diff --git a/websites/website/docs/ru/guide/migrate-from-v2.md b/websites/website/docs/ru/migrations/from-v2.md similarity index 75% rename from websites/website/docs/ru/guide/migrate-from-v2.md rename to websites/website/docs/ru/migrations/from-v2.md index c82a135d8f0..a56af6bd5d2 100644 --- a/websites/website/docs/ru/guide/migrate-from-v2.md +++ b/websites/website/docs/ru/migrations/from-v2.md @@ -34,5 +34,5 @@ await tsParticles.load({ ## Ресурсы -- Матрица переименований: [`/guide/option-rename-matrix`](/ru/guide/option-rename-matrix) -- Миграция v1: [`/guide/migrate-from-v1`](/ru/guide/migrate-from-v1) +- Матрица переименований: [`/migrations/option-rename-matrix`](/ru/migrations/option-rename-matrix) +- Миграция v1: [`/migrations/from-v1`](/ru/migrations/from-v1) diff --git a/websites/website/docs/ru/migrations/from-v3.md b/websites/website/docs/ru/migrations/from-v3.md new file mode 100644 index 00000000000..4746c880ebb --- /dev/null +++ b/websites/website/docs/ru/migrations/from-v3.md @@ -0,0 +1,86 @@ +# Миграция с v3.x + +Для `v3.x` основные риски миграции — **совместимость опций** и **изменения пакетов**. + +## Приоритетные изменения + +- `particles.color` -> `particles.paint.fill` +- `particles.stroke` -> `particles.paint.stroke` + +## Переименование пакетов + +Некоторые пакеты `v3.x` были переименованы или реструктурированы: + +| Пакет v3 | Текущий пакет | Примечание | +|---|---|---| +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Объединены в один плагин | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Объединены в один плагин | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Заменён системой paint | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Заменён системой paint | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Перемещён в `plugins/colors/hsv/`, то же имя | + +## Примеры соответствия опций + +До (стиль `v3.x`): + +```ts +const options = { + particles: { + color: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, +}; +``` + +После (текущий): + +```ts +const options = { + particles: { + paint: { + fill: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, + }, +}; +``` + +## Миграция Load API + +До (устаревший позиционный вызов): + +```ts +await tsParticles.load("tsparticles", options); +``` + +После (объектный параметр): + +```ts +await tsParticles.load({ + id: "tsparticles", + options, +}); +``` + +## Рекомендуемые шаги + +1. Приведите все пакеты `@tsparticles/*` к последней версии. +2. Замените устаревшие ключи опций (`particles.color`, `particles.stroke`) на `particles.paint.*`. +3. Обновите переименованные пакеты в `package.json` (см. таблицу выше). +4. Убедитесь, что пользовательские плагины/фигуры загружаются до `tsParticles.load(...)`. +5. Повторно протестируйте взаимодействия и сцены, критичные для производительности. + +## Ресурсы + +- Матрица переименований: [`/migrations/option-rename-matrix`](/ru/migrations/option-rename-matrix) +- `particles.paint`: [`/options/particles-paint`](/ru/options/particles-paint) diff --git a/websites/website/docs/ru/migrations/index.md b/websites/website/docs/ru/migrations/index.md new file mode 100644 index 00000000000..d055c6f802b --- /dev/null +++ b/websites/website/docs/ru/migrations/index.md @@ -0,0 +1,34 @@ +# Versioning & Migration + +Используйте этот раздел для навигации между основными версиями `tsParticles`, отслеживания релизов и понимания версионирования. + +## Руководства по миграции + +- [`Миграция с v3.x`](/ru/migrations/from-v3) +- [`Миграция с v2.x`](/ru/migrations/from-v2) +- [`Миграция с v1.x`](/ru/migrations/from-v1) + +## Быстрый путь + +- С `v3.x`: начните с [`/ru/migrations/from-v3`](/ru/migrations/from-v3) (фокус: изменения ключей опций + переименования пакетов). +- С `v2.x`: начните с [`/ru/migrations/from-v2`](/ru/migrations/from-v2) (фокус: API `load(...)` + опции). +- С `v1.x`: начните с [`/ru/migrations/from-v1`](/ru/migrations/from-v1) (фокус: пакеты, загрузчики, опции). + +## Где обычно возникают проблемы + +Большинство миграций между основными версиями нарушаются в двух местах: + +1. **Форма Load API** (старые позиционные параметры vs новый объектный параметр). +2. **Схема опций** (переименованные/перемещённые ключи). + +Если ваше приложение компилируется, но отображается неправильно, начните с сопоставления опций. + +## Быстрый поиск + +- [Матрица переименований опций](/ru/migrations/option-rename-matrix) — быстрое сопоставление устаревших и текущих ключей опций. + +## Также полезно + +- [Changelog](/ru/migrations/changelog) — последние заметки о релизах. +- [Релизы и Версионирование](/ru/migrations/releases) — правила выравнивания версий и чеклист релиза. +- [Миграция с particles.js](/ru/migrations/particles-js) — миграция с устаревшего `particles.js` или `canvas-confetti`. diff --git a/websites/website/docs/ru/guide/option-rename-matrix.md b/websites/website/docs/ru/migrations/option-rename-matrix.md similarity index 100% rename from websites/website/docs/ru/guide/option-rename-matrix.md rename to websites/website/docs/ru/migrations/option-rename-matrix.md diff --git a/websites/website/docs/ru/migration/index.md b/websites/website/docs/ru/migrations/particles-js.md similarity index 100% rename from websites/website/docs/ru/migration/index.md rename to websites/website/docs/ru/migrations/particles-js.md diff --git a/websites/website/docs/ru/releases/index.md b/websites/website/docs/ru/migrations/releases.md similarity index 100% rename from websites/website/docs/ru/releases/index.md rename to websites/website/docs/ru/migrations/releases.md diff --git a/websites/website/docs/zh/guide/getting-started.md b/websites/website/docs/zh/guide/getting-started.md index 33d7d637bd8..aad107d774b 100644 --- a/websites/website/docs/zh/guide/getting-started.md +++ b/websites/website/docs/zh/guide/getting-started.md @@ -94,7 +94,7 @@ pnpm add @tsparticles/configs - 预设目录:[`/demos/presets`](/zh/demos/presets) - 调色板目录:[`/demos/palettes`](/zh/demos/palettes) - 形状目录:[`/demos/shapes`](/zh/demos/shapes) -- 从 particles.js 迁移:[`/migration/`](/zh/migration/) +- 从 particles.js 迁移:[`/migrations/particles-js`](/zh/migrations/particles-js) - 颜色格式:[`/guide/color-formats`](/zh/guide/color-formats) - 容器生命周期:[`/guide/container-lifecycle`](/zh/guide/container-lifecycle) - 插件和自定义:[`/guide/plugins-customization`](/zh/guide/plugins-customization) diff --git a/websites/website/docs/zh/guide/installation.md b/websites/website/docs/zh/guide/installation.md index b63f028e472..4912be24fbd 100644 --- a/websites/website/docs/zh/guide/installation.md +++ b/websites/website/docs/zh/guide/installation.md @@ -99,7 +99,7 @@ await tsParticles.load({ - [`/guide/getting-started`](/zh/guide/getting-started) - [`/guide/wrappers`](/zh/guide/wrappers) - [`/demos/presets`](/zh/demos/presets) -- [`/migration/`](/zh/migration/) +- [`/migrations/particles-js`](/zh/migrations/particles-js) ## 旧版兼容 diff --git a/websites/website/docs/zh/guide/migrate-from-v3.md b/websites/website/docs/zh/guide/migrate-from-v3.md deleted file mode 100644 index 90f1c31595c..00000000000 --- a/websites/website/docs/zh/guide/migrate-from-v3.md +++ /dev/null @@ -1,30 +0,0 @@ -# 从 v3.x 迁移 - -从 `v3.x` 迁移时,最常见的问题是选项兼容性。 - -## 优先变更 - -- `particles.color` -> `particles.paint.fill` -- `particles.stroke` -> `particles.paint.stroke` - -## Load API 迁移 - -迁移前: - -```ts -await tsParticles.load("tsparticles", options); -``` - -迁移后: - -```ts -await tsParticles.load({ - id: "tsparticles", - options, -}); -``` - -## 参考 - -- 重命名矩阵: [`/guide/option-rename-matrix`](/zh/guide/option-rename-matrix) -- `particles.paint`: [`/options/particles-paint`](/zh/options/particles-paint) diff --git a/websites/website/docs/zh/guide/migrations.md b/websites/website/docs/zh/guide/migrations.md deleted file mode 100644 index 0ea6621dc8a..00000000000 --- a/websites/website/docs/zh/guide/migrations.md +++ /dev/null @@ -1,22 +0,0 @@ -# 迁移 - -本节用于在 `tsParticles` 的 major 版本之间迁移。 - -- [`从 v3.x 迁移`](/zh/guide/migrate-from-v3) -- [`从 v2.x 迁移`](/zh/guide/migrate-from-v2) -- [`从 v1.x 迁移`](/zh/guide/migrate-from-v1) - -## 常见问题点 - -1. **Load API 形态**(旧位置参数 vs 新单对象参数)。 -2. **选项结构**(键重命名/迁移)。 - -## 快速查阅 - -- 选项重命名矩阵: [`/guide/option-rename-matrix`](/zh/guide/option-rename-matrix) - -## 也建议查看 - -- 从 particles.js 迁移: [`/migration/`](/zh/migration/) -- 发布与版本策略: [`/releases/`](/zh/releases/) -- 最新发布说明: [`/changelog`](/zh/changelog) diff --git a/websites/website/docs/zh/index.md b/websites/website/docs/zh/index.md index c9cde1eb3d4..d4f2978af8f 100644 --- a/websites/website/docs/zh/index.md +++ b/websites/website/docs/zh/index.md @@ -49,7 +49,7 @@ features: 3. [`/playground/`](/zh/playground/):按命令启动演示并实时编辑 JSON。 4. [`/demos/`](/zh/demos/):可直接用于生产的配方示例。 5. [`/options/`](/zh/options/):根选项地图与深层链接。 -6. [`/migration/`](/zh/migration/):从 particles.js 迁移及兼容说明。 +6. [`/migrations/particles-js`](/zh/migrations/particles-js):从 particles.js 迁移及兼容说明。 7. [`/guide/wrappers`](/zh/guide/wrappers):官方 wrappers 与各 framework 入口。 8. [`/guide/plugins-customization`](/zh/guide/plugins-customization):自定义形状、presets 与 plugin 扩展。 9. [`/guide/templates-resources`](/zh/guide/templates-resources):起步仓库与可复用资源。 diff --git a/websites/website/docs/zh/changelog.md b/websites/website/docs/zh/migrations/changelog.md similarity index 100% rename from websites/website/docs/zh/changelog.md rename to websites/website/docs/zh/migrations/changelog.md diff --git a/websites/website/docs/zh/guide/migrate-from-v1.md b/websites/website/docs/zh/migrations/from-v1.md similarity index 70% rename from websites/website/docs/zh/guide/migrate-from-v1.md rename to websites/website/docs/zh/migrations/from-v1.md index 242452629e7..c6c93d95f3d 100644 --- a/websites/website/docs/zh/guide/migrate-from-v1.md +++ b/websites/website/docs/zh/migrations/from-v1.md @@ -26,5 +26,5 @@ await tsParticles.load({ ## 参考 -- 重命名矩阵: [`/guide/option-rename-matrix`](/zh/guide/option-rename-matrix) -- particles.js 迁移: [`/migration/`](/zh/migration/) +- 重命名矩阵: [`/migrations/option-rename-matrix`](/zh/migrations/option-rename-matrix) +- particles.js 迁移: [`/migrations/particles-js`](/zh/migrations/particles-js) diff --git a/websites/website/docs/zh/guide/migrate-from-v2.md b/websites/website/docs/zh/migrations/from-v2.md similarity index 76% rename from websites/website/docs/zh/guide/migrate-from-v2.md rename to websites/website/docs/zh/migrations/from-v2.md index 2d72b8d12e3..f9503c46c84 100644 --- a/websites/website/docs/zh/guide/migrate-from-v2.md +++ b/websites/website/docs/zh/migrations/from-v2.md @@ -34,5 +34,5 @@ await tsParticles.load({ ## 参考 -- 重命名矩阵: [`/guide/option-rename-matrix`](/zh/guide/option-rename-matrix) -- v1 迁移: [`/guide/migrate-from-v1`](/zh/guide/migrate-from-v1) +- 重命名矩阵: [`/migrations/option-rename-matrix`](/zh/migrations/option-rename-matrix) +- v1 迁移: [`/migrations/from-v1`](/zh/migrations/from-v1) diff --git a/websites/website/docs/zh/migrations/from-v3.md b/websites/website/docs/zh/migrations/from-v3.md new file mode 100644 index 00000000000..22ea24a2a3d --- /dev/null +++ b/websites/website/docs/zh/migrations/from-v3.md @@ -0,0 +1,86 @@ +# 从 v3.x 迁移 + +从 `v3.x` 迁移时,主要风险是**选项兼容性**和**包变更**。 + +## 优先变更 + +- `particles.color` -> `particles.paint.fill` +- `particles.stroke` -> `particles.paint.stroke` + +## 包重命名 + +部分 `v3.x` 包已重命名或重组: + +| v3 包 | 当前包 | 说明 | +|---|---|---| +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | 合并为单个插件 | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | 合并为单个插件 | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | 被 paint 系统取代 | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | 被 paint 系统取代 | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | 移动到 `plugins/colors/hsv/`,名称不变 | + +## 选项映射示例 + +迁移前(`v3.x` 风格): + +```ts +const options = { + particles: { + color: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, +}; +``` + +迁移后(当前): + +```ts +const options = { + particles: { + paint: { + fill: { + value: "#ff0000", + }, + stroke: { + width: 2, + color: "#000000", + }, + }, + }, +}; +``` + +## Load API 迁移 + +迁移前(旧式位置参数): + +```ts +await tsParticles.load("tsparticles", options); +``` + +迁移后(对象参数): + +```ts +await tsParticles.load({ + id: "tsparticles", + options, +}); +``` + +## 推荐步骤 + +1. 将所有 `@tsparticles/*` 包对齐到最新版本。 +2. 将弃用的选项键(`particles.color`、`particles.stroke`)替换为 `particles.paint.*`。 +3. 在 `package.json` 中更新重命名的包(见上表)。 +4. 确保自定义插件/形状在 `tsParticles.load(...)` 之前加载。 +5. 重新测试交互和性能敏感场景。 + +## 参考 + +- 重命名矩阵: [`/migrations/option-rename-matrix`](/zh/migrations/option-rename-matrix) +- `particles.paint`: [`/options/particles-paint`](/zh/options/particles-paint) diff --git a/websites/website/docs/zh/migrations/index.md b/websites/website/docs/zh/migrations/index.md new file mode 100644 index 00000000000..feb3e0542f5 --- /dev/null +++ b/websites/website/docs/zh/migrations/index.md @@ -0,0 +1,34 @@ +# Versioning & Migration + +使用此部分在 `tsParticles` 主要版本之间导航、跟踪发布和了解版本控制。 + +## 迁移指南 + +- [`从 v3.x 迁移`](/zh/migrations/from-v3) +- [`从 v2.x 迁移`](/zh/migrations/from-v2) +- [`从 v1.x 迁移`](/zh/migrations/from-v1) + +## 快速路线 + +- 从 `v3.x` 开始:查看 [`/zh/migrations/from-v3`](/zh/migrations/from-v3)(重点:选项键更改 + 包重命名)。 +- 从 `v2.x` 开始:查看 [`/zh/migrations/from-v2`](/zh/migrations/from-v2)(重点:`load(...)` API + 选项)。 +- 从 `v1.x` 开始:查看 [`/zh/migrations/from-v1`](/zh/migrations/from-v1)(重点:包、加载器、选项)。 + +## 迁移通常在哪里失败 + +大多数主要版本迁移会在两个地方失败: + +1. **Load API 形式**(旧的位置参数 vs 新的对象参数)。 +2. **选项模式**(重命名/移动的键)。 + +如果您的应用可以编译但显示错误,请从选项映射开始。 + +## 快速查找 + +- [选项重命名矩阵](/zh/migrations/option-rename-matrix) — 旧版与当前选项键的快速映射。 + +## 其他有用信息 + +- [更新日志](/zh/migrations/changelog) — 最新发布说明。 +- [发布与版本控制](/zh/migrations/releases) — 版本对齐规则和发布清单。 +- [particles.js 迁移](/zh/migrations/particles-js) — 从旧版 `particles.js` 或 `canvas-confetti` 迁移。 diff --git a/websites/website/docs/zh/guide/option-rename-matrix.md b/websites/website/docs/zh/migrations/option-rename-matrix.md similarity index 100% rename from websites/website/docs/zh/guide/option-rename-matrix.md rename to websites/website/docs/zh/migrations/option-rename-matrix.md diff --git a/websites/website/docs/zh/migration/index.md b/websites/website/docs/zh/migrations/particles-js.md similarity index 100% rename from websites/website/docs/zh/migration/index.md rename to websites/website/docs/zh/migrations/particles-js.md diff --git a/websites/website/docs/zh/releases/index.md b/websites/website/docs/zh/migrations/releases.md similarity index 100% rename from websites/website/docs/zh/releases/index.md rename to websites/website/docs/zh/migrations/releases.md From 39ed7cdb9cfdc13bd1d94563fe7c8196ac4d36e6 Mon Sep 17 00:00:00 2001 From: Matteo Bruni <176620+matteobruni@users.noreply.github.com> Date: Sun, 17 May 2026 16:52:20 +0200 Subject: [PATCH 3/4] build: updated website --- websites/website/docs/de/migrations/from-v3.md | 14 +++++++------- websites/website/docs/es/migrations/from-v3.md | 14 +++++++------- websites/website/docs/fr/migrations/from-v3.md | 14 +++++++------- websites/website/docs/hi/migrations/from-v3.md | 14 +++++++------- websites/website/docs/it/migrations/from-v3.md | 14 +++++++------- websites/website/docs/ja/migrations/from-v3.md | 14 +++++++------- websites/website/docs/migrations/from-v3.md | 14 +++++++------- websites/website/docs/pt/migrations/from-v3.md | 14 +++++++------- websites/website/docs/ru/migrations/from-v3.md | 14 +++++++------- websites/website/docs/zh/migrations/from-v3.md | 14 +++++++------- 10 files changed, 70 insertions(+), 70 deletions(-) diff --git a/websites/website/docs/de/migrations/from-v3.md b/websites/website/docs/de/migrations/from-v3.md index 95b575d4f3e..c33410477f1 100644 --- a/websites/website/docs/de/migrations/from-v3.md +++ b/websites/website/docs/de/migrations/from-v3.md @@ -11,13 +11,13 @@ Bei `v3.x` sind die groessten Migrationsrisiken die **Options-Kompatibilitaet** Einige `v3.x`-Pakete wurden umbenannt oder umstrukturiert: -| v3-Paket | Aktuelles Paket | Hinweis | -|---|---|---| -| `@tsparticles/move-base` | `@tsparticles/plugin-move` | In einem einzigen Plugin zusammengefuehrt | -| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | In einem einzigen Plugin zusammengefuehrt | -| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Durch Paint-System ersetzt | -| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Durch Paint-System ersetzt | -| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Nach `plugins/colors/hsv/` verschoben, gleicher Name | +| v3-Paket | Aktuelles Paket | Hinweis | +| ----------------------------------- | ------------------------------- | ---------------------------------------------------- | +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | In einem einzigen Plugin zusammengefuehrt | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | In einem einzigen Plugin zusammengefuehrt | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Durch Paint-System ersetzt | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Durch Paint-System ersetzt | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Nach `plugins/colors/hsv/` verschoben, gleicher Name | ## Beispiele fuer Optionszuordnung diff --git a/websites/website/docs/es/migrations/from-v3.md b/websites/website/docs/es/migrations/from-v3.md index 7187ec98a5e..a0df101c3d4 100644 --- a/websites/website/docs/es/migrations/from-v3.md +++ b/websites/website/docs/es/migrations/from-v3.md @@ -11,13 +11,13 @@ Desde `v3.x`, los principales riesgos son la **compatibilidad de opciones** y lo Algunos paquetes de `v3.x` han sido renombrados o reestructurados: -| Paquete v3 | Paquete actual | Nota | -|---|---|---| -| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Fusionados en un solo plugin | -| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Fusionados en un solo plugin | -| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Reemplazado por el sistema paint | -| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Reemplazado por el sistema paint | -| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Movido a `plugins/colors/hsv/`, mismo nombre | +| Paquete v3 | Paquete actual | Nota | +| ----------------------------------- | ------------------------------- | -------------------------------------------- | +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Fusionados en un solo plugin | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Fusionados en un solo plugin | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Reemplazado por el sistema paint | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Reemplazado por el sistema paint | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Movido a `plugins/colors/hsv/`, mismo nombre | ## Ejemplos de mapeo de opciones diff --git a/websites/website/docs/fr/migrations/from-v3.md b/websites/website/docs/fr/migrations/from-v3.md index 2dfc87e9a32..b2214772988 100644 --- a/websites/website/docs/fr/migrations/from-v3.md +++ b/websites/website/docs/fr/migrations/from-v3.md @@ -11,13 +11,13 @@ Depuis `v3.x`, les principaux risques de migration sont la **compatibilité des Certains paquets `v3.x` ont été renommés ou restructurés : -| Paquet v3 | Paquet actuel | Note | -|---|---|---| -| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Fusionnés en un seul plugin | -| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Fusionnés en un seul plugin | -| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Remplacé par le système paint | -| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Remplacé par le système paint | -| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Déplacé dans `plugins/colors/hsv/`, même nom | +| Paquet v3 | Paquet actuel | Note | +| ----------------------------------- | ------------------------------- | -------------------------------------------- | +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Fusionnés en un seul plugin | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Fusionnés en un seul plugin | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Remplacé par le système paint | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Remplacé par le système paint | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Déplacé dans `plugins/colors/hsv/`, même nom | ## Exemples de correspondance des options diff --git a/websites/website/docs/hi/migrations/from-v3.md b/websites/website/docs/hi/migrations/from-v3.md index 324520eef27..ef0d0da870d 100644 --- a/websites/website/docs/hi/migrations/from-v3.md +++ b/websites/website/docs/hi/migrations/from-v3.md @@ -11,13 +11,13 @@ कुछ `v3.x` पैकेजों का नाम बदल दिया गया है या पुनर्गठित किया गया है: -| v3 पैकेज | वर्तमान पैकेज | नोट | -|---|---|---| -| `@tsparticles/move-base` | `@tsparticles/plugin-move` | एकल प्लगइन में विलय | -| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | एकल प्लगइन में विलय | -| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | paint सिस्टम से बदला गया | -| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | paint सिस्टम से बदला गया | -| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | `plugins/colors/hsv/` में स्थानांतरित, same name | +| v3 पैकेज | वर्तमान पैकेज | नोट | +| ----------------------------------- | ------------------------------- | ------------------------------------------------ | +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | एकल प्लगइन में विलय | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | एकल प्लगइन में विलय | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | paint सिस्टम से बदला गया | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | paint सिस्टम से बदला गया | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | `plugins/colors/hsv/` में स्थानांतरित, same name | ## ऑप्शन मैपिंग उदाहरण diff --git a/websites/website/docs/it/migrations/from-v3.md b/websites/website/docs/it/migrations/from-v3.md index 7265b700c7d..dfefa5fb8cf 100644 --- a/websites/website/docs/it/migrations/from-v3.md +++ b/websites/website/docs/it/migrations/from-v3.md @@ -11,13 +11,13 @@ Da `v3.x`, i rischi principali in migrazione sono la **compatibilità delle opzi Alcuni pacchetti di `v3.x` sono stati rinominati o ristrutturati: -| Pacchetto v3 | Pacchetto attuale | Note | -|---|---|---| -| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Uniti in un singolo plugin | -| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Uniti in un singolo plugin | -| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Sostituito dal sistema paint | -| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Sostituito dal sistema paint | -| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Spostato in `plugins/colors/hsv/`, stesso nome | +| Pacchetto v3 | Pacchetto attuale | Note | +| ----------------------------------- | ------------------------------- | ---------------------------------------------- | +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Uniti in un singolo plugin | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Uniti in un singolo plugin | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Sostituito dal sistema paint | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Sostituito dal sistema paint | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Spostato in `plugins/colors/hsv/`, stesso nome | ## Esempi mappatura opzioni diff --git a/websites/website/docs/ja/migrations/from-v3.md b/websites/website/docs/ja/migrations/from-v3.md index 40535b19175..4394e2a5346 100644 --- a/websites/website/docs/ja/migrations/from-v3.md +++ b/websites/website/docs/ja/migrations/from-v3.md @@ -11,13 +11,13 @@ 一部の `v3.x` パッケージは名称変更または再構成されました: -| v3 パッケージ | 現在のパッケージ | 備考 | -|---|---|---| -| `@tsparticles/move-base` | `@tsparticles/plugin-move` | 1つのプラグインに統合 | -| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | 1つのプラグインに統合 | -| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | paint システムに置き換え | -| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | paint システムに置き換え | -| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | `plugins/colors/hsv/` に移動、名前は同じ | +| v3 パッケージ | 現在のパッケージ | 備考 | +| ----------------------------------- | ------------------------------- | ---------------------------------------- | +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | 1つのプラグインに統合 | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | 1つのプラグインに統合 | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | paint システムに置き換え | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | paint システムに置き換え | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | `plugins/colors/hsv/` に移動、名前は同じ | ## オプション対応例 diff --git a/websites/website/docs/migrations/from-v3.md b/websites/website/docs/migrations/from-v3.md index 3ee9a98ad7c..a0fa8950b48 100644 --- a/websites/website/docs/migrations/from-v3.md +++ b/websites/website/docs/migrations/from-v3.md @@ -78,13 +78,13 @@ await tsParticles.load({ Some `v3.x` packages have been renamed or restructured: -| v3 package | Current package | Note | -|---|---|---| -| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Merged into single plugin | -| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Merged into single plugin | -| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Replaced by paint system | -| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Replaced by paint system | -| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Moved to `plugins/colors/hsv/`, still the same package name | +| v3 package | Current package | Note | +| ----------------------------------- | ------------------------------- | ----------------------------------------------------------- | +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Merged into single plugin | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Merged into single plugin | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Replaced by paint system | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Replaced by paint system | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Moved to `plugins/colors/hsv/`, still the same package name | ## Recommended steps diff --git a/websites/website/docs/pt/migrations/from-v3.md b/websites/website/docs/pt/migrations/from-v3.md index 0c5564144cf..ba53f35c86d 100644 --- a/websites/website/docs/pt/migrations/from-v3.md +++ b/websites/website/docs/pt/migrations/from-v3.md @@ -11,13 +11,13 @@ Em `v3.x`, os maiores riscos de migracao sao a **compatibilidade das opcoes** e Alguns pacotes `v3.x` foram renomeados ou reestruturados: -| Pacote v3 | Pacote atual | Nota | -|---|---|---| -| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Unificados em um unico plugin | -| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Unificados em um unico plugin | -| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Substituido pelo sistema paint | -| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Substituido pelo sistema paint | -| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Movido para `plugins/colors/hsv/`, mesmo nome | +| Pacote v3 | Pacote atual | Nota | +| ----------------------------------- | ------------------------------- | --------------------------------------------- | +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Unificados em um unico plugin | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Unificados em um unico plugin | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Substituido pelo sistema paint | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Substituido pelo sistema paint | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Movido para `plugins/colors/hsv/`, mesmo nome | ## Exemplos de mapeamento de opcoes diff --git a/websites/website/docs/ru/migrations/from-v3.md b/websites/website/docs/ru/migrations/from-v3.md index 4746c880ebb..ad00b9d86ab 100644 --- a/websites/website/docs/ru/migrations/from-v3.md +++ b/websites/website/docs/ru/migrations/from-v3.md @@ -11,13 +11,13 @@ Некоторые пакеты `v3.x` были переименованы или реструктурированы: -| Пакет v3 | Текущий пакет | Примечание | -|---|---|---| -| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Объединены в один плагин | -| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Объединены в один плагин | -| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Заменён системой paint | -| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Заменён системой paint | -| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Перемещён в `plugins/colors/hsv/`, то же имя | +| Пакет v3 | Текущий пакет | Примечание | +| ----------------------------------- | ------------------------------- | -------------------------------------------- | +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | Объединены в один плагин | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | Объединены в один плагин | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | Заменён системой paint | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | Заменён системой paint | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | Перемещён в `plugins/colors/hsv/`, то же имя | ## Примеры соответствия опций diff --git a/websites/website/docs/zh/migrations/from-v3.md b/websites/website/docs/zh/migrations/from-v3.md index 22ea24a2a3d..5d1a23049dd 100644 --- a/websites/website/docs/zh/migrations/from-v3.md +++ b/websites/website/docs/zh/migrations/from-v3.md @@ -11,13 +11,13 @@ 部分 `v3.x` 包已重命名或重组: -| v3 包 | 当前包 | 说明 | -|---|---|---| -| `@tsparticles/move-base` | `@tsparticles/plugin-move` | 合并为单个插件 | -| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | 合并为单个插件 | -| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | 被 paint 系统取代 | -| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | 被 paint 系统取代 | -| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | 移动到 `plugins/colors/hsv/`,名称不变 | +| v3 包 | 当前包 | 说明 | +| ----------------------------------- | ------------------------------- | -------------------------------------- | +| `@tsparticles/move-base` | `@tsparticles/plugin-move` | 合并为单个插件 | +| `@tsparticles/move-parallax` | `@tsparticles/plugin-move` | 合并为单个插件 | +| `@tsparticles/updater-color` | `@tsparticles/updater-paint` | 被 paint 系统取代 | +| `@tsparticles/updater-stroke-color` | `@tsparticles/updater-paint` | 被 paint 系统取代 | +| `@tsparticles/plugin-hsv-color` | `@tsparticles/plugin-hsv-color` | 移动到 `plugins/colors/hsv/`,名称不变 | ## 选项映射示例 From bbc5a71d6fb7440d2bed0f223e470155bc8aef42 Mon Sep 17 00:00:00 2001 From: Matteo Bruni <176620+matteobruni@users.noreply.github.com> Date: Mon, 18 May 2026 08:58:15 +0200 Subject: [PATCH 4/4] build: updated website --- .../theme/components/RandomDemo.vue | 35 ++++++++++++++++--- .../theme/components/RandomDemoHero.vue | 2 +- websites/website/docs/ru/migrations/index.md | 2 +- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/websites/website/docs/.vitepress/theme/components/RandomDemo.vue b/websites/website/docs/.vitepress/theme/components/RandomDemo.vue index bee4a4add67..ed637807b92 100644 --- a/websites/website/docs/.vitepress/theme/components/RandomDemo.vue +++ b/websites/website/docs/.vitepress/theme/components/RandomDemo.vue @@ -19,6 +19,7 @@ const canvasRef = ref(null); let cycleTimer: ReturnType | undefined; let initialized = false; +let isMounted = true; function pickRandom(): string { return configKeys[Math.floor(Math.random() * configKeys.length)]; @@ -65,12 +66,30 @@ async function loadAndStart(key: string) { async function nextRandom() { const newKey = pickRandom(); currentKey.value = newKey; - await loadAndStart(newKey); - resetCycle(); + + try { + await loadAndStart(newKey); + } catch (error) { + console.error("[RandomDemo] Failed to load random config", error); + + return; + } + + if (isMounted) { + resetCycle(); + } } function resetCycle() { - if (cycleTimer) clearTimeout(cycleTimer); + if (!isMounted) { + return; + } + + if (cycleTimer) { + clearTimeout(cycleTimer); + cycleTimer = undefined; + } + cycleTimer = setTimeout(nextRandom, 10000); } @@ -80,7 +99,13 @@ onMounted(async () => { }); onUnmounted(() => { - if (cycleTimer) clearTimeout(cycleTimer); + isMounted = false; + + if (cycleTimer) { + clearTimeout(cycleTimer); + cycleTimer = undefined; + } + const container = tsParticles.items.find((c) => c.id === containerId); if (container) container.destroy(); }); @@ -92,7 +117,7 @@ onUnmounted(() => {
{{ currentTitle }} -
diff --git a/websites/website/docs/ru/migrations/index.md b/websites/website/docs/ru/migrations/index.md index d055c6f802b..1ec23597d42 100644 --- a/websites/website/docs/ru/migrations/index.md +++ b/websites/website/docs/ru/migrations/index.md @@ -1,4 +1,4 @@ -# Versioning & Migration +# Версионирование и миграция Используйте этот раздел для навигации между основными версиями `tsParticles`, отслеживания релизов и понимания версионирования.