diff --git a/components/models/home/computer-desk.tsx b/components/models/home/computer-desk.tsx index 2c35280..1220a08 100644 --- a/components/models/home/computer-desk.tsx +++ b/components/models/home/computer-desk.tsx @@ -5,6 +5,7 @@ import { lazy, Suspense, useMemo } from 'react'; import Loading from './loading'; import { PerspectiveCamera } from '@react-three/drei/core/PerspectiveCamera'; import { useMediaQuery } from 'react-responsive'; +import { useTexture } from '@react-three/drei'; const ComputerModel = lazy( () => import('components/models/home/computer-model'), diff --git a/components/models/home/computer-model.tsx b/components/models/home/computer-model.tsx index b5e3558..3e009df 100644 --- a/components/models/home/computer-model.tsx +++ b/components/models/home/computer-model.tsx @@ -7,7 +7,7 @@ License: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/) Source: https://sketchfab.com/3d-models/hacker-room-stylized-a0cfe6edf2dd494c8a95addf6bb13a10 Title: Hacker Room - Stylized */ -import { useGLTF } from '@react-three/drei'; +import { useGLTF, useTexture } from '@react-three/drei'; import { useLoader } from '@react-three/fiber'; import { JSX } from 'react'; import * as THREE from 'three'; @@ -59,6 +59,9 @@ export function Model(props: JSX.IntrinsicElements['group']) { }, ) as unknown as GLTFResult; + const moniterTexture = useTexture('/texture/desk/monitor.png'); + const screenTexture = useTexture('/texture/desk/screen.png'); + return ( + > + + + > + +