Skip to content

Commit

Permalink
fix: gltf downloader (#575)
Browse files Browse the repository at this point in the history
* fix: gltf downloader

* change name
  • Loading branch information
Anshgrover23 authored Jan 16, 2025
1 parent 2fae5fd commit f966866
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/DownloadButtonAndMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function DownloadButtonAndMenu({
<Download className="mr-1 h-3 w-3" />
<span className="flex-grow mr-6">3D Model</span>
<span className="text-[0.6rem] bg-green-500 opacity-80 text-white font-mono rounded-md px-1 text-center py-0.5 mr-1">
gltf
glb
</span>
</DropdownMenuItem>
<DropdownMenuItem
Expand Down
3 changes: 2 additions & 1 deletion src/lib/download-fns/download-gltf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ export const downloadGltf = async (

const gltfBlob = await gltfPromise

saveAs(gltfBlob, fileName + ".gltf")
const extension = options.binary ? ".glb" : ".gltf"
saveAs(gltfBlob, fileName + extension)
}

0 comments on commit f966866

Please sign in to comment.