Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计提醒

threejsThree.js 3D 开发

Agent Skill

threejs 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

894

周安装

38

GitHub Stars

10

下载量

313
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:threejs(Three.js 3D 开发)
来源仓库:https://github.com/oakoss/agent-skills
仓库路径:skills/threejs
安装命令:
npx skills add https://github.com/oakoss/agent-skills --skill threejs
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/oakoss/agent-skills --skill threejs

简介

threejs 用于处理 GitHub 仓库、Issue 和 Pull Request 信息,适合围绕 Three.js 相关代码变更或协作事项进行整理。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 中的 3D 图形开发与协作场景。
  • 通过 GitHub 仓库安装,使用 npx skills add 等 --skill threejs 命令部署。
  • 注意权限范围,避免越权访问或修改核心代码。
  • 可结合原始 README 了解具体功能和应用边界。

SKILL.md

Three.js

Overview

Guides building high-performance 3D web experiences with Three.js, WebGPU-first rendering, TSL (Three Shader Language), and React Three Fiber. Covers scene architecture, asset compression, draw call budgets, and React 19 / Next.js integration patterns.

When to use: Creating 3D scenes, WebGPU rendering setup, TSL shader authoring, asset optimization (Draco/KTX2), React Three Fiber composition, Next.js streaming for 3D content, loading GLTF models, setting up lighting and shadows, animation playback and blending.

When NOT to use: 2D canvas animations (use Canvas API), simple SVG graphics, server-side rendering without client hydration, projects targeting pre-2022 hardware exclusively.

Quick Reference

PatternAPI / ApproachKey Points
WebGPU rendererimport * as THREE from 'three/webgpu'Must await renderer.init() before first render
R3F canvas<Canvas gl={...}> with SuspenseWrap in <Suspense> for streaming support
Frame updatesuseFrame((state, delta) =>...)Mutate refs directly; never use setState
TSL shadersimport {...} from 'three/tsl'Node-based; compiles to WGSL or GLSL
Instancing<instancedMesh> with matrix updatesSingle draw call for repeated geometry
Batched meshBatchedMesh (r156+)Different geometries sharing one material
Draco compressiongltf-pipeline -i in.gltf -o out.glb -dUp to 90% geometry size reduction
KTX2 texturesBasis Universal via toktxStays compressed in VRAM
LODTHREE.LOD with distance thresholdsSwap detail levels by camera distance
On-demand render<Canvas frameloop="demand">Only render when scene state changes
Cleanup.dispose() on unmountGeometries, materials, and textures
Compute shadersFn(() => {...})().compute(count)GPU-side physics, particles, flocking
LightingDirectionalLight, SpotLight, HemisphereLightEnable shadowMap on renderer + castShadow on light
GLTF loadingGLTFLoader + DRACOLoaderDraco for geometry compression; traverse for shadows
AnimationAnimationMixer + clipAction()Update with clock.getDelta() every frame
Crossfadeaction.fadeOut() / action.fadeIn()Weight-based blending between walk/run/idle
Environment mapsRGBELoader + PMREMGeneratorSet scene.environment for PBR reflections
RaycastingRaycaster.setFromCamera(pointer, cam)Mouse/touch picking; use recursive: true for GLTF
Morph targetsmesh.morphTargetInfluences[index]Facial animation, blend shapes from GLTF

Common Mistakes

MistakeCorrect Pattern
Allocating new THREE.Vector3() or new THREE.Color() inside useFramePre-allocate outside the loop to avoid GC pressure every frame
Using requestAnimationFrame manually in React projectsUse R3F's useFrame hook for frame-by-frame updates
Not awaiting renderer.init() for WebGPUAlways await renderer.init() before the first render to avoid race conditions
Loading assets without <Suspense> boundariesWrap <Canvas> in <Suspense> to prevent main thread blocking
Using high-poly models for background or distant elementsUse LOD (Level of Detail) or Impostors to reduce draw calls
Using setState inside render loop for animationsMutate refs directly via useFrame for frame-by-frame updates
Speed tied to frame rate (rotation += 0.01)Multiply by delta for frame-rate-independent motion
Not using clock.getDelta() for mixer.update()Always pass delta time to mixer.update(delta) for correct animation speed
Forgetting to dispose loaded GLTF modelsTraverse and dispose geometries, materials, and textures on removal
Shadow map enabled on renderer but not on the lightSet both renderer.shadowMap.enabled and light.castShadow = true
Large far/near ratio on cameraKeep ratio small to avoid z-fighting; set near as large as possible

Delegation

  • Asset and scene graph exploration: Use Explore agent
  • Multi-file scene refactoring and optimization passes: Use Task agent
  • 3D architecture and rendering pipeline planning: Use Plan agent

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.45%
按下载量换算114

Claude

28.36%
按下载量换算89

Cursor

20.47%
按下载量换算64

Gemini CLI

8.7%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills