babylonjs.proceduralTextures.module.d.ts 11 KB

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