From 3afd60a27d7907d558ac8c571ef9e01c2438f818 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 19 四月 2024 10:56:33 +0800
Subject: [PATCH] #

---
 src/components/light.jsx |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/components/light.jsx b/src/components/light.jsx
index 655d83c..3293562 100644
--- a/src/components/light.jsx
+++ b/src/components/light.jsx
@@ -1,14 +1,20 @@
 import React, { useRef } from 'react';
 import { SpotLight, useDepthBuffer, useHelper } from '@react-three/drei';
+import { SpotLightHelper } from 'three';
 
 const Lights = () => {
+    const spotLightRef = useRef();
+
+    useHelper(spotLightRef, SpotLightHelper, 'teal');
+
     return (
         <>
             <ambientLight intensity={0.5} />
             <directionalLight color={0xffffff} intensity={3} position={[10, 10, 0]} />
             <SpotLight
-                color="#fff"
-                position={[3, 2000, 2]}
+                ref={spotLightRef}
+                color="#ffffff"
+                position={[3, 700, 2]}
                 castShadow
                 penumbra={2}
                 distance={6000}

--
Gitblit v1.9.1