babylonjs.postProcess.module.d.ts 14 KB

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