Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/flo-bit/flo-bit.github.io. my personal website, w/ astro, svelte, tailwind, typescript, threlte flo-bit.dev
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354<!--Auto-generated by: https://github.com/threlte/threlte/tree/main/packages/gltfCommand: npx @threlte/gltf@2.0.1 static/planet.gltf -t -T--><script lang="ts"> import * as THREE from 'three'; import { Group } from 'three'; import { T, type Props, type Events, type Slots, forwardEventHandlers } from '@threlte/core'; import { useGltf } from '@threlte/extras';
type $$Props = Props<THREE.Group>; type $$Events = Events<THREE.Group>; type $$Slots = Slots<THREE.Group> & { fallback: {}; error: { error: any } };
export const ref = new Group();
type GLTFResult = { nodes: { mesh_0: THREE.Mesh; mesh_1: THREE.Mesh; }; materials: {}; };
const gltf = useGltf<GLTFResult>('/planet-transformed.glb', { useDraco: true });
const component = forwardEventHandlers();</script>
<T is={ref} dispose={false} {...$$restProps} bind:this={$component}> {#await gltf} <slot name="fallback" /> {:then gltf} <T.Mesh geometry={gltf.nodes.mesh_0.geometry} material={gltf.nodes.mesh_0.material} material.opacity={0.5} material.transparent={false} material.flatShading={true} > <T.Mesh geometry={gltf.nodes.mesh_1.geometry} material={gltf.nodes.mesh_1.material} material.transparent={true} material.flatShading={true} /> </T.Mesh> {:catch error} <slot name="error" {error} /> {/await}
<slot {ref} /></T>