/*
Auto-generated by: https://github.com/pmndrs/gltfjsx
*/

import React, { useRef } from 'react';
import { useFrame } from 'react-three-fiber';
import { useGLTF } from '@react-three/drei/useGLTF';

export default function Model(props) {
  const group = useRef();
  const { nodes, materials } = useGLTF('/plato.glb');

  useFrame(() => {
    group.current.rotation.x = -0.05;
    group.current.rotation.y += 0.002;
  });

  return (
    <group ref={group} {...props} dispose={null}>
      <group position={[-4.03, 2.5, 12.86]}>
        <group rotation={[-Math.PI / 2, 0, 0]}>
          <group position={[0, 0, 1.88]}>
            <mesh
              material={materials.plato}
              geometry={nodes['mesh-3'].geometry}
              position={[1.2, 0.23, -0.16]}
            />
            <mesh
              material={materials.plato}
              geometry={nodes['mesh-0'].geometry}
              position={[1.2, 0.23, -0.16]}
            />
            <mesh
              material={materials.plato}
              geometry={nodes['mesh-1'].geometry}
              position={[1.2, 0.23, -0.16]}
            />
            <mesh
              material={materials.plato}
              geometry={nodes['mesh-2'].geometry}
              position={[1.2, 0.23, -0.16]}
            />
          </group>
        </group>
      </group>
    </group>
  );
}

useGLTF.preload('/plato.glb');
