Answer the question
In order to leave comments, you need to log in
How to put preloader on stage three.js? And then json files are loaded large, you need to put an inscription, for example, Loading...?
This is the construction:
________________________________________
var loader = new THREE.JSONLoader( );
var onGeometry = function(geom, mats) {
var mesh = new THREE.Mesh( geom, new THREE.MeshFaceMaterial( mats ) );
scene.add(mesh);
};
loader.load("test1.js", onGeometry);
loader.load("test2.js", onGeometry);
loader.load("test3.js", onGeometry);
Answer the question
In order to leave comments, you need to log in
Loader Manager
var manager = new THREE.LoadingManager();
manager.onLoad = function () {
console.log( 'test all loaded' );
};
or onProgress method
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question