2
0

Group.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <!DOCTYPE html>
  2. <html lang="it">
  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. [page:Object3D] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. Questo è quasi identico ad un [page:Object3D Object3D].
  14. Il suo scopo è rendere sintatticamente più chiaro il lavoro con gruppi di oggetti.
  15. </p>
  16. <h2>Codice di Esempio</h2>
  17. <code>
  18. const geometry = new THREE.BoxGeometry( 1, 1, 1 );
  19. const material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
  20. const cubeA = new THREE.Mesh( geometry, material );
  21. cubeA.position.set( 100, 100, 0 );
  22. const cubeB = new THREE.Mesh( geometry, material );
  23. cubeB.position.set( -100, -100, 0 );
  24. // Crea un gruppo e aggiunge due cubi
  25. // Questi cubi possono essere ruotati / ridimensionati etc come gruppo
  26. const group = new THREE.Group();
  27. group.add( cubeA );
  28. group.add( cubeB );
  29. scene.add( group );
  30. </code>
  31. <h2>Costruttore</h2>
  32. <h3>[name]( )</h3>
  33. <h2>Proprietà</h2>
  34. <p>Vedi la classe base [page:Object3D] per le proprietà comuni.</p>
  35. <h3>[property:Boolean isGroup]</h3>
  36. <p>
  37. Flag di sola lettura per verificare se l'oggetto dato è di tipo [name].
  38. </p>
  39. <h3>[property:String type]</h3>
  40. <p>Una stringa 'Group'. Non deve essere modificata.</p>
  41. <h2>Metodi</h2>
  42. <p>Vedi la classe base [page:Object3D] per i metodi comuni.</p>
  43. <h2>Source</h2>
  44. <p>
  45. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  46. </p>
  47. </body>
  48. </html>