方法 1:実際の読み込み進捗と連動する(Vue / React・Pro)
0〜100 の progress Prop を渡すと、進捗 100 でロゴが完成するように粒子を制御できます:
import { PixelLogoLoader } from './components/PixelLogoLoader';
<PixelLogoLoader progress={progress} height={360} />
実装例は Vue 3 ガイド・React ガイドをご覧ください。
方法 2:無料 HTML をオーバーレイ表示してロード後に閉じる
<body> 先頭にオーバーレイを配置し、load イベント後に(最低 1.5 秒表示してから)削除します:
<div id="logo-loader" style="position:fixed;inset:0;z-index:9999;background:#000;display:grid;place-items:center">
<iframe src="/particle-logo/index.html" title="Loading" width="480" height="520" style="border:0;max-width:100%"></iframe>
</div>
<script>
const loader = document.getElementById('logo-loader');
const shownAt = performance.now();
const MIN_MS = 1500; // 最低 1.5 秒はアニメーションを表示
function hide() {
setTimeout(() => loader.remove(), Math.max(0, MIN_MS - (performance.now() - shownAt)));
}
if (document.readyState === 'complete') hide();
else window.addEventListener('load', hide);
</script>
視差効果を減らす設定への配慮
Vue / React では固定値 progress={100} を渡し、オーバーレイ方式では表示自体をスキップできます。
ダウンロードされるファイルサイズ実測
2026年11月3日 計測の実測サイズ(ステップ 4、括弧内は gzip):
| テスト画像 | サンプリング点数 | HTML ファイル | Vue コンポーネント | React コンポーネント |
|---|---|---|---|---|
| 白の4文字ワードマーク(単色) | 589 | 22.4 KB (6.4 KB gzip) | 24.2 KB (6.9 KB gzip) | 25.1 KB (7.0 KB gzip) |
| 5色の幾何学マーク | 4,139 | 66.5 KB (12.3 KB gzip) | 68.2 KB (12.9 KB gzip) | 69.2 KB (13.1 KB gzip) |
| Particle Logo 自身のマーク(シルバー単色) | 7,082 | 35.8 KB (11.0 KB gzip) | 37.5 KB (11.6 KB gzip) | 38.4 KB (11.7 KB gzip) |
最大 1,600 点を内蔵し実行時の外部通信はありません。料金プランもご覧ください。