Skip to content

Commit

Permalink
fix: animationmodel rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-rpm committed Sep 17, 2024
1 parent e7e1b4a commit f30724c
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { useRef, FC, useMemo, useState } from 'react';
import { useFrame, useGraph, useLoader } from '@react-three/fiber';
import { useFrame, useGraph } from '@react-three/fiber';
import { AnimationMixer, Group } from 'three';
import { GLTFLoader } from 'three-stdlib';

import { Model } from 'src/components/Models/Model';
import { useHeadMovement, useFallback, useIdleExpression, useEmotion } from 'src/services';
import { useHeadMovement, useFallback, useIdleExpression, useEmotion, useGltfLoader } from 'src/services';
import { BaseModelProps } from 'src/types';
import { loadAnimationClip } from 'src/services/Animation.service';
import { Emotion } from 'src/components/Avatar/Avatar.component';
Expand Down Expand Up @@ -39,7 +38,7 @@ export const AnimationModel: FC<AnimationModelProps> = ({
setAnimationRunning(false);
};

const { scene } = useLoader(GLTFLoader, String(modelSrc));
const { scene } = useGltfLoader(modelSrc);
const { nodes } = useGraph(scene);

const animationClip = useMemo(async () => loadAnimationClip(animationSrc), [animationSrc]);
Expand Down

0 comments on commit f30724c

Please sign in to comment.