function checkMaterialsReady(){materials.forEach(function(material){const materialProperties=properties.get(material);const program=materialProperties.currentProgram;if(program.isReady()){// remove any programs that report they're ready to use from the list
materials.delete(material);}});// once the list of compiling materials is empty, call the callback
if(materials.size===0){resolve(scene);return;}// if some materials are still not ready, wait a bit and check again
setTimeout(checkMaterialsReady,10);}
Callback for custom error reporting.
@type {?Function}