babylonjs.proceduralTextures.module.d.ts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. declare module 'babylonjs-procedural-textures' {
  2. export = BABYLON;
  3. }
  4. declare module BABYLON {
  5. class WoodProceduralTexture extends ProceduralTexture {
  6. private _ampScale;
  7. private _woodColor;
  8. constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
  9. updateShaderUniforms(): void;
  10. ampScale: number;
  11. woodColor: Color3;
  12. /**
  13. * Serializes this wood procedural texture
  14. * @returns a serialized wood procedural texture object
  15. */
  16. serialize(): any;
  17. /**
  18. * Creates a Wood Procedural Texture from parsed wood procedural texture data
  19. * @param parsedTexture defines parsed texture data
  20. * @param scene defines the current scene
  21. * @param rootUrl defines the root URL containing wood procedural texture information
  22. * @returns a parsed Wood Procedural Texture
  23. */
  24. static Parse(parsedTexture: any, scene: Scene, rootUrl: string): WoodProceduralTexture;
  25. }
  26. }
  27. declare module BABYLON {
  28. class FireProceduralTexture extends ProceduralTexture {
  29. private _time;
  30. private _speed;
  31. private _autoGenerateTime;
  32. private _fireColors;
  33. private _alphaThreshold;
  34. constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
  35. updateShaderUniforms(): void;
  36. render(useCameraPostProcess?: boolean): void;
  37. static readonly PurpleFireColors: Color3[];
  38. static readonly GreenFireColors: Color3[];
  39. static readonly RedFireColors: Color3[];
  40. static readonly BlueFireColors: Color3[];
  41. fireColors: Color3[];
  42. time: number;
  43. speed: Vector2;
  44. alphaThreshold: number;
  45. /**
  46. * Serializes this fire procedural texture
  47. * @returns a serialized fire procedural texture object
  48. */
  49. serialize(): any;
  50. /**
  51. * Creates a Fire Procedural Texture from parsed fire procedural texture data
  52. * @param parsedTexture defines parsed texture data
  53. * @param scene defines the current scene
  54. * @param rootUrl defines the root URL containing fire procedural texture information
  55. * @returns a parsed Fire Procedural Texture
  56. */
  57. static Parse(parsedTexture: any, scene: Scene, rootUrl: string): FireProceduralTexture;
  58. }
  59. }
  60. declare module BABYLON {
  61. class CloudProceduralTexture extends ProceduralTexture {
  62. private _skyColor;
  63. private _cloudColor;
  64. constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
  65. updateShaderUniforms(): void;
  66. skyColor: Color4;
  67. cloudColor: Color4;
  68. /**
  69. * Serializes this cloud procedural texture
  70. * @returns a serialized cloud procedural texture object
  71. */
  72. serialize(): any;
  73. /**
  74. * Creates a Cloud Procedural Texture from parsed cloud procedural texture data
  75. * @param parsedTexture defines parsed texture data
  76. * @param scene defines the current scene
  77. * @param rootUrl defines the root URL containing cloud procedural texture information
  78. * @returns a parsed Cloud Procedural Texture
  79. */
  80. static Parse(parsedTexture: any, scene: Scene, rootUrl: string): CloudProceduralTexture;
  81. }
  82. }
  83. declare module BABYLON {
  84. class GrassProceduralTexture extends ProceduralTexture {
  85. private _grassColors;
  86. private _groundColor;
  87. constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
  88. updateShaderUniforms(): void;
  89. grassColors: Color3[];
  90. groundColor: Color3;
  91. /**
  92. * Serializes this grass procedural texture
  93. * @returns a serialized grass procedural texture object
  94. */
  95. serialize(): any;
  96. /**
  97. * Creates a Grass Procedural Texture from parsed grass procedural texture data
  98. * @param parsedTexture defines parsed texture data
  99. * @param scene defines the current scene
  100. * @param rootUrl defines the root URL containing grass procedural texture information
  101. * @returns a parsed Grass Procedural Texture
  102. */
  103. static Parse(parsedTexture: any, scene: Scene, rootUrl: string): GrassProceduralTexture;
  104. }
  105. }
  106. declare module BABYLON {
  107. class RoadProceduralTexture extends ProceduralTexture {
  108. private _roadColor;
  109. constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
  110. updateShaderUniforms(): void;
  111. roadColor: Color3;
  112. /**
  113. * Serializes this road procedural texture
  114. * @returns a serialized road procedural texture object
  115. */
  116. serialize(): any;
  117. /**
  118. * Creates a Road Procedural Texture from parsed road procedural texture data
  119. * @param parsedTexture defines parsed texture data
  120. * @param scene defines the current scene
  121. * @param rootUrl defines the root URL containing road procedural texture information
  122. * @returns a parsed Road Procedural Texture
  123. */
  124. static Parse(parsedTexture: any, scene: Scene, rootUrl: string): RoadProceduralTexture;
  125. }
  126. }
  127. declare module BABYLON {
  128. class BrickProceduralTexture extends ProceduralTexture {
  129. private _numberOfBricksHeight;
  130. private _numberOfBricksWidth;
  131. private _jointColor;
  132. private _brickColor;
  133. constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
  134. updateShaderUniforms(): void;
  135. numberOfBricksHeight: number;
  136. numberOfBricksWidth: number;
  137. jointColor: Color3;
  138. brickColor: Color3;
  139. /**
  140. * Serializes this brick procedural texture
  141. * @returns a serialized brick procedural texture object
  142. */
  143. serialize(): any;
  144. /**
  145. * Creates a Brick Procedural Texture from parsed brick procedural texture data
  146. * @param parsedTexture defines parsed texture data
  147. * @param scene defines the current scene
  148. * @param rootUrl defines the root URL containing brick procedural texture information
  149. * @returns a parsed Brick Procedural Texture
  150. */
  151. static Parse(parsedTexture: any, scene: Scene, rootUrl: string): BrickProceduralTexture;
  152. }
  153. }
  154. declare module BABYLON {
  155. class MarbleProceduralTexture extends ProceduralTexture {
  156. private _numberOfTilesHeight;
  157. private _numberOfTilesWidth;
  158. private _amplitude;
  159. private _jointColor;
  160. constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
  161. updateShaderUniforms(): void;
  162. numberOfTilesHeight: number;
  163. amplitude: number;
  164. numberOfTilesWidth: number;
  165. jointColor: Color3;
  166. /**
  167. * Serializes this marble procedural texture
  168. * @returns a serialized marble procedural texture object
  169. */
  170. serialize(): any;
  171. /**
  172. * Creates a Marble Procedural Texture from parsed marble procedural texture data
  173. * @param parsedTexture defines parsed texture data
  174. * @param scene defines the current scene
  175. * @param rootUrl defines the root URL containing marble procedural texture information
  176. * @returns a parsed Marble Procedural Texture
  177. */
  178. static Parse(parsedTexture: any, scene: Scene, rootUrl: string): MarbleProceduralTexture;
  179. }
  180. }
  181. declare module BABYLON {
  182. class StarfieldProceduralTexture extends ProceduralTexture {
  183. private _time;
  184. private _alpha;
  185. private _beta;
  186. private _zoom;
  187. private _formuparam;
  188. private _stepsize;
  189. private _tile;
  190. private _brightness;
  191. private _darkmatter;
  192. private _distfading;
  193. private _saturation;
  194. constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
  195. updateShaderUniforms(): void;
  196. time: number;
  197. alpha: number;
  198. beta: number;
  199. formuparam: number;
  200. stepsize: number;
  201. zoom: number;
  202. tile: number;
  203. brightness: number;
  204. darkmatter: number;
  205. distfading: number;
  206. saturation: number;
  207. /**
  208. * Serializes this starfield procedural texture
  209. * @returns a serialized starfield procedural texture object
  210. */
  211. serialize(): any;
  212. /**
  213. * Creates a Starfield Procedural Texture from parsed startfield procedural texture data
  214. * @param parsedTexture defines parsed texture data
  215. * @param scene defines the current scene
  216. * @param rootUrl defines the root URL containing startfield procedural texture information
  217. * @returns a parsed Starfield Procedural Texture
  218. */
  219. static Parse(parsedTexture: any, scene: Scene, rootUrl: string): StarfieldProceduralTexture;
  220. }
  221. }
  222. declare module BABYLON {
  223. class NormalMapProceduralTexture extends ProceduralTexture {
  224. private _baseTexture;
  225. constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
  226. updateShaderUniforms(): void;
  227. render(useCameraPostProcess?: boolean): void;
  228. resize(size: any, generateMipMaps: any): void;
  229. baseTexture: Texture;
  230. /**
  231. * Serializes this normal map procedural texture
  232. * @returns a serialized normal map procedural texture object
  233. */
  234. serialize(): any;
  235. /**
  236. * Creates a Normal Map Procedural Texture from parsed normal map procedural texture data
  237. * @param parsedTexture defines parsed texture data
  238. * @param scene defines the current scene
  239. * @param rootUrl defines the root URL containing normal map procedural texture information
  240. * @returns a parsed Normal Map Procedural Texture
  241. */
  242. static Parse(parsedTexture: any, scene: Scene, rootUrl: string): NormalMapProceduralTexture;
  243. }
  244. }
  245. declare module BABYLON {
  246. class PerlinNoiseProceduralTexture extends ProceduralTexture {
  247. time: number;
  248. speed: number;
  249. translationSpeed: number;
  250. private _currentTranslation;
  251. constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
  252. updateShaderUniforms(): void;
  253. render(useCameraPostProcess?: boolean): void;
  254. resize(size: any, generateMipMaps: any): void;
  255. /**
  256. * Serializes this perlin noise procedural texture
  257. * @returns a serialized perlin noise procedural texture object
  258. */
  259. serialize(): any;
  260. /**
  261. * Creates a Perlin Noise Procedural Texture from parsed perlin noise procedural texture data
  262. * @param parsedTexture defines parsed texture data
  263. * @param scene defines the current scene
  264. * @param rootUrl defines the root URL containing perlin noise procedural texture information
  265. * @returns a parsed Perlin Noise Procedural Texture
  266. */
  267. static Parse(parsedTexture: any, scene: Scene, rootUrl: string): PerlinNoiseProceduralTexture;
  268. }
  269. }