I have 20 objects and I'm creating mesh and textures with three.js. You can see the example object.
What I'm trying to do is exactly, I display my first object, then let it stay on the screen for a while, then turn it off and display my new object. In this way, I want to show my 20 objects in order. The waiting time is important to me, I want this time to be around 0.5. How can I do it.
Adding all meshes a array:
for ( var i = 0; i < count; i ++ ) {
geometry = // new geometry ...
material = // new material ...
//the lines above are unnecessary
var mesh = new THREE.Mesh(geometry, material);
scene.add(mesh);
objects.push(mesh);
}
And this is the render part:
function render() { requestAnimationFrame(render);
for ( var i = 0; i < count; i ++ ) {
var mesh = objects[ i ];
}
renderer.render(scene, camera);
}
As I said, 0.5 seconds after showing my first object, I have to turn it off and show my other object. But I couldn't find a solution. What should I do?