Skip to content

Commit

Permalink
Conditionally render gLTF
Browse files Browse the repository at this point in the history
  • Loading branch information
franknoirot committed Oct 19, 2023
1 parent 321a347 commit 60bc41e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ModelViewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
</script>

<SC.Canvas antialias background={new THREE.Color('oklch(99.7% 0.008766 102.8deg)')}>
<SC.Mesh geometry={model} />
{#if model}
<SC.Primitive object={model.scene} scale={[0.05, 0.05, 0.05]} />
{/if}
<SC.PerspectiveCamera position={[1, 1, 3]} />
<SC.OrbitControls enableZoom={false} />
</SC.Canvas>

0 comments on commit 60bc41e

Please sign in to comment.