You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my code I wanted to be able to load image by url or from element, and once the texture is created call some code. So now to handle both cases I need to set a timeout to check if texture was loaded and it's a bit messy... It'd be nice if I specify a callback, the function would automatically become asynchronous in case that I rely on the callback and not having to process both asynchronous and synchronous cases. That'd make the interface more straightforward.
I did notice that simply calling the callback is not the best idea, because if the function is not asynchronous, the return value would not be set at the moment of calling the callback and the callback might rely on that return value being set...
It took me a while to figure out why my code stopped working after switching from url to html element.
Greetings!
The text was updated successfully, but these errors were encountered: