mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
22 lines
476 B
TypeScript
22 lines
476 B
TypeScript
import type { SpotLightProps } from '@react-three/fiber';
|
|
import { memo } from 'react';
|
|
|
|
interface Props extends SpotLightProps {
|
|
debug?: boolean;
|
|
}
|
|
|
|
export const HelpingSpotLight = memo<Props>(({ debug, ...props }) => {
|
|
return (
|
|
<>
|
|
{debug && (
|
|
<mesh position={props.position}>
|
|
<icosahedronGeometry args={[0.1, 2]} />
|
|
<meshBasicMaterial color={props.color} />
|
|
</mesh>
|
|
)}
|
|
|
|
<spotLight {...props} />
|
|
</>
|
|
);
|
|
});
|