babylonjs-post-process 5.0.0-rc.2 → 5.0.0-rc.5
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.
- package/{babylonjs.postProcess.js → dist/babylonjs.postProcess.js} +304 -326
- package/dist/babylonjs.postProcess.js.map +1 -0
- package/dist/babylonjs.postProcess.min.js +3 -0
- package/dist/babylonjs.postProcess.min.js.LICENSE.txt +14 -0
- package/dist/babylonjs.postProcess.min.js.map +1 -0
- package/dist/babylonjs.postProcess.module.d.ts +291 -0
- package/package.json +26 -30
- package/babylonjs.postProcess.js.map +0 -1
- package/babylonjs.postProcess.min.js +0 -16
- package/babylonjs.postProcess.module.d.ts +0 -468
|
@@ -0,0 +1,291 @@
|
|
|
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
|
+
|
|
264
|
+
declare module "babylonjs-post-process" {
|
|
265
|
+
export * from "babylonjs-post-process/legacy/legacy";
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
declare module BABYLON {
|
|
270
|
+
/** @hidden */
|
|
271
|
export var asciiartPixelShader: {
|
|
1
272
|
name: string;
|
|
2
273
|
shader: string;
|
|
3
274
|
};
|
|
275
|
+
|
|
276
|
+
/**
|
|
4
277
|
* AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
|
|
5
278
|
*
|
|
6
279
|
* It basically takes care rendering the font front the given font size to a texture.
|
|
7
280
|
* This is used later on in the postprocess.
|
|
8
281
|
*/
|
|
9
282
|
export class AsciiArtFontTexture extends BABYLON.BaseTexture {
|
|
10
283
|
private _font;
|
|
11
284
|
private _text;
|
|
12
285
|
private _charSize;
|
|
13
286
|
/**
|
|
14
287
|
* Gets the size of one char in the texture (each char fits in size * size space in the texture).
|
|
15
288
|
*/
|
|
16
289
|
get charSize(): number;
|
|
17
290
|
/**
|
|
18
291
|
* Create a new instance of the Ascii Art FontTexture class
|
|
19
292
|
* @param name the name of the texture
|
|
20
293
|
* @param font the font to use, use the W3C CSS notation
|
|
21
294
|
* @param text the caracter set to use in the rendering.
|
|
22
295
|
* @param scene the scene that owns the texture
|
|
23
296
|
*/
|
|
24
297
|
constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
|
|
25
298
|
/**
|
|
26
299
|
* Gets the max char width of a font.
|
|
27
300
|
* @param font the font to use, use the W3C CSS notation
|
|
28
301
|
* @return the max char width
|
|
29
302
|
*/
|
|
30
303
|
private _getFontWidth;
|
|
31
304
|
/**
|
|
32
305
|
* Gets the max char height of a font.
|
|
33
306
|
* @param font the font to use, use the W3C CSS notation
|
|
34
307
|
* @return the max char height
|
|
35
308
|
*/
|
|
36
309
|
private _getFontHeight;
|
|
37
310
|
/**
|
|
38
311
|
* Clones the current AsciiArtTexture.
|
|
39
312
|
* @return the clone of the texture.
|
|
40
313
|
*/
|
|
41
314
|
clone(): AsciiArtFontTexture;
|
|
42
315
|
/**
|
|
43
316
|
* Parses a json object representing the texture and returns an instance of it.
|
|
44
317
|
* @param source the source JSON representation
|
|
45
318
|
* @param scene the scene to create the texture for
|
|
46
319
|
* @return the parsed texture
|
|
47
320
|
*/
|
|
48
321
|
static Parse(source: any, scene: BABYLON.Scene): AsciiArtFontTexture;
|
|
49
322
|
}
|
|
50
323
|
/**
|
|
51
324
|
* Option available in the Ascii Art Post Process.
|
|
52
325
|
*/
|
|
53
326
|
export interface IAsciiArtPostProcessOptions {
|
|
54
327
|
/**
|
|
55
328
|
* The font to use following the w3c font definition.
|
|
56
329
|
*/
|
|
57
330
|
font?: string;
|
|
58
331
|
/**
|
|
59
332
|
* The character set to use in the postprocess.
|
|
60
333
|
*/
|
|
61
334
|
characterSet?: string;
|
|
62
335
|
/**
|
|
63
336
|
* This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
|
|
64
337
|
* This number is defined between 0 and 1;
|
|
65
338
|
*/
|
|
66
339
|
mixToTile?: number;
|
|
67
340
|
/**
|
|
68
341
|
* This defines the amount you want to mix the normal rendering pass in the ascii art.
|
|
69
342
|
* This number is defined between 0 and 1;
|
|
70
343
|
*/
|
|
71
344
|
mixToNormal?: number;
|
|
72
345
|
}
|
|
73
346
|
/**
|
|
74
347
|
* AsciiArtPostProcess helps rendering everithing in Ascii Art.
|
|
75
348
|
*
|
|
76
349
|
* Simmply add it to your scene and let the nerd that lives in you have fun.
|
|
77
350
|
* Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
|
|
78
351
|
*/
|
|
79
352
|
export class AsciiArtPostProcess extends BABYLON.PostProcess {
|
|
80
353
|
/**
|
|
81
354
|
* The font texture used to render the char in the post process.
|
|
82
355
|
*/
|
|
83
356
|
private _asciiArtFontTexture;
|
|
84
357
|
/**
|
|
85
358
|
* This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
|
|
86
359
|
* This number is defined between 0 and 1;
|
|
87
360
|
*/
|
|
88
361
|
mixToTile: number;
|
|
89
362
|
/**
|
|
90
363
|
* This defines the amount you want to mix the normal rendering pass in the ascii art.
|
|
91
364
|
* This number is defined between 0 and 1;
|
|
92
365
|
*/
|
|
93
366
|
mixToNormal: number;
|
|
94
367
|
/**
|
|
95
368
|
* Instantiates a new Ascii Art Post Process.
|
|
96
369
|
* @param name the name to give to the postprocess
|
|
97
370
|
* @camera the camera to apply the post process to.
|
|
98
371
|
* @param camera
|
|
99
372
|
* @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
|
|
100
373
|
*/
|
|
101
374
|
constructor(name: string, camera: BABYLON.Camera, options?: string | IAsciiArtPostProcessOptions);
|
|
102
375
|
}
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
/** @hidden */
|
|
103
380
|
export var digitalrainPixelShader: {
|
|
104
381
|
name: string;
|
|
105
382
|
shader: string;
|
|
106
383
|
};
|
|
384
|
+
|
|
385
|
+
/**
|
|
107
386
|
* DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
|
|
108
387
|
*
|
|
109
388
|
* It basically takes care rendering the font front the given font size to a texture.
|
|
110
389
|
* This is used later on in the postprocess.
|
|
111
390
|
*/
|
|
112
391
|
export class DigitalRainFontTexture extends BABYLON.BaseTexture {
|
|
113
392
|
private _font;
|
|
114
393
|
private _text;
|
|
115
394
|
private _charSize;
|
|
116
395
|
/**
|
|
117
396
|
* Gets the size of one char in the texture (each char fits in size * size space in the texture).
|
|
118
397
|
*/
|
|
119
398
|
get charSize(): number;
|
|
120
399
|
/**
|
|
121
400
|
* Create a new instance of the Digital Rain FontTexture class
|
|
122
401
|
* @param name the name of the texture
|
|
123
402
|
* @param font the font to use, use the W3C CSS notation
|
|
124
403
|
* @param text the caracter set to use in the rendering.
|
|
125
404
|
* @param scene the scene that owns the texture
|
|
126
405
|
*/
|
|
127
406
|
constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
|
|
128
407
|
/**
|
|
129
408
|
* Gets the max char width of a font.
|
|
130
409
|
* @param font the font to use, use the W3C CSS notation
|
|
131
410
|
* @return the max char width
|
|
132
411
|
*/
|
|
133
412
|
private _getFontWidth;
|
|
134
413
|
/**
|
|
135
414
|
* Gets the max char height of a font.
|
|
136
415
|
* @param font the font to use, use the W3C CSS notation
|
|
137
416
|
* @return the max char height
|
|
138
417
|
*/
|
|
139
418
|
private _getFontHeight;
|
|
140
419
|
/**
|
|
141
420
|
* Clones the current DigitalRainFontTexture.
|
|
142
421
|
* @return the clone of the texture.
|
|
143
422
|
*/
|
|
144
423
|
clone(): DigitalRainFontTexture;
|
|
145
424
|
/**
|
|
146
425
|
* Parses a json object representing the texture and returns an instance of it.
|
|
147
426
|
* @param source the source JSON representation
|
|
148
427
|
* @param scene the scene to create the texture for
|
|
149
428
|
* @return the parsed texture
|
|
150
429
|
*/
|
|
151
430
|
static Parse(source: any, scene: BABYLON.Scene): DigitalRainFontTexture;
|
|
152
431
|
}
|
|
153
432
|
/**
|
|
154
433
|
* Option available in the Digital Rain Post Process.
|
|
155
434
|
*/
|
|
156
435
|
export interface IDigitalRainPostProcessOptions {
|
|
157
436
|
/**
|
|
158
437
|
* The font to use following the w3c font definition.
|
|
159
438
|
*/
|
|
160
439
|
font?: string;
|
|
161
440
|
/**
|
|
162
441
|
* This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
|
|
163
442
|
* This number is defined between 0 and 1;
|
|
164
443
|
*/
|
|
165
444
|
mixToTile?: number;
|
|
166
445
|
/**
|
|
167
446
|
* This defines the amount you want to mix the normal rendering pass in the digital rain.
|
|
168
447
|
* This number is defined between 0 and 1;
|
|
169
448
|
*/
|
|
170
449
|
mixToNormal?: number;
|
|
171
450
|
}
|
|
172
451
|
/**
|
|
173
452
|
* DigitalRainPostProcess helps rendering everithing in digital rain.
|
|
174
453
|
*
|
|
175
454
|
* Simmply add it to your scene and let the nerd that lives in you have fun.
|
|
176
455
|
* Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
|
|
177
456
|
*/
|
|
178
457
|
export class DigitalRainPostProcess extends BABYLON.PostProcess {
|
|
179
458
|
/**
|
|
180
459
|
* The font texture used to render the char in the post process.
|
|
181
460
|
*/
|
|
182
461
|
private _digitalRainFontTexture;
|
|
183
462
|
/**
|
|
184
463
|
* This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
|
|
185
464
|
* This number is defined between 0 and 1;
|
|
186
465
|
*/
|
|
187
466
|
mixToTile: number;
|
|
188
467
|
/**
|
|
189
468
|
* This defines the amount you want to mix the normal rendering pass in the digital rain.
|
|
190
469
|
* This number is defined between 0 and 1;
|
|
191
470
|
*/
|
|
192
471
|
mixToNormal: number;
|
|
193
472
|
/**
|
|
194
473
|
* Speed of the effect
|
|
195
474
|
*/
|
|
196
475
|
speed: number;
|
|
197
476
|
/**
|
|
198
477
|
* Instantiates a new Digital Rain Post Process.
|
|
199
478
|
* @param name the name to give to the postprocess
|
|
200
479
|
* @camera the camera to apply the post process to.
|
|
201
480
|
* @param camera
|
|
202
481
|
* @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
|
|
203
482
|
*/
|
|
204
483
|
constructor(name: string, camera: BABYLON.Camera, options?: string | IDigitalRainPostProcessOptions);
|
|
205
484
|
}
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
|
package/package.json
CHANGED
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
"author": {
|
|
3
|
-
"name": "David CATUHE"
|
|
4
|
-
},
|
|
5
2
|
"name": "babylonjs-post-process",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/BabylonJS/Babylon.js.git"
|
|
11
|
-
},
|
|
12
|
-
"main": "babylonjs.postProcess.min.js",
|
|
3
|
+
"version": "5.0.0-rc.5",
|
|
4
|
+
"main": "dist/babylonjs.postProcess.min.js",
|
|
5
|
+
"types": "dist/babylonjs.postProcess.module.d.ts",
|
|
13
6
|
"files": [
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"babylonjs.postProcess.min.js",
|
|
17
|
-
"babylonjs.postProcess.module.d.ts",
|
|
18
|
-
"readme.md",
|
|
19
|
-
"package.json"
|
|
20
|
-
],
|
|
21
|
-
"typings": "babylonjs.postProcess.module.d.ts",
|
|
22
|
-
"keywords": [
|
|
23
|
-
"3D",
|
|
24
|
-
"javascript",
|
|
25
|
-
"html5",
|
|
26
|
-
"webgl",
|
|
27
|
-
"post process"
|
|
7
|
+
"dist",
|
|
8
|
+
"readme.md"
|
|
28
9
|
],
|
|
29
|
-
"
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "npm run clean && npm run build:dev && npm run build:prod && npm run build:declaration",
|
|
12
|
+
"build:dev": "webpack --env development",
|
|
13
|
+
"build:prod": "webpack --env production",
|
|
14
|
+
"build:declaration": "build-tools -c pud --config ./config.json",
|
|
15
|
+
"clean": "rimraf dist"
|
|
16
|
+
},
|
|
30
17
|
"dependencies": {
|
|
31
|
-
"babylonjs": "5.0.0-rc.
|
|
18
|
+
"babylonjs": "^5.0.0-rc.5"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@dev/build-tools": "1.0.0",
|
|
22
|
+
"@lts/post-processes": "1.0.0",
|
|
23
|
+
"rimraf": "^3.0.2",
|
|
24
|
+
"source-map-loader": "^3.0.0",
|
|
25
|
+
"ts-loader": "^9.2.6",
|
|
26
|
+
"typescript": "^4.4.4",
|
|
27
|
+
"webpack": "^5.59.1",
|
|
28
|
+
"webpack-cli": "^4.9.1",
|
|
29
|
+
"webpack-merge": "^5.8.0"
|
|
32
30
|
},
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
}
|
|
31
|
+
"sideEffects": true
|
|
32
|
+
}
|