The following piece of code has a reference problem when the code is bundled and it would be nice if a better approach was used allowing whatever type of state to be inserted.
For this accomplishment a primary idea is to use a "for in" loop to verify each key and assign a new object state for each of one. This would allow the bundle change the class name as well, reducing the sizes of the archives and improving the efficiency of the code in the web.
The filter layer does not work properly when both, the Ship3D and the GLB are in. The idea is to disable each object according to the visibility status: if (status) { modelGLTF.layers.enableAll() ship3D.layers.disableAll() } else { ship3D.layers.enableAll() modelGLTF.layers.disableAll() }