cryptovoxels / issues

🐞 Bugs and issues to be resolved on cryptovoxels
5 stars 1 forks source link

Atlas NFT Images #82

Open bnolan opened 4 years ago

bnolan commented 4 years ago

@damo1884 's crazy parcel has hundreds of cryptomorphs and they take some time to load - and they'll probably annihilate mobile GPUs with two XHRs, one texture upload and one drawcall per NFT.

https://www.cryptovoxels.com/play?coords=NW@215E,-1U,216N&isolate=true

Screen Shot 2020-02-04 at 2 19 43 PM

To fix:

Add multi-nft lookups - returning just basic metadata (not full metadata) here:

https://github.com/cryptovoxels/image-server/blob/master/handlers/opensea.ts

Add multi image lookup here - and return an atlas:

https://github.com/cryptovoxels/image-server/blob/master/handlers/image.ts

May strike problems with the URL query string length:

https://stackoverflow.com/questions/812925/what-is-the-maximum-possible-length-of-a-query-string

But up to 64k length query string should be ok.

Also - all the images need to already be on the image proxy server to atlas them - the atlassing code won't fetch the images. We'll assume the image was prefetched when the parcel owner was in editor mode.

Need to have some code to smash the atlas and return to individual geometries when: