babylon.postProcesses.module.d.ts 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  1. /*BabylonJS Postprocess library*/
  2. // Dependencies for this module:
  3. // ../../../../Tools/Gulp/babylonjs
  4. declare module 'babylonjs-postProcessLibrary' {
  5. export * from "babylonjs-postProcessLibrary/asciiArt";
  6. export * from "babylonjs-postProcessLibrary/digitalRain";
  7. }
  8. declare module 'babylonjs-postProcessLibrary/asciiArt' {
  9. export * from "babylonjs-postProcessLibrary/asciiArt/asciiArtPostProcess";
  10. }
  11. declare module 'babylonjs-postProcessLibrary/digitalRain' {
  12. export * from "babylonjs-postProcessLibrary/digitalRain/digitalRainPostProcess";
  13. }
  14. declare module 'babylonjs-postProcessLibrary/asciiArt/asciiArtPostProcess' {
  15. import { BaseTexture, Nullable, Scene, PostProcess, Camera } from "babylonjs";
  16. /**
  17. * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
  18. *
  19. * It basically takes care rendering the font front the given font size to a texture.
  20. * This is used later on in the postprocess.
  21. */
  22. export class AsciiArtFontTexture extends BaseTexture {
  23. /**
  24. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  25. */
  26. readonly charSize: number;
  27. /**
  28. * Create a new instance of the Ascii Art FontTexture class
  29. * @param name the name of the texture
  30. * @param font the font to use, use the W3C CSS notation
  31. * @param text the caracter set to use in the rendering.
  32. * @param scene the scene that owns the texture
  33. */
  34. constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
  35. /**
  36. * Clones the current AsciiArtTexture.
  37. * @return the clone of the texture.
  38. */
  39. clone(): AsciiArtFontTexture;
  40. /**
  41. * Parses a json object representing the texture and returns an instance of it.
  42. * @param source the source JSON representation
  43. * @param scene the scene to create the texture for
  44. * @return the parsed texture
  45. */
  46. static Parse(source: any, scene: Scene): AsciiArtFontTexture;
  47. }
  48. /**
  49. * Option available in the Ascii Art Post Process.
  50. */
  51. export interface IAsciiArtPostProcessOptions {
  52. /**
  53. * The font to use following the w3c font definition.
  54. */
  55. font?: string;
  56. /**
  57. * The character set to use in the postprocess.
  58. */
  59. characterSet?: string;
  60. /**
  61. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  62. * This number is defined between 0 and 1;
  63. */
  64. mixToTile?: number;
  65. /**
  66. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  67. * This number is defined between 0 and 1;
  68. */
  69. mixToNormal?: number;
  70. }
  71. /**
  72. * AsciiArtPostProcess helps rendering everithing in Ascii Art.
  73. *
  74. * Simmply add it to your scene and let the nerd that lives in you have fun.
  75. * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
  76. */
  77. export class AsciiArtPostProcess extends PostProcess {
  78. /**
  79. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  80. * This number is defined between 0 and 1;
  81. */
  82. mixToTile: number;
  83. /**
  84. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  85. * This number is defined between 0 and 1;
  86. */
  87. mixToNormal: number;
  88. /**
  89. * Instantiates a new Ascii Art Post Process.
  90. * @param name the name to give to the postprocess
  91. * @camera the camera to apply the post process to.
  92. * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
  93. */
  94. constructor(name: string, camera: Camera, options?: string | IAsciiArtPostProcessOptions);
  95. }
  96. }
  97. declare module 'babylonjs-postProcessLibrary/digitalRain/digitalRainPostProcess' {
  98. import { BaseTexture, Nullable, Scene, PostProcess, Camera } from "babylonjs";
  99. /**
  100. * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
  101. *
  102. * It basically takes care rendering the font front the given font size to a texture.
  103. * This is used later on in the postprocess.
  104. */
  105. export class DigitalRainFontTexture extends BaseTexture {
  106. /**
  107. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  108. */
  109. readonly charSize: number;
  110. /**
  111. * Create a new instance of the Digital Rain FontTexture class
  112. * @param name the name of the texture
  113. * @param font the font to use, use the W3C CSS notation
  114. * @param text the caracter set to use in the rendering.
  115. * @param scene the scene that owns the texture
  116. */
  117. constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
  118. /**
  119. * Clones the current DigitalRainFontTexture.
  120. * @return the clone of the texture.
  121. */
  122. clone(): DigitalRainFontTexture;
  123. /**
  124. * Parses a json object representing the texture and returns an instance of it.
  125. * @param source the source JSON representation
  126. * @param scene the scene to create the texture for
  127. * @return the parsed texture
  128. */
  129. static Parse(source: any, scene: Scene): DigitalRainFontTexture;
  130. }
  131. /**
  132. * Option available in the Digital Rain Post Process.
  133. */
  134. export interface IDigitalRainPostProcessOptions {
  135. /**
  136. * The font to use following the w3c font definition.
  137. */
  138. font?: string;
  139. /**
  140. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  141. * This number is defined between 0 and 1;
  142. */
  143. mixToTile?: number;
  144. /**
  145. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  146. * This number is defined between 0 and 1;
  147. */
  148. mixToNormal?: number;
  149. }
  150. /**
  151. * DigitalRainPostProcess helps rendering everithing in digital rain.
  152. *
  153. * Simmply add it to your scene and let the nerd that lives in you have fun.
  154. * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
  155. */
  156. export class DigitalRainPostProcess extends PostProcess {
  157. /**
  158. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  159. * This number is defined between 0 and 1;
  160. */
  161. mixToTile: number;
  162. /**
  163. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  164. * This number is defined between 0 and 1;
  165. */
  166. mixToNormal: number;
  167. /**
  168. * Instantiates a new Digital Rain Post Process.
  169. * @param name the name to give to the postprocess
  170. * @camera the camera to apply the post process to.
  171. * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
  172. */
  173. constructor(name: string, camera: Camera, options?: string | IDigitalRainPostProcessOptions);
  174. }
  175. }
  176. /*BabylonJS Postprocess library*/
  177. // Dependencies for this module:
  178. // ../../../../Tools/Gulp/babylonjs
  179. declare module BABYLON {
  180. }
  181. declare module BABYLON {
  182. }
  183. declare module BABYLON {
  184. }
  185. declare module BABYLON {
  186. /**
  187. * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
  188. *
  189. * It basically takes care rendering the font front the given font size to a texture.
  190. * This is used later on in the postprocess.
  191. */
  192. export class AsciiArtFontTexture extends BABYLON.BaseTexture {
  193. /**
  194. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  195. */
  196. readonly charSize: number;
  197. /**
  198. * Create a new instance of the Ascii Art FontTexture class
  199. * @param name the name of the texture
  200. * @param font the font to use, use the W3C CSS notation
  201. * @param text the caracter set to use in the rendering.
  202. * @param scene the scene that owns the texture
  203. */
  204. constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
  205. /**
  206. * Clones the current AsciiArtTexture.
  207. * @return the clone of the texture.
  208. */
  209. clone(): AsciiArtFontTexture;
  210. /**
  211. * Parses a json object representing the texture and returns an instance of it.
  212. * @param source the source JSON representation
  213. * @param scene the scene to create the texture for
  214. * @return the parsed texture
  215. */
  216. static Parse(source: any, scene: BABYLON.Scene): AsciiArtFontTexture;
  217. }
  218. /**
  219. * Option available in the Ascii Art Post Process.
  220. */
  221. export interface IAsciiArtPostProcessOptions {
  222. /**
  223. * The font to use following the w3c font definition.
  224. */
  225. font?: string;
  226. /**
  227. * The character set to use in the postprocess.
  228. */
  229. characterSet?: string;
  230. /**
  231. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  232. * This number is defined between 0 and 1;
  233. */
  234. mixToTile?: number;
  235. /**
  236. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  237. * This number is defined between 0 and 1;
  238. */
  239. mixToNormal?: number;
  240. }
  241. /**
  242. * AsciiArtPostProcess helps rendering everithing in Ascii Art.
  243. *
  244. * Simmply add it to your scene and let the nerd that lives in you have fun.
  245. * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
  246. */
  247. export class AsciiArtPostProcess extends BABYLON.PostProcess {
  248. /**
  249. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  250. * This number is defined between 0 and 1;
  251. */
  252. mixToTile: number;
  253. /**
  254. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  255. * This number is defined between 0 and 1;
  256. */
  257. mixToNormal: number;
  258. /**
  259. * Instantiates a new Ascii Art Post Process.
  260. * @param name the name to give to the postprocess
  261. * @camera the camera to apply the post process to.
  262. * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
  263. */
  264. constructor(name: string, camera: BABYLON.Camera, options?: string | IAsciiArtPostProcessOptions);
  265. }
  266. }
  267. declare module BABYLON {
  268. /**
  269. * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
  270. *
  271. * It basically takes care rendering the font front the given font size to a texture.
  272. * This is used later on in the postprocess.
  273. */
  274. export class DigitalRainFontTexture extends BABYLON.BaseTexture {
  275. /**
  276. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  277. */
  278. readonly charSize: number;
  279. /**
  280. * Create a new instance of the Digital Rain FontTexture class
  281. * @param name the name of the texture
  282. * @param font the font to use, use the W3C CSS notation
  283. * @param text the caracter set to use in the rendering.
  284. * @param scene the scene that owns the texture
  285. */
  286. constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
  287. /**
  288. * Clones the current DigitalRainFontTexture.
  289. * @return the clone of the texture.
  290. */
  291. clone(): DigitalRainFontTexture;
  292. /**
  293. * Parses a json object representing the texture and returns an instance of it.
  294. * @param source the source JSON representation
  295. * @param scene the scene to create the texture for
  296. * @return the parsed texture
  297. */
  298. static Parse(source: any, scene: BABYLON.Scene): DigitalRainFontTexture;
  299. }
  300. /**
  301. * Option available in the Digital Rain Post Process.
  302. */
  303. export interface IDigitalRainPostProcessOptions {
  304. /**
  305. * The font to use following the w3c font definition.
  306. */
  307. font?: string;
  308. /**
  309. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  310. * This number is defined between 0 and 1;
  311. */
  312. mixToTile?: number;
  313. /**
  314. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  315. * This number is defined between 0 and 1;
  316. */
  317. mixToNormal?: number;
  318. }
  319. /**
  320. * DigitalRainPostProcess helps rendering everithing in digital rain.
  321. *
  322. * Simmply add it to your scene and let the nerd that lives in you have fun.
  323. * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
  324. */
  325. export class DigitalRainPostProcess extends BABYLON.PostProcess {
  326. /**
  327. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  328. * This number is defined between 0 and 1;
  329. */
  330. mixToTile: number;
  331. /**
  332. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  333. * This number is defined between 0 and 1;
  334. */
  335. mixToNormal: number;
  336. /**
  337. * Instantiates a new Digital Rain Post Process.
  338. * @param name the name to give to the postprocess
  339. * @camera the camera to apply the post process to.
  340. * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
  341. */
  342. constructor(name: string, camera: BABYLON.Camera, options?: string | IDigitalRainPostProcessOptions);
  343. }
  344. }