// © XlXi 2021
// Graphictoria 5
import React, { useRef } from 'react';
import { Canvas, useFrame } from '@react-three/fiber';
import SetTitle from "../Helpers/Title.js";
let Buttons = [];
let ButtonsAlreadyTemplated = false;
function Box(props) {
const ref = useRef();
const distanceFromCamera = Math.random() * 30
const rotX = (Math.random() * 200 - 100)/300
const rotZ = (Math.random() * 200 - 100)/300
useFrame((state, delta) => {
ref.current.position.y -= 0.6 * delta
ref.current.rotation.x += rotX * delta
ref.current.rotation.z += rotZ * delta
if(ref.current.position.y < -30)
{
ref.current.position.y = 30;
}
});
return (