A class containing useful utility functions for scene manipulation.
Assigns default control settings on the camera based on the given sceneBox param.
scene — current scene.
Calculates scene bounding box.
Checks if the given action is used with one of the scene objects, i.e. the action's target node exists on the scene.
Creates default PerspectiveCamera which looks to the center of the scene bounding box.
mesh — a mesh with multiple materials.
Converts the given multi-material mesh into an instance of Group holding for each material a separate mesh.
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 one mesh. This is mostly useful for objects that need both a material and a wireframe implementation.
Search for animation action by its clip name.
Find material by the given name. If not found, returns null.
Find materials by the given name. If not found, returns [].
(value: T, vertex: Vector3) → T. Akin to Array.prototype.reduce(), but operating on the vertices of all the visible descendant objects, in world space. Additionally, it can operate as a transform-reduce, returning a different type T than the Vector3 input. This can be useful for e.g. fitting a viewing frustum to the scene.
For more info on how to obtain the source code of this module see this page.