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

Add optional delayed loading of assets loaded using a constructor #302

Open
fatcerberus opened this issue May 29, 2019 · 1 comment
Open

Comments

@fatcerberus
Copy link
Member

fatcerberus commented May 29, 2019

Support has recently been added to Oozaru to allow the use of asset-loading constructors such as new Sound() and new Shader(). This is enabled by loading the resource in the background and swapping it in via a promise reaction once loading is complete. For the most part this works well, but certain things, such as shader.clone(), are difficult--perhaps even impossible--to support before an asset is fully loaded.

Add an option to miniSphere to artificially delay loading until the next frame, so that synchronous calls which would throw in Oozaru due to an unloaded resource also have a chance to throw in miniSphere for the same reason. This may help to catch errors in code intended to be cross-compatible.

@fatcerberus
Copy link
Member Author

I’m thinking this is best implemented as a flag in the development section in the manifest. This section is automatically ignored by the production engine.

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

No branches or pull requests

1 participant