D
D
Dmitry2016-03-08 01:51:39
three.js
Dmitry, 2016-03-08 01:51:39

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

1 answer(s)
K
Khangeldy Ilebaev, 2016-03-08
@mahabatuly

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 question

Ask a Question

731 491 924 answers to any question