소스 정보
- 저장소
- Jwuthri/Tracely-ai
- 최근 소스 활동
- 2026년 7월 28일 06:24
- 감지된 SKILL.md 언어
- 영어
- 스타
- 1,161
- 포크
- 91
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/Jwuthri/Tracely-ai --skill threejs-r3f명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Instrument AI agents with Tracely and turn their production traces into CI gates. Use when the user mentions Tracely, tracely-ai, tracely_sdk, the `tracely` CLI, or asks to trace/observe an AI agent, add LLM evaluators or LLM-as-a-judge columns, debug why a trace or conversation isn't showing up, wire agent regression tests into a PR check, run scenario or red-team suites against an agent endpoint, or replay recorded agent failures in CI. Covers both zero-span-code automatic instrumentation and the manual span API.
PostHog AI Observability integration for LangChain (Python)
Map SEO market leaders, winning content themes, keyword coverage, backlinks, and strategic gaps.
SKILL.md 표시 중
| name | threejs-r3f |
| description | Three.js and React Three Fiber sub-skill - 3D scenes, shaders, postprocessing. |
3D on the web. Three.js is the engine, R3F is the React renderer. Concise rules here. Deep-dive in
references/.
| Need | Tool | Why |
|---|---|---|
| Full 3D scene (models, lights, physics) | R3F + drei | Declarative, React-friendly, ecosystem |
| Vanilla 3D (no React) | Three.js direct | Lighter, no React overhead |
| Simple 3D transforms on UI | CSS transform3d | GPU-composited, no WebGL context |
| 2D particles / generative | Canvas 2D | Simpler API, less GPU overhead |
| Shader-only visuals (no scene graph) | Raw WebGL / ShaderMaterial | Maximum control, minimal abstraction |
import { Canvas } from '@react-three/fiber'
import { Environment, OrbitControls } from '@react-three/drei'
import { Suspense } from 'react'
<Canvas camera={{ position: [0, 2, 5], fov: 45 }} dpr={[1, 2]} gl={{ antialias: true }}>
<Suspense fallback={null}>
<Environment preset="studio" />
<OrbitControls makeDefault />
<Scene />
</Suspense>
</Canvas>
Rules:
<Suspense> -- loaders (GLTF, textures, HDRI) need itdpr={[1, 2]} to clamp pixel ratio (Retina without melting GPUs)| Hook | Purpose | Gotcha |
|---|---|---|
useFrame((state, delta) => {}) | Per-frame logic (animation, physics) | Never setState inside |
useThree() | Access gl, scene, camera, size, viewport, pointer | Destructure only what you need |
useLoader(TextureLoader, url) | Load any Three.js resource | Wrap parent in Suspense |
useGraph(scene) | Extract nodes/materials from loaded scene | Useful after useGLTF |
useFrame((state, delta) => {
// Use delta for framerate-independent animation
meshRef.current.rotation.y += delta * 0.5
// Access clock for time-based effects
material.uniforms.uTime.value = state.clock.elapsedTime
})
| Component | Use Case |
|---|---|
Environment | HDRI lighting (presets: studio, sunset, city, forest, dawn) |
Float | Idle floating animation (speed, rotationIntensity, floatIntensity) |
Text3D | Extruded 3D text (needs JSON font from Facetype.js) |
useGLTF | Load .glb/.gltf models (returns { nodes, materials, scene }) |
useGLTF.preload(url) | Preload model before component mounts |
MeshTransmissionMaterial | Glass/crystal/liquid refraction effects |
PresentationControls | Drag-to-rotate for product showcases |
Center | Auto-center any group of meshes |
Detailed | LOD -- swap geometry by camera distance |
useTexture | Load textures with Suspense support |
Instances | Declarative instancing for repeated meshes |
import { EffectComposer, Bloom, ChromaticAberration } from '@react-three/postprocessing'
import { BlendFunction } from 'postprocessing'
<EffectComposer>
<Bloom
luminanceThreshold={1}
luminanceSmoothing={0.4}
intensity={0.6}
/>
<ChromaticAberration
blendFunction={BlendFunction.NORMAL}
offset={[0.002, 0.002]}
/>
</EffectComposer>
Rules:
luminanceThreshold={1} = nothing glows unless explicitly emissive| Pattern | When |
|---|---|
<Instances> / InstancedMesh | 100+ identical meshes (particles, trees, crowds) |
<Detailed distances={[0, 50, 100]}> | LOD: swap hi/lo models by distance |
dispose={null} on <primitive> | Prevent auto-dispose when reusing shared geometry |
useGLTF + Draco | Compress .glb models (70-90% size reduction) |
useTexture + KTX2 | Compressed GPU textures (1/4 VRAM) |
frameloop="demand" on Canvas | Only render when something changes (static scenes) |
invalidate() from useThree | Trigger a render in demand mode |
Offscreen canvas (<Canvas eventSource={...}>) | Run rendering off main thread |
Target metrics: < 100 draw calls, < 1M triangles, 60fps on mid-range GPU.
Use stats-gl or r3f-perf to monitor.
Causes full React re-render 60x/second. Mutate refs directly.
// BAD
useFrame(() => {
setRotation(prev => prev + 0.01) // React re-render every frame
})
// GOOD
useFrame((_, delta) => {
meshRef.current.rotation.y += delta * 0.5 // Direct mutation, zero re-renders
})
new Vector3() per frame = GC spikes = stutter.
// BAD
useFrame((state) => {
const target = new THREE.Vector3(0, Math.sin(state.clock.elapsedTime), 0)
meshRef.current.position.copy(target)
})
// GOOD
const _target = useMemo(() => new THREE.Vector3(), [])
useFrame((state) => {
_target.set(0, Math.sin(state.clock.elapsedTime), 0)
meshRef.current.position.copy(_target)
})
Three.js textures, geometries, and materials live on the GPU. Unmounting a React component does NOT free them.
// BAD -- texture stays in VRAM after unmount
const texture = useLoader(TextureLoader, '/big-texture.jpg')
// GOOD -- R3F auto-disposes when using JSX primitives
// For manual resources, dispose in cleanup:
useEffect(() => {
return () => {
texture.dispose()
geometry.dispose()
material.dispose()
}
}, [])
State changes in the parent force the entire Canvas to remount = flash, lost state, reloaded assets.
// BAD
function App() {
const [uiState, setUiState] = useState(false) // re-renders remount Canvas
return (
<>
<button onClick={() => setUiState(!uiState)}>Toggle</button>
<Canvas><Scene config={uiState} /></Canvas>
</>
)
}
// GOOD -- isolate Canvas in its own component
function App() {
return (
<>
<UI />
<SceneCanvas />
</>
)
}
Loaders (useGLTF, useTexture, useLoader) throw promises. Without Suspense, you get crashes.
// BAD
<Canvas>
<Model /> {/* useGLTF inside -- will throw */}
</Canvas>
// GOOD
<Canvas>
<Suspense fallback={<Loader />}>
<Model />
</Suspense>
</Canvas>
| Need | Load |
|---|---|
| Scene boilerplate, lighting rigs, controls | references/scene-setup.md |
| Custom shaders, GLSL patterns, uniforms | references/shaders.md |
| Animation principles, easing, timing | ../motion-principles/SKILL.md |
| GSAP + Three.js integration | ../gsap/SKILL.md |