mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: new lighting
This commit is contained in:
1 parent
2559782a28
commit
b67fd5b58c
5 files changed
+45
-159
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { Box, Text } from "@radix-ui/themes";
|
||||
import { Html } from "@react-three/drei";
|
||||
import { memo, type ComponentProps } from "react";
|
||||
|
||||
interface Props extends ComponentProps<"spotLight"> {
|
||||
@@ -8,10 +10,20 @@ export const HelpingSpotLight = memo<Props>(({ debug, ...props }) => {
|
||||
return (
|
||||
<>
|
||||
{debug && (
|
||||
<mesh position={props.position}>
|
||||
<icosahedronGeometry args={[0.1, 2]} />
|
||||
<meshBasicMaterial color={props.color} />
|
||||
</mesh>
|
||||
<group position={props.position}>
|
||||
<mesh>
|
||||
<icosahedronGeometry args={[0.1, 2]} />
|
||||
<meshBasicMaterial color={props.color} />
|
||||
</mesh>
|
||||
|
||||
<Html center>
|
||||
<Box pb="9">
|
||||
<Text wrap="nowrap">
|
||||
{props.intensity} @ {JSON.stringify(props.userData)}
|
||||
</Text>
|
||||
</Box>
|
||||
</Html>
|
||||
</group>
|
||||
)}
|
||||
|
||||
<spotLight {...props} />
|
||||
|
||||
Reference in new issue
Block a user