Mesh.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. Una classe che rappresenta oggetti basati su [link:https://en.wikipedia.org/wiki/Polygon_mesh mesh poligonali] triangolari.
  14. Serve anche come base per altre classi come [page:SkinnedMesh].
  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: 0xffff00 } );
  20. const mesh = new THREE.Mesh( geometry, material );
  21. scene.add( mesh );
  22. </code>
  23. <h2>Costruttore</h2>
  24. <h3>[name]( [param:BufferGeometry geometry], [param:Material material] )</h3>
  25. <p>
  26. [page:BufferGeometry geometry] — (opzionale) un'istanza di [page:BufferGeometry]. Il valore predefinito è una nuova [page:BufferGeometry].<br />
  27. [page:Material material] — (opzionale) un singolo o un array di [page:Material Material]. Il valore predefinito è una nuova [page:MeshBasicMaterial].
  28. </p>
  29. <h2>Proprietà</h2>
  30. <p>Vedi la classe base [page:Object3D] per le proprietà comuni.</p>
  31. <h3>[property:BufferGeometry geometry]</h3>
  32. <p>
  33. Un'istanza di [page:BufferGeometry] (o classi derivate), che definisce la struttura dell'oggetto.
  34. </p>
  35. <h3>[property:Boolean isMesh]</h3>
  36. <p>
  37. Flag di sola lettura per verificare se l'oggetto dato è di tipo [name].
  38. </p>
  39. <h3>[property:Material material]</h3>
  40. <p>
  41. Un'istanza di materiale derivata dalla classe base [page:Material] o un array di materiali, che definisce
  42. l'aspetto dell'oggetto. Il valore predefinito è [page:MeshBasicMaterial].
  43. </p>
  44. <h3>[property:Array morphTargetInfluences]</h3>
  45. <p>
  46. Un array di pesi solitamente da 0 a 1 che specifica la quantità di morph applicata.
  47. Non definito per impostazione predefinita, ma reimpostato su un array vuoto da [page:Mesh.updateMorphTargets updateMorphTargets].
  48. </p>
  49. <h3>[property:Object morphTargetDictionary]</h3>
  50. <p>
  51. Un dizionario di morphTargets basato sulla proprietà morphTarget.name.
  52. Non definito per impostazione predefinita, ma ricompilato [page:Mesh.updateMorphTargets updateMorphTargets].
  53. </p>
  54. <h2>Metodi</h2>
  55. <p>Vedi la classe base [page:Object3D] per i metodi comuni.</p>
  56. <h3>[method:undefined raycast]( [param:Raycaster raycaster], [param:Array intersects] )</h3>
  57. <p>
  58. Ottiene le intersezioni tra un raggio lanciato e questa mesh.
  59. [page:Raycaster.intersectObject] chiamerà questo metodo, ma i risultati non saranno ordinati.
  60. </p>
  61. <h3>[method:undefined updateMorphTargets]()</h3>
  62. <p>
  63. Aggiorna i morphTargets in modo che non abbiano influenza sull'oggetto. Reimposta le proprietà
  64. [page:Mesh.morphTargetInfluences morphTargetInfluences] e
  65. [page:Mesh.morphTargetDictionary morphTargetDictionary].
  66. </p>
  67. <h2>Source</h2>
  68. <p>
  69. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  70. </p>
  71. </body>
  72. </html>