pull out proper camera

This commit is contained in:
Hayk Martiros 2022-11-26 11:26:19 -08:00
parent 3d8acaf761
commit 6649508aab
2 changed files with 10 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import { Canvas } from "@react-three/fiber";
import { InferenceResult } from "../types"; import { InferenceResult } from "../types";
import SpectrogramViewer from "./SpectrogramViewer"; import SpectrogramViewer from "./SpectrogramViewer";
import { PerspectiveCamera } from "@react-three/drei";
interface CanvasProps { interface CanvasProps {
paused: boolean; paused: boolean;
@ -20,9 +21,16 @@ export default function ThreeCanvas({
audioLength, audioLength,
}: CanvasProps) { }: CanvasProps) {
return ( return (
<Canvas camera={{ position: [0, 0, 8], rotation: [0.4, 0, 0] }}> <Canvas>
<ambientLight intensity={2} /> <ambientLight intensity={2} />
<pointLight position={[40, 40, 40]} /> <pointLight position={[40, 40, 40]} />
<PerspectiveCamera
makeDefault
position={[0, 0, 8]}
rotation={[0.4, 0, 0]}
fov={70}
/>
<SpectrogramViewer <SpectrogramViewer
paused={paused} paused={paused}
inferenceResults={inferenceResults} inferenceResults={inferenceResults}

View File

@ -12,6 +12,7 @@ import { InferenceResult, PromptInput } from "../types";
import * as Tone from "tone"; import * as Tone from "tone";
// TODO(hayk): Get this into a configuration.
const SERVER_URL = "http://129.146.52.68:3013/run_inference/"; const SERVER_URL = "http://129.146.52.68:3013/run_inference/";
const defaultPromptInputs = [ const defaultPromptInputs = [