Jump to content


Off Topic - Grid Loading?

Recommended Posts

This is a bit off topic since I doesn't have anything to do with GreenSock. I was hoping that someone could point me in the right direction on how this is being done.


In both of the sites below you will notice that there is some sort of "grid loading" going on. Similar to Google maps when you pan an area.




http://pinocchioisonfire.org/#/experience/a_closer_look (zoom in on artwork and then pan - you will see that the image is blurry at first and then the high resolution pixels load in).



Does anyone know how this is being done?

Link to comment
Share on other sites

  • 2 weeks later...

Well, fortunately I'm working in the agency behind capri-sonne.com. The grid loading is no rocket science. We have two versions of every tile a high-res and a low-res one. The low-res ones are loaded during the preloading process and displayed immediately. Then while "flying" around we check which tiles are currently on stage and whether the high-res versions of those tiles have already been loaded. If yes show them if not load them and show them afterwards. It's that simple.



Link to comment
Share on other sites

Thanks tripso. Makes perfect sense.


Love that site. I remember when it won an FWA and I'm glad to see that it is still around.


As a follow up, are you using ScrollRect? And in your experience, what is the best / most efficient way to detect if the tile is on the stage?

Link to comment
Share on other sites

On this site, we are not using scrollrect. To detect whether a tile is on stage or not we are simply using Math. We know the width and height of the tile and the width and height of the stage. So we can simply calculate which tile is on stage and which not. All tiles are positioned in one container sprite which is moved across the stage. I'm not allowed to tell more details here but trust me it's no rocket science.

Link to comment
Share on other sites

Cool deal. Seems like this was strictly a way to help with file size rather than performance. I appreciate the info.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.