Agent Skills by ALSEL
Anthropic Claudeその他⭐ リポ 0品質スコア 50/100

lightweight-3d-effects

Zdog・Vanta.js・Vanilla-Tilt.js を使い、装飾要素やマイクロインタラクションに軽量な3Dエフェクトを追加するスキルです。擬似3Dイラスト・アニメーション背景・視差チルト効果・ヒーローセクションのアニメーションなど、重厚なフレームワークなしで奥行き感のある表現を実装したい場合に使用します。パフォーマンスを重視したランディングページやカードのチルトエフェクトにも最適です。

description の原文を見る

Lightweight 3D effects for decorative elements and micro-interactions using Zdog, Vanta.js, and Vanilla-Tilt.js. Use this skill when adding pseudo-3D illustrations, animated backgrounds, parallax tilt effects, decorative 3D elements, or subtle depth effects without heavy frameworks. Triggers on tasks involving Zdog pseudo-3D, Vanta.js backgrounds, Vanilla-Tilt parallax, card tilt effects, hero section animations, or lightweight landing page visuals. Ideal for performance-focused designs.

SKILL.md 本文

軽量 3D エフェクト スキル

概要

このスキルは、装飾的 3D 要素とマイクロインタラクションのための 3 つの強力なライブラリを組み合わせています:

  • Zdog: デザイナーに優しいベクター イラストのための疑似 3D エンジン
  • Vanta.js: Three.js/p5.js で駆動されたアニメーション 3D 背景
  • Vanilla-Tilt.js: マウス/ジャイロスコープに応答する滑らかな視差チルト効果

このスキルをいつ使用するか

  • 重いフレームワークなしで装飾的 3D イラストを追加する
  • ヒーロー セクション用にアニメーション背景を作成する
  • カード/画像に微妙な視差チルト効果を実装する
  • 視覚的な奥行きを持つ軽量ランディング ページを構築する
  • パフォーマンスへの影響がないマイクロインタラクションを追加する

Zdog - 疑似 3D イラスト

基本概念

Zdog は、Canvas または SVG を使用して、平坦で丸いデザインを 3D 空間にレンダリングする疑似 3D エンジンです。

主な機能:

  • デザイナーに優しい宣言型 API
  • 小さいファイル サイズ(ミニファイ時 ~28kb)
  • Canvas または SVG レンダリング
  • ドラッグ回転が組み込まれている
  • スムーズなアニメーション

基本セットアップ

<!DOCTYPE html>
<html>
<head>
  <script src="https://unpkg.com/zdog@1/dist/zdog.dist.min.js"></script>
  <style>
    .zdog-canvas {
      display: block;
      margin: 0 auto;
      background: #FDB;
      cursor: move;
    }
  </style>
</head>
<body>
  <canvas class="zdog-canvas" width="240" height="240"></canvas>

  <script>
    let isSpinning = true;

    let illo = new Zdog.Illustration({
      element: '.zdog-canvas',
      zoom: 4,
      dragRotate: true,
      onDragStart: function() {
        isSpinning = false;
      },
    });

    // Add shapes
    new Zdog.Ellipse({
      addTo: illo,
      diameter: 20,
      translate: { z: 10 },
      stroke: 5,
      color: '#636',
    });

    new Zdog.Rect({
      addTo: illo,
      width: 20,
      height: 20,
      translate: { z: -10 },
      stroke: 3,
      color: '#E62',
      fill: true,
    });

    function animate() {
      illo.rotate.y += isSpinning ? 0.03 : 0;
      illo.updateRenderGraph();
      requestAnimationFrame(animate);
    }
    animate();
  </script>
</body>
</html>

Zdog の図形

基本図形:

// Circle
new Zdog.Ellipse({
  addTo: illo,
  diameter: 80,
  stroke: 20,
  color: '#636',
});

// Rectangle
new Zdog.Rect({
  addTo: illo,
  width: 80,
  height: 60,
  stroke: 10,
  color: '#E62',
  fill: true,
});

