babylonjs.postProcess.module.d.ts 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. /*BabylonJS Postprocess library*/
  2. // Dependencies for this module:
  3. // ../../../../Tools/Gulp/babylonjs
  4. declare module 'babylonjs-postProcessLibrary' {
  5. export * from "babylonjs-postProcessLibrary/src/asciiArt";
  6. export * from "babylonjs-postProcessLibrary/src/digitalRain";
  7. }
  8. declare module 'babylonjs-postProcessLibrary/src/asciiArt' {
  9. export * from "babylonjs-postProcessLibrary/src/asciiArt/asciiArtPostProcess";
  10. }
  11. declare module 'babylonjs-postProcessLibrary/src/digitalRain' {
  12. export * from "babylonjs-postProcessLibrary/src/digitalRain/digitalRainPostProcess";
  13. }
  14. declare module 'babylonjs-postProcessLibrary/src/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/src/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. * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
  182. *
  183. * It basically takes care rendering the font front the given font size to a texture.
  184. * This is used later on in the postprocess.
  185. */
  186. export class AsciiArtFontTexture extends BABYLON.BaseTexture {
  187. /**
  188. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  189. */
  190. readonly charSize: number;
  191. /**
  192. * Create a new instance of the Ascii Art FontTexture class
  193. * @param name the name of the texture
  194. * @param font the font to use, use the W3C CSS notation
  195. * @param text the caracter set to use in the rendering.
  196. * @param scene the scene that owns the texture
  197. */
  198. constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
  199. /**
  200. * Clones the current AsciiArtTexture.
  201. * @return the clone of the texture.
  202. */
  203. clone(): AsciiArtFontTexture;
  204. /**
  205. * Parses a json object representing the texture and returns an instance of it.
  206. * @param source the source JSON representation
  207. * @param scene the scene to create the texture for
  208. * @return the parsed texture
  209. */
  210. static Parse(source: any, scene: BABYLON.Scene): AsciiArtFontTexture;
  211. }
  212. /**
  213. * Option available in the Ascii Art Post Process.
  214. */
  215. export interface IAsciiArtPostProcessOptions {
  216. /**
  217. * The font to use following the w3c font definition.
  218. */
  219. font?: string;
  220. /**
  221. * The character set to use in the postprocess.
  222. */
  223. characterSet?: string;
  224. /**
  225. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  226. * This number is defined between 0 and 1;
  227. */
  228. mixToTile?: number;
  229. /**
  230. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  231. * This number is defined between 0 and 1;
  232. */
  233. mixToNormal?: number;
  234. }
  235. /**
  236. * AsciiArtPostProcess helps rendering everithing in Ascii Art.
  237. *
  238. * Simmply add it to your scene and let the nerd that lives in you have fun.
  239. * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
  240. */
  241. export class AsciiArtPostProcess extends BABYLON.PostProcess {
  242. /**
  243. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  244. * This number is defined between 0 and 1;
  245. */
  246. mixToTile: number;
  247. /**
  248. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  249. * This number is defined between 0 and 1;
  250. */
  251. mixToNormal: number;
  252. /**
  253. * Instantiates a new Ascii Art Post Process.
  254. * @param name the name to give to the postprocess
  255. * @camera the camera to apply the post process to.
  256. * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
  257. */
  258. constructor(name: string, camera: BABYLON.Camera, options?: string | IAsciiArtPostProcessOptions);
  259. }
  260. }
  261. declare module BABYLON {
  262. /**
  263. * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
  264. *
  265. * It basically takes care rendering the font front the given font size to a texture.
  266. * This is used later on in the postprocess.
  267. */
  268. export class DigitalRainFontTexture extends BABYLON.BaseTexture {
  269. /**
  270. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  271. */
  272. readonly charSize: number;
  273. /**
  274. * Create a new instance of the Digital Rain FontTexture class
  275. * @param name the name of the texture
  276. * @param font the font to use, use the W3C CSS notation
  277. * @param text the caracter set to use in the rendering.
  278. * @param scene the scene that owns the texture
  279. */
  280. constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
  281. /**
  282. * Clones the current DigitalRainFontTexture.
  283. * @return the clone of the texture.
  284. */
  285. clone(): DigitalRainFontTexture;
  286. /**
  287. * Parses a json object representing the texture and returns an instance of it.
  288. * @param source the source JSON representation
  289. * @param scene the scene to create the texture for
  290. * @return the parsed texture
  291. */
  292. static Parse(source: any, scene: BABYLON.Scene): DigitalRainFontTexture;
  293. }
  294. /**
  295. * Option available in the Digital Rain Post Process.
  296. */
  297. export interface IDigitalRainPostProcessOptions {
  298. /**
  299. * The font to use following the w3c font definition.
  300. */
  301. font?: string;
  302. /**
  303. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  304. * This number is defined between 0 and 1;
  305. */
  306. mixToTile?: number;
  307. /**
  308. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  309. * This number is defined between 0 and 1;
  310. */
  311. mixToNormal?: number;
  312. }
  313. /**
  314. * DigitalRainPostProcess helps rendering everithing in digital rain.
  315. *
  316. * Simmply add it to your scene and let the nerd that lives in you have fun.
  317. * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
  318. */
  319. export class DigitalRainPostProcess extends BABYLON.PostProcess {
  320. /**
  321. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  322. * This number is defined between 0 and 1;
  323. */
  324. mixToTile: number;
  325. /**
  326. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  327. * This number is defined between 0 and 1;
  328. */
  329. mixToNormal: number;
  330. /**
  331. * Instantiates a new Digital Rain Post Process.
  332. * @param name the name to give to the postprocess
  333. * @camera the camera to apply the post process to.
  334. * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
  335. */
  336. constructor(name: string, camera: BABYLON.Camera, options?: string | IDigitalRainPostProcessOptions);
  337. }
  338. }