Improve frontpage performance (#929)
* initial commit * merge with origin/main * fix package-lock.json * fix tiptap mentions * remove flutter * update package-lock.json * disable tailwindcss/typography until https://github.com/tailwindlabs/tailwindcss/issues/19946 is fixed * reactivate tailwind/typography after fix --------- Co-authored-by: Christian Beutel <> Co-authored-by: slothful-vassal <89943360+slothful-vassal@users.noreply.github.com>
This commit is contained in:
42
web/src/lib/components/3D/moon.svelte
Normal file
42
web/src/lib/components/3D/moon.svelte
Normal file
@@ -0,0 +1,42 @@
|
||||
<!--
|
||||
Auto-generated by: https://github.com/threlte/threlte/tree/main/packages/gltf
|
||||
Command: npx @threlte/gltf@3.0.7 ../../../../static/models/moon.glb -T
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { T } from "@threlte/core";
|
||||
import { useGltf, useDraco } from "@threlte/extras";
|
||||
import type { Snippet } from "svelte";
|
||||
|
||||
interface Props {
|
||||
fallback?: Snippet;
|
||||
error?: Snippet<[any]>;
|
||||
children?: Snippet<[any]>;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
let {
|
||||
fallback,
|
||||
error,
|
||||
children,
|
||||
ref = $bindable(),
|
||||
...props
|
||||
}: Props = $props();
|
||||
|
||||
const gltf = useGltf("/models/moon.glb", { dracoLoader: useDraco() });
|
||||
</script>
|
||||
|
||||
<T.Group bind:ref dispose={false} {...props}>
|
||||
{#await gltf}
|
||||
{@render fallback?.()}
|
||||
{:then gltf}
|
||||
<T.Mesh geometry={gltf.nodes.Moon.geometry} material={gltf.materials.DD9944}
|
||||
><T.PointLight position={[0.5, 5, 0.5]} color="#a2cbf5" intensity={7}
|
||||
></T.PointLight>
|
||||
</T.Mesh>
|
||||
{:catch err}
|
||||
{@render error?.({ error: err })}
|
||||
{/await}
|
||||
|
||||
{@render children?.({ ref })}
|
||||
</T.Group>
|
||||
Reference in New Issue
Block a user