Skip to content

Commit

Permalink
add tree model and forest file
Browse files Browse the repository at this point in the history
  • Loading branch information
Koraus committed Oct 11, 2023
1 parent 9deb309 commit 4712d7e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/assetsx/forest.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { jsx } from "@emotion/react";
import { useGLTF } from "@react-three/drei";
import tree from "./tree2.glb";
import { useMemo } from "react";

useGLTF.preload(tree);

export const Forest = ({ ...props
}: jsx.JSX.IntrinsicElements["group"]) => {
const { scene } = useGLTF(tree);
const clone = useMemo(() => scene.clone(), [scene]);
return <primitive object={clone} {...props} />;
};
Binary file added src/assetsx/tree2.glb
Binary file not shown.

0 comments on commit 4712d7e

Please sign in to comment.