SceneUtils

优质
小牛编辑
148浏览
2023-12-01

A class containing useful utility functions for scene manipulation.

Methods

.createMeshesFromInstancedMesh ( instancedMesh : InstancedMesh ) : Group

instancedMesh -- The instanced mesh.

Creates a new group object that contains a new mesh for each instance of the given instanced mesh.

.createMultiMaterialObject ( geometry : BufferGeometry, materials : Array ) : 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.

Source

examples/jsm/utils/SceneUtils.js