tiledBoxBuilder.d.ts 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. import type { Nullable } from "../../types";
  2. import type { Scene } from "../../scene";
  3. import { Vector4 } from "../../Maths/math.vector";
  4. import { Color4 } from "../../Maths/math.color";
  5. import { Mesh } from "../mesh";
  6. import { VertexData } from "../mesh.vertexData";
  7. /**
  8. * Creates the VertexData for a tiled box
  9. * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/tiled_box
  10. * @param options an object used to set the following optional parameters for the tiled box, required but can be empty
  11. * * pattern sets the rotation or reflection pattern for the tiles,
  12. * * size of the box
  13. * * width of the box, overwrites size
  14. * * height of the box, overwrites size
  15. * * depth of the box, overwrites size
  16. * * tileSize sets the size of a tile
  17. * * tileWidth sets the tile width and overwrites tileSize
  18. * * tileHeight sets the tile width and overwrites tileSize
  19. * * faceUV an array of 6 Vector4 elements used to set different images to each box side
  20. * * faceColors an array of 6 Color3 elements used to set different colors to each box side
  21. * * alignHorizontal places whole tiles aligned to the center, left or right of a row
  22. * * alignVertical places whole tiles aligned to the center, left or right of a column
  23. * @param options.pattern
  24. * @param options.size
  25. * @param options.width
  26. * @param options.height
  27. * @param options.depth
  28. * @param options.tileSize
  29. * @param options.tileWidth
  30. * @param options.tileHeight
  31. * @param options.faceUV
  32. * @param options.faceColors
  33. * @param options.alignHorizontal
  34. * @param options.alignVertical
  35. * @param options.sideOrientation
  36. * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
  37. * @returns the VertexData of the TiledBox
  38. */
  39. export declare function CreateTiledBoxVertexData(options: {
  40. pattern?: number;
  41. size?: number;
  42. width?: number;
  43. height?: number;
  44. depth?: number;
  45. tileSize?: number;
  46. tileWidth?: number;
  47. tileHeight?: number;
  48. faceUV?: Vector4[];
  49. faceColors?: Color4[];
  50. alignHorizontal?: number;
  51. alignVertical?: number;
  52. sideOrientation?: number;
  53. }): VertexData;
  54. /**
  55. * Creates a tiled box mesh
  56. * @see https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set/tiled_box
  57. * @param name defines the name of the mesh
  58. * @param options an object used to set the following optional parameters for the tiled box, required but can be empty
  59. * * pattern sets the rotation or reflection pattern for the tiles,
  60. * * size of the box
  61. * * width of the box, overwrites size
  62. * * height of the box, overwrites size
  63. * * depth of the box, overwrites size
  64. * * tileSize sets the size of a tile
  65. * * tileWidth sets the tile width and overwrites tileSize
  66. * * tileHeight sets the tile width and overwrites tileSize
  67. * * faceUV an array of 6 Vector4 elements used to set different images to each box side
  68. * * faceColors an array of 6 Color3 elements used to set different colors to each box side
  69. * * alignHorizontal places whole tiles aligned to the center, left or right of a row
  70. * * alignVertical places whole tiles aligned to the center, left or right of a column
  71. * * sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
  72. * @param options.pattern
  73. * @param options.width
  74. * @param options.height
  75. * @param options.depth
  76. * @param options.tileSize
  77. * @param options.tileWidth
  78. * @param options.tileHeight
  79. * @param options.alignHorizontal
  80. * @param options.alignVertical
  81. * @param options.faceUV
  82. * @param options.faceColors
  83. * @param options.sideOrientation
  84. * @param options.updatable
  85. * @param scene defines the hosting scene
  86. * @returns the box mesh
  87. */
  88. export declare function CreateTiledBox(name: string, options: {
  89. pattern?: number;
  90. width?: number;
  91. height?: number;
  92. depth?: number;
  93. tileSize?: number;
  94. tileWidth?: number;
  95. tileHeight?: number;
  96. alignHorizontal?: number;
  97. alignVertical?: number;
  98. faceUV?: Vector4[];
  99. faceColors?: Color4[];
  100. sideOrientation?: number;
  101. updatable?: boolean;
  102. }, scene?: Nullable<Scene>): Mesh;
  103. /**
  104. * Class containing static functions to help procedurally build meshes
  105. * @deprecated use CreateTiledBox instead
  106. */
  107. export declare const TiledBoxBuilder: {
  108. CreateTiledBox: typeof CreateTiledBox;
  109. };