Open jjhembd opened 2 years ago
hello jjhembd i am a beginner in open source world can you please tell me exact location of code[related to this issue] in files so that i can work on that
Hello @gaurav8y785675474,
The new function should be added to packages/engine/Source/Scene/Material.js
.
Then search the unit tests for occurrences of material._loadedImages
. That should be replaces with the async/await pattern shown above.
Hi, I’m a part of the Flagship program for JTC. I would like to work on this issue ticket, please! This is a great opportunity to test my abilities.
@wesleykebrown Sounds great!
A Material instance currently gives no indication of whether its textures are loaded or not. This makes unit testing difficult.
For example, the following test will fail since the image is not loaded before the scene renders:
Some current tests fix the problem by waiting for a change in the length of the
material._loadedImages
array, but this is complicated to set up.Proposal: add a static method
Material.fromUrl
returning a Promise. The Promise would resolve to a new Material instance with all textures ready for use. The above test would become: