包装:@tsparticles/webcomponents
tsParticles 的官方 Web 组件包装器 (<web-particles />)。
安装
bash
pnpm add @tsparticles/webcomponents @tsparticles/engine @tsparticles/slim快速设置流程
1.安装包+引擎+加载器包。2. 在您的应用程序 shell 中注册自定义元素。3. 使用 <web-particles /> 并传递选项。
Monorepo 参考资料
- 包文件夹:https://github.com/tsparticles/tsparticles/tree/main/wrappers/webcomponents
- 演示应用程序:https://github.com/tsparticles/tsparticles/tree/main/demo/webcomponents
