babylonjs-post-process 5.0.0-beta.9 → 5.0.0-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,466 +1,501 @@
1
- declare module "babylonjs-post-process/asciiArt/asciiart.fragment" {
2
- /** @hidden */
3
- export var asciiartPixelShader: {
4
- name: string;
5
- shader: string;
6
- };
7
- }
8
- declare module "babylonjs-post-process/asciiArt/asciiArtPostProcess" {
9
- import { Nullable } from "babylonjs/types";
10
- import { Camera } from "babylonjs/Cameras/camera";
11
- import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
12
- import { PostProcess } from "babylonjs/PostProcesses/postProcess";
13
- import { Scene } from "babylonjs/scene";
14
- import "babylonjs-post-process/asciiArt/asciiart.fragment";
15
- /**
16
- * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
17
- *
18
- * It basically takes care rendering the font front the given font size to a texture.
19
- * This is used later on in the postprocess.
20
- */
21
- export class AsciiArtFontTexture extends BaseTexture {
22
- private _font;
23
- private _text;
24
- private _charSize;
25
- /**
26
- * Gets the size of one char in the texture (each char fits in size * size space in the texture).
27
- */
28
- get charSize(): number;
29
- /**
30
- * Create a new instance of the Ascii Art FontTexture class
31
- * @param name the name of the texture
32
- * @param font the font to use, use the W3C CSS notation
33
- * @param text the caracter set to use in the rendering.
34
- * @param scene the scene that owns the texture
35
- */
36
- constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
37
- /**
38
- * Gets the max char width of a font.
39
- * @param font the font to use, use the W3C CSS notation
40
- * @return the max char width
41
- */
42
- private getFontWidth;
43
- /**
44
- * Gets the max char height of a font.
45
- * @param font the font to use, use the W3C CSS notation
46
- * @return the max char height
47
- */
48
- private getFontHeight;
49
- /**
50
- * Clones the current AsciiArtTexture.
51
- * @return the clone of the texture.
52
- */
53
- clone(): AsciiArtFontTexture;
54
- /**
55
- * Parses a json object representing the texture and returns an instance of it.
56
- * @param source the source JSON representation
57
- * @param scene the scene to create the texture for
58
- * @return the parsed texture
59
- */
60
- static Parse(source: any, scene: Scene): AsciiArtFontTexture;
61
- }
62
- /**
63
- * Option available in the Ascii Art Post Process.
64
- */
65
- export interface IAsciiArtPostProcessOptions {
66
- /**
67
- * The font to use following the w3c font definition.
68
- */
69
- font?: string;
70
- /**
71
- * The character set to use in the postprocess.
72
- */
73
- characterSet?: string;
74
- /**
75
- * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
76
- * This number is defined between 0 and 1;
77
- */
78
- mixToTile?: number;
79
- /**
80
- * This defines the amount you want to mix the normal rendering pass in the ascii art.
81
- * This number is defined between 0 and 1;
82
- */
83
- mixToNormal?: number;
84
- }
85
- /**
86
- * AsciiArtPostProcess helps rendering everithing in Ascii Art.
87
- *
88
- * Simmply add it to your scene and let the nerd that lives in you have fun.
89
- * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
90
- */
91
- export class AsciiArtPostProcess extends PostProcess {
92
- /**
93
- * The font texture used to render the char in the post process.
94
- */
95
- private _asciiArtFontTexture;
96
- /**
97
- * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
98
- * This number is defined between 0 and 1;
99
- */
100
- mixToTile: number;
101
- /**
102
- * This defines the amount you want to mix the normal rendering pass in the ascii art.
103
- * This number is defined between 0 and 1;
104
- */
105
- mixToNormal: number;
106
- /**
107
- * Instantiates a new Ascii Art Post Process.
108
- * @param name the name to give to the postprocess
109
- * @camera the camera to apply the post process to.
110
- * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
111
- */
112
- constructor(name: string, camera: Camera, options?: string | IAsciiArtPostProcessOptions);
113
- }
114
- }
115
- declare module "babylonjs-post-process/asciiArt/index" {
116
- export * from "babylonjs-post-process/asciiArt/asciiArtPostProcess";
117
- }
118
- declare module "babylonjs-post-process/digitalRain/digitalrain.fragment" {
119
- /** @hidden */
120
- export var digitalrainPixelShader: {
121
- name: string;
122
- shader: string;
123
- };
124
- }
125
- declare module "babylonjs-post-process/digitalRain/digitalRainPostProcess" {
126
- import { Nullable } from "babylonjs/types";
127
- import { Camera } from "babylonjs/Cameras/camera";
128
- import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
129
- import { PostProcess } from "babylonjs/PostProcesses/postProcess";
130
- import { Scene } from "babylonjs/scene";
131
- import "babylonjs-post-process/digitalRain/digitalrain.fragment";
132
- /**
133
- * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
134
- *
135
- * It basically takes care rendering the font front the given font size to a texture.
136
- * This is used later on in the postprocess.
137
- */
138
- export class DigitalRainFontTexture extends BaseTexture {
139
- private _font;
140
- private _text;
141
- private _charSize;
142
- /**
143
- * Gets the size of one char in the texture (each char fits in size * size space in the texture).
144
- */
145
- get charSize(): number;
146
- /**
147
- * Create a new instance of the Digital Rain FontTexture class
148
- * @param name the name of the texture
149
- * @param font the font to use, use the W3C CSS notation
150
- * @param text the caracter set to use in the rendering.
151
- * @param scene the scene that owns the texture
152
- */
153
- constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
154
- /**
155
- * Gets the max char width of a font.
156
- * @param font the font to use, use the W3C CSS notation
157
- * @return the max char width
158
- */
159
- private getFontWidth;
160
- /**
161
- * Gets the max char height of a font.
162
- * @param font the font to use, use the W3C CSS notation
163
- * @return the max char height
164
- */
165
- private getFontHeight;
166
- /**
167
- * Clones the current DigitalRainFontTexture.
168
- * @return the clone of the texture.
169
- */
170
- clone(): DigitalRainFontTexture;
171
- /**
172
- * Parses a json object representing the texture and returns an instance of it.
173
- * @param source the source JSON representation
174
- * @param scene the scene to create the texture for
175
- * @return the parsed texture
176
- */
177
- static Parse(source: any, scene: Scene): DigitalRainFontTexture;
178
- }
179
- /**
180
- * Option available in the Digital Rain Post Process.
181
- */
182
- export interface IDigitalRainPostProcessOptions {
183
- /**
184
- * The font to use following the w3c font definition.
185
- */
186
- font?: string;
187
- /**
188
- * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
189
- * This number is defined between 0 and 1;
190
- */
191
- mixToTile?: number;
192
- /**
193
- * This defines the amount you want to mix the normal rendering pass in the digital rain.
194
- * This number is defined between 0 and 1;
195
- */
196
- mixToNormal?: number;
197
- }
198
- /**
199
- * DigitalRainPostProcess helps rendering everithing in digital rain.
200
- *
201
- * Simmply add it to your scene and let the nerd that lives in you have fun.
202
- * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
203
- */
204
- export class DigitalRainPostProcess extends PostProcess {
205
- /**
206
- * The font texture used to render the char in the post process.
207
- */
208
- private _digitalRainFontTexture;
209
- /**
210
- * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
211
- * This number is defined between 0 and 1;
212
- */
213
- mixToTile: number;
214
- /**
215
- * This defines the amount you want to mix the normal rendering pass in the digital rain.
216
- * This number is defined between 0 and 1;
217
- */
218
- mixToNormal: number;
219
- /**
220
- * Speed of the effect
221
- */
222
- speed: number;
223
- /**
224
- * Instantiates a new Digital Rain Post Process.
225
- * @param name the name to give to the postprocess
226
- * @camera the camera to apply the post process to.
227
- * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
228
- */
229
- constructor(name: string, camera: Camera, options?: string | IDigitalRainPostProcessOptions);
230
- }
231
- }
232
- declare module "babylonjs-post-process/digitalRain/index" {
233
- export * from "babylonjs-post-process/digitalRain/digitalRainPostProcess";
234
- }
235
- declare module "babylonjs-post-process/index" {
236
- export * from "babylonjs-post-process/asciiArt/index";
237
- export * from "babylonjs-post-process/digitalRain/index";
238
- }
239
- declare module "babylonjs-post-process/legacy/legacy-asciiArt" {
240
- export * from "babylonjs-post-process/asciiArt/index";
241
- }
242
- declare module "babylonjs-post-process/legacy/legacy-digitalRain" {
243
- export * from "babylonjs-post-process/digitalRain/index";
244
- }
245
- declare module "babylonjs-post-process/legacy/legacy" {
246
- export * from "babylonjs-post-process/index";
247
- }
1
+
2
+ declare module "babylonjs-post-process/asciiArt/asciiart.fragment" {
3
+ /** @hidden */
4
+ export const asciiartPixelShader: {
5
+ name: string;
6
+ shader: string;
7
+ };
8
+
9
+ }
10
+ declare module "babylonjs-post-process/asciiArt/asciiArtPostProcess" {
11
+ import { Nullable } from "babylonjs/types";
12
+ import { Camera } from "babylonjs/Cameras/camera";
13
+ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
14
+ import { PostProcess } from "babylonjs/PostProcesses/postProcess";
15
+ import { Scene } from "babylonjs/scene";
16
+ import "babylonjs/Engines/Extensions/engine.dynamicTexture";
17
+ import "babylonjs-post-process/asciiArt/asciiart.fragment";
18
+ /**
19
+ * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
20
+ *
21
+ * It basically takes care rendering the font front the given font size to a texture.
22
+ * This is used later on in the postprocess.
23
+ */
24
+ export class AsciiArtFontTexture extends BaseTexture {
25
+ private _font;
26
+ private _text;
27
+ private _charSize;
28
+ /**
29
+ * Gets the size of one char in the texture (each char fits in size * size space in the texture).
30
+ */
31
+ get charSize(): number;
32
+ /**
33
+ * Create a new instance of the Ascii Art FontTexture class
34
+ * @param name the name of the texture
35
+ * @param font the font to use, use the W3C CSS notation
36
+ * @param text the caracter set to use in the rendering.
37
+ * @param scene the scene that owns the texture
38
+ */
39
+ constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
40
+ /**
41
+ * Gets the max char width of a font.
42
+ * @param font the font to use, use the W3C CSS notation
43
+ * @return the max char width
44
+ */
45
+ private _getFontWidth;
46
+ /**
47
+ * Gets the max char height of a font.
48
+ * @param font the font to use, use the W3C CSS notation
49
+ * @return the max char height
50
+ */
51
+ private _getFontHeight;
52
+ /**
53
+ * Clones the current AsciiArtTexture.
54
+ * @return the clone of the texture.
55
+ */
56
+ clone(): AsciiArtFontTexture;
57
+ /**
58
+ * Parses a json object representing the texture and returns an instance of it.
59
+ * @param source the source JSON representation
60
+ * @param scene the scene to create the texture for
61
+ * @return the parsed texture
62
+ */
63
+ static Parse(source: any, scene: Scene): AsciiArtFontTexture;
64
+ }
65
+ /**
66
+ * Option available in the Ascii Art Post Process.
67
+ */
68
+ export interface IAsciiArtPostProcessOptions {
69
+ /**
70
+ * The font to use following the w3c font definition.
71
+ */
72
+ font?: string;
73
+ /**
74
+ * The character set to use in the postprocess.
75
+ */
76
+ characterSet?: string;
77
+ /**
78
+ * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
79
+ * This number is defined between 0 and 1;
80
+ */
81
+ mixToTile?: number;
82
+ /**
83
+ * This defines the amount you want to mix the normal rendering pass in the ascii art.
84
+ * This number is defined between 0 and 1;
85
+ */
86
+ mixToNormal?: number;
87
+ }
88
+ /**
89
+ * AsciiArtPostProcess helps rendering everithing in Ascii Art.
90
+ *
91
+ * Simmply add it to your scene and let the nerd that lives in you have fun.
92
+ * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
93
+ */
94
+ export class AsciiArtPostProcess extends PostProcess {
95
+ /**
96
+ * The font texture used to render the char in the post process.
97
+ */
98
+ private _asciiArtFontTexture;
99
+ /**
100
+ * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
101
+ * This number is defined between 0 and 1;
102
+ */
103
+ mixToTile: number;
104
+ /**
105
+ * This defines the amount you want to mix the normal rendering pass in the ascii art.
106
+ * This number is defined between 0 and 1;
107
+ */
108
+ mixToNormal: number;
109
+ /**
110
+ * Instantiates a new Ascii Art Post Process.
111
+ * @param name the name to give to the postprocess
112
+ * @camera the camera to apply the post process to.
113
+ * @param camera
114
+ * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
115
+ */
116
+ constructor(name: string, camera: Camera, options?: string | IAsciiArtPostProcessOptions);
117
+ }
118
+
119
+ }
120
+ declare module "babylonjs-post-process/asciiArt/index" {
121
+ export * from "babylonjs-post-process/asciiArt/asciiArtPostProcess";
122
+
123
+ }
124
+ declare module "babylonjs-post-process/digitalRain/digitalrain.fragment" {
125
+ /** @hidden */
126
+ export const digitalrainPixelShader: {
127
+ name: string;
128
+ shader: string;
129
+ };
130
+
131
+ }
132
+ declare module "babylonjs-post-process/digitalRain/digitalRainPostProcess" {
133
+ import { Nullable } from "babylonjs/types";
134
+ import { Camera } from "babylonjs/Cameras/camera";
135
+ import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
136
+ import { PostProcess } from "babylonjs/PostProcesses/postProcess";
137
+ import { Scene } from "babylonjs/scene";
138
+ import "babylonjs/Engines/Extensions/engine.dynamicTexture";
139
+ import "babylonjs-post-process/digitalRain/digitalrain.fragment";
140
+ /**
141
+ * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
142
+ *
143
+ * It basically takes care rendering the font front the given font size to a texture.
144
+ * This is used later on in the postprocess.
145
+ */
146
+ export class DigitalRainFontTexture extends BaseTexture {
147
+ private _font;
148
+ private _text;
149
+ private _charSize;
150
+ /**
151
+ * Gets the size of one char in the texture (each char fits in size * size space in the texture).
152
+ */
153
+ get charSize(): number;
154
+ /**
155
+ * Create a new instance of the Digital Rain FontTexture class
156
+ * @param name the name of the texture
157
+ * @param font the font to use, use the W3C CSS notation
158
+ * @param text the caracter set to use in the rendering.
159
+ * @param scene the scene that owns the texture
160
+ */
161
+ constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
162
+ /**
163
+ * Gets the max char width of a font.
164
+ * @param font the font to use, use the W3C CSS notation
165
+ * @return the max char width
166
+ */
167
+ private _getFontWidth;
168
+ /**
169
+ * Gets the max char height of a font.
170
+ * @param font the font to use, use the W3C CSS notation
171
+ * @return the max char height
172
+ */
173
+ private _getFontHeight;
174
+ /**
175
+ * Clones the current DigitalRainFontTexture.
176
+ * @return the clone of the texture.
177
+ */
178
+ clone(): DigitalRainFontTexture;
179
+ /**
180
+ * Parses a json object representing the texture and returns an instance of it.
181
+ * @param source the source JSON representation
182
+ * @param scene the scene to create the texture for
183
+ * @return the parsed texture
184
+ */
185
+ static Parse(source: any, scene: Scene): DigitalRainFontTexture;
186
+ }
187
+ /**
188
+ * Option available in the Digital Rain Post Process.
189
+ */
190
+ export interface IDigitalRainPostProcessOptions {
191
+ /**
192
+ * The font to use following the w3c font definition.
193
+ */
194
+ font?: string;
195
+ /**
196
+ * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
197
+ * This number is defined between 0 and 1;
198
+ */
199
+ mixToTile?: number;
200
+ /**
201
+ * This defines the amount you want to mix the normal rendering pass in the digital rain.
202
+ * This number is defined between 0 and 1;
203
+ */
204
+ mixToNormal?: number;
205
+ }
206
+ /**
207
+ * DigitalRainPostProcess helps rendering everithing in digital rain.
208
+ *
209
+ * Simmply add it to your scene and let the nerd that lives in you have fun.
210
+ * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
211
+ */
212
+ export class DigitalRainPostProcess extends PostProcess {
213
+ /**
214
+ * The font texture used to render the char in the post process.
215
+ */
216
+ private _digitalRainFontTexture;
217
+ /**
218
+ * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
219
+ * This number is defined between 0 and 1;
220
+ */
221
+ mixToTile: number;
222
+ /**
223
+ * This defines the amount you want to mix the normal rendering pass in the digital rain.
224
+ * This number is defined between 0 and 1;
225
+ */
226
+ mixToNormal: number;
227
+ /**
228
+ * Speed of the effect
229
+ */
230
+ speed: number;
231
+ /**
232
+ * Instantiates a new Digital Rain Post Process.
233
+ * @param name the name to give to the postprocess
234
+ * @camera the camera to apply the post process to.
235
+ * @param camera
236
+ * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
237
+ */
238
+ constructor(name: string, camera: Camera, options?: string | IDigitalRainPostProcessOptions);
239
+ }
240
+
241
+ }
242
+ declare module "babylonjs-post-process/digitalRain/index" {
243
+ export * from "babylonjs-post-process/digitalRain/digitalRainPostProcess";
244
+
245
+ }
246
+ declare module "babylonjs-post-process/index" {
247
+ export * from "babylonjs-post-process/asciiArt/index";
248
+ export * from "babylonjs-post-process/digitalRain/index";
249
+
250
+ }
251
+ declare module "babylonjs-post-process/legacy/legacy-asciiArt" {
252
+ export * from "babylonjs-post-process/asciiArt/index";
253
+
254
+ }
255
+ declare module "babylonjs-post-process/legacy/legacy-digitalRain" {
256
+ export * from "babylonjs-post-process/digitalRain/index";
257
+
258
+ }
259
+ declare module "babylonjs-post-process/legacy/legacy" {
260
+ export * from "babylonjs-post-process/index";
261
+
262
+ }
263
+
248
264
  declare module "babylonjs-post-process" {
249
265
  export * from "babylonjs-post-process/legacy/legacy";
250
266
  }
