Utilizing three.js to render obj model in a web browser. Here is the approach I am taking:
function animate() {
requestAnimationFrame(animate);
render(scene, camera);
}
function render(scene, camera){
scene.traverse(function(object) {
scene = setLODDistance(scene, thresHold);
});
renderer.render(scene, camera);
}
animate();
The function setLODDistance will result in a scene object that has been computed by LOD.
However, I do not want to invoke this function every frame per second; I only intend to run it after my object in the browser has been translated, rotated, or scaled.
Are there any tags or methods provided in THREE.Object3D, scene, or other classes that allow me to detect if my object has undergone changes (translation, rotation, scaling)?
Thanks