Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

document freeSlideBehind option #54

Open
jobevers opened this issue Dec 4, 2015 · 2 comments
Open

document freeSlideBehind option #54

jobevers opened this issue Dec 4, 2015 · 2 comments

Comments

@jobevers
Copy link

jobevers commented Dec 4, 2015

I'm not sure what freeSlideBehind is for:

var freeSlideBehind = opts.freeSlideBehind || Infinity;

@gre
Copy link
Owner

gre commented Dec 4, 2015

this allows to (optionally) remove slides that are freeSlideBehind times before the current slide so the memory doesn't grow indefinitely for stream purpose.

An example is running here: http://greweb.me/diaporama/#example/4 , if you accelerate the speed of the diaporama (or manually click on Next), you will see that the number of slides never reach 40 slides, because previous slides are released (code is here https://github.com/gre/diaporama-website/blob/master/stream_example.js ).

Note that diaporama is designed as a "timeline", so the way to make an infinite stream of images is to append some images at the end, and remove slides at the beginning (+ also changing the time) while the time is running.

@jobevers
Copy link
Author

jobevers commented Dec 4, 2015

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants