本文へ移動
cccskills
無料GitHub で公開

vantajs

Use when adding animated WebGL background effects with Vanta.js (setup, parameters, resizing, performance, integration in React/Next.js).

インストール方法を見る

含まれるファイル(5)

  • SKILL.md2.0 KB
  • demo/index.html15.8 KB
  • demo/preview.jpg38.6 KB
  • demo/PROMPT.md1.8 KB
  • REFERENCES.md124 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Vanta.js — Animated WebGL Backgrounds Skill

When to use

  • Decorative animated backgrounds behind hero sections
  • You want “wow” quickly without building a full three.js scene
  • Lightweight integration into static sites or React/Vue

How it works

  • Vanta injects a canvas into a container element and renders an effect (many use three.js).
  • Typical usage: include three.min.js (or provide THREE) + one Vanta effect bundle.

Key APIs/patterns

  • Init:
    • const effect = VANTA.WAVES({ el: "#hero", ...options })
  • Update after init:
    • effect.setOptions({ color: 0xff88cc })
  • Resize:
    • effect.resize() (if container size changes)
  • Cleanup:
    • effect.destroy() (important in SPAs)

Common pitfalls

  • Container has no size → nothing visible
    • Ensure the target element has explicit width/height (or is laid out).
  • Multiple WebGL canvases on one page → GPU load
    • Keep to 1–2 effects/page.
  • Mobile/older GPU issues
    • Provide a fallback background color/image; consider disabling on small screens.
  • Bundling in frameworks
    • Some builds require window.THREE or passing THREE in options.

Quick recipes

1) Minimal waves background

<div id="hero" style="height: 70vh;"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta/dist/vanta.waves.min.js"></script>
<script>
  const effect = VANTA.WAVES({ el: "#hero", color: 0x0b1220, shininess: 40, waveHeight: 16, zoom: 0.9 });
</script>

2) React cleanup pattern (concept)

  • Create effect in useEffect, store in ref, call destroy() on unmount.

What to ask the user

  • Which effect (waves, birds, fog, net, etc.) and brand colors?
  • Must it run on mobile? If yes, what’s acceptable FPS/quality?
  • Is it behind text (needs contrast/readability)?

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Build convincing woven cloth in Three.js, with a thread-level weave normal map, sheen and anisotropic highlights, folds that never stretch the texture, hems with thickness, stitches, seams, frayed edges, fold occlusion, dye and wear variation, and light passing through thin fabric. Use for linen, silk, wool, canvas, curtains, banners, cloaks, tablecloths, tapestries or any 3D drape that currently looks like a plastic sheet, a stretched texture, or a flat coloured plane.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7372026年10月6日 更新

Build recognizable falling leaves in world space using instanced geometry, independent tumble, coupled sideways drift, shared wind, scene occlusion, and camera-aware recycling. Use for 3D autumn leaves or drifting foliage in Three.js and similar scenes; use falling-leaves for a 2D canvas overlay.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7372026年10月6日 更新

Add coordinated spring, summer, fall, and winter states to a 3D scene, blending foliage, sunlight, sky, ground materials, snow, and particles without rebuilding the world. Use for seasonal controls, architectural walkthroughs, and outdoor scenes with four-season transitions.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7372026年10月6日 更新

Create or integrate highly detailed 3D models with smooth silhouettes, shaped surfaces, believable bevels, and close-up geometry, then prepare suitable runtime LODs and loading. Use when a user requests high polygon counts, ultra-realistic models, detailed architectural assets, or removal of visibly faceted geometry.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7372026年10月6日 更新

Build sharp, physically coherent high-resolution materials for 3D rendering with appropriate PBR maps, texel density, UV direction, mipmaps, anisotropic filtering, and progressive asset delivery. Use for detailed wood, stone, fabric, foliage, and architectural close-ups without excessive download or GPU memory costs.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7372026年10月6日 更新

Build hyperrealistic PBR metal in Three.js: steel, brass, gold, copper and iron as true conductors (metalness 1, measured F0 tint, no albedo) with roughness-varied finishes (polished, brushed anisotropic, aged with patina and worn edges) lit by a dark HDR studio of real bright window cards prefiltered with PMREM. Use when metal looks like grey plastic, a dull blur, or a black hole; when blades, tools, rings, ingots, hardware or product metal need reflections with edges and structure; or when a finish needs scratches, streaks, fingerprints and bevels that catch light.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7372026年10月6日 更新

MengTo のスキルをすべて見る

このスキルの問題を報告する