Skip to content

Add download button for 3D models#2

Open
deivid11 wants to merge 1 commit intoPokemon-3D-api:mainfrom
deivid11:add-download-button
Open

Add download button for 3D models#2
deivid11 wants to merge 1 commit intoPokemon-3D-api:mainfrom
deivid11:add-download-button

Conversation

@deivid11
Copy link

@deivid11 deivid11 commented Feb 20, 2026

Summary

  • Adds a download button to the Pokemon modal that lets users download the .glb 3D model file
  • The button shows a loading state while downloading and names the file based on the Pokemon name and form
  • Includes styled button matching the existing Pokedex red theme
image

Test plan

  • Open a Pokemon modal and verify the download button appears below the 3D viewer
  • Click the download button and verify the .glb file downloads with the correct filename
  • Verify the button shows "Downloading..." state while fetching
  • Check that the button is disabled during download to prevent duplicate clicks

@Sudhanshu-Ambastha
Copy link
Member

i have a Q do we really need it like
think like this for brainstorm or logical thinking
1)as we both know glb files are larger in size so if i want 1/2 it is good and can also be downloaded but if i want models in large no.s like all of those instead of downloading i will just simply use api to fetch all those which is much lighter than downloading them to add even if need to download why not use GitHub like it allow to install specific files isn't it or directly clone things as it is open source content?
2)even if we along with threejs with drei for simplicity but still it is bad idea and not optimized i need to create jsx file along with it's glb which increases bundle size which is not efficient
3)so the best way to load these models efficiently is Google's models viewer which can load heavy model dynamically so doesn't makes sense to add a download button in our app to me
like also point to note does the pokeapi added download button to imgs to download for the sprites used in their api?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants