Loading...
Loading...
Expert in 3D web graphics using Three.js, React Three Fiber (R3F), and WebGL shaders.
npx skill4agent add 404kidwiz/claude-supercode-skills threejs-proWhat is the project scope?
│
├─ **React Integration?**
│ ├─ Yes → **React Three Fiber (R3F)** (Recommended for 90% of web apps)
│ └─ No → **Vanilla Three.js**
│
├─ **Performance Critical?**
│ ├─ Massive Object Count? → **InstancedMesh**
│ ├─ Complex Physics? → **Rapier (WASM)**
│ └─ Post-Processing? → **EffectComposer / R3F Postprocessing**
│
└─ **Visual Style?**
├─ Realistic? → **PBR Materials + HDR Lighting**
├─ Cartoon? → **Toon Shader / Outline Pass**
└─ Abstract? → **Custom GLSL Shaders**DracoMeshopt.webp.ktx2useFramegraphics-engineernpm install three @types/three @react-three/fiber @react-three/dreiScene.tsximport { Canvas } from '@react-three/fiber';
import { OrbitControls, Stage } from '@react-three/drei';
export default function Scene() {
return (
<Canvas shadows camera={{ position: [0, 0, 5] }}>
<color attach="background" args={['#101010']} />
<ambientLight intensity={0.5} />
<spotLight position={[10, 10, 10]} angle={0.15} penumbra={1} castShadow />
<mesh castShadow receiveShadow rotation={[0, 1, 0]}>
<boxGeometry args={[1, 1, 1]} />
<meshStandardMaterial color="orange" />
</mesh>
<OrbitControls />
</Canvas>
);
}gltf-pipelinegltf-transformgltf-transform optimize input.glb output.glb --compress dracoimport { useGLTF } from '@react-three/drei';
export function Model(props) {
const { nodes, materials } = useGLTF('/optimized-model.glb');
return (
<group {...props} dispose={null}>
<mesh geometry={nodes.Cube.geometry} material={materials.Metal} />
</group>
);
}
useGLTF.preload('/optimized-model.glb');useFrame(() => { new THREE.Vector3(...) })const vec = new THREE.Vector3(); useFrame(() => vec.set(...)).png1k2k.jpg.pngAmbientLightDirectionalLightscene.add()useMemo