From 26c660fb05a2ec45933590682c643e1fc418189f Mon Sep 17 00:00:00 2001 From: "H. E." <6037756+rndexe@users.noreply.github.com> Date: Fri, 2 Aug 2024 22:30:53 +0530 Subject: [PATCH] Fix the-three-graces demo (#44) --- demos/the-three-graces/src/App.jsx | 10 ++++++---- .../{public => src}/graces-draco.glb | Bin 2 files changed, 6 insertions(+), 4 deletions(-) rename demos/the-three-graces/{public => src}/graces-draco.glb (100%) diff --git a/demos/the-three-graces/src/App.jsx b/demos/the-three-graces/src/App.jsx index 097d2d1d..fc539e7c 100755 --- a/demos/the-three-graces/src/App.jsx +++ b/demos/the-three-graces/src/App.jsx @@ -5,14 +5,16 @@ import { Canvas, extend, useFrame } from '@react-three/fiber' import { useGLTF, SoftShadows, Html, CameraControls } from '@react-three/drei' import { easing, geometry } from 'maath' +import gracesModel from "./graces-draco.glb?url" + extend(geometry) export default function App() { return ( - - + + @@ -30,7 +32,7 @@ Title: 3D Printable The Three Graces function Model(props) { const group = useRef() const light = useRef() - const { nodes } = useGLTF('/graces-draco.glb') + const { nodes } = useGLTF(gracesModel) useFrame((state, delta) => { easing.dampE(group.current.rotation, [0, -state.pointer.x * (Math.PI / 10), 0], 1.5, delta) easing.damp3(group.current.position, [0, -5.5, 1 - Math.abs(state.pointer.x)], 1, delta) @@ -50,7 +52,7 @@ function Model(props) { 🌕 Aglaia - + diff --git a/demos/the-three-graces/public/graces-draco.glb b/demos/the-three-graces/src/graces-draco.glb similarity index 100% rename from demos/the-three-graces/public/graces-draco.glb rename to demos/the-three-graces/src/graces-draco.glb