Sign in to follow this  
fateriddle

Is it possible to load sound / music async? Like a promise.

Recommended Posts

1. Since you can load meshes using ImportMeshAsync to return a promise, I wonder if it is possible to do the same for sound?
I'm trying to do

Promise.all([ loadAsset1, loadAsset2, loadSound, loadMusic ]).then( ... )

2. Also It seems 360 photo dome and video also needs loading time, can you turn them into promise too? 

Share this post


Link to post
Share on other sites

What about doing a PR? This could help the entire community :)

And btw all loads are already asynchronous (that's the inner nature of the XHR). For isntance the sound constructor provides a readyToPlayCallback so it should not be a big deal to add a helper function on Sound class to load a sound and return a promise

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.