Group.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. <div class="desc">This is almost identical to an [page:Object3D Object3D]. It's purpose is to make working with groups of objects syntactically clearer.</div>
  14. <h2>Example</h2>
  15. <code>
  16. var geometry = new THREE.BoxBufferGeometry( 1, 1, 1 );
  17. var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
  18. var cubeA = new THREE.Mesh( geometry, material );
  19. cubeA.position.set( 100, 100, 0 );
  20. var cubeB = new THREE.Mesh( geometry, material );
  21. cubeA.position.set( -100, -100, 0 );
  22. //create a group and add the two cubes
  23. //These cubes can now be rotated / scaled etc as a group
  24. var group = new THREE.Group();
  25. group.add( cubeA );
  26. group.add( cubeB )
  27. scene.add( group );
  28. </code>
  29. <h2>Constructor</h2>
  30. <h3>[name]( )</h3>
  31. <h2>Properties</h2>
  32. Properties are identical to an [page:Object3D]'s properties, with the exception of:
  33. <h3>[property:String type]</h3>
  34. <div>A string 'Group'. This should not be changed.</div>
  35. <h2>Methods</h2>
  36. Methods are identical to an [page:Object3D]'s methods.
  37. <h2>Source</h2>
  38. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  39. </body>
  40. </html>