Hi @mbostock
I am experimenting to display multiple sketches (potentially several dozens or more) in a single Framework md page, and eventually I think I need to have lazy loading feature enabled.
I have managed to make the lazy loading work (but flickering due to the wrong way of using the helper function by adding .parent("div name")
to each p5 sketch. see the demo on this page and scroll to see the lazy loading effect.
Then after fixing the flickering effect by following your advice, see the demo on this page I could not get the lazy loading feature to work. The problem seems to be I can’t find a way to reference the sketches and display them when I put them inside a html literal without using parent("div name")
.
You can click the details button to see my code on lazy loading and all the other relevant codes in both pages.
Is there a way for me to make this lazy loading feature to work?
Thanks a lot!
I wonder whether invalidation promise is the easiest way to make my working version of lazy loading without flickering? The problem is after reading the page of invalidation promise I still have no idea how to implement it.