SceneUtils.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <p class="desc">A class containing useful utility functions for scene manipulation.</p>
  12. <h2>Methods</h2>
  13. <h3>[method:Group createMeshesFromInstancedMesh]( [param:InstancedMesh instancedMesh] )</h3>
  14. <p>
  15. instancedMesh -- The instanced mesh.
  16. </p>
  17. <p>
  18. Creates a new group object that contains a new mesh for each instance of the given instanced mesh.
  19. </p>
  20. <h3>[method:Group createMeshesFromMultiMaterialMesh]( [param:Mesh mesh] )</h3>
  21. <p>
  22. mesh -- A mesh with multiple materials.
  23. </p>
  24. <p>
  25. Converts the given multi-material mesh into an instance of [page:Group] holding for each material a separate mesh.
  26. </p>
  27. <h3>[method:Group createMultiMaterialObject]( [param:BufferGeometry geometry], [param:Array materials] )</h3>
  28. <p>
  29. geometry -- The geometry for the set of materials. <br />
  30. materials -- The materials for the object.
  31. </p>
  32. <p>
  33. 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.<br />
  34. This is mostly useful for objects that need both a material and a wireframe implementation.
  35. </p>
  36. <h2>Source</h2>
  37. <p>
  38. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/SceneUtils.js examples/jsm/utils/SceneUtils.js]
  39. </p>
  40. </body>
  41. </html>