包装:@tsparticles/preact
tsParticles 的官方 Preact 包装器。
安装
bash
pnpm add @tsparticles/preact @tsparticles/engine @tsparticles/slim快速设置流程
1.安装wrapper+engine+loader包。2. 在应用程序根目录初始化引擎一次。3. 使用选项对象渲染 Preact 组件。
Monorepo 参考资料
- 包文件夹:https://github.com/tsparticles/tsparticles/tree/main/wrappers/preact
- 演示应用程序:https://github.com/tsparticles/tsparticles/tree/main/demo/preact