251
- declare module BABYLON {
252
- /** @hidden */
253
- export var asciiartPixelShader: {
254
- name: string;
255
- shader: string;
256
- };
257
- }
258
- declare module BABYLON {
259
- /**
260
- * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
261
- *
262
- * It basically takes care rendering the font front the given font size to a texture.
263
- * This is used later on in the postprocess.
264
- */
265
- export class AsciiArtFontTexture extends BABYLON.BaseTexture {
266
- private _font;
267
- private _text;
268
- private _charSize;
269
- /**
270
- * Gets the size of one char in the texture (each char fits in size * size space in the texture).
271
- */
272
- get charSize(): number;
273
- /**
274
- * Create a new instance of the Ascii Art 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
- * Gets the max char width of a font.
283
- * @param font the font to use, use the W3C CSS notation
284
- * @return the max char width
285
- */
286
- private getFontWidth;
287
- /**
288
- * Gets the max char height of a font.
289
- * @param font the font to use, use the W3C CSS notation
290
- * @return the max char height
291
- */
292
- private getFontHeight;
293
- /**
294
- * Clones the current AsciiArtTexture.
295
- * @return the clone of the texture.
296
- */
297
- clone(): AsciiArtFontTexture;
298
- /**
299
- * Parses a json object representing the texture and returns an instance of it.
300
- * @param source the source JSON representation
301
- * @param scene the scene to create the texture for
302
- * @return the parsed texture
303
- */
304
- static Parse(source: any, scene: BABYLON.Scene): AsciiArtFontTexture;
305
- }
306
- /**
307
- * Option available in the Ascii Art Post Process.
308
- */
309
- export interface IAsciiArtPostProcessOptions {
310
- /**
311
- * The font to use following the w3c font definition.
312
- */
313
- font?: string;
314
- /**
315
- * The character set to use in the postprocess.
316
- */
317
- characterSet?: string;
318
- /**
319
- * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
320
- * This number is defined between 0 and 1;
321
- */
322
- mixToTile?: number;
323
- /**
324
- * This defines the amount you want to mix the normal rendering pass in the ascii art.
325
- * This number is defined between 0 and 1;
326
- */
327
- mixToNormal?: number;
328
- }
329
- /**
330
- * AsciiArtPostProcess helps rendering everithing in Ascii Art.
331
- *
332
- * Simmply add it to your scene and let the nerd that lives in you have fun.
333
- * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
334
- */
335
- export class AsciiArtPostProcess extends BABYLON.PostProcess {
336
- /**
337
- * The font texture used to render the char in the post process.
338
- */
339
- private _asciiArtFontTexture;
340
- /**
341
- * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
342
- * This number is defined between 0 and 1;
343
- */
344
- mixToTile: number;
345
- /**
346
- * This defines the amount you want to mix the normal rendering pass in the ascii art.
347
- * This number is defined between 0 and 1;
348
- */
349
- mixToNormal: number;
350
- /**
351
- * Instantiates a new Ascii Art Post Process.
352
- * @param name the name to give to the postprocess
353
- * @camera the camera to apply the post process to.
354
- * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
355
- */
356
- constructor(name: string, camera: BABYLON.Camera, options?: string | IAsciiArtPostProcessOptions);
357
- }
358
- }
359
- declare module BABYLON {
360
- /** @hidden */
361
- export var digitalrainPixelShader: {
362
- name: string;
363
- shader: string;
364
- };
365
- }
366
- declare module BABYLON {
367
- /**
368
- * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
369
- *
370
- * It basically takes care rendering the font front the given font size to a texture.
371
- * This is used later on in the postprocess.
372
- */
373
- export class DigitalRainFontTexture extends BABYLON.BaseTexture {
374
- private _font;
375
- private _text;
376
- private _charSize;
377
- /**
378
- * Gets the size of one char in the texture (each char fits in size * size space in the texture).
379
- */
380
- get charSize(): number;
381
- /**
382
- * Create a new instance of the Digital Rain FontTexture class
383
- * @param name the name of the texture
384
- * @param font the font to use, use the W3C CSS notation
385
- * @param text the caracter set to use in the rendering.
386
- * @param scene the scene that owns the texture
387
- */
388
- constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
389
- /**
390
- * Gets the max char width of a font.
391
- * @param font the font to use, use the W3C CSS notation
392
- * @return the max char width
393
- */
394
- private getFontWidth;
395
- /**
396
- * Gets the max char height of a font.
397
- * @param font the font to use, use the W3C CSS notation
398
- * @return the max char height
399
- */
400
- private getFontHeight;
401
- /**
402
- * Clones the current DigitalRainFontTexture.
403
- * @return the clone of the texture.
404
- */
405
- clone(): DigitalRainFontTexture;
406
- /**
407
- * Parses a json object representing the texture and returns an instance of it.
408
- * @param source the source JSON representation
409
- * @param scene the scene to create the texture for
410
- * @return the parsed texture
411
- */
412
- static Parse(source: any, scene: BABYLON.Scene): DigitalRainFontTexture;
413
- }
414
- /**
415
- * Option available in the Digital Rain Post Process.
416
- */
417
- export interface IDigitalRainPostProcessOptions {
418
- /**
419
- * The font to use following the w3c font definition.
420
- */
421
- font?: string;
422
- /**
423
- * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
424
- * This number is defined between 0 and 1;
425
- */
426
- mixToTile?: number;
427
- /**
428
- * This defines the amount you want to mix the normal rendering pass in the digital rain.
429
- * This number is defined between 0 and 1;
430
- */
431
- mixToNormal?: number;
432
- }
433
- /**
434
- * DigitalRainPostProcess helps rendering everithing in digital rain.
435
- *
436
- * Simmply add it to your scene and let the nerd that lives in you have fun.
437
- * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
438
- */
439
- export class DigitalRainPostProcess extends BABYLON.PostProcess {
440
- /**
441
- * The font texture used to render the char in the post process.
442
- */
443
- private _digitalRainFontTexture;
444
- /**
445
- * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
446
- * This number is defined between 0 and 1;
447
- */
448
- mixToTile: number;
449
- /**
450
- * This defines the amount you want to mix the normal rendering pass in the digital rain.
451
- * This number is defined between 0 and 1;
452
- */
453
- mixToNormal: number;
454
- /**
455
- * Speed of the effect
456
- */
457
- speed: number;
458
- /**
459
- * Instantiates a new Digital Rain Post Process.
460
- * @param name the name to give to the postprocess
461
- * @camera the camera to apply the post process to.
462
- * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
463
- */
464
- constructor(name: string, camera: BABYLON.Camera, options?: string | IDigitalRainPostProcessOptions);
465
- }
466
- }
267
+
268
+
269
+ declare module BABYLON {
270
+ /** @hidden */
271
+ export var asciiartPixelShader: {
272
+ name: string;
273
+ shader: string;
274
+ };
275
+
276
+
277
+ /**
278
+ * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
279
+ *
280
+ * It basically takes care rendering the font front the given font size to a texture.
281
+ * This is used later on in the postprocess.
282
+ */
283
+ export class AsciiArtFontTexture extends BABYLON.BaseTexture {
284
+ private _font;
285
+ private _text;
286
+ private _charSize;
287
+ /**
288
+ * Gets the size of one char in the texture (each char fits in size * size space in the texture).
289
+ */
290
+ get charSize(): number;
291
+ /**
292
+ * Create a new instance of the Ascii Art FontTexture class
293
+ * @param name the name of the texture
294
+ * @param font the font to use, use the W3C CSS notation
295
+ * @param text the caracter set to use in the rendering.
296
+ * @param scene the scene that owns the texture
297
+ */
298
+ constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
299
+ /**
300
+ * Gets the max char width of a font.
301
+ * @param font the font to use, use the W3C CSS notation
302
+ * @return the max char width
303
+ */
304
+ private _getFontWidth;
305
+ /**
306
+ * Gets the max char height of a font.
307
+ * @param font the font to use, use the W3C CSS notation
308
+ * @return the max char height
309
+ */
310
+ private _getFontHeight;
311
+ /**
312
+ * Clones the current AsciiArtTexture.
313
+ * @return the clone of the texture.
314
+ */
315
+ clone(): AsciiArtFontTexture;
316
+ /**
317
+ * Parses a json object representing the texture and returns an instance of it.
318
+ * @param source the source JSON representation
319
+ * @param scene the scene to create the texture for
320
+ * @return the parsed texture
321
+ */
322
+ static Parse(source: any, scene: Scene): AsciiArtFontTexture;
323
+ }
324
+ /**
325
+ * Option available in the Ascii Art Post Process.
326
+ */
327
+ export interface IAsciiArtPostProcessOptions {
328
+ /**
329
+ * The font to use following the w3c font definition.
330
+ */
331
+ font?: string;
332
+ /**
333
+ * The character set to use in the postprocess.
334
+ */
335
+ characterSet?: string;
336
+ /**
337
+ * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
338
+ * This number is defined between 0 and 1;
339
+ */
340
+ mixToTile?: number;
341
+ /**
342
+ * This defines the amount you want to mix the normal rendering pass in the ascii art.
343
+ * This number is defined between 0 and 1;
344
+ */
345
+ mixToNormal?: number;
346
+ }
347
+ /**
348
+ * AsciiArtPostProcess helps rendering everithing in Ascii Art.
349
+ *
350
+ * Simmply add it to your scene and let the nerd that lives in you have fun.
351
+ * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
352
+ */
353
+ export class AsciiArtPostProcess extends BABYLON.PostProcess {
354
+ /**
355
+ * The font texture used to render the char in the post process.
356
+ */
357
+ private _asciiArtFontTexture;
358
+ /**
359
+ * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
360
+ * This number is defined between 0 and 1;
361
+ */
362
+ mixToTile: number;
363
+ /**
364
+ * This defines the amount you want to mix the normal rendering pass in the ascii art.
365
+ * This number is defined between 0 and 1;
366
+ */
367
+ mixToNormal: number;
368
+ /**
369
+ * Instantiates a new Ascii Art Post Process.
370
+ * @param name the name to give to the postprocess
371
+ * @camera the camera to apply the post process to.
372
+ * @param camera
373
+ * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
374
+ */
375
+ constructor(name: string, camera: Camera, options?: string | IAsciiArtPostProcessOptions);
376
+ }
377
+
378
+
379
+
380
+
381
+ /** @hidden */
382
+ export var digitalrainPixelShader: {
383
+ name: string;
384
+ shader: string;
385
+ };
386
+
387
+
388
+ /**
389
+ * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
390
+ *
391
+ * It basically takes care rendering the font front the given font size to a texture.
392
+ * This is used later on in the postprocess.
393
+ */
394
+ export class DigitalRainFontTexture extends BABYLON.BaseTexture {
395
+ private _font;
396
+ private _text;
397
+ private _charSize;
398
+ /**
399
+ * Gets the size of one char in the texture (each char fits in size * size space in the texture).
400
+ */
401
+ get charSize(): number;
402
+ /**
403
+ * Create a new instance of the Digital Rain FontTexture class
404
+ * @param name the name of the texture
405
+ * @param font the font to use, use the W3C CSS notation
406
+ * @param text the caracter set to use in the rendering.
407
+ * @param scene the scene that owns the texture
408
+ */
409
+ constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
410
+ /**
411
+ * Gets the max char width of a font.
412
+ * @param font the font to use, use the W3C CSS notation
413
+ * @return the max char width
414
+ */
415
+ private _getFontWidth;
416
+ /**
417
+ * Gets the max char height of a font.
418
+ * @param font the font to use, use the W3C CSS notation
419
+ * @return the max char height
420
+ */
421
+ private _getFontHeight;
422
+ /**
423
+ * Clones the current DigitalRainFontTexture.
424
+ * @return the clone of the texture.
425
+ */
426
+ clone(): DigitalRainFontTexture;
427
+ /**
428
+ * Parses a json object representing the texture and returns an instance of it.
429
+ * @param source the source JSON representation
430
+ * @param scene the scene to create the texture for
431
+ * @return the parsed texture
432
+ */
433
+ static Parse(source: any, scene: Scene): DigitalRainFontTexture;
434
+ }
435
+ /**
436
+ * Option available in the Digital Rain Post Process.
437
+ */
438
+ export interface IDigitalRainPostProcessOptions {
439
+ /**
440
+ * The font to use following the w3c font definition.
441
+ */
442
+ font?: string;
443
+ /**
444
+ * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
445
+ * This number is defined between 0 and 1;
446
+ */
447
+ mixToTile?: number;
448
+ /**
449
+ * This defines the amount you want to mix the normal rendering pass in the digital rain.
450
+ * This number is defined between 0 and 1;
451
+ */
452
+ mixToNormal?: number;
453
+ }
454
+ /**
455
+ * DigitalRainPostProcess helps rendering everithing in digital rain.
456
+ *
457
+ * Simmply add it to your scene and let the nerd that lives in you have fun.
458
+ * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
459
+ */
460
+ export class DigitalRainPostProcess extends BABYLON.PostProcess {
461
+ /**
462
+ * The font texture used to render the char in the post process.
463
+ */
464
+ private _digitalRainFontTexture;
465
+ /**
466
+ * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
467
+ * This number is defined between 0 and 1;
468
+ */
469
+ mixToTile: number;
470
+ /**
471
+ * This defines the amount you want to mix the normal rendering pass in the digital rain.
472
+ * This number is defined between 0 and 1;
473
+ */
474
+ mixToNormal: number;
475
+ /**
476
+ * Speed of the effect
477
+ */
478
+ speed: number;
479
+ /**
480
+ * Instantiates a new Digital Rain Post Process.
481
+ * @param name the name to give to the postprocess
482
+ * @camera the camera to apply the post process to.
483
+ * @param camera
484
+ * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
485
+ */
486
+ constructor(name: string, camera: Camera, options?: string | IDigitalRainPostProcessOptions);
487
+ }
488
+
489
+
490
+
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+ }
500
+
501
+