From 319730ac5c613cc60f77f8bc87c2adc561c2db36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andri=20=C3=93skarsson?= Date: Fri, 4 Oct 2024 20:37:52 +0200 Subject: [PATCH] deleted old threejs code --- src/components/three/box-animation.tsx | 73 -------------------------- 1 file changed, 73 deletions(-) delete mode 100644 src/components/three/box-animation.tsx diff --git a/src/components/three/box-animation.tsx b/src/components/three/box-animation.tsx deleted file mode 100644 index 3e68d9b..0000000 --- a/src/components/three/box-animation.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { Canvas, useFrame, extend, useThree } from "@react-three/fiber"; -import * as THREE from "three"; -import React, { useRef } from "react"; -import { Mesh } from "three"; -import { Stats, OrbitControls } from "@react-three/drei"; - -function Box(props: { position: [number, number, number] }) { - const mesh = useRef(null); - /* - useFrame(() => { - return; - if (mesh.current) { - mesh.current.rotation.x += 0.01; - mesh.current.rotation.y += 0.01; - } - }); - */ - const [x, y, z] = props.position; - - return ( - - - - - ); -} - -function SimpleBox() { - const ref = useRef(null); - const { mouse } = useThree(); - - // useFrame(() => { - // if (ref.current) { - // ref.current.rotation.y = mouse.x * Math.PI * 2; - // ref.current.rotation.x = mouse.y * Math.PI * 2; - // ref.current.rotation.z = 0; - // } - // }); - - return ( - - - - - ); -} - -export const BoxAnimation = () => { - const camera = useRef(null); - const boxes = Array(100) - .fill(null) - .map((_, i) => { - const x = (i % 10) * 2; - const y = Math.floor(i / 10) * 2; - return ; - }); - return ( -
- - - - - - -
- ); -};