ラッパー: @tsparticles/preact
tsParticles の公式 Preact ラッパー。
インストール
bash
pnpm add @tsparticles/preact @tsparticles/engine @tsparticles/slim簡単なセットアップの流れ
- ラッパー + エンジン + ローダー パッケージをインストールします。
- アプリのルートでエンジンを一度初期化します。
- オプション オブジェクトを使用して Preact コンポーネントをレンダリングします。
モノリポジトリ参照
- パッケージフォルダー: https://github.com/tsparticles/tsparticles/tree/main/wrappers/preact
- デモアプリ: https://github.com/tsparticles/tsparticles/tree/main/demo/preact
