Using the visible attribute

Hey,

This might be a dumb question but is there a large performance difference between dynamically setting meshes to visible/not visible vs. adding and removing meshes from the scene? What would be the preferred way for scenes where you want objects visible at a certain time window?

I found the best performance option is to set visibility instead of adding and removing from scene graph (at least with three r96).

Especially if you modify THREE.updateMatrixWorld to return false on objects with visibility = false.

Run some tests and see.

4 Likes