When loading a large obj file on computers that do not support WebGL, the process can become too slow. To address this issue, I am looking to upload a lighter object before and after the complete object loads. However, I need a way to pause the rendering process while rotating the view if the complete object is still processing. Is there a function that can help solve this problem? Thank you!
This is my code:
var renderWire = function () {
renderer.render(wireScene, camera);
render();
};
var render = function () {
renderer.render(scene, camera);
};
$(document).ready(function() {
$(document).keypress(function(event) {
switch(event.keyCode) {
case 100: //right
//rotation
break;
case 97: //left
//rotation
break;
default:
//not set
break
}
//here I need to stop the current rendering process and start a new one
renderWire();
});
});