// Rounded Rectangle
new Zdog.RoundedRect({
  addTo: illo,
  width: 60,
  height: 40,
  cornerRadius: 10,
  stroke: 4,
  color: '#C25',
  fill: true,
});

// Polygon
new Zdog.Polygon({
  addTo: illo,
  radius: 40,
  sides: 5,
  stroke: 8,
  color: '#EA0',
  fill: true,
});

// Line
new Zdog.Shape({
  addTo: illo,
  path: [
    { x: -40, y: 0 },
    { x: 40, y: 0 },
  ],
  stroke: 6,
  color: '#636',
});

// Bezier Curve
new Zdog.Shape({
  addTo: illo,
  path: [
    { x: -40, y: -20 },
    {
      bezier: [
        { x: -40, y: 20 },
        { x: 40, y: 20 },
        { x: 40, y: -20 },
      ],
    },
  ],
  stroke: 4,
  color: '#C25',
  closed: false,
});

Zdog グループ

複雑なモデルのための図形をグループに整理します:

// Create a group
let head = new Zdog.Group({
  addTo: illo,
  translate: { y: -40 },
});

// Add shapes to group
new Zdog.Ellipse({
  addTo: head,
  diameter: 60,
  stroke: 30,
  color: '#FED',
});

// Eyes
new Zdog.Ellipse({
  addTo: head,
  diameter: 8,
  stroke: 4,
  color: '#333',
  translate: { x: -10, z: 15 },
});

new Zdog.Ellipse({
  addTo: head,
  diameter: 8,
  stroke: 4,
  color: '#333',
  translate: { x: 10, z: 15 },
});

// Mouth
new Zdog.Shape({
  addTo: head,
  path: [
    { x: -10, y: 0 },
    {
      bezier: [
        { x: -5, y: 5 },
        { x: 5, y: 5 },
        { x: 10, y: 0 },
      ],
    },
  ],
  stroke: 2,
  color: '#333',
  translate: { y: 5, z: 15 },
  closed: false,
});

// Rotate entire group
head.rotate.y = Math.PI / 4;

Zdog アニメーション

// Continuous rotation
function animate() {
  illo.rotate.y += 0.03;
  illo.updateRenderGraph();
  requestAnimationFrame(animate);
}
animate();

// Bounce animation
let t = 0;
function bounceAnimate() {
  t += 0.05;
  illo.translate.y = Math.sin(t) * 20;
  illo.updateRenderGraph();
  requestAnimationFrame(bounceAnimate);
}
bounceAnimate();

// Interactive rotation with easing
let targetRotateY = 0;
let currentRotateY = 0;

document.addEventListener('mousemove', (event) => {
  targetRotateY = (event.clientX / window.innerWidth - 0.5) * Math.PI;
});

function smoothAnimate() {
  // Ease towards target
  currentRotateY += (targetRotateY - currentRotateY) * 0.1;
  illo.rotate.y = currentRotateY;
  illo.updateRenderGraph();
  requestAnimationFrame(smoothAnimate);
}
smoothAnimate();

Vanta.js - アニメーション 3D 背景

基本概念

Vanta.js は、Three.js または p5.js で駆動される、最小限のセットアップでアニメーション WebGL 背景を提供します。

主な機能:

  • 14 以上のアニメーション エフェクト(Waves、Birds、Net、Clouds など)
  • マウス/タッチ インタラクション
  • カスタマイズ可能な色と設定
  • 総合 ~120KB(Three.js を含む)
  • ほとんどのデバイスで 60fps

基本セットアップ

<!DOCTYPE html>
<html>
<head>
  <style>
    #vanta-bg {
      width: 100%;
      height: 100vh;
    }
    .content {
      position: relative;
      z-index: 1;
      color: white;
      text-align: center;
      padding: 100px 20px;
    }
  </style>
