Group.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Object3D] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. This is almost identical to an [page:Object3D Object3D]. Its purpose is to make working
  15. with groups of objects syntactically clearer.
  16. </p>
  17. <h2>Example</h2>
  18. <code>
  19. var geometry = new THREE.BoxBufferGeometry( 1, 1, 1 );
  20. var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
  21. var cubeA = new THREE.Mesh( geometry, material );
  22. cubeA.position.set( 100, 100, 0 );
  23. var cubeB = new THREE.Mesh( geometry, material );
  24. cubeB.position.set( -100, -100, 0 );
  25. //create a group and add the two cubes
  26. //These cubes can now be rotated / scaled etc as a group
  27. var group = new THREE.Group();
  28. group.add( cubeA );
  29. group.add( cubeB );
  30. scene.add( group );
  31. </code>
  32. <h2>Constructor</h2>
  33. <h3>[name]( )</h3>
  34. <h2>Properties</h2>
  35. <p>See the base [page:Object3D] class for common properties.</p>
  36. <h3>[property:String type]</h3>
  37. <p>A string 'Group'. This should not be changed.</p>
  38. <h2>Methods</h2>
  39. <p>See the base [page:Object3D] class for common methods.</p>
  40. <h2>Source</h2>
  41. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  42. </body>
  43. </html>