Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability for Outside Code to Wait for FRAME.Resources #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonobr1
Copy link
Contributor

@jonobr1 jonobr1 commented May 18, 2018

I added two methods to the FRAME.Resources returned object.

  • resources.queue: Returns a resolve function that should be called when the resource is ready to be used.
  • resources.onLoad: On your webpage invoke this method when you want to run code when you know for sure assets that are queued have been loaded.

I added an example that ensures that the image asset is loaded before the player starts playing at: /player/?file=../examples/load_image.json

This doesn't affect the other examples because they're not using the queuing mechanisms. This makes it a totally optional use.

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

Successfully merging this pull request may close these issues.

None yet

1 participant