</head>
<body>
  <div id="vanta-bg">
    <div class="content">
      <h1>My Animated Background</h1>
      <p>Content goes here</p>
    </div>
  </div>

  <!-- Three.js (required) -->
  <script src="https://cdn.jsdelivr.net/npm/three@0.134.0/build/three.min.js"></script>

  <!-- Vanta.js effect -->
  <script src="https://cdn.jsdelivr.net/npm/vanta@0.5.24/dist/vanta.waves.min.js"></script>

  <script>
    VANTA.WAVES({
      el: "#vanta-bg",
      mouseControls: true,
      touchControls: true,
      gyroControls: false,
      minHeight: 200.00,
      minWidth: 200.00,
      scale: 1.00,
      scaleMobile: 1.00,
      color: 0x23153c,
      shininess: 30.00,
      waveHeight: 15.00,
      waveSpeed: 0.75,
      zoom: 0.65
    });
  </script>
</body>
</html>

利用可能なエフェクト

1. WAVES (Three.js)

VANTA.WAVES({
  el: "#vanta-bg",
  color: 0x23153c,
  shininess: 30,
  waveHeight: 15,
  waveSpeed: 0.75,
  zoom: 0.65
});

2. CLOUDS (Three.js)

VANTA.CLOUDS({
  el: "#vanta-bg",
  skyColor: 0x68b8d7,
  cloudColor: 0xadc1de,
  cloudShadowColor: 0x183550,
  sunColor: 0xff9919,
  sunGlareColor: 0xff6633,
  sunlightColor: 0xff9933,
  speed: 1.0
});

3. BIRDS (p5.js が必要)

<script src="https://cdn.jsdelivr.net/npm/p5@1.4.0/lib/p5.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@0.5.24/dist/vanta.birds.min.js"></script>

<script>
  VANTA.BIRDS({
    el: "#vanta-bg",
    backgroundColor: 0x23153c,
    color1: 0xff0000,
    color2: 0x0000ff,
    birdSize: 1.5,
    wingSpan: 20,
    speedLimit: 5,
    separation: 40,
    alignment: 40,
    cohesion: 40,
    quantity: 3
  });
</script>

4. NET (Three.js)

VANTA.NET({
  el: "#vanta-bg",
  color: 0x3fff00,
  backgroundColor: 0x23153c,
  points: 10,
  maxDistance: 20,
  spacing: 15,
  showDots: true
});

5. CELLS (p5.js が必要)

VANTA.CELLS({
  el: "#vanta-bg",
  color1: 0x00ff00,
  color2: 0xff0000,
  size: 1.5,
  speed: 1.0,
  scale: 1.0
});

6. FOG (Three.js)

VANTA.FOG({
  el: "#vanta-bg",
  highlightColor: 0xff3f81,
  midtoneColor: 0x1d004d,
  lowlightColor: 0x2b1a5e,
  baseColor: 0x000000,
  blurFactor: 0.6,
  speed: 1.0,
  zoom: 1.0
});

その他のエフェクト: GLOBE、TRUNK、TOPOLOGY、DOTS、HALO、RINGS

設定オプション

// すべてのエフェクト共通のオプション
{
  el: "#element-id",              // 必須:ターゲット要素
  mouseControls: true,             // マウス インタラクションを有効にする
  touchControls: true,             // タッチ インタラクションを有効にする
  gyroControls: false,             // デバイス方向
  minHeight: 200.00,               // 最小高さ
  minWidth: 200.00,                // 最小幅
  scale: 1.00,                     // サイズ スケール
  scaleMobile: 1.00,               // モバイル スケール

  // 色(16 進数文字列ではなく数字)
  color: 0x23153c,
  backgroundColor: 0x000000,

  // パフォーマンス
  forceAnimate: false,             // 非表示時もアニメーションを強制

  // エフェクト固有のオプションはエフェクトごとに異なります
}

Vanta.js メソッド

// 初期化して参照を保存する
const vantaEffect = VANTA.WAVES({
  el: "#vanta-bg",
  // ... options
});

