New THREE.LoadingManager()

hello

how cani check if TextureLoader is finish loaded in LoadingManager
example below dont work , thanks

var manager = new THREE.LoadingManager();
manager.onStart = function ( url, itemsLoaded, itemsTotal ) {

	console.log( 'Started loading file: ' + url + '.\nLoaded ' + itemsLoaded + ' of ' + itemsTotal + ' files.' );

};

manager.onLoad = function ( ) {

	console.log( 'Loading complete!');

};


manager.onProgress = function ( url, itemsLoaded, itemsTotal ) {

	console.log( 'Loading file: ' + url + '.\nLoaded ' + itemsLoaded + ' of ' + itemsTotal + ' files.' );

};

           var loader = new THREE.TextureLoader(manager);
	   var geometry = new THREE.BoxGeometry(2, 2, 2);
	   var material = new THREE.MeshBasicMaterial({

		map: loader.load(url),
        side:THREE.DoubleSide,
       		
	    }) ;

	var mesh = new THREE.Mesh(
	    geometry,
		material
		);

scene.add(mesh);

I’ve created a live example with your code: https://jsfiddle.net/uLrm1t94/1/

Everything seems to work fine.

thanks .

can it been done on new THREE.Mesh ?

I’m afraid I don’t understand what you mean. LoadingManager can only be used with loaders.