2025-08-28 18:23:02 -05:00
|
|
|
import type { SpotLightProps } from '@react-three/fiber';
|
2025-08-29 13:21:41 -05:00
|
|
|
import { memo } from 'react';
|
2025-08-28 17:59:31 -05:00
|
|
|
|
2025-08-28 18:23:02 -05:00
|
|
|
interface Props extends SpotLightProps {
|
2025-08-28 17:59:31 -05:00
|
|
|
debug?: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-29 13:21:41 -05:00
|
|
|
export const HelpingSpotLight = memo<Props>(({ debug, ...props }) => {
|
2025-08-28 17:59:31 -05:00
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
{debug && (
|
|
|
|
|
<mesh position={props.position}>
|
|
|
|
|
<icosahedronGeometry args={[0.1, 2]} />
|
|
|
|
|
<meshBasicMaterial color={props.color} />
|
|
|
|
|
</mesh>
|
|
|
|
|
)}
|
|
|
|
|
|
2025-08-29 22:51:24 -05:00
|
|
|
<spotLight {...props} />
|
2025-08-28 17:59:31 -05:00
|
|
|
</>
|
|
|
|
|
);
|
2025-08-29 13:21:41 -05:00
|
|
|
});
|