#
luxiaotao1123
2024-04-19 b52c36b92ed63ec95fff3e9ef0dfbd539493f96d
#
3个文件已修改
78 ■■■■■ 已修改文件
package-lock.json 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/light.jsx 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json
@@ -8,17 +8,17 @@
      "name": "three-asrs",
      "version": "0.0.0",
      "dependencies": {
        "@react-three/csg": "^3.2.0",
        "@react-three/drei": "9.92.0",
        "@react-three/fiber": "8.15.12",
        "@react-three/postprocessing": "2.15.11",
        "@react-three/csg": "^2.2.0",
        "@react-three/drei": "^9.70.3",
        "@react-three/fiber": "^8.13.0",
        "@react-three/postprocessing": "^2.14.8",
        "@tweenjs/tween.js": "^21.0.0",
        "axios": "^1.6.2",
        "maath": "0.10.7",
        "react": "^18.2.0",
        "react-dom": "^18.2.0",
        "react-router-dom": "^6.15.0",
        "three": "^0.159.0",
        "three": "^0.153.0",
        "valtio": "^1.12.1"
      },
      "devDependencies": {
@@ -1064,12 +1064,35 @@
      "integrity": "sha512-POu8Mk0hIU3lRXB3bGIGe4VHIwwDsQyoD1F394OK7STTiX9w4dG3cTLljjYswkQN+hDSHRrj4O36kuVa7KPU8Q=="
    },
    "node_modules/@react-three/csg": {
      "version": "3.2.0",
      "resolved": "https://registry.npmmirror.com/@react-three/csg/-/csg-3.2.0.tgz",
      "integrity": "sha512-POnakTYaJqmqKsk9Q23oCL78JmaitN2+s/ciOHDK8dQu6GsSa2eMzlhR7J7kI9VdjmV/cW2cRz9XJEWNJ4XmfA==",
      "version": "2.2.0",
      "resolved": "https://registry.npmmirror.com/@react-three/csg/-/csg-2.2.0.tgz",
      "integrity": "sha512-YgQ9anVePRKWdkZFozyEoQkhrZUYSXxGaUibXzPk3U7RKj5119Fv+Gc9t5EyF/G4ypUm5gSYUiep6owGD8abmA==",
      "dependencies": {
        "three-bvh-csg": "^0.0.16",
        "three-mesh-bvh": "^0.6.8"
        "three-bvh-csg": "^0.0.5"
      }
    },
    "node_modules/@react-three/csg/node_modules/three": {
      "version": "0.141.0",
      "resolved": "https://registry.npmmirror.com/three/-/three-0.141.0.tgz",
      "integrity": "sha512-JaSDAPWuk4RTzG5BYRQm8YZbERUxTfTDVouWgHMisS2to4E5fotMS9F2zPFNOIJyEFTTQDDKPpsgZVThKU3pXA==",
      "peer": true
    },
    "node_modules/@react-three/csg/node_modules/three-bvh-csg": {
      "version": "0.0.5",
      "resolved": "https://registry.npmmirror.com/three-bvh-csg/-/three-bvh-csg-0.0.5.tgz",
      "integrity": "sha512-gxqmaV3HlGHUGB857AV8oLoNxx5Q0T7io1DUs5nrCwmmFqjWZT3a8ue7WapE394wY8awFVAMr+YvdSrzqswpFA==",
      "peerDependencies": {
        "three": "^0.141.0",
        "three-mesh-bvh": "^0.5.13"
      }
    },
    "node_modules/@react-three/csg/node_modules/three-mesh-bvh": {
      "version": "0.5.24",
      "resolved": "https://registry.npmmirror.com/three-mesh-bvh/-/three-mesh-bvh-0.5.24.tgz",
      "integrity": "sha512-VTIgfjz8aFoPKTQoMIQQv9jJD4ybFRZuKKE1/kqy78FQcuHQ0+iIWv7C5cSb2inlvs7bNMVY3yRx3RXGZfrvzQ==",
      "peer": true,
      "peerDependencies": {
        "three": ">= 0.123.0"
      }
    },
    "node_modules/@react-three/drei": {
@@ -5083,18 +5106,9 @@
      }
    },
    "node_modules/three": {
      "version": "0.159.0",
      "resolved": "https://registry.npmmirror.com/three/-/three-0.159.0.tgz",
      "integrity": "sha512-eCmhlLGbBgucuo4VEA9IO3Qpc7dh8Bd4VKzr7WfW4+8hMcIfoAVi1ev0pJYN9PTTsCslbcKgBwr2wNZ1EvLInA=="
    },
    "node_modules/three-bvh-csg": {
      "version": "0.0.16",
      "resolved": "https://registry.npmmirror.com/three-bvh-csg/-/three-bvh-csg-0.0.16.tgz",
      "integrity": "sha512-RgC5dY0hAKdfd1bmD3o2CDfmK9GTkvsA1ECzoqTMhSkjSc2zp1z4Wpa5+emLi/EosF5P6+aK2veTxTLZA9+Mhw==",
      "peerDependencies": {
        "three": ">=0.151.0",
        "three-mesh-bvh": ">=0.6.6"
      }
      "version": "0.153.0",
      "resolved": "https://registry.npmmirror.com/three/-/three-0.153.0.tgz",
      "integrity": "sha512-OCP2/uQR6GcDpSLnJt/3a4mdS0kNWcbfUXIwLoEMgLzEUIVIYsSDwskpmOii/AkDM+BBwrl6+CKgrjX9+E2aWg=="
    },
    "node_modules/three-mesh-bvh": {
      "version": "0.6.8",
package.json
@@ -10,17 +10,17 @@
    "preview": "vite preview"
  },
  "dependencies": {
    "@react-three/csg": "^3.2.0",
    "@react-three/drei": "9.92.0",
    "@react-three/fiber": "8.15.12",
    "@react-three/postprocessing": "2.15.11",
    "@react-three/csg": "^2.2.0",
    "@react-three/drei": "^9.70.3",
    "@react-three/fiber": "^8.13.0",
    "@react-three/postprocessing": "^2.14.8",
    "@tweenjs/tween.js": "^21.0.0",
    "axios": "^1.6.2",
    "maath": "0.10.7",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-router-dom": "^6.15.0",
    "three": "^0.159.0",
    "three": "^0.153.0",
    "valtio": "^1.12.1"
  },
  "devDependencies": {
src/components/light.jsx
@@ -1,11 +1,11 @@
import React, { useRef } from 'react';
import { SpotLight, useDepthBuffer, useHelper } from '@react-three/drei';
import { SpotLightHelper } from 'three';
// import { SpotLightHelper } from 'three';
const Lights = () => {
    const spotLightRef = useRef();
    useHelper(spotLightRef, SpotLightHelper, 'teal');
    // useHelper(spotLightRef, SpotLightHelper, 'teal');
    return (
        <>
@@ -14,14 +14,14 @@
            <SpotLight
                ref={spotLightRef}
                color="#ffffff"
                position={[3, 700, 2]}
                position={[3, 900, 2]}
                castShadow
                penumbra={2}
                distance={6000}
                distance={5000}
                angle={Math.PI * 0.6}
                attenuation={5}
                anglePower={Math.PI / 2}
                intensity={6}
                intensity={5}
                shadow-mapSize={[1024, 1024]}
                shadow-camera-near={200}
                shadow-camera-far={2000}