// 完了時に破棄する(SPA の場合重要)
vantaEffect.destroy();

// オプションを動的に更新する
vantaEffect.setOptions({
  color: 0xff0000,
  waveHeight: 20
});

// リサイズ(通常は自動)
vantaEffect.resize();

React インテグレーション

import { useEffect, useRef, useState } from 'react';
import VANTA from 'vanta/dist/vanta.waves.min';
import * as THREE from 'three';

function VantaBackground() {
  const vantaRef = useRef(null);
  const [vantaEffect, setVantaEffect] = useState(null);

  useEffect(() => {
    if (!vantaEffect) {
      setVantaEffect(VANTA.WAVES({
        el: vantaRef.current,
        THREE: THREE,
        mouseControls: true,
        touchControls: true,
        color: 0x23153c,
        shininess: 30,
        waveHeight: 15,
        waveSpeed: 0.75
      }));
    }

    return () => {
      if (vantaEffect) vantaEffect.destroy();
    };
  }, [vantaEffect]);

  return (
    <div ref={vantaRef} style={{ width: '100%', height: '100vh' }}>
      <div className="content">
        <h1>React + Vanta.js</h1>
      </div>
    </div>
  );
}

Vanilla-Tilt.js - 視差チルト効果

基本概念

Vanilla-Tilt.js は、マウスの移動とデバイス方向に応答する滑らかな 3D チルト効果を追加します。

主な機能:

  • 軽量(ミニファイ時 ~8.5kb)
  • 依存関係なし
  • ジャイロスコープ サポート
  • オプションのグレア効果
  • スムーズなトランジション

基本セットアップ

<!DOCTYPE html>
<html>
<head>
  <style>
    .tilt-card {
      width: 300px;
      height: 400px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border-radius: 15px;
      margin: 50px auto;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 24px;
      transform-style: preserve-3d;
    }

    .tilt-inner {
      transform: translateZ(60px);
    }
  </style>
</head>
<body>
  <div class="tilt-card" data-tilt>
    <div class="tilt-inner">Hover Me!</div>
  </div>

  <script src="https://cdn.jsdelivr.net/npm/vanilla-tilt@1.8.1/dist/vanilla-tilt.min.js"></script>
</body>
</html>

設定オプション

VanillaTilt.init(document.querySelector(".tilt-card"), {
  // 回転
  max: 25,                    // 最大チルト角度(度)
  reverse: false,             // チルト方向を反転する
  startX: 0,                  // 初期チルト X(度)
  startY: 0,                  // 初期チルト Y(度)

  // 外観
  perspective: 1000,          // トランスフォーム パースペクティブ(低いほど激しい)
  scale: 1.1,                 // ホバー時のスケール(1 = スケールなし)

  // アニメーション
  speed: 400,                 // トランジション速度(ミリ秒)
  transition: true,           // スムーズなトランジションを有効にする
  easing: "cubic-bezier(.03,.98,.52,.99)",

  // 動作
  axis: null,                 // 「x」または「y」軸に制限する
  reset: true,                // マウス離脱時にリセットする
  "reset-to-start": true,     // [0,0] vs 開始位置にリセットする

  // グレア効果
  glare: true,                // グレアを有効にする
  "max-glare": 0.5,          // グレア不透明度(0-1)
  "glare-prerender": false,   // グレア要素を事前レンダリングする

  // 高度な設定
  "full-page-listening": false, // ページ全体をリッスンする
  gyroscope: true,            // デバイス方向を有効にする
  gyroscopeMinAngleX: -45,    // 最小 X 角度
  gyroscopeMaxAngleX: 45,     // 最大 X 角度
  gyroscopeMinAngleY: -45,    // 最小 Y 角度
  gyroscopeMaxAngleY: 45,     // 最大 Y 角度
  gyroscopeSamples: 10        // キャリブレーション サンプル
});

高度な例

グレア効果付きカード:

