nodes/app/src/lib/graph-interface/Camera.svelte
Max Richter 4f03f2af5a
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 2m44s
feat: migrate most of graph-manager to svelte-5
2024-11-02 19:37:22 +01:00

21 lines
453 B
Svelte

<script lang="ts">
import { T } from "@threlte/core";
import { type OrthographicCamera } from "three";
type Props = {
camera: OrthographicCamera;
position: [number, number, number];
};
let { camera = $bindable(), position }: Props = $props();
</script>
<T.OrthographicCamera
bind:ref={camera}
position.x={position[0]}
position.y={10}
position.z={position[1]}
rotation.x={-Math.PI / 2}
zoom={position[2]}
makeDefault
/>