
import React from 'react'
import { Group } from 'three'
import * as THREE from 'three'


export default function Floor() {
    const floor = new Group()

    const floorGeometry = new THREE.PlaneGeometry(100, 100, 100, 100)
    const floorMaterial = new THREE.MeshStandardMaterial({ color: 0x00ff00, side: THREE.DoubleSide })
    const floorMesh = new THREE.Mesh(floorGeometry, floorMaterial)

    floorMesh.rotation.x = -Math.PI / 2
    floorMesh.position.y = -2

    floor.add(floorMesh)

    return <primitive object={floor} />
}