<div class="tilt-card" data-tilt
     data-tilt-glare
     data-tilt-max-glare="0.5"
     data-tilt-scale="1.1">
  <div class="tilt-inner">
    <h3>Premium Card</h3>
    <p>With glare effect</p>
  </div>
</div>

層状 3D エフェクト:

<style>
  .tilt-card {
    transform-style: preserve-3d;
  }
  .layer-1 {
    transform: translateZ(20px);
  }
  .layer-2 {
    transform: translateZ(40px);
  }
  .layer-3 {
    transform: translateZ(60px);
  }
</style>

<div class="tilt-card" data-tilt data-tilt-max="15">
  <div class="layer-1">Background</div>
  <div class="layer-2">Middle</div>
  <div class="layer-3">Front</div>
</div>

プログラマティック制御:

const element = document.querySelector(".tilt-card");

VanillaTilt.init(element, {
  max: 25,
  speed: 400,
  glare: true,
  "max-glare": 0.5
});

// チルト値を取得する
element.addEventListener("tiltChange", (e) => {
  console.log("Tilt:", e.detail);
});

// プログラマティックにリセットする
element.vanillaTilt.reset();

// インスタンスを破棄する
element.vanillaTilt.destroy();

// 現在の値を取得する
const values = element.vanillaTilt.getValues();
console.log(values); // { tiltX, tiltY, percentageX, percentageY, angle }

React インテグレーション

import { useEffect, useRef } from 'react';
import VanillaTilt from 'vanilla-tilt';

function TiltCard({ children, options }) {
  const tiltRef = useRef(null);

  useEffect(() => {
    const element = tiltRef.current;

    VanillaTilt.init(element, {
      max: 25,
      speed: 400,
      glare: true,
      "max-glare": 0.5,
      ...options
    });

    return () => {
      element.vanillaTilt.destroy();
    };
  }, [options]);

  return (
    <div ref={tiltRef} className="tilt-card">
      {children}
    </div>
  );
}

// 使用例
<TiltCard options={{ max: 30, scale: 1.1 }}>
  <h3>My Card</h3>
</TiltCard>

よく使われるパターン

パターン 1:Vanta + コンテンツを使用したヒーロー セクション

<section id="hero">
  <div class="hero-content">
    <h1>Welcome</h1>
    <p>Animated background with content overlay</p>
    <button>Get Started</button>
  </div>
</section>

<style>
  #hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }

  .hero-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    padding-top: 20vh;
  }
</style>

<script src="https://cdn.jsdelivr.net/npm/three@0.134.0/build/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@0.5.24/dist/vanta.waves.min.js"></script>

<script>
  VANTA.WAVES({
    el: "#hero",
    mouseControls: true,
    touchControls: true,
    color: 0x23153c,
    waveHeight: 20,
    waveSpeed: 1.0
  });
</script>

パターン 2:Zdog アイコン グリッド

<div class="icon-grid">
  <canvas class="icon" width="120" height="120"></canvas>
  <canvas class="icon" width="120" height="120"></canvas>
  <canvas class="icon" width="120" height="120"></canvas>
</div>

<script src="https://unpkg.com/zdog@1/dist/zdog.dist.min.js"></script>

<script>
  document.querySelectorAll('.icon').forEach((canvas, index) => {
    let illo = new Zdog.Illustration({
      element: canvas,
      zoom: 3,
      dragRotate: true
    });

    // 各キャンバスに異なるアイコンを作成する
    const icons = [
      createHeartIcon,
      createStarIcon,
      createCheckIcon
    ];

    icons[index](illo);

    function animate() {
      illo.rotate.y += 0.02;
      illo.updateRenderGraph();
      requestAnimationFrame(animate);
    }
    animate();
  });

  function createHeartIcon(illo) {
    new Zdog.Shape({
      addTo: illo,
      path: [
        { x: 0, y: -10 },
        {
          bezier: [
            { x: -20, y: -20 },
            { x: -20, y: 0 },
            { x: 0, y: 10 }
          ]
        },
        {
          bezier: [
            { x: 20, y: 0 },
            { x: 20, y: -20 },
            { x: 0, y: -10 }
          ]
        }
      ],
      stroke: 6,
      color: '#E62',
      fill: true,
      closed: false
    });
  }
