babylonjs.postProcess.module.d.ts 16 KB

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