NUKnightLab / NUKnightLab/TimelineJS3
Preload images?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.2k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to create a Marvel-movie-intro-like effect by starting the timeline at the end, and then successively calling goToPrev() with a short delay between calls, to quickly flip backwards through all the slides.
That all works, but I don't see the images, I only see the grey "loading" square.
I tried to preload the images into the browser cache by using the technique here:
https://stackoverflow.com/a/901699/988264
whereby you just create a bunch of Image() objects and set their src property. That seems to work fine, if I look at my browser tools network tab while the page is loading, it looks like all the images load before the first call to goToPrev(), but I still am seeing the grey "loading" square.
Is there some way to preload the images into whatever cache TimelineJS is using?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the backward timeline traversal with goToPrev() and inspect how TimelineJS requests and caches slide images. Compare browser-cached images with the grey loading state during rapid navigation. Done means establishing whether preloading can use TimelineJS's cache and documenting or implementing a reliable way to avoid the loading placeholder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100