</script>

パターン 3:チルト カード ギャラリー

<div class="card-gallery">
  <div class="card" data-tilt data-tilt-glare data-tilt-max-glare="0.3">
    <img src="product1.jpg" alt="Product 1">
    <h3>Product 1</h3>
  </div>

  <div class="card" data-tilt data-tilt-glare data-tilt-max-glare="0.3">
    <img src="product2.jpg" alt="Product 2">
    <h3>Product 2</h3>
  </div>

  <div class="card" data-tilt data-tilt-glare data-tilt-max-glare="0.3">
    <img src="product3.jpg" alt="Product 3">
    <h3>Product 3</h3>
  </div>
</div>

<style>
  .card-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 50px;
  }

  .card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform-style: preserve-3d;
  }

  .card img {
    width: 100%;
    border-radius: 10px;
    transform: translateZ(40px);
  }

  .card h3 {
    margin-top: 15px;
    transform: translateZ(60px);
  }
</style>

<script src="https://cdn.jsdelivr.net/npm/vanilla-tilt@1.8.1/dist/vanilla-tilt.min.js"></script>

パターン 4:結合エフェクト - Vanta 背景 + チルト カード

<div id="vanta-section">
  <div class="container">
    <h1>Our Services</h1>

    <div class="services-grid">
      <div class="service-card" data-tilt data-tilt-scale="1.05">
        <div class="icon">🚀</div>
        <h3>Fast</h3>
        <p>Lightning quick performance</p>
      </div>

      <div class="service-card" data-tilt data-tilt-scale="1.05">
        <div class="icon">🎨</div>
        <h3>Beautiful</h3>
        <p>Stunning visual design</p>
      </div>

      <div class="service-card" data-tilt data-tilt-scale="1.05">
        <div class="icon">💪</div>
        <h3>Powerful</h3>
        <p>Feature-rich platform</p>
      </div>
    </div>
  </div>
</div>

<script>
  // Vanta 背景
  VANTA.NET({
    el: "#vanta-section",
    color: 0x3fff00,
    backgroundColor: 0x23153c,
    points: 10,
    maxDistance: 20
  });

  // チルト カード
  VanillaTilt.init(document.querySelectorAll(".service-card"), {
    max: 15,
    speed: 400,
    glare: true,
    "max-glare": 0.3
  });
</script>

パフォーマンスのベストプラクティス

Zdog の最適化

  1. 図形数を制限する:スムーズな 60fps のため、総図形数を 100 未満に保つ
  2. グループを使用する:関連する図形を整理しやすくするため
  3. アニメーション ループを最適化する:必要な場合のみ updateRenderGraph() を呼び出す
  4. Canvas vs SVG:Canvas はアニメーション用、SVG は静止イラスト用

Vanta.js の最適化

  1. 単一インスタンス:ページあたり 1~2 つの Vanta エフェクトのみ使用
  2. モバイル フォールバック:モバイルで無効にするか、静止背景を使用
  3. アンマウント時に破棄する:SPA では常に .destroy() を呼び出す
  4. パーティクル数を削減する:より良いパフォーマンスのため pointsquantity を低くする
// モバイル検出とフォールバック
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);

if (!isMobile) {
  VANTA.WAVES({
    el: "#hero",
    // ... options
  });
} else {
  document.getElementById('hero').style.background = 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)';
}

Vanilla-Tilt の最適化

  1. インスタンス数を制限する:表示要素のみに適用する
  2. gyroscopeSamples を削減する:モバイル パフォーマンスのため低くする
  3. ローエンド デバイスで無効にする:デバイス機能をチェック
  4. CSS will-change を使用する:トランスフォーム用にブラウザーにヒントを与える
