adds 3d model

This commit is contained in:
Christian Beutel
2024-02-14 17:48:37 +01:00
parent 2014dc2508
commit e9cb72b250
8 changed files with 870 additions and 49 deletions

View File

@@ -0,0 +1,21 @@
<script lang="ts">
import { T, useTask } from "@threlte/core";
import Earth from "./earth.svelte";
let rotation = 0;
useTask((delta) => {
rotation += delta/4;
});
</script>
<T.PerspectiveCamera
makeDefault
position={[5, 2, 0]}
on:create={({ ref }) => {
ref.lookAt(0, 0, -0.5);
}}
/>
<T.AmbientLight color="0xffffff" intensity={1.1} />
<Earth rotation={rotation}></Earth>