2022-11-20 12:56:36 -07:00
|
|
|
import { Canvas } from "@react-three/fiber";
|
|
|
|
|
2022-11-20 14:39:15 -07:00
|
|
|
import RotatingBox from "./RotatingBox";
|
|
|
|
import ImagePlane from "./ImagePlane";
|
2022-11-20 12:56:36 -07:00
|
|
|
|
2022-11-20 14:39:15 -07:00
|
|
|
/**
|
|
|
|
* React three fiber canvas with spectrogram drawing.
|
|
|
|
*/
|
2022-11-20 12:56:36 -07:00
|
|
|
export default function ThreeCanvas() {
|
|
|
|
return (
|
2022-11-20 14:39:15 -07:00
|
|
|
<Canvas camera={{ position: [0, 0, 35] }}>
|
|
|
|
<ambientLight intensity={2} />
|
|
|
|
<pointLight position={[40, 40, 40]} />
|
|
|
|
<ImagePlane url={"spectrogram_example.png"} />
|
|
|
|
<RotatingBox position={[-12, 0, 1]} />
|
|
|
|
<RotatingBox position={[-4, 0, 1]} />
|
|
|
|
<RotatingBox position={[4, 0, 1]} />
|
|
|
|
<RotatingBox position={[12, 0, 1]} />
|
|
|
|
</Canvas>
|
2022-11-20 12:56:36 -07:00
|
|
|
);
|
|
|
|
}
|