riffusion-app/components/ThreeCanvas.tsx

22 lines
619 B
TypeScript
Raw Normal View History

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 14:39:15 -07:00
/**
* React three fiber canvas with spectrogram drawing.
*/
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>
);
}