[name]

A class containing useful utility functions for scene manipulation.

Methods

[method:Group createMultiMaterialObject]( [param:Geometry geometry], [param:Array materials] )

geometry -- The geometry for the set of materials.
materials -- The materials for the object.

Creates a new Group that contains a new mesh for each material defined in materials. Beware that this is not the same as an array of materials which defines multiple materials for 1 mesh.
This is mostly useful for objects that need both a material and a wireframe implementation.

[method:null attach]( [param:Object3D child], [param:Object3D scene], [param:Object3D parent] )

child -- The object to add to the parent
scene -- The scene to detach the object from.
parent -- The parent to attach the object to.

Attaches the object to the parent without the moving the object in the worldspace. Beware that to do this the matrixWorld needs to be updated. This can be done by calling the updateMatrixWorld method on the parent object.

[method:null detach]( [param:Object3D child], [param:Object3D parent], [param:Object3D scene] )

child -- The object to remove from the parent
scene -- The scene to attach the object on.
parent -- The parent to detach the object from.

Detaches the object from the parent and adds it back to the scene without moving in worldspace. Beware that to do this the matrixWorld needs to be updated. This can be done by calling the updateMatrixWorld method on the parent object.

Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/js/utils/SceneUtils.js examples/js/utils/SceneUtils.js]