diff --git a/public/images/cat .glb b/public/cat.glb similarity index 100% rename from public/images/cat .glb rename to public/cat.glb diff --git a/public/images/catbeta.glb b/public/catbeta.glb similarity index 100% rename from public/images/catbeta.glb rename to public/catbeta.glb diff --git a/public/catbeta1.glb b/public/catbeta1.glb new file mode 100644 index 0000000..9e46df2 Binary files /dev/null and b/public/catbeta1.glb differ diff --git a/public/catbeta2.glb b/public/catbeta2.glb new file mode 100644 index 0000000..9e46df2 Binary files /dev/null and b/public/catbeta2.glb differ diff --git a/src/components/Cat.tsx b/src/components/Cat.tsx index 2614d24..3651293 100644 --- a/src/components/Cat.tsx +++ b/src/components/Cat.tsx @@ -1,15 +1,60 @@ -import { useAnimations, useGLTF } from "@react-three/drei"; +import { Clone, useAnimations, useGLTF } from "@react-three/drei"; import { useFrame } from "@react-three/fiber"; import { useRef } from "react"; -const Cat = () => { - const { scene, animations } = useGLTF("cat.glb"); +const CloneCat = ({ + scene, + animations, + position, + animationName, +}: { + scene: any; + animations: any; + position: any; + animationName: str; +}) => { const ref = useRef(); const { actions } = useAnimations(animations, ref); - console.log(scene); useFrame(() => { - actions.walk?.play(); + actions[animationName]?.play(); }); - return ; + return ( + + ); +}; + +const Cat = () => { + const { scene, animations } = useGLTF("/catbeta2.glb"); + // const ref = useRef(); + // const { actions } = useAnimations(animations, ref); + // console.log(scene); + // useFrame(() => { + // actions.stay?.play(); + // }); + return ( + <> + {/* + + */} + + + + ); }; export default Cat; diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 9050647..10b4f1a 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -8,15 +8,15 @@ export const Header = () => { sx={{ backgroundColor: "#fffff0", width: "100%", - height: "13vh", + height: "6vh", margin: "0 0", }} > nyan.gif ); diff --git a/src/components/Request.tsx b/src/components/Request.tsx index f671351..adefbdd 100644 --- a/src/components/Request.tsx +++ b/src/components/Request.tsx @@ -13,6 +13,7 @@ import DatePick from "../components/DatePick"; export default function Request() { const [isOpen, setIsOpen] = useState(false); + const [isClose, setIsClose] = useState(false); return (