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
|
@@ -7,128 +7,44 @@
|
|
|
7
7
|
exports["babylonjs-post-process"] = factory(require("babylonjs"));
|
|
8
8
|
else
|
|
9
9
|
root["POSTPROCESSES"] = factory(root["BABYLON"]);
|
|
10
|
-
})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), function(
|
|
11
|
-
return /******/ (
|
|
12
|
-
/******/
|
|
13
|
-
/******/ var
|
|
14
|
-
/******/
|
|
15
|
-
/******/ // The require function
|
|
16
|
-
/******/ function __webpack_require__(moduleId) {
|
|
17
|
-
/******/
|
|
18
|
-
/******/ // Check if module is in cache
|
|
19
|
-
/******/ if(installedModules[moduleId]) {
|
|
20
|
-
/******/ return installedModules[moduleId].exports;
|
|
21
|
-
/******/ }
|
|
22
|
-
/******/ // Create a new module (and put it into the cache)
|
|
23
|
-
/******/ var module = installedModules[moduleId] = {
|
|
24
|
-
/******/ i: moduleId,
|
|
25
|
-
/******/ l: false,
|
|
26
|
-
/******/ exports: {}
|
|
27
|
-
/******/ };
|
|
28
|
-
/******/
|
|
29
|
-
/******/ // Execute the module function
|
|
30
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
31
|
-
/******/
|
|
32
|
-
/******/ // Flag the module as loaded
|
|
33
|
-
/******/ module.l = true;
|
|
34
|
-
/******/
|
|
35
|
-
/******/ // Return the exports of the module
|
|
36
|
-
/******/ return module.exports;
|
|
37
|
-
/******/ }
|
|
38
|
-
/******/
|
|
39
|
-
/******/
|
|
40
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
41
|
-
/******/ __webpack_require__.m = modules;
|
|
42
|
-
/******/
|
|
43
|
-
/******/ // expose the module cache
|
|
44
|
-
/******/ __webpack_require__.c = installedModules;
|
|
45
|
-
/******/
|
|
46
|
-
/******/ // define getter function for harmony exports
|
|
47
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
48
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
49
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
50
|
-
/******/ }
|
|
51
|
-
/******/ };
|
|
52
|
-
/******/
|
|
53
|
-
/******/ // define __esModule on exports
|
|
54
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
55
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
56
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
57
|
-
/******/ }
|
|
58
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
59
|
-
/******/ };
|
|
60
|
-
/******/
|
|
61
|
-
/******/ // create a fake namespace object
|
|
62
|
-
/******/ // mode & 1: value is a module id, require it
|
|
63
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
64
|
-
/******/ // mode & 4: return value when already ns object
|
|
65
|
-
/******/ // mode & 8|1: behave like require
|
|
66
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
67
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
68
|
-
/******/ if(mode & 8) return value;
|
|
69
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
70
|
-
/******/ var ns = Object.create(null);
|
|
71
|
-
/******/ __webpack_require__.r(ns);
|
|
72
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
73
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
74
|
-
/******/ return ns;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
78
|
-
/******/ __webpack_require__.n = function(module) {
|
|
79
|
-
/******/ var getter = module && module.__esModule ?
|
|
80
|
-
/******/ function getDefault() { return module['default']; } :
|
|
81
|
-
/******/ function getModuleExports() { return module; };
|
|
82
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
83
|
-
/******/ return getter;
|
|
84
|
-
/******/ };
|
|
85
|
-
/******/
|
|
86
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
87
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
88
|
-
/******/
|
|
89
|
-
/******/ // __webpack_public_path__
|
|
90
|
-
/******/ __webpack_require__.p = "";
|
|
91
|
-
/******/
|
|
92
|
-
/******/
|
|
93
|
-
/******/ // Load entry module and return exports
|
|
94
|
-
/******/ return __webpack_require__(__webpack_require__.s = "./legacy/legacy.ts");
|
|
95
|
-
/******/ })
|
|
96
|
-
/************************************************************************/
|
|
97
|
-
/******/ ({
|
|
10
|
+
})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), function(__WEBPACK_EXTERNAL_MODULE_core_Misc_decorators__) {
|
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
|
12
|
+
/******/ "use strict";
|
|
13
|
+
/******/ var __webpack_modules__ = ({
|
|
98
14
|
|
|
99
|
-
/***/ "
|
|
100
|
-
|
|
101
|
-
!***
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15
|
+
/***/ "../../../../node_modules/tslib/tslib.es6.js":
|
|
16
|
+
/*!***************************************************!*\
|
|
17
|
+
!*** ../../../../node_modules/tslib/tslib.es6.js ***!
|
|
18
|
+
\***************************************************/
|
|
19
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
105
20
|
|
|
106
|
-
"use strict";
|
|
107
21
|
__webpack_require__.r(__webpack_exports__);
|
|
108
|
-
/* harmony export
|
|
109
|
-
/* harmony export
|
|
110
|
-
/* harmony export
|
|
111
|
-
/* harmony export
|
|
112
|
-
/* harmony export
|
|
113
|
-
/* harmony export
|
|
114
|
-
/* harmony export
|
|
115
|
-
/* harmony export
|
|
116
|
-
/* harmony export
|
|
117
|
-
/* harmony export
|
|
118
|
-
/* harmony export
|
|
119
|
-
/* harmony export
|
|
120
|
-
/* harmony export
|
|
121
|
-
/* harmony export
|
|
122
|
-
/* harmony export
|
|
123
|
-
/* harmony export
|
|
124
|
-
/* harmony export
|
|
125
|
-
/* harmony export
|
|
126
|
-
/* harmony export
|
|
127
|
-
/* harmony export
|
|
128
|
-
/* harmony export
|
|
129
|
-
/* harmony export
|
|
130
|
-
/* harmony export
|
|
131
|
-
/* harmony export
|
|
22
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23
|
+
/* harmony export */ "__assign": () => (/* binding */ __assign),
|
|
24
|
+
/* harmony export */ "__asyncDelegator": () => (/* binding */ __asyncDelegator),
|
|
25
|
+
/* harmony export */ "__asyncGenerator": () => (/* binding */ __asyncGenerator),
|
|
26
|
+
/* harmony export */ "__asyncValues": () => (/* binding */ __asyncValues),
|
|
27
|
+
/* harmony export */ "__await": () => (/* binding */ __await),
|
|
28
|
+
/* harmony export */ "__awaiter": () => (/* binding */ __awaiter),
|
|
29
|
+
/* harmony export */ "__classPrivateFieldGet": () => (/* binding */ __classPrivateFieldGet),
|
|
30
|
+
/* harmony export */ "__classPrivateFieldSet": () => (/* binding */ __classPrivateFieldSet),
|
|
31
|
+
/* harmony export */ "__createBinding": () => (/* binding */ __createBinding),
|
|
32
|
+
/* harmony export */ "__decorate": () => (/* binding */ __decorate),
|
|
33
|
+
/* harmony export */ "__exportStar": () => (/* binding */ __exportStar),
|
|
34
|
+
/* harmony export */ "__extends": () => (/* binding */ __extends),
|
|
35
|
+
/* harmony export */ "__generator": () => (/* binding */ __generator),
|
|
36
|
+
/* harmony export */ "__importDefault": () => (/* binding */ __importDefault),
|
|
37
|
+
/* harmony export */ "__importStar": () => (/* binding */ __importStar),
|
|
38
|
+
/* harmony export */ "__makeTemplateObject": () => (/* binding */ __makeTemplateObject),
|
|
39
|
+
/* harmony export */ "__metadata": () => (/* binding */ __metadata),
|
|
40
|
+
/* harmony export */ "__param": () => (/* binding */ __param),
|
|
41
|
+
/* harmony export */ "__read": () => (/* binding */ __read),
|
|
42
|
+
/* harmony export */ "__rest": () => (/* binding */ __rest),
|
|
43
|
+
/* harmony export */ "__spread": () => (/* binding */ __spread),
|
|
44
|
+
/* harmony export */ "__spreadArray": () => (/* binding */ __spreadArray),
|
|
45
|
+
/* harmony export */ "__spreadArrays": () => (/* binding */ __spreadArrays),
|
|
46
|
+
/* harmony export */ "__values": () => (/* binding */ __values)
|
|
47
|
+
/* harmony export */ });
|
|
132
48
|
/*! *****************************************************************************
|
|
133
49
|
Copyright (c) Microsoft Corporation.
|
|
134
50
|
|
|
@@ -372,52 +288,21 @@ function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
|
372
288
|
|
|
373
289
|
/***/ }),
|
|
374
290
|
|
|
375
|
-
/***/ "
|
|
376
|
-
|
|
377
|
-
!***
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
/***/ (function(module, exports) {
|
|
381
|
-
|
|
382
|
-
var g;
|
|
383
|
-
|
|
384
|
-
// This works in non-strict mode
|
|
385
|
-
g = (function() {
|
|
386
|
-
return this;
|
|
387
|
-
})();
|
|
388
|
-
|
|
389
|
-
try {
|
|
390
|
-
// This works if eval is allowed (see CSP)
|
|
391
|
-
g = g || new Function("return this")();
|
|
392
|
-
} catch (e) {
|
|
393
|
-
// This works if the window reference is available
|
|
394
|
-
if (typeof window === "object") g = window;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
// g can still be undefined, but nothing to do about it...
|
|
398
|
-
// We return undefined, instead of nothing here, so it's
|
|
399
|
-
// easier to handle this case. if(!global) { ...}
|
|
400
|
-
|
|
401
|
-
module.exports = g;
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
/***/ }),
|
|
405
|
-
|
|
406
|
-
/***/ "./asciiArt/asciiArtPostProcess.ts":
|
|
407
|
-
/*!*****************************************!*\
|
|
408
|
-
!*** ./asciiArt/asciiArtPostProcess.ts ***!
|
|
409
|
-
\*****************************************/
|
|
410
|
-
/*! exports provided: AsciiArtFontTexture, AsciiArtPostProcess */
|
|
411
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
291
|
+
/***/ "../../../lts/postProcesses/dist/asciiArt/asciiArtPostProcess.js":
|
|
292
|
+
/*!***********************************************************************!*\
|
|
293
|
+
!*** ../../../lts/postProcesses/dist/asciiArt/asciiArtPostProcess.js ***!
|
|
294
|
+
\***********************************************************************/
|
|
295
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
412
296
|
|
|
413
|
-
"use strict";
|
|
414
297
|
__webpack_require__.r(__webpack_exports__);
|
|
415
|
-
/* harmony export
|
|
416
|
-
/* harmony export
|
|
417
|
-
/* harmony
|
|
418
|
-
/* harmony
|
|
419
|
-
/* harmony import */ var
|
|
420
|
-
/* harmony import */ var
|
|
298
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
299
|
+
/* harmony export */ "AsciiArtFontTexture": () => (/* binding */ AsciiArtFontTexture),
|
|
300
|
+
/* harmony export */ "AsciiArtPostProcess": () => (/* binding */ AsciiArtPostProcess)
|
|
301
|
+
/* harmony export */ });
|
|
302
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.js");
|
|
303
|
+
/* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/Engines/Extensions/engine.dynamicTexture */ "core/Misc/decorators");
|
|
304
|
+
/* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
|
|
305
|
+
/* harmony import */ var _asciiart_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./asciiart.fragment */ "../../../lts/postProcesses/dist/asciiArt/asciiart.fragment.js");
|
|
421
306
|
|
|
422
307
|
|
|
423
308
|
|
|
@@ -432,7 +317,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
432
317
|
* This is used later on in the postprocess.
|
|
433
318
|
*/
|
|
434
319
|
var AsciiArtFontTexture = /** @class */ (function (_super) {
|
|
435
|
-
|
|
320
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(AsciiArtFontTexture, _super);
|
|
436
321
|
/**
|
|
437
322
|
* Create a new instance of the Ascii Art FontTexture class
|
|
438
323
|
* @param name the name of the texture
|
|
@@ -450,18 +335,18 @@ var AsciiArtFontTexture = /** @class */ (function (_super) {
|
|
|
450
335
|
_this.name = name;
|
|
451
336
|
_this._text == text;
|
|
452
337
|
_this._font == font;
|
|
453
|
-
_this.wrapU =
|
|
454
|
-
_this.wrapV =
|
|
338
|
+
_this.wrapU = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Texture.CLAMP_ADDRESSMODE;
|
|
339
|
+
_this.wrapV = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Texture.CLAMP_ADDRESSMODE;
|
|
455
340
|
//this.anisotropicFilteringLevel = 1;
|
|
456
341
|
// Get the font specific info.
|
|
457
|
-
var maxCharHeight = _this.
|
|
458
|
-
var maxCharWidth = _this.
|
|
342
|
+
var maxCharHeight = _this._getFontHeight(font);
|
|
343
|
+
var maxCharWidth = _this._getFontWidth(font);
|
|
459
344
|
_this._charSize = Math.max(maxCharHeight.height, maxCharWidth);
|
|
460
345
|
// This is an approximate size, but should always be able to fit at least the maxCharCount.
|
|
461
346
|
var textureWidth = Math.ceil(_this._charSize * text.length);
|
|
462
347
|
var textureHeight = _this._charSize;
|
|
463
348
|
// Create the texture that will store the font characters.
|
|
464
|
-
_this._texture = scene.getEngine().createDynamicTexture(textureWidth, textureHeight, false,
|
|
349
|
+
_this._texture = scene.getEngine().createDynamicTexture(textureWidth, textureHeight, false, core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_SAMPLINGMODE);
|
|
465
350
|
//scene.getEngine().setclamp
|
|
466
351
|
var textureSize = _this.getSize();
|
|
467
352
|
// Create a canvas with the final size: the one matching the texture.
|
|
@@ -496,10 +381,10 @@ var AsciiArtFontTexture = /** @class */ (function (_super) {
|
|
|
496
381
|
* @param font the font to use, use the W3C CSS notation
|
|
497
382
|
* @return the max char width
|
|
498
383
|
*/
|
|
499
|
-
AsciiArtFontTexture.prototype.
|
|
384
|
+
AsciiArtFontTexture.prototype._getFontWidth = function (font) {
|
|
500
385
|
var fontDraw = document.createElement("canvas");
|
|
501
|
-
var ctx = fontDraw.getContext(
|
|
502
|
-
ctx.fillStyle =
|
|
386
|
+
var ctx = fontDraw.getContext("2d");
|
|
387
|
+
ctx.fillStyle = "white";
|
|
503
388
|
ctx.font = font;
|
|
504
389
|
return ctx.measureText("W").width;
|
|
505
390
|
};
|
|
@@ -509,14 +394,14 @@ var AsciiArtFontTexture = /** @class */ (function (_super) {
|
|
|
509
394
|
* @param font the font to use, use the W3C CSS notation
|
|
510
395
|
* @return the max char height
|
|
511
396
|
*/
|
|
512
|
-
AsciiArtFontTexture.prototype.
|
|
397
|
+
AsciiArtFontTexture.prototype._getFontHeight = function (font) {
|
|
513
398
|
var fontDraw = document.createElement("canvas");
|
|
514
|
-
var ctx = fontDraw.getContext(
|
|
399
|
+
var ctx = fontDraw.getContext("2d");
|
|
515
400
|
ctx.fillRect(0, 0, fontDraw.width, fontDraw.height);
|
|
516
|
-
ctx.textBaseline =
|
|
517
|
-
ctx.fillStyle =
|
|
401
|
+
ctx.textBaseline = "top";
|
|
402
|
+
ctx.fillStyle = "white";
|
|
518
403
|
ctx.font = font;
|
|
519
|
-
ctx.fillText(
|
|
404
|
+
ctx.fillText("jH|", 0, 0);
|
|
520
405
|
var pixels = ctx.getImageData(0, 0, fontDraw.width, fontDraw.height).data;
|
|
521
406
|
var start = -1;
|
|
522
407
|
var end = -1;
|
|
@@ -539,7 +424,7 @@ var AsciiArtFontTexture = /** @class */ (function (_super) {
|
|
|
539
424
|
}
|
|
540
425
|
}
|
|
541
426
|
}
|
|
542
|
-
return { height:
|
|
427
|
+
return { height: end - start + 1, offset: start - 1 };
|
|
543
428
|
};
|
|
544
429
|
/**
|
|
545
430
|
* Clones the current AsciiArtTexture.
|
|
@@ -555,17 +440,17 @@ var AsciiArtFontTexture = /** @class */ (function (_super) {
|
|
|
555
440
|
* @return the parsed texture
|
|
556
441
|
*/
|
|
557
442
|
AsciiArtFontTexture.Parse = function (source, scene) {
|
|
558
|
-
var texture =
|
|
443
|
+
var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Parse(function () { return new AsciiArtFontTexture(source.name, source.font, source.text, scene); }, source, scene, null);
|
|
559
444
|
return texture;
|
|
560
445
|
};
|
|
561
|
-
|
|
562
|
-
|
|
446
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
447
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serialize)("font")
|
|
563
448
|
], AsciiArtFontTexture.prototype, "_font", void 0);
|
|
564
|
-
|
|
565
|
-
|
|
449
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
450
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serialize)("text")
|
|
566
451
|
], AsciiArtFontTexture.prototype, "_text", void 0);
|
|
567
452
|
return AsciiArtFontTexture;
|
|
568
|
-
}(
|
|
453
|
+
}(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.BaseTexture));
|
|
569
454
|
|
|
570
455
|
/**
|
|
571
456
|
* AsciiArtPostProcess helps rendering everithing in Ascii Art.
|
|
@@ -574,18 +459,19 @@ var AsciiArtFontTexture = /** @class */ (function (_super) {
|
|
|
574
459
|
* Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
|
|
575
460
|
*/
|
|
576
461
|
var AsciiArtPostProcess = /** @class */ (function (_super) {
|
|
577
|
-
|
|
462
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(AsciiArtPostProcess, _super);
|
|
578
463
|
/**
|
|
579
464
|
* Instantiates a new Ascii Art Post Process.
|
|
580
465
|
* @param name the name to give to the postprocess
|
|
581
466
|
* @camera the camera to apply the post process to.
|
|
467
|
+
* @param camera
|
|
582
468
|
* @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
|
|
583
469
|
*/
|
|
584
470
|
function AsciiArtPostProcess(name, camera, options) {
|
|
585
|
-
var _this = _super.call(this, name,
|
|
471
|
+
var _this = _super.call(this, name, "asciiart", ["asciiArtFontInfos", "asciiArtOptions"], ["asciiArtFont"], {
|
|
586
472
|
width: camera.getEngine().getRenderWidth(),
|
|
587
|
-
height: camera.getEngine().getRenderHeight()
|
|
588
|
-
}, camera,
|
|
473
|
+
height: camera.getEngine().getRenderHeight(),
|
|
474
|
+
}, camera, core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Texture.TRILINEAR_SAMPLINGMODE, camera.getEngine(), true) || this;
|
|
589
475
|
/**
|
|
590
476
|
* This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
|
|
591
477
|
* This number is defined between 0 and 1;
|
|
@@ -601,7 +487,7 @@ var AsciiArtPostProcess = /** @class */ (function (_super) {
|
|
|
601
487
|
var characterSet = " `-.'_:,\"=^;<+!*?/cL\\zrs7TivJtC{3F)Il(xZfY5S2eajo14[nuyE]P6V9kXpKwGhqAUbOd8#HRDB0$mgMW&Q%N@";
|
|
602
488
|
// Use options.
|
|
603
489
|
if (options) {
|
|
604
|
-
if (typeof
|
|
490
|
+
if (typeof options === "string") {
|
|
605
491
|
font = options;
|
|
606
492
|
}
|
|
607
493
|
else {
|
|
@@ -621,68 +507,68 @@ var AsciiArtPostProcess = /** @class */ (function (_super) {
|
|
|
621
507
|
return _this;
|
|
622
508
|
}
|
|
623
509
|
return AsciiArtPostProcess;
|
|
624
|
-
}(
|
|
510
|
+
}(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.PostProcess));
|
|
625
511
|
|
|
626
512
|
|
|
627
513
|
|
|
628
514
|
/***/ }),
|
|
629
515
|
|
|
630
|
-
/***/ "
|
|
631
|
-
|
|
632
|
-
!***
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
516
|
+
/***/ "../../../lts/postProcesses/dist/asciiArt/asciiart.fragment.js":
|
|
517
|
+
/*!*********************************************************************!*\
|
|
518
|
+
!*** ../../../lts/postProcesses/dist/asciiArt/asciiart.fragment.js ***!
|
|
519
|
+
\*********************************************************************/
|
|
520
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
636
521
|
|
|
637
|
-
"use strict";
|
|
638
522
|
__webpack_require__.r(__webpack_exports__);
|
|
639
|
-
/* harmony export
|
|
640
|
-
/* harmony
|
|
641
|
-
/* harmony
|
|
642
|
-
|
|
643
|
-
var
|
|
644
|
-
|
|
645
|
-
|
|
523
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
524
|
+
/* harmony export */ "asciiartPixelShader": () => (/* binding */ asciiartPixelShader)
|
|
525
|
+
/* harmony export */ });
|
|
526
|
+
/* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
|
|
527
|
+
/* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
|
|
528
|
+
// Do not edit.
|
|
529
|
+
|
|
530
|
+
var name = "asciiartPixelShader";
|
|
531
|
+
var shader = "varying vec2 vUV;uniform sampler2D textureSampler;uniform sampler2D asciiArtFont;uniform vec4 asciiArtFontInfos;uniform vec4 asciiArtOptions;float getLuminance(vec3 color)\n{return clamp(dot(color,vec3(0.2126,0.7152,0.0722)),0.,1.);}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{float caracterSize=asciiArtFontInfos.x;float numChar=asciiArtFontInfos.y-1.0;float fontx=asciiArtFontInfos.z;float fonty=asciiArtFontInfos.w;float screenx=asciiArtOptions.x;float screeny=asciiArtOptions.y;float tileX=float(floor((gl_FragCoord.x)/caracterSize))*caracterSize/screenx;float tileY=float(floor((gl_FragCoord.y)/caracterSize))*caracterSize/screeny;vec2 tileUV=vec2(tileX,tileY);vec4 tileColor=texture2D(textureSampler,tileUV);vec4 baseColor=texture2D(textureSampler,vUV);float tileLuminance=getLuminance(tileColor.rgb);float offsetx=(float(floor(tileLuminance*numChar)))*caracterSize/fontx;float offsety=0.0;float x=float(mod(gl_FragCoord.x,caracterSize))/fontx;float y=float(mod(gl_FragCoord.y,caracterSize))/fonty;vec4 finalColor= texture2D(asciiArtFont,vec2(offsetx+x,offsety+(caracterSize/fonty-y)));finalColor.rgb*=tileColor.rgb;finalColor.a=1.0;finalColor= mix(finalColor,tileColor,asciiArtOptions.w);finalColor= mix(finalColor,baseColor,asciiArtOptions.z);gl_FragColor=finalColor;}";
|
|
532
|
+
// Sideeffect
|
|
533
|
+
core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
|
|
646
534
|
/** @hidden */
|
|
647
535
|
var asciiartPixelShader = { name: name, shader: shader };
|
|
648
536
|
|
|
649
537
|
|
|
650
538
|
/***/ }),
|
|
651
539
|
|
|
652
|
-
/***/ "
|
|
653
|
-
|
|
654
|
-
!***
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
540
|
+
/***/ "../../../lts/postProcesses/dist/asciiArt/index.js":
|
|
541
|
+
/*!*********************************************************!*\
|
|
542
|
+
!*** ../../../lts/postProcesses/dist/asciiArt/index.js ***!
|
|
543
|
+
\*********************************************************/
|
|
544
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
658
545
|
|
|
659
|
-
"use strict";
|
|
660
546
|
__webpack_require__.r(__webpack_exports__);
|
|
661
|
-
/* harmony
|
|
662
|
-
/* harmony
|
|
663
|
-
|
|
664
|
-
/* harmony
|
|
665
|
-
|
|
547
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
548
|
+
/* harmony export */ "AsciiArtFontTexture": () => (/* reexport safe */ _asciiArtPostProcess__WEBPACK_IMPORTED_MODULE_0__.AsciiArtFontTexture),
|
|
549
|
+
/* harmony export */ "AsciiArtPostProcess": () => (/* reexport safe */ _asciiArtPostProcess__WEBPACK_IMPORTED_MODULE_0__.AsciiArtPostProcess)
|
|
550
|
+
/* harmony export */ });
|
|
551
|
+
/* harmony import */ var _asciiArtPostProcess__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./asciiArtPostProcess */ "../../../lts/postProcesses/dist/asciiArt/asciiArtPostProcess.js");
|
|
666
552
|
|
|
667
553
|
|
|
668
554
|
|
|
669
555
|
/***/ }),
|
|
670
556
|
|
|
671
|
-
/***/ "
|
|
672
|
-
|
|
673
|
-
!***
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
557
|
+
/***/ "../../../lts/postProcesses/dist/digitalRain/digitalRainPostProcess.js":
|
|
558
|
+
/*!*****************************************************************************!*\
|
|
559
|
+
!*** ../../../lts/postProcesses/dist/digitalRain/digitalRainPostProcess.js ***!
|
|
560
|
+
\*****************************************************************************/
|
|
561
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
677
562
|
|
|
678
|
-
"use strict";
|
|
679
563
|
__webpack_require__.r(__webpack_exports__);
|
|
680
|
-
/* harmony export
|
|
681
|
-
/* harmony export
|
|
682
|
-
/* harmony
|
|
683
|
-
/* harmony
|
|
684
|
-
/* harmony import */ var
|
|
685
|
-
/* harmony import */ var
|
|
564
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
565
|
+
/* harmony export */ "DigitalRainFontTexture": () => (/* binding */ DigitalRainFontTexture),
|
|
566
|
+
/* harmony export */ "DigitalRainPostProcess": () => (/* binding */ DigitalRainPostProcess)
|
|
567
|
+
/* harmony export */ });
|
|
568
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.js");
|
|
569
|
+
/* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/Engines/Extensions/engine.dynamicTexture */ "core/Misc/decorators");
|
|
570
|
+
/* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
|
|
571
|
+
/* harmony import */ var _digitalrain_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./digitalrain.fragment */ "../../../lts/postProcesses/dist/digitalRain/digitalrain.fragment.js");
|
|
686
572
|
|
|
687
573
|
|
|
688
574
|
|
|
@@ -698,7 +584,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
698
584
|
* This is used later on in the postprocess.
|
|
699
585
|
*/
|
|
700
586
|
var DigitalRainFontTexture = /** @class */ (function (_super) {
|
|
701
|
-
|
|
587
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(DigitalRainFontTexture, _super);
|
|
702
588
|
/**
|
|
703
589
|
* Create a new instance of the Digital Rain FontTexture class
|
|
704
590
|
* @param name the name of the texture
|
|
@@ -716,17 +602,17 @@ var DigitalRainFontTexture = /** @class */ (function (_super) {
|
|
|
716
602
|
_this.name = name;
|
|
717
603
|
_this._text == text;
|
|
718
604
|
_this._font == font;
|
|
719
|
-
_this.wrapU =
|
|
720
|
-
_this.wrapV =
|
|
605
|
+
_this.wrapU = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Texture.CLAMP_ADDRESSMODE;
|
|
606
|
+
_this.wrapV = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Texture.CLAMP_ADDRESSMODE;
|
|
721
607
|
// Get the font specific info.
|
|
722
|
-
var maxCharHeight = _this.
|
|
723
|
-
var maxCharWidth = _this.
|
|
608
|
+
var maxCharHeight = _this._getFontHeight(font);
|
|
609
|
+
var maxCharWidth = _this._getFontWidth(font);
|
|
724
610
|
_this._charSize = Math.max(maxCharHeight.height, maxCharWidth);
|
|
725
611
|
// This is an approximate size, but should always be able to fit at least the maxCharCount.
|
|
726
612
|
var textureWidth = _this._charSize;
|
|
727
613
|
var textureHeight = Math.ceil(_this._charSize * text.length);
|
|
728
614
|
// Create the texture that will store the font characters.
|
|
729
|
-
_this._texture = scene.getEngine().createDynamicTexture(textureWidth, textureHeight, false,
|
|
615
|
+
_this._texture = scene.getEngine().createDynamicTexture(textureWidth, textureHeight, false, core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Texture.NEAREST_SAMPLINGMODE);
|
|
730
616
|
//scene.getEngine().setclamp
|
|
731
617
|
var textureSize = _this.getSize();
|
|
732
618
|
// Create a canvas with the final size: the one matching the texture.
|
|
@@ -761,10 +647,10 @@ var DigitalRainFontTexture = /** @class */ (function (_super) {
|
|
|
761
647
|
* @param font the font to use, use the W3C CSS notation
|
|
762
648
|
* @return the max char width
|
|
763
649
|
*/
|
|
764
|
-
DigitalRainFontTexture.prototype.
|
|
650
|
+
DigitalRainFontTexture.prototype._getFontWidth = function (font) {
|
|
765
651
|
var fontDraw = document.createElement("canvas");
|
|
766
|
-
var ctx = fontDraw.getContext(
|
|
767
|
-
ctx.fillStyle =
|
|
652
|
+
var ctx = fontDraw.getContext("2d");
|
|
653
|
+
ctx.fillStyle = "white";
|
|
768
654
|
ctx.font = font;
|
|
769
655
|
return ctx.measureText("W").width;
|
|
770
656
|
};
|
|
@@ -774,14 +660,14 @@ var DigitalRainFontTexture = /** @class */ (function (_super) {
|
|
|
774
660
|
* @param font the font to use, use the W3C CSS notation
|
|
775
661
|
* @return the max char height
|
|
776
662
|
*/
|
|
777
|
-
DigitalRainFontTexture.prototype.
|
|
663
|
+
DigitalRainFontTexture.prototype._getFontHeight = function (font) {
|
|
778
664
|
var fontDraw = document.createElement("canvas");
|
|
779
|
-
var ctx = fontDraw.getContext(
|
|
665
|
+
var ctx = fontDraw.getContext("2d");
|
|
780
666
|
ctx.fillRect(0, 0, fontDraw.width, fontDraw.height);
|
|
781
|
-
ctx.textBaseline =
|
|
782
|
-
ctx.fillStyle =
|
|
667
|
+
ctx.textBaseline = "top";
|
|
668
|
+
ctx.fillStyle = "white";
|
|
783
669
|
ctx.font = font;
|
|
784
|
-
ctx.fillText(
|
|
670
|
+
ctx.fillText("jH|", 0, 0);
|
|
785
671
|
var pixels = ctx.getImageData(0, 0, fontDraw.width, fontDraw.height).data;
|
|
786
672
|
var start = -1;
|
|
787
673
|
var end = -1;
|
|
@@ -804,7 +690,7 @@ var DigitalRainFontTexture = /** @class */ (function (_super) {
|
|
|
804
690
|
}
|
|
805
691
|
}
|
|
806
692
|
}
|
|
807
|
-
return { height:
|
|
693
|
+
return { height: end - start + 1, offset: start - 1 };
|
|
808
694
|
};
|
|
809
695
|
/**
|
|
810
696
|
* Clones the current DigitalRainFontTexture.
|
|
@@ -820,17 +706,17 @@ var DigitalRainFontTexture = /** @class */ (function (_super) {
|
|
|
820
706
|
* @return the parsed texture
|
|
821
707
|
*/
|
|
822
708
|
DigitalRainFontTexture.Parse = function (source, scene) {
|
|
823
|
-
var texture =
|
|
709
|
+
var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Parse(function () { return new DigitalRainFontTexture(source.name, source.font, source.text, scene); }, source, scene, null);
|
|
824
710
|
return texture;
|
|
825
711
|
};
|
|
826
|
-
|
|
827
|
-
|
|
712
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
713
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serialize)("font")
|
|
828
714
|
], DigitalRainFontTexture.prototype, "_font", void 0);
|
|
829
|
-
|
|
830
|
-
|
|
715
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
716
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serialize)("text")
|
|
831
717
|
], DigitalRainFontTexture.prototype, "_text", void 0);
|
|
832
718
|
return DigitalRainFontTexture;
|
|
833
|
-
}(
|
|
719
|
+
}(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.BaseTexture));
|
|
834
720
|
|
|
835
721
|
/**
|
|
836
722
|
* DigitalRainPostProcess helps rendering everithing in digital rain.
|
|
@@ -839,18 +725,19 @@ var DigitalRainFontTexture = /** @class */ (function (_super) {
|
|
|
839
725
|
* Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
|
|
840
726
|
*/
|
|
841
727
|
var DigitalRainPostProcess = /** @class */ (function (_super) {
|
|
842
|
-
|
|
728
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(DigitalRainPostProcess, _super);
|
|
843
729
|
/**
|
|
844
730
|
* Instantiates a new Digital Rain Post Process.
|
|
845
731
|
* @param name the name to give to the postprocess
|
|
846
732
|
* @camera the camera to apply the post process to.
|
|
733
|
+
* @param camera
|
|
847
734
|
* @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
|
|
848
735
|
*/
|
|
849
736
|
function DigitalRainPostProcess(name, camera, options) {
|
|
850
|
-
var _this = _super.call(this, name,
|
|
737
|
+
var _this = _super.call(this, name, "digitalrain", ["digitalRainFontInfos", "digitalRainOptions", "cosTimeZeroOne", "matrixSpeed"], ["digitalRainFont"], {
|
|
851
738
|
width: camera.getEngine().getRenderWidth(),
|
|
852
|
-
height: camera.getEngine().getRenderHeight()
|
|
853
|
-
}, camera,
|
|
739
|
+
height: camera.getEngine().getRenderHeight(),
|
|
740
|
+
}, camera, core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Texture.TRILINEAR_SAMPLINGMODE, camera.getEngine(), true) || this;
|
|
854
741
|
/**
|
|
855
742
|
* This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
|
|
856
743
|
* This number is defined between 0 and 1;
|
|
@@ -870,7 +757,7 @@ var DigitalRainPostProcess = /** @class */ (function (_super) {
|
|
|
870
757
|
var characterSet = "古池や蛙飛び込む水の音ふるいけやかわずとびこむみずのおと初しぐれ猿も小蓑をほしげ也はつしぐれさるもこみのをほしげなり江戸の雨何石呑んだ時鳥えどのあめなんごくのんだほととぎす";
|
|
871
758
|
// Use options.
|
|
872
759
|
if (options) {
|
|
873
|
-
if (typeof
|
|
760
|
+
if (typeof options === "string") {
|
|
874
761
|
font = options;
|
|
875
762
|
}
|
|
876
763
|
else {
|
|
@@ -883,7 +770,7 @@ var DigitalRainPostProcess = /** @class */ (function (_super) {
|
|
|
883
770
|
var textureSize = _this._digitalRainFontTexture.getSize();
|
|
884
771
|
var alpha = 0.0;
|
|
885
772
|
var cosTimeZeroOne = 0.0;
|
|
886
|
-
var matrix =
|
|
773
|
+
var matrix = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Matrix.FromValues(Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random(), Math.random());
|
|
887
774
|
_this.onApply = function (effect) {
|
|
888
775
|
effect.setTexture("digitalRainFont", _this._digitalRainFontTexture);
|
|
889
776
|
effect.setFloat4("digitalRainFontInfos", _this._digitalRainFontTexture.charSize, characterSet.length, textureSize.width, textureSize.height);
|
|
@@ -891,130 +778,221 @@ var DigitalRainPostProcess = /** @class */ (function (_super) {
|
|
|
891
778
|
effect.setMatrix("matrixSpeed", matrix);
|
|
892
779
|
alpha += _this.speed;
|
|
893
780
|
cosTimeZeroOne = alpha;
|
|
894
|
-
effect.setFloat(
|
|
781
|
+
effect.setFloat("cosTimeZeroOne", cosTimeZeroOne);
|
|
895
782
|
};
|
|
896
783
|
return _this;
|
|
897
784
|
}
|
|
898
785
|
return DigitalRainPostProcess;
|
|
899
|
-
}(
|
|
786
|
+
}(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.PostProcess));
|
|
900
787
|
|
|
901
788
|
|
|
902
789
|
|
|
903
790
|
/***/ }),
|
|
904
791
|
|
|
905
|
-
/***/ "
|
|
906
|
-
|
|
907
|
-
!***
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
792
|
+
/***/ "../../../lts/postProcesses/dist/digitalRain/digitalrain.fragment.js":
|
|
793
|
+
/*!***************************************************************************!*\
|
|
794
|
+
!*** ../../../lts/postProcesses/dist/digitalRain/digitalrain.fragment.js ***!
|
|
795
|
+
\***************************************************************************/
|
|
796
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
911
797
|
|
|
912
|
-
"use strict";
|
|
913
798
|
__webpack_require__.r(__webpack_exports__);
|
|
914
|
-
/* harmony export
|
|
915
|
-
/* harmony
|
|
916
|
-
/* harmony
|
|
917
|
-
|
|
918
|
-
var
|
|
919
|
-
|
|
920
|
-
|
|
799
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
800
|
+
/* harmony export */ "digitalrainPixelShader": () => (/* binding */ digitalrainPixelShader)
|
|
801
|
+
/* harmony export */ });
|
|
802
|
+
/* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
|
|
803
|
+
/* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
|
|
804
|
+
// Do not edit.
|
|
805
|
+
|
|
806
|
+
var name = "digitalrainPixelShader";
|
|
807
|
+
var shader = "varying vec2 vUV;uniform sampler2D textureSampler;uniform sampler2D digitalRainFont;uniform vec4 digitalRainFontInfos;uniform vec4 digitalRainOptions;uniform mat4 matrixSpeed;uniform float cosTimeZeroOne;float getLuminance(vec3 color)\n{return clamp(dot(color,vec3(0.2126,0.7152,0.0722)),0.,1.);}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) \n{float caracterSize=digitalRainFontInfos.x;float numChar=digitalRainFontInfos.y-1.0;float fontx=digitalRainFontInfos.z;float fonty=digitalRainFontInfos.w;float screenx=digitalRainOptions.x;float screeny=digitalRainOptions.y;float ratio=screeny/fonty;float columnx=float(floor((gl_FragCoord.x)/caracterSize));float tileX=float(floor((gl_FragCoord.x)/caracterSize))*caracterSize/screenx;float tileY=float(floor((gl_FragCoord.y)/caracterSize))*caracterSize/screeny;vec2 tileUV=vec2(tileX,tileY);vec4 tileColor=texture2D(textureSampler,tileUV);vec4 baseColor=texture2D(textureSampler,vUV);float tileLuminance=getLuminance(tileColor.rgb);int st=int(mod(columnx,4.0));float speed=cosTimeZeroOne*(sin(tileX*314.5)*0.5+0.6); \nfloat x=float(mod(gl_FragCoord.x,caracterSize))/fontx;float y=float(mod(speed+gl_FragCoord.y/screeny,1.0));y*=ratio;vec4 finalColor= texture2D(digitalRainFont,vec2(x,1.0-y));vec3 high=finalColor.rgb*(vec3(1.2,1.2,1.2)*pow(1.0-y,30.0));finalColor.rgb*=vec3(pow(tileLuminance,5.0),pow(tileLuminance,1.5),pow(tileLuminance,3.0));finalColor.rgb+=high;finalColor.rgb=clamp(finalColor.rgb,0.,1.);finalColor.a=1.0;finalColor= mix(finalColor,tileColor,digitalRainOptions.w);finalColor= mix(finalColor,baseColor,digitalRainOptions.z);gl_FragColor=finalColor;}";
|
|
808
|
+
// Sideeffect
|
|
809
|
+
core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
|
|
921
810
|
/** @hidden */
|
|
922
811
|
var digitalrainPixelShader = { name: name, shader: shader };
|
|
923
812
|
|
|
924
813
|
|
|
925
814
|
/***/ }),
|
|
926
815
|
|
|
927
|
-
/***/ "
|
|
928
|
-
|
|
929
|
-
!***
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
816
|
+
/***/ "../../../lts/postProcesses/dist/digitalRain/index.js":
|
|
817
|
+
/*!************************************************************!*\
|
|
818
|
+
!*** ../../../lts/postProcesses/dist/digitalRain/index.js ***!
|
|
819
|
+
\************************************************************/
|
|
820
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
933
821
|
|
|
934
|
-
"use strict";
|
|
935
822
|
__webpack_require__.r(__webpack_exports__);
|
|
936
|
-
/* harmony
|
|
937
|
-
/* harmony
|
|
938
|
-
|
|
939
|
-
/* harmony
|
|
940
|
-
|
|
823
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
824
|
+
/* harmony export */ "DigitalRainFontTexture": () => (/* reexport safe */ _digitalRainPostProcess__WEBPACK_IMPORTED_MODULE_0__.DigitalRainFontTexture),
|
|
825
|
+
/* harmony export */ "DigitalRainPostProcess": () => (/* reexport safe */ _digitalRainPostProcess__WEBPACK_IMPORTED_MODULE_0__.DigitalRainPostProcess)
|
|
826
|
+
/* harmony export */ });
|
|
827
|
+
/* harmony import */ var _digitalRainPostProcess__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./digitalRainPostProcess */ "../../../lts/postProcesses/dist/digitalRain/digitalRainPostProcess.js");
|
|
941
828
|
|
|
942
829
|
|
|
943
830
|
|
|
944
831
|
/***/ }),
|
|
945
832
|
|
|
946
|
-
/***/ "
|
|
947
|
-
|
|
948
|
-
!***
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
833
|
+
/***/ "../../../lts/postProcesses/dist/index.js":
|
|
834
|
+
/*!************************************************!*\
|
|
835
|
+
!*** ../../../lts/postProcesses/dist/index.js ***!
|
|
836
|
+
\************************************************/
|
|
837
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
952
838
|
|
|
953
|
-
"use strict";
|
|
954
839
|
__webpack_require__.r(__webpack_exports__);
|
|
955
|
-
/* harmony
|
|
956
|
-
/* harmony
|
|
957
|
-
|
|
958
|
-
/* harmony
|
|
959
|
-
|
|
960
|
-
/* harmony
|
|
961
|
-
/* harmony
|
|
962
|
-
|
|
963
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DigitalRainPostProcess", function() { return _digitalRain_index__WEBPACK_IMPORTED_MODULE_1__["DigitalRainPostProcess"]; });
|
|
964
|
-
|
|
840
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
841
|
+
/* harmony export */ "AsciiArtFontTexture": () => (/* reexport safe */ _asciiArt_index__WEBPACK_IMPORTED_MODULE_0__.AsciiArtFontTexture),
|
|
842
|
+
/* harmony export */ "AsciiArtPostProcess": () => (/* reexport safe */ _asciiArt_index__WEBPACK_IMPORTED_MODULE_0__.AsciiArtPostProcess),
|
|
843
|
+
/* harmony export */ "DigitalRainFontTexture": () => (/* reexport safe */ _digitalRain_index__WEBPACK_IMPORTED_MODULE_1__.DigitalRainFontTexture),
|
|
844
|
+
/* harmony export */ "DigitalRainPostProcess": () => (/* reexport safe */ _digitalRain_index__WEBPACK_IMPORTED_MODULE_1__.DigitalRainPostProcess)
|
|
845
|
+
/* harmony export */ });
|
|
846
|
+
/* harmony import */ var _asciiArt_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./asciiArt/index */ "../../../lts/postProcesses/dist/asciiArt/index.js");
|
|
847
|
+
/* harmony import */ var _digitalRain_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./digitalRain/index */ "../../../lts/postProcesses/dist/digitalRain/index.js");
|
|
965
848
|
|
|
966
849
|
|
|
967
850
|
|
|
968
851
|
|
|
969
852
|
/***/ }),
|
|
970
853
|
|
|
971
|
-
/***/ "
|
|
972
|
-
|
|
973
|
-
!***
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
854
|
+
/***/ "../../../lts/postProcesses/dist/legacy/legacy.js":
|
|
855
|
+
/*!********************************************************!*\
|
|
856
|
+
!*** ../../../lts/postProcesses/dist/legacy/legacy.js ***!
|
|
857
|
+
\********************************************************/
|
|
858
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
977
859
|
|
|
978
|
-
"use strict";
|
|
979
860
|
__webpack_require__.r(__webpack_exports__);
|
|
980
|
-
/*
|
|
981
|
-
/* harmony
|
|
982
|
-
|
|
983
|
-
/* harmony
|
|
984
|
-
|
|
985
|
-
/* harmony
|
|
986
|
-
|
|
987
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DigitalRainPostProcess", function() { return _index__WEBPACK_IMPORTED_MODULE_0__["DigitalRainPostProcess"]; });
|
|
988
|
-
|
|
861
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
862
|
+
/* harmony export */ "AsciiArtFontTexture": () => (/* reexport safe */ post_processes_index__WEBPACK_IMPORTED_MODULE_0__.AsciiArtFontTexture),
|
|
863
|
+
/* harmony export */ "AsciiArtPostProcess": () => (/* reexport safe */ post_processes_index__WEBPACK_IMPORTED_MODULE_0__.AsciiArtPostProcess),
|
|
864
|
+
/* harmony export */ "DigitalRainFontTexture": () => (/* reexport safe */ post_processes_index__WEBPACK_IMPORTED_MODULE_0__.DigitalRainFontTexture),
|
|
865
|
+
/* harmony export */ "DigitalRainPostProcess": () => (/* reexport safe */ post_processes_index__WEBPACK_IMPORTED_MODULE_0__.DigitalRainPostProcess)
|
|
866
|
+
/* harmony export */ });
|
|
867
|
+
/* harmony import */ var post_processes_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! post-processes/index */ "../../../lts/postProcesses/dist/index.js");
|
|
989
868
|
|
|
990
869
|
/**
|
|
991
870
|
*
|
|
992
871
|
* This is the entry point for the UMD module.
|
|
993
872
|
* The entry point for a future ESM package should be index.ts
|
|
994
873
|
*/
|
|
995
|
-
var globalObject =
|
|
874
|
+
var globalObject = typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : undefined;
|
|
996
875
|
if (typeof globalObject !== "undefined") {
|
|
997
|
-
for (var key in
|
|
998
|
-
globalObject.BABYLON[key] =
|
|
876
|
+
for (var key in post_processes_index__WEBPACK_IMPORTED_MODULE_0__) {
|
|
877
|
+
globalObject.BABYLON[key] = post_processes_index__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
999
878
|
}
|
|
1000
879
|
}
|
|
1001
880
|
|
|
1002
881
|
|
|
1003
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js")))
|
|
1004
882
|
|
|
1005
883
|
/***/ }),
|
|
1006
884
|
|
|
1007
|
-
/***/ "
|
|
885
|
+
/***/ "core/Misc/decorators":
|
|
1008
886
|
/*!****************************************************************************************************!*\
|
|
1009
887
|
!*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
|
|
1010
888
|
\****************************************************************************************************/
|
|
1011
|
-
|
|
1012
|
-
/***/ (function(module, exports) {
|
|
889
|
+
/***/ ((module) => {
|
|
1013
890
|
|
|
1014
|
-
module.exports =
|
|
891
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_core_Misc_decorators__;
|
|
1015
892
|
|
|
1016
893
|
/***/ })
|
|
1017
894
|
|
|
1018
|
-
/******/
|
|
895
|
+
/******/ });
|
|
896
|
+
/************************************************************************/
|
|
897
|
+
/******/ // The module cache
|
|
898
|
+
/******/ var __webpack_module_cache__ = {};
|
|
899
|
+
/******/
|
|
900
|
+
/******/ // The require function
|
|
901
|
+
/******/ function __webpack_require__(moduleId) {
|
|
902
|
+
/******/ // Check if module is in cache
|
|
903
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
904
|
+
/******/ if (cachedModule !== undefined) {
|
|
905
|
+
/******/ return cachedModule.exports;
|
|
906
|
+
/******/ }
|
|
907
|
+
/******/ // Create a new module (and put it into the cache)
|
|
908
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
909
|
+
/******/ // no module.id needed
|
|
910
|
+
/******/ // no module.loaded needed
|
|
911
|
+
/******/ exports: {}
|
|
912
|
+
/******/ };
|
|
913
|
+
/******/
|
|
914
|
+
/******/ // Execute the module function
|
|
915
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
916
|
+
/******/
|
|
917
|
+
/******/ // Return the exports of the module
|
|
918
|
+
/******/ return module.exports;
|
|
919
|
+
/******/ }
|
|
920
|
+
/******/
|
|
921
|
+
/************************************************************************/
|
|
922
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
923
|
+
/******/ (() => {
|
|
924
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
925
|
+
/******/ __webpack_require__.n = (module) => {
|
|
926
|
+
/******/ var getter = module && module.__esModule ?
|
|
927
|
+
/******/ () => (module['default']) :
|
|
928
|
+
/******/ () => (module);
|
|
929
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
930
|
+
/******/ return getter;
|
|
931
|
+
/******/ };
|
|
932
|
+
/******/ })();
|
|
933
|
+
/******/
|
|
934
|
+
/******/ /* webpack/runtime/define property getters */
|
|
935
|
+
/******/ (() => {
|
|
936
|
+
/******/ // define getter functions for harmony exports
|
|
937
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
938
|
+
/******/ for(var key in definition) {
|
|
939
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
940
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
941
|
+
/******/ }
|
|
942
|
+
/******/ }
|
|
943
|
+
/******/ };
|
|
944
|
+
/******/ })();
|
|
945
|
+
/******/
|
|
946
|
+
/******/ /* webpack/runtime/global */
|
|
947
|
+
/******/ (() => {
|
|
948
|
+
/******/ __webpack_require__.g = (function() {
|
|
949
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
950
|
+
/******/ try {
|
|
951
|
+
/******/ return this || new Function('return this')();
|
|
952
|
+
/******/ } catch (e) {
|
|
953
|
+
/******/ if (typeof window === 'object') return window;
|
|
954
|
+
/******/ }
|
|
955
|
+
/******/ })();
|
|
956
|
+
/******/ })();
|
|
957
|
+
/******/
|
|
958
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
959
|
+
/******/ (() => {
|
|
960
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
961
|
+
/******/ })();
|
|
962
|
+
/******/
|
|
963
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
964
|
+
/******/ (() => {
|
|
965
|
+
/******/ // define __esModule on exports
|
|
966
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
967
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
968
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
969
|
+
/******/ }
|
|
970
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
971
|
+
/******/ };
|
|
972
|
+
/******/ })();
|
|
973
|
+
/******/
|
|
974
|
+
/************************************************************************/
|
|
975
|
+
var __webpack_exports__ = {};
|
|
976
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
977
|
+
(() => {
|
|
978
|
+
/*!**********************!*\
|
|
979
|
+
!*** ./src/index.ts ***!
|
|
980
|
+
\**********************/
|
|
981
|
+
__webpack_require__.r(__webpack_exports__);
|
|
982
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
983
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
984
|
+
/* harmony export */ "postProcess": () => (/* reexport module object */ post_processes_legacy_legacy__WEBPACK_IMPORTED_MODULE_0__)
|
|
985
|
+
/* harmony export */ });
|
|
986
|
+
/* harmony import */ var post_processes_legacy_legacy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! post-processes/legacy/legacy */ "../../../lts/postProcesses/dist/legacy/legacy.js");
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (post_processes_legacy_legacy__WEBPACK_IMPORTED_MODULE_0__);
|
|
990
|
+
|
|
991
|
+
})();
|
|
992
|
+
|
|
993
|
+
__webpack_exports__ = __webpack_exports__["default"];
|
|
994
|
+
/******/ return __webpack_exports__;
|
|
995
|
+
/******/ })()
|
|
996
|
+
;
|
|
1019
997
|
});
|
|
1020
998
|
//# sourceMappingURL=babylonjs.postProcess.js.map
|