SceneUtils

A class containing useful utility functions for scene manipulation.

Methods

.createMultiMaterialObject (geometry, materials) : Group

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.

.attach (child, scene, parent) : null

child -- The object to add to the parent
scene -- The scene to detach the object on.
parent -- The parent to attach the object from.
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.

.detach (child, parent, scene) : null

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

For more info on how to obtain the source code of this module see this page.