SceneUtils.html 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../list.js"></script>
  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. <div class="desc">A class containing useful utility functions for scene manipulation.</div>
  12. <h2>Methods</h2>
  13. <h3>[method:Object3D createMultiMaterialObject]([page:Geometry geometry], [page:Array materials])</h3>
  14. <div>
  15. geometry -- The geometry for the Object. <br />
  16. materials -- The materials for the object.
  17. </div>
  18. <div>
  19. Creates an new Object3D an new mesh for each material defined in materials. Beware that this is not the same as Meshfacematerial which defines multiple material for 1 mesh.<br />
  20. This is mostly useful for object that need a material and a wireframe implementation.
  21. </div>
  22. <h3>[method:null attach]([page:Object3D child], [page:Object3D scene], [page:Object3D parent])</h3>
  23. <div>
  24. child -- The object to add to the parent <br />
  25. scene -- The scene to detach the object on. <br />
  26. parent -- The parent to attach the object from.
  27. </div>
  28. <div>
  29. Attaches the object to the parent without the moving the object in the worldspace.
  30. </div>
  31. <h3>[method:null detach]([page:Object3D child], [page:Object3D parent], [page:Object3D scene])</h3>
  32. <div>
  33. child -- The object to remove from the parent <br />
  34. scene -- The scene to attach the object on. <br />
  35. parent -- The parent to detach the object from.
  36. </div>
  37. <div>
  38. Detaches the object from the parent and adds it back to the scene without moving in worldspace.
  39. </div>
  40. <h2>Source</h2>
  41. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  42. </body>
  43. </html>