diff --git a/src/components/GenerationListItem.svelte b/src/components/GenerationListItem.svelte index deb358f..f8503d4 100644 --- a/src/components/GenerationListItem.svelte +++ b/src/components/GenerationListItem.svelte @@ -6,17 +6,20 @@ let outputFormat: CADFormat = 'gltf' console.log(data) - let output = '' + let output: string | undefined = '' // Outputs will only be set if the model has completed processing. if (data.outputs) { for (const [key, value] of Object.entries(data.outputs)) { if (key.endsWith('gltf')) { - output = value + output = value as string | undefined } } } $: dataUrl = `data:text/${outputFormat};base64,${output}` + + const gltfUrl = `data:application/json;base64,${data.outputs ? data.outputs['source.gltf'] : ''}` + console.log('gltfUrl', gltfUrl)
@@ -30,9 +33,9 @@

Error: {data.error}

{/if}
- {#if data.outputs} + {#if data.outputs && gltfUrl}
- +
{/if} diff --git a/src/components/ModelViewer.svelte b/src/components/ModelViewer.svelte index 984f5f6..0fd3422 100644 --- a/src/components/ModelViewer.svelte +++ b/src/components/ModelViewer.svelte @@ -1,10 +1,24 @@ - + diff --git a/src/components/Nav.svelte b/src/components/Nav.svelte index 8ddba21..3175777 100644 --- a/src/components/Nav.svelte +++ b/src/components/Nav.svelte @@ -12,7 +12,9 @@ {#if user} -

signed in

+
+ Avatar +
{:else}