This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Marc Krenn
Posted Sep 03 - Read on Facebook

I often send Dropbox-links to my client in order to show them my current progress - it's automatic, reliable and always up-to-date. Both, my clients and I love this new super-iterative workflow.

Loading and caching can be a pain in the ass, though. I currently black-out the screen for a certain amount of time in order to give the browser enough time to fetch the data (~30sec. for 30megs of data ... iPad@2x mockup). Some layers needs the be loaded quicker than others (like the ones currently off-screen), but right now, images are getting loaded in a pseudo-random order.

Therefore I'd like to ask you, Koen, to include something like a loading-priority-function, forcing the browser to request layer-data in a particular order:

layer.priority = 0 # sets the priority to load from 0 ... n; when multiple layers are set to the same priority, this subset gets loaded in the traditional "random" order

Additional, useful functions could be:
Utils.loadingProgress() # returns % loaded -> could be great to create "real" loading animations
layer.loadingProgress() # returns % loaded of this particular layer
layer.load() # loads the layer no matter what
layer.loaded() # returns true or false
Utils.start/pause/stopLoading()
Utils.load(2) # loads particular priority-subset

On a more silly note:
Utils.cacheThisMotherf()
Uitls.ignoreCache()
;)

Relevant link: http://stackoverflow.com/questions/4211519/controlling-image-load-order-in-html

Thanks!

2 Comments

Koen Bok

Yeah this should be doable. The easiest would be to just supply a list of images that we need to preload, and I start the prototype only after they are all loaded.

In terms of events, a layer with an image already throws the "load" event if an image is loaded.

Marc Krenn

Cool. Yeah, a simple "layer.preload = true" would certainly be sufficient 90% of the time.

Read the entire post on Facebook