diff --git a/package.json b/package.json index 6907035d..1af79c4f 100644 --- a/package.json +++ b/package.json @@ -18,28 +18,28 @@ }, "dependencies": { "@ducanh2912/next-pwa": "^10.0.0", - "@react-three/drei": "^9.92.7", - "@react-three/fiber": "^8.15.12", + "@react-three/drei": "^10.0.5", + "@react-three/fiber": "^9.1.0", "glsl-random": "^0.0.5", - "next": "^14.0.4", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "three": "^0.160.0", - "three-stdlib": "^2.28.9", + "next": "^15.2.3", + "react": "^19.0.0", + "react-dom": "^19.0.0", + "three": "^0.174.0", + "three-stdlib": "^2.35.14", "tunnel-rat": "^0.1.2" }, "devDependencies": { - "@next/bundle-analyzer": "^14.0.4", - "autoprefixer": "^10.4.16", - "eslint": "^8.56.0", - "eslint-config-next": "^14.0.4", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-tailwindcss": "^3.13.0", + "@next/bundle-analyzer": "^15.2.3", + "autoprefixer": "^10.4.21", + "eslint": "^9.23.0", + "eslint-config-next": "^15.2.3", + "eslint-config-prettier": "^10.1.1", + "eslint-plugin-tailwindcss": "^3.18.0", "file-loader": "^6.2.0", "glslify": "^7.1.1", "glslify-loader": "^2.0.0", - "postcss": "^8.4.32", - "prettier": "^3.1.1", + "postcss": "^8.5.3", + "prettier": "^3.5.3", "raw-loader": "^4.0.2", "tailwindcss": "^3.4.0", "url-loader": "^4.1.1" diff --git a/src/components/canvas/View.jsx b/src/components/canvas/View.jsx index ad5cd940..899e5337 100644 --- a/src/components/canvas/View.jsx +++ b/src/components/canvas/View.jsx @@ -1,6 +1,6 @@ 'use client' -import { forwardRef, Suspense, useImperativeHandle, useRef } from 'react' +import { Suspense, useImperativeHandle, useRef } from 'react' import { OrbitControls, PerspectiveCamera, View as ViewImpl } from '@react-three/drei' import { Three } from '@/helpers/components/Three' @@ -14,7 +14,7 @@ export const Common = ({ color }) => ( ) -const View = forwardRef(({ children, orbit, ...props }, ref) => { +const View = ({ children, orbit, ref, ...props }) => { const localRef = useRef(null) useImperativeHandle(ref, () => localRef.current) @@ -29,7 +29,7 @@ const View = forwardRef(({ children, orbit, ...props }, ref) => { ) -}) +} View.displayName = 'View' export { View } diff --git a/src/templates/Shader/Shader.jsx b/src/templates/Shader/Shader.jsx index ea80130f..d8a31d42 100644 --- a/src/templates/Shader/Shader.jsx +++ b/src/templates/Shader/Shader.jsx @@ -4,7 +4,7 @@ import { extend, useFrame } from '@react-three/fiber' import { shaderMaterial } from '@react-three/drei' import vertex from './glsl/shader.vert' import fragment from './glsl/shader.frag' -import { forwardRef, useImperativeHandle, useRef } from 'react' +import { useImperativeHandle, useRef } from 'react' const ShaderImpl = shaderMaterial( { @@ -18,13 +18,13 @@ const ShaderImpl = shaderMaterial( extend({ ShaderImpl }) // eslint-disable-next-line react/display-name -const Shader = forwardRef(({ children, ...props }, ref) => { +const Shader = ({ children, ref, ...props }) => { const localRef = useRef() useImperativeHandle(ref, () => localRef.current) useFrame((_, delta) => (localRef.current.time += delta)) return -}) +} export default Shader