From 66668d85d603c5841d755a6023aa1925559fc6d4 Mon Sep 17 00:00:00 2001
From: 苏向夜 <fu050409@163.com>
Date: Wed, 25 Feb 2026 01:32:51 +0800
Subject: chore(workspace): replace legacy codes

---
 .../ui/src/components/ParticleBackground.svelte    | 70 ----------------------
 1 file changed, 70 deletions(-)
 delete mode 100644 packages/ui/src/components/ParticleBackground.svelte

(limited to 'packages/ui/src/components/ParticleBackground.svelte')

diff --git a/packages/ui/src/components/ParticleBackground.svelte b/packages/ui/src/components/ParticleBackground.svelte
deleted file mode 100644
index 7644b1a..0000000
--- a/packages/ui/src/components/ParticleBackground.svelte
+++ /dev/null
@@ -1,70 +0,0 @@
-<script lang="ts" module>
-  import { SaturnEffect } from "../lib/effects/SaturnEffect";
-  
-  // Global reference to the active Saturn effect for external control
-  let globalSaturnEffect: SaturnEffect | null = null;
-  
-  export function getSaturnEffect(): SaturnEffect | null {
-    return globalSaturnEffect;
-  }
-</script>
-
-<script lang="ts">
-  import { onMount, onDestroy } from "svelte";
-  import { ConstellationEffect } from "../lib/effects/ConstellationEffect";
-  import { settingsState } from "../stores/settings.svelte";
-
-  let canvas: HTMLCanvasElement;
-  let activeEffect: any;
-
-  function loadEffect() {
-    if (activeEffect) {
-      activeEffect.destroy();
-    }
-    
-    if (!canvas) return;
-
-    if (settingsState.settings.active_effect === "saturn") {
-      activeEffect = new SaturnEffect(canvas);
-      globalSaturnEffect = activeEffect;
-    } else {
-      activeEffect = new ConstellationEffect(canvas);
-      globalSaturnEffect = null;
-    }
-    
-    // Ensure correct size immediately
-    activeEffect.resize(window.innerWidth, window.innerHeight);
-  }
-
-  $effect(() => {
-    const _ = settingsState.settings.active_effect;
-    if (canvas) {
-        loadEffect();
-    }
-  });
-
-  onMount(() => {
-    const resizeObserver = new ResizeObserver(() => {
-      if (canvas && activeEffect) {
-         activeEffect.resize(window.innerWidth, window.innerHeight);
-      }
-    });
-    
-    resizeObserver.observe(document.body);
-    
-    return () => {
-      resizeObserver.disconnect();
-      if (activeEffect) activeEffect.destroy();
-    };
-  });
-  
-  onDestroy(() => {
-    if (activeEffect) activeEffect.destroy();
-    globalSaturnEffect = null;
-  });
-</script>
-
-<canvas
-  bind:this={canvas}
-  class="absolute inset-0 z-0 pointer-events-none"
-></canvas>
-- 
cgit v1.2.3-70-g09d2

