Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mquangdev committed May 2, 2024
1 parent df63f6d commit 9a907e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
PUBLIC_URL=.
PUBLIC_URL=.
REPO_URL=3D-Portfolio
14 changes: 6 additions & 8 deletions src/components/Avatar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import { useAnimations, useFBX, useGLTF, useScroll } from "@react-three/drei";
import { useFrame } from "@react-three/fiber";
import * as THREE from "three";
export default function Avatar(props) {
const { nodes, materials } = useGLTF("./models/Me.glb");
const { animations: idleAnimation } = useFBX(
"./animations/Breathing_Idle.fbx"
);
const { animations: walkingAnimation } = useFBX("./animations/Walking.fbx");
const { nodes, materials } = useGLTF("models/Me.glb");
const { animations: idleAnimation } = useFBX("animations/Breathing_Idle.fbx");
const { animations: walkingAnimation } = useFBX("animations/Walking.fbx");
const group = useRef();
const [animation, setAnimation] = useState("idle");
idleAnimation[0].name = "idle";
Expand Down Expand Up @@ -115,6 +113,6 @@ export default function Avatar(props) {
);
}

useGLTF.preload("./models/Me.glb");
useFBX.preload("./animations/Breathing_Idle.fbx");
useFBX.preload("./animations/Walking.fbx");
useGLTF.preload("models/Me.glb");
useFBX.preload("animations/Breathing_Idle.fbx");
useFBX.preload("animations/Walking.fbx");

0 comments on commit 9a907e4

Please sign in to comment.