M0-M11 狩夜人笔记初始实现:11里程碑+86测试

This commit is contained in:
hunter-dev
2026-08-24 20:35:22 +08:00
commit 3ebd33536b
106 changed files with 10490 additions and 0 deletions
@@ -0,0 +1,20 @@
import { useEffect, useRef } from 'react';
import { EffectEngine } from '../effects/effect-engine';
import { useAppearance } from '../appearance/appearance-store';
export function EffectLayer() {
const ref = useRef<HTMLCanvasElement>(null);
const engineRef = useRef<EffectEngine | null>(null);
const appearance = useAppearance();
// M6 骨架:默认关闭,外观面板后续接入选择
useEffect(() => {
if (!ref.current) return;
const eng = new EffectEngine();
eng.attach(ref.current);
eng.setColor(appearance.draft.accent);
eng.setType('off'); // 默认关闭,待外观面板接入开启
engineRef.current = eng;
return () => eng.detach();
}, []);
return <canvas ref={ref} style={{ position: 'fixed', inset: 0, pointerEvents: 'none', zIndex: 9999 }} />;
}