File size: 572 Bytes
1829efb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { useDebugStore } from '../../store/debug'

export function OriginHelper() {
  const showOrigin = useDebugStore((s) => s.showOrigin)
  if (!showOrigin) return null

  return (
    <group>
      {/* flat plane at Y=0 */}
      <mesh rotation={[-Math.PI / 2, 0, 0]}>
        <planeGeometry args={[10, 10]} />
        <meshBasicMaterial color={0x00ff88} wireframe />
      </mesh>
      {/* wire sphere at origin */}
      <mesh>
        <sphereGeometry args={[0.5, 16, 12]} />
        <meshBasicMaterial color={0xff4400} wireframe />
      </mesh>
    </group>
  )
}