babylonjs-post-process 5.0.0-beta.8 → 5.0.0-beta.8-snapshot

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