.tilt-card {
  will-change: transform;
}

よくある落とし穴

落とし穴 1:複数の Vanta インスタンス

問題:複数の Vanta エフェクトがパフォーマンス問題を引き起こす

解決策:1 つのエフェクトのみを使用するか、セクションごとにエフェクトを遅延読み込み

// Intersection Observer を使用して、表示時のみ Vanta を読み込む
const observer = new IntersectionObserver((entries) => {
  entries.forEach(entry => {
    if (entry.isIntersecting && !entry.target.vantaEffect) {
      entry.target.vantaEffect = VANTA.WAVES({
        el: entry.target,
        // ... options
      });
    }
  });
});

observer.observe(document.getElementById('hero'));

落とし穴 2:SPA でのメモリ リーク

問題:コンポーネント アンマウント時に Vanta/Tilt が破棄されない

解決策:常にクリーンアップする

// React useEffect クリーンアップ
useEffect(() => {
  const effect = VANTA.WAVES({ el: vantaRef.current });

  return () => {
    effect.destroy(); // 重要!
  };
}, []);

落とし穴 3:Zdog がレンダリングされない

問題:Canvas が空白になっている

原因

  • updateRenderGraph() を呼び忘れた
  • Canvas サイズが 0
  • 図形がビューの外にある

解決策:

// 図形変更後は常に updateRenderGraph を呼び出す
illo.updateRenderGraph();

// Canvas に寸法があることを確認する
<canvas width="240" height="240"></canvas>

// 図形の位置がビューに見えることを確認する
new Zdog.Ellipse({
  addTo: illo,
  diameter: 20,
  translate: { z: 0 }, // 原点に近いままにする
});

落とし穴 4:モバイルでチルトが機能しない

問題:モバイル デバイスでチルトが応答しない

解決策:ジャイロスコープ コントロールを有効にする

VanillaTilt.init(element, {
  gyroscope: true,
  gyroscopeMinAngleX: -45,
  gyroscopeMaxAngleX: 45
});

落とし穴 5:色形式の混乱(Vanta.js)

問題:色が機能しない

原因:Vanta.js は 16 進数文字列ではなく、16 進数数字を使用

// ❌ 間違い
color: "#23153c"

// ✅ 正しい
color: 0x23153c

リソース

Zdog:

Vanta.js:

Vanilla-Tilt.js:

関連スキル

  • threejs-webgl:装飾的エフェクトを超えたより複雑な 3D グラフィックス
  • gsap-scrolltrigger:スクロール時にこれらのエフェクトをアニメーション化する
  • motion-framer:これらのエフェクトと並行して React コンポーネント アニメーション
  • react-three-fiber:軽量エフェクトが十分でない場合の高度な 3D

ライセンス: MIT(寛容ライセンスのため全文を引用しています) · 原本リポジトリ

詳細情報

作者
freshtechbro
リポジトリ
freshtechbro/claudedesignskills
ライセンス
MIT
最終更新
不明

Source: https://github.com/freshtechbro/claudedesignskills / ライセンス: MIT

関連スキル

汎用その他⭐ リポ 1,982

superfluid

Superfluidプロトコルおよびそのエコシステムに関するナレッジベースです。Superfluidについて情報を検索する際は、ウェブ検索の前にこちらを参照してください。対応キーワード:Superfluid、CFA、GDA、Super App、Super Token、stream、flow rate、real-time balance、pool(member/distributor)、IDA、sentinels、liquidation、TOGA、@sfpro/sdk、semantic money、yellowpaper、whitepaper

by LeoYeAI
汎用その他⭐ リポ 100

civ-finish-quotes

実質的なタスクが真に完了した際に、文明風の儀式的な引用句を追加します。ユーザーやエージェントが機能追加、リファクタリング、分析、設計ドキュメント、プロセス改善、レポート、執筆タスクといった実際の成果物を完成させるときに、明示的な依頼がなくても使用します。短い返信や小さな修正、未完成の作業には適用しません。

