Face3.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import { Vector3 } from './../math/Vector3';
  2. import { Color } from './../math/Color';
  3. export interface Event {
  4. type: string;
  5. target?: any;
  6. [attachment: string]: any;
  7. }
  8. /**
  9. * Triangle face.
  10. *
  11. * @source https://github.com/mrdoob/three.js/blob/master/src/core/Face3.js
  12. */
  13. export class Face3 {
  14. /**
  15. * @param a Vertex A index.
  16. * @param b Vertex B index.
  17. * @param c Vertex C index.
  18. * @param normal Face normal or array of vertex normals.
  19. * @param color Face color or array of vertex colors.
  20. * @param materialIndex Material index.
  21. */
  22. constructor(
  23. a: number,
  24. b: number,
  25. c: number,
  26. normal?: Vector3,
  27. color?: Color,
  28. materialIndex?: number
  29. );
  30. constructor(
  31. a: number,
  32. b: number,
  33. c: number,
  34. normal?: Vector3,
  35. vertexColors?: Color[],
  36. materialIndex?: number
  37. );
  38. constructor(
  39. a: number,
  40. b: number,
  41. c: number,
  42. vertexNormals?: Vector3[],
  43. color?: Color,
  44. materialIndex?: number
  45. );
  46. constructor(
  47. a: number,
  48. b: number,
  49. c: number,
  50. vertexNormals?: Vector3[],
  51. vertexColors?: Color[],
  52. materialIndex?: number
  53. );
  54. /**
  55. * Vertex A index.
  56. */
  57. a: number;
  58. /**
  59. * Vertex B index.
  60. */
  61. b: number;
  62. /**
  63. * Vertex C index.
  64. */
  65. c: number;
  66. /**
  67. * Face normal.
  68. */
  69. normal: Vector3;
  70. /**
  71. * Array of 4 vertex normals.
  72. */
  73. vertexNormals: Vector3[];
  74. /**
  75. * Face color.
  76. */
  77. color: Color;
  78. /**
  79. * Array of 4 vertex normals.
  80. */
  81. vertexColors: Color[];
  82. /**
  83. * Material index (points to {@link Geometry.materials}).
  84. */
  85. materialIndex: number;
  86. clone(): this;
  87. copy( source: Face3 ): this;
  88. }
粤ICP备19079148号