useSimplification
This hook mutates a mesh geometry using three's Simplification modifier.
👉 The simplification code is based on this algorithm.
const meshRef = useSimplification(0.5) // the vertices will be halved
return (
<mesh ref={meshRef}>
<octahedronBufferGeometry args={[2, 5]} />
</mesh>
)