I want to render each step wise construction of the scene.
So I placed alert() in middle of code, just after render() call, but it seems that rendering is interrupted and scene does not drawn.
Are there canonical ways to wait until render() job finishes?
Thank you!
CODE SNIPPET
const geometry = new THREE.BoxGeometry();
const lineMaterial = new THREE.LineBasicMaterial( { color: 0x00ccff } );
const line = new THREE.Line(geometry, lineMaterial);
scene.add(line);
renderer.setClearColor(0x773333, 1.0);
renderer.render(scene, camera);
alert("lo! at wireframe... then"); // FIXME: But does not show render result
const meshMaterial = new THREE.MeshBasicMaterial( { color: 0x00ccff, size: 3.0 } );
const mesh = new THREE.Mesh(geometry, meshMaterial);
scene.add(mesh);
renderer.setClearColor(0x337733, 1.0);
renderer.render(scene, camera);