mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: better framing
This commit is contained in:
1 parent
744c6654cf
commit
2bf57e2c72
4 files changed
+19
-12
No files matched your search
@@ -1,17 +1,11 @@
|
||||
import type { SpotLightProps } from '@react-three/fiber';
|
||||
import { memo } from 'react';
|
||||
import { Color } from 'three';
|
||||
import { isHalloween } from '../core/blitzkit/isHalloween';
|
||||
|
||||
interface Props extends SpotLightProps {
|
||||
debug?: boolean;
|
||||
}
|
||||
|
||||
export const HelpingSpotLight = memo<Props>(({ debug, ...props }) => {
|
||||
const color = new Color();
|
||||
|
||||
if (isHalloween()) color.set(1, 0.25, 0.25);
|
||||
|
||||
return (
|
||||
<>
|
||||
{debug && (
|
||||
@@ -21,7 +15,7 @@ export const HelpingSpotLight = memo<Props>(({ debug, ...props }) => {
|
||||
</mesh>
|
||||
)}
|
||||
|
||||
<spotLight color={color} {...props} />
|
||||
<spotLight {...props} />
|
||||
</>
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user