Face3.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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. <h1>[name]</h1>
  11. <p class="desc">
  12. 在 deprecated geometry 中被使用到的三角形面。这些三角形面会为所有标准几何体自动创建。
  13. 然而,如果你正在构建一个自定义几何体,你需要手动创建这些三角形面。
  14. </p>
  15. <h2>构造函数</h2>
  16. <h3>[name]( [param:Integer a], [param:Integer b], [param:Integer c], [param:Vector3 normal], [param:Color color], [param:Integer materialIndex] )</h3>
  17. <p>
  18. a — 顶点 A 的索引。<br />
  19. b — 顶点 B 的索引。<br />
  20. c — 顶点 C 的索引。<br /><br />
  21. normal — (可选) 面的法向量 ([page:Vector3 Vector3]) 或顶点法向量队列。
  22. 如果参数传入单一矢量,则用该量设置面的法向量 [page:.normal],如果传入的是包含三个矢量的队列,
  23. 则用该量设置 [page:.vertexNormals]<br /><br />
  24. color — (可选) 面的颜色值 [page:Color color] 或顶点颜色值的队列。
  25. 如果参数传入单一矢量,则用该量设置 [page:.color],如果传入的是包含三个矢量的队列,
  26. 则用该量设置 [page:.vertexColors]<br /><br />
  27. materialIndex — (可选) 材质队列中与该面对应的材质的索引。
  28. </p>
  29. <h2>属性</h2>
  30. <h3>[property:Integer a]</h3>
  31. <p>
  32. 顶点 A 的索引。
  33. </p>
  34. <h3>[property:Integer b]</h3>
  35. <p>
  36. 顶点 B 的索引。
  37. </p>
  38. <h3>[property:Integer c]</h3>
  39. <p>
  40. 顶点 C 的索引。
  41. </p>
  42. <h3>[property:Vector3 normal]</h3>
  43. <p>
  44. 面的法向量 - 矢量展示 Face3 的方向。如果该量是通过调用自动计算的,
  45. 该值等于归一化的两条边的差积。默认值是 *(0, 0, 0)*。
  46. </p>
  47. <h3>[property:Color color]</h3>
  48. <p>
  49. 面的颜色值 - 在被用于指定材质的 [page:Material.vertexColors vertexColors] 属性时,该值必须被设置为
  50. *true*。
  51. </p>
  52. <h3>[property:Array vertexNormals]</h3>
  53. <p>
  54. 包含三个 [page:Vector3 vertex normals] 的队列。
  55. </p>
  56. <h3>[property:Array vertexColors]</h3>
  57. <p>
  58. 包含 3 个顶点颜色值的队列 - 在被用于指定材质的 [page:Material.vertexColors vertexColors] 属性时,该值必须被设置为
  59. *true*。
  60. </p>
  61. <h3>[property:Integer materialIndex]</h3>
  62. <p>
  63. 材质队列中与该面相关的材质的索引。默认值为 *0*。
  64. </p>
  65. <h2>方法</h2>
  66. <h3>[method:Face3 clone]()</h3>
  67. <p>克隆该 Face3 对象。</p>
  68. <h3>[method:Face3 copy]( [param:Face3 face3] )</h3>
  69. <p>将参数指定的 Face3 对象的数据拷贝到当前对象。</p>
  70. <h2>源代码</h2>
  71. <p>
  72. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  73. </p>
  74. </body>
  75. </html>