by huxiuhan
汎用その他⭐ リポ 1,110

nookplot

Base(Ethereum L2)上のAIエージェント向け分散型調整ネットワークです。エージェントがオンチェーンアイデンティティを登録する、コンテンツを公開する、他のエージェントにメッセージを送る、マーケットプレイスで専門家を雇う、バウンティを投稿・請求する、レピュテーションを構築する、共有プロジェクトで協業する、リサーチチャレンジを解くことでNOOKをマイニングする、キュレーションされたナレッジを備えたスタンドアロンオンチェーンエージェントをデプロイする、またはアグリーメントとリワードで収益を得る場合に利用できます。エージェントネットワーク、エージェント調整、分散型エージェント、NOOKトークン、マイニングチャレンジ、ナレッジバンドル、エージェントレピュテーション、エージェントマーケットプレイス、ERC-2771メタトランザクション、Prepare-Sign-Relay、AgentFactory、またはNookplotが言及された場合にトリガーされます。

by BankrBot
汎用その他⭐ リポ 59

web3-polymarket

Polygon上でのPolymarket予測市場取引統合です。認証機能(L1 EIP-712、L2 HMAC-SHA256、ビルダーヘッダー)、注文発注(GTC/GTD/FOK/FAK、バッチ、ポストオンリー、ハートビート)、市場データ(Gamma API、Data API、オーダーブック、サブグラフ)、WebSocketストリーミング(市場・ユーザー・スポーツチャネル)、CTF操作(分割、統合、償却、ネガティブリスク)、ブリッジ機能(入金、出金、マルチチェーン)、およびガスレスリレイトランザクションに対応しています。AIエージェント、自動マーケットメーカー、予測市場UI、またはPolygraph上のPolymarketと統合するアプリケーション構築時に活用できます。

by elophanto
汎用その他⭐ リポ 52

ethskills

Ethereum、EVM、またはブロックチェーン関連のリクエストに対応します。スマートコントラクト、dApps、ウォレット、DeFiプロトコルの構築、監査、デプロイ、インタラクションに適用されます。Solidityの開発、コントラクトアドレス、トークン規格(ERC-20、ERC-721、ERC-4626など)、Layer 2ネットワーク(Base、Arbitrum、Optimism、zkSync、Polygon)、Uniswap、Aave、Curveなどのプロトコルとの統合をカバーします。ガスコスト、コントラクトのデシマル設定、オラクルセキュリティ、リエントランシー、MEV、ブリッジング、ウォレット管理、オンチェーンデータの取得、本番環境へのデプロイ、プロトコル進化(EIPライフサイクル、フォーク追跡、今後の変更予定)といったトピックを含みます。

by jiayaoqijia
汎用その他⭐ リポ 44

xxyy-trade

このスキルは、ユーザーが「トークン購入」「トークン売却」「トークンスワップ」「暗号資産取引」「取引ステータス確認」「トランザクション照会」「トークンスキャン」「フィード」「チェーン監視」「トークン照会」「トークン詳細」「トークン安全性確認」「ウォレット一覧表示」「マイウォレット」「AIスキャン」「自動スキャン」「ツイートスキャン」「オンボーディング」「IP確認」「IPホワイトリスト」「トークン発行」「自動売却」「損切り」「利益確定」「トレーリングストップ」「保有者」「トップホルダー」「KOLホルダー」などをリクエストした場合、またはSolana/ETH/BSC/BaseチェーンでXXYYを経由した取引について言及した場合に使用します。XXYY Open APIを通じてオンチェーン取引とデータ照会を実現します。

by Jimmy-Holiday
本サイトは GitHub 上で公開されているオープンソースの SKILL.md ファイルをクロール・インデックス化したものです。 各スキルの著作権は原作者に帰属します。掲載に問題がある場合は info@alsel.co.jp または /takedown フォームよりご連絡ください。
原作者: freshtechbro · freshtechbro/claudedesignskills · ライセンス: MIT