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 );

				}
Asynchronous version of {@link WebGLRenderer#compile}.

This method makes use of the `KHR_parallel_shader_compile` WebGL extension. Hence,
it is recommended to use this version of `compile()` whenever possible.

@async
@param {Object3D} scene - The scene or another type of 3D object to precompile.
@param {Camera} camera - The camera.
@param {?Scene} [targetScene=null] - The target scene.
@return {Promise} A Promise that resolves when the given scene can be rendered without unnecessary stalling due to shader compilation.