.claude/skills/r3f-geometry/SKILL.md
React Three Fiber geometry - built-in shapes, BufferGeometry, instancing, Drei helpers. Use when creating 3D shapes, custom geometry, or optimizing with instances.
npx skillsauth add tadams95/kardashev-network r3f-geometryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
<boxGeometry args={[1, 1, 1]} />
<sphereGeometry args={[1, 32, 32]} />
<planeGeometry args={[10, 10]} />
<cylinderGeometry args={[1, 1, 2, 32]} />
<coneGeometry args={[1, 2, 32]} />
<torusGeometry args={[1, 0.4, 16, 100]} />
<torusKnotGeometry args={[1, 0.4, 100, 16]} />
<icosahedronGeometry args={[1, 0]} />
<capsuleGeometry args={[0.5, 1, 4, 8]} />
import { Box, Sphere, Plane, RoundedBox, Text } from '@react-three/drei'
<Box args={[1, 1, 1]}>
<meshStandardMaterial color="orange" />
</Box>
<Sphere args={[1, 32, 32]}>
<meshStandardMaterial color="blue" />
</Sphere>
<RoundedBox args={[1, 1, 1]} radius={0.1} smoothness={4}>
<meshStandardMaterial color="green" />
</RoundedBox>
<Text fontSize={1} color="white">Hello World</Text>
import { useMemo } from 'react'
import * as THREE from 'three'
function CustomGeometry() {
const geometry = useMemo(() => {
const geo = new THREE.BufferGeometry()
const vertices = new Float32Array([
-1, -1, 0, 1, -1, 0, 1, 1, 0, -1, 1, 0
])
const indices = new Uint16Array([0, 1, 2, 0, 2, 3])
geo.setAttribute('position', new THREE.BufferAttribute(vertices, 3))
geo.setIndex(new THREE.BufferAttribute(indices, 1))
geo.computeVertexNormals()
return geo
}, [])
return (
<mesh geometry={geometry}>
<meshStandardMaterial />
</mesh>
)
}
import { Instances, Instance } from '@react-three/drei'
function InstancedBoxes({ count = 100 }) {
return (
<Instances limit={count}>
<boxGeometry />
<meshStandardMaterial />
{Array.from({ length: count }, (_, i) => (
<Instance
key={i}
position={[Math.random() * 10, Math.random() * 10, Math.random() * 10]}
rotation={[Math.random() * Math.PI, Math.random() * Math.PI, 0]}
scale={0.5 + Math.random()}
color={`hsl(${Math.random() * 360}, 70%, 50%)`}
/>
))}
</Instances>
)
}
import { Merged } from '@react-three/drei'
function MergedMeshes() {
return (
<Merged meshes={{ box: boxGeometry, sphere: sphereGeometry }}>
{(models) => (
<>
<models.box position={[0, 0, 0]} />
<models.box position={[2, 0, 0]} />
<models.sphere position={[1, 2, 0]} />
</>
)}
</Merged>
)
}
function ParticleCloud({ count = 1000 }) {
const positions = useMemo(() => {
const pos = new Float32Array(count * 3)
for (let i = 0; i < count; i++) {
pos[i * 3] = (Math.random() - 0.5) * 10
pos[i * 3 + 1] = (Math.random() - 0.5) * 10
pos[i * 3 + 2] = (Math.random() - 0.5) * 10
}
return pos
}, [count])
return (
<points>
<bufferGeometry>
<bufferAttribute
attach="attributes-position"
count={count}
array={positions}
itemSize={3}
/>
</bufferGeometry>
<pointsMaterial size={0.1} color="white" />
</points>
)
}
import { Center, Bounds } from '@react-three/drei'
// Center geometry
<Center>
<mesh>...</mesh>
</Center>
// Fit to view
<Bounds fit clip margin={1.2}>
<mesh>...</mesh>
</Bounds>
development
Web3 integration with wagmi and viem - wallet connection, contract interactions, transactions, RainbowKit. Use when implementing wallet features, reading/writing contracts, or handling blockchain transactions.
content-media
Three.js textures - loading, configuration, UV mapping, environment maps. Use when loading images, configuring texture properties, or working with HDR environments.
data-ai
Three.js shaders - GLSL, ShaderMaterial, uniforms, custom effects. Use when creating custom visual effects, modifying vertices, writing fragment shaders, or extending built-in materials.
testing
Three.js post-processing - EffectComposer, bloom, depth of field, custom passes. Use when adding visual effects, screen-space effects, or enhancing rendered output.