Skip to content

Commit

Permalink
Merge pull request #51 from Sea10wood/cahnge/#50-change-field
Browse files Browse the repository at this point in the history
change:地面ファイルの変更 #50
  • Loading branch information
Sea10wood authored May 21, 2023
2 parents 0f97a74 + 14a8690 commit 945c7a5
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 7 deletions.
Binary file added public/block.glb
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/Todo/Cat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Cat = ({ cats }: { cats: Task[] }) => {
{cats.map(({ comment }, index) => {
const position = [
Math.random() * 30 - 15,
-1,
-3,
Math.random() * 30 - 15,
];
const rotation = [0, Math.random() * Math.PI, 0];
Expand Down
112 changes: 106 additions & 6 deletions src/components/Todo/Field.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,114 @@
import { Clone, useGLTF } from "@react-three/drei";

const Field = () => {
const { scene, animations } = useGLTF("field.glb");
const { scene, animations } = useGLTF("block.glb");
console.log(scene);
return (
<group position={[-100, 0, -100]}>
<Clone object={scene} position={[90, 1, 90]} />
<Clone object={scene} position={[90, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 90]} />
<group position={[-200, -4, -200]} scale={2}>
<group position={[0, 0, 0]}>
<group position={[40, 0, 40]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[0, 0, 0]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[0, 0, 40]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[40, 0, 0]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
</group>
<group position={[80, 0, 80]}>
<group position={[40, 0, 40]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[0, 0, 0]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[0, 0, 40]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[40, 0, 0]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
</group>
<group position={[0, 0, 80]}>
<group position={[40, 0, 40]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[0, 0, 0]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[0, 0, 40]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[40, 0, 0]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
</group>
<group position={[80, 0, 0]}>
<group position={[40, 0, 40]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[0, 0, 0]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[0, 0, 40]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
<group position={[40, 0, 0]}>
<Clone object={scene} position={[20, 1, 20]} />
<Clone object={scene} position={[20, 1, 0]} />
<Clone object={scene} position={[0, 1, 0]} />
<Clone object={scene} position={[0, 1, 20]} />
</group>
</group>
</group>
);
};
Expand Down

0 comments on commit 945c7a5

Please sign in to comment.