Blaarkies / ksp-visual-calculator

Online tool for Kerbal Space Program that helps players determine delta-v requirements for a mission, and what type of comms dishes a certain satellite requires.
https://ksp-visual-calculator.blaarkies.com
Other
23 stars 0 forks source link

Progressive image loader planets #5

Closed Blaarkies closed 1 year ago

Blaarkies commented 3 years ago

On loading the website, planets show up before their images have finished loading.

This can be solved with Progressive image loaders, a technique where we display a simple placeholder image in the place of the final image, and then swap them out when loading is complete.

Start planets out as filled <svg> circles, the same color as the planet's orbit (or the average color of the planet image?) The library should handle showing the real image.

Low-res placeholders are not necessary, a simple monotone color circle shape is enough.

Blaarkies commented 1 year ago

.webp format largely reduced this to a non-issue