jpskill.com
🛠️ 開発・MCP コミュニティ

threejs

Three.jsを使って、ブラウザ上で動く3D製品コンフィギュレーターやデータ可視化、ゲームなどのインタラクティブなコンテンツを、シーン構築、カメラ設定、照明、モデル読み込み、パフォーマンス最適化などを通して実現するSkill。

📜 元の英語説明(参考)

Assists with building interactive 3D experiences in the browser using Three.js. Use when creating 3D product configurators, data visualizations, games, or creative experiences with scenes, cameras, lighting, model loading, and performance optimization. Trigger words: threejs, three.js, 3d, webgl, react three fiber, r3f, glb, gltf.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Three.jsを使って、ブラウザ上で動く3D製品コンフィギュレーターやデータ可視化、ゲームなどのインタラクティブなコンテンツを、シーン構築、カメラ設定、照明、モデル読み込み、パフォーマンス最適化などを通して実現するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o threejs.zip https://jpskill.com/download/15477.zip && unzip -o threejs.zip && rm threejs.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15477.zip -OutFile "$d\threejs.zip"; Expand-Archive "$d\threejs.zip" -DestinationPath $d -Force; ri "$d\threejs.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して threejs.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → threejs フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Three.js

概要

Three.js は、WebGL を使用してブラウザでインタラクティブな 3D グラフィックスを作成するための JavaScript ライブラリです。シーングラフ、PBR マテリアル、ライティングシステム、モデルローダー (glTF, FBX)、およびインスタンス化されたレンダリングのようなパフォーマンスツールを提供します。React Three Fiber は、自動リソース管理と Suspense ベースのローディングによる、宣言的な React 統合を提供します。

指示

  • シーンをセットアップする際は、ScenePerspectiveCamera (または OrthographicCamera)、および WebGLRenderer を作成し、マウス/タッチ操作のために OrbitControls を追加し、製品品質のためにアンチエイリアシングとトーンマッピングを設定します。
  • オブジェクトを作成する際は、ジオメトリ (box、sphere、plane、またはカスタム BufferGeometry) とマテリアル (MeshStandardMaterial (PBR 用)、MeshPhysicalMaterial (高度なエフェクト用)) を組み合わせ、diffuse、normal、roughness、および metalness のテクスチャマップを適用します。
  • 3D モデルをロードする際は、glTF/GLB ファイル (推奨されるウェブ形式) には GLTFLoader を使用し、1MB を超えるモデルには Draco 圧縮を有効にし、GPU 圧縮形式には KTX2 テクスチャを使用します。
  • ライティングを構築する際は、アンビエントライト、ディレクショナルライト、ポイントライト、およびスポットライトを、イメージベースドライティング用の環境マップ (HDR) と組み合わせて、ライトとそれらを必要とするメッシュでシャドウマップを有効にします。
  • パフォーマンスを最適化する際は、100 個以上の同一オブジェクトをレンダリングするには InstancedMesh を使用し、静的ジオメトリをマージし、距離ベースの詳細レベルには LOD を実装し、オブジェクトを削除する際はリソースを手動で破棄します。
  • React を使用する際は、宣言的なシーン管理と自動破棄のために、React Three Fiber と @react-three/drei ヘルパー (OrbitControls, Environment, useGLTF) およびブルームや SSAO のようなエフェクトのために @react-three/postprocessing を優先します。

例 1: 3D 製品コンフィギュレーターの構築

ユーザーリクエスト: 「ユーザーが色を変更したり、モデルを回転させたりできる 3D 製品ビューアを作成してください」

アクション:

  1. React Three Fiber で useGLTF() を使用して、Draco 圧縮で製品モデルをロードします。
  2. 回転とズームのために OrbitControls をセットアップし、オプション変更時にカメラアニメーションを行います。
  3. MeshStandardMaterial の色と粗さを更新するマテリアル交換ロジックを作成します。
  4. HDR マップによる環境光と、リアリズムのためのコンタクトシャドウを追加します。

出力: 色のオプション、スムーズな回転、およびリアルなライティングを備えたインタラクティブな 3D 製品コンフィギュレーター。

例 2: アニメーション化されたデータグローブの作成

ユーザーリクエスト: 「インタラクティブな 3D グローブ上にグローバルデータポイントを可視化してください」

アクション:

  1. 地球のテクスチャと大気シェーダーを備えた球体ジオメトリを作成します。
  2. 地理座標にある数千の小さな球体を持つ InstancedMesh を使用して、データポイントをプロットします。
  3. アニメーション化されたダッシュオフセットを持つ TubeGeometry を使用して、ポイント間にアーク接続を追加します。
  4. マウスオーバーライドのオービットコントロールで自動回転を実装します。

出力: データポイントマーカー、アニメーション化された接続アーク、およびインタラクティブな回転を備えた 3D グローブ。

ガイドライン

  • すべての 3D モデルに glTF/GLB 形式を使用してください。これは最も効率的で、広くサポートされているウェブ形式であるためです。
  • ファイルサイズを大幅に削減するために、1MB を超えるモデルには Draco 圧縮を有効にします。
  • 大幅なパフォーマンス向上を得るために、100 個を超える同一オブジェクトをレンダリングする場合は InstancedMesh を使用します。
  • 製品の視覚品質のために、antialias: truetoneMapping: ACESFilmicToneMapping を設定します。
  • 宣言的なシーン管理と自動破棄のために、React アプリには React Three Fiber を使用します。
  • オブジェクトを削除する際は、リソースを手動で破棄します: geometry.dispose()material.dispose()texture.dispose()
  • モバイルデバイスでテストし、ローエンド GPU の場合はシャドウ解像度、ピクセル比、およびマテリアルの複雑さを軽減します。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Three.js

Overview

Three.js is a JavaScript library for creating interactive 3D graphics in the browser using WebGL. It provides a scene graph, PBR materials, lighting systems, model loaders (glTF, FBX), and performance tools like instanced rendering. React Three Fiber offers a declarative React integration with automatic resource management and Suspense-based loading.

Instructions

  • When setting up a scene, create a Scene, PerspectiveCamera (or OrthographicCamera), and WebGLRenderer, adding OrbitControls for mouse/touch interaction and configuring anti-aliasing and tone mapping for production quality.
  • When creating objects, combine geometries (box, sphere, plane, or custom BufferGeometry) with materials (MeshStandardMaterial for PBR, MeshPhysicalMaterial for advanced effects) and apply texture maps for diffuse, normal, roughness, and metalness.
  • When loading 3D models, use GLTFLoader for glTF/GLB files (the preferred web format), enable Draco compression for models over 1MB, and use KTX2 textures for GPU-compressed formats.
  • When building lighting, combine ambient, directional, point, and spot lights with environment maps (HDR) for image-based lighting, and enable shadow maps on lights and meshes that need them.
  • When optimizing performance, use InstancedMesh for rendering 100+ identical objects, merge static geometries, implement LOD for distance-based detail levels, and dispose resources manually when removing objects.
  • When using React, prefer React Three Fiber with @react-three/drei helpers (OrbitControls, Environment, useGLTF) and @react-three/postprocessing for effects like bloom and SSAO.

Examples

Example 1: Build a 3D product configurator

User request: "Create a 3D product viewer where users can change colors and rotate the model"

Actions:

  1. Load the product model with useGLTF() in React Three Fiber with Draco compression
  2. Set up OrbitControls for rotation and zoom, with camera animation on option change
  3. Create material swapping logic that updates MeshStandardMaterial color and roughness
  4. Add environment lighting with an HDR map and contact shadows for realism

Output: An interactive 3D product configurator with color options, smooth rotation, and realistic lighting.

Example 2: Create an animated data globe

User request: "Visualize global data points on an interactive 3D globe"

Actions:

  1. Create a sphere geometry with an earth texture and atmosphere shader
  2. Plot data points using InstancedMesh with thousands of small spheres at geographic coordinates
  3. Add arc connections between points using TubeGeometry with animated dash offsets
  4. Implement auto-rotation with mouse-override orbit controls

Output: A 3D globe with data point markers, animated connection arcs, and interactive rotation.

Guidelines

  • Use glTF/GLB format for all 3D models since it is the most efficient and widely supported web format.
  • Enable Draco compression for models over 1MB to reduce file size significantly.
  • Use InstancedMesh when rendering more than 100 identical objects for massive performance gains.
  • Set antialias: true and toneMapping: ACESFilmicToneMapping for production visual quality.
  • Use React Three Fiber for React apps for declarative scene management and automatic disposal.
  • Dispose resources manually when removing objects: geometry.dispose(), material.dispose(), texture.dispose().
  • Test on mobile devices and reduce shadow resolution, pixel ratio, and material complexity for low-end GPUs.