A neon wireframe icosahedron rotating in place.
three @react-three/fiber @react-three/drei<WireframeIcosahedron /> inside your own <Canvas>.import { useRef } from 'react';
import { useFrame } from '@react-three/fiber';
import type { Mesh } from 'three';
export default function WireframeIco({ color = '#8a5cff', scale = 1 }: { color?: string; scale?: number }) {
const ref = useRef<Mesh>(null);
useFrame((_, dt) => {
if (!ref.current) return;
ref.current.rotation.x += dt * 0.2;
ref.current.rotation.y += dt * 0.3;
});
return (
<mesh ref={ref} scale={scale}>
<icosahedronGeometry args={[1.1, 1]} />
<meshStandardMaterial color={color} wireframe emissive={color} emissiveIntensity={2} />
</mesh>
);
}