babylonjs-procedural-textures 6.10.0 → 6.11.1

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.
Files changed (62) hide show
  1. package/babylon.brickProceduralTexture.js +128 -115
  2. package/babylon.brickProceduralTexture.js.map +1 -1
  3. package/babylon.brickProceduralTexture.min.js +1 -1
  4. package/babylon.brickProceduralTexture.min.js.map +1 -1
  5. package/babylon.cloudProceduralTexture.js +126 -115
  6. package/babylon.cloudProceduralTexture.js.map +1 -1
  7. package/babylon.cloudProceduralTexture.min.js +1 -1
  8. package/babylon.cloudProceduralTexture.min.js.map +1 -1
  9. package/babylon.fireProceduralTexture.js +146 -162
  10. package/babylon.fireProceduralTexture.js.map +1 -1
  11. package/babylon.fireProceduralTexture.min.js +1 -1
  12. package/babylon.fireProceduralTexture.min.js.map +1 -1
  13. package/babylon.grassProceduralTexture.js +103 -86
  14. package/babylon.grassProceduralTexture.js.map +1 -1
  15. package/babylon.grassProceduralTexture.min.js +1 -1
  16. package/babylon.grassProceduralTexture.min.js.map +1 -1
  17. package/babylon.marbleProceduralTexture.js +115 -115
  18. package/babylon.marbleProceduralTexture.js.map +1 -1
  19. package/babylon.marbleProceduralTexture.min.js +1 -1
  20. package/babylon.marbleProceduralTexture.min.js.map +1 -1
  21. package/babylon.normalMapProceduralTexture.js +94 -78
  22. package/babylon.normalMapProceduralTexture.js.map +1 -1
  23. package/babylon.normalMapProceduralTexture.min.js +1 -1
  24. package/babylon.normalMapProceduralTexture.min.js.map +1 -1
  25. package/babylon.perlinNoiseProceduralTexture.js +130 -76
  26. package/babylon.perlinNoiseProceduralTexture.js.map +1 -1
  27. package/babylon.perlinNoiseProceduralTexture.min.js +1 -1
  28. package/babylon.perlinNoiseProceduralTexture.min.js.map +1 -1
  29. package/babylon.roadProceduralTexture.js +92 -70
  30. package/babylon.roadProceduralTexture.js.map +1 -1
  31. package/babylon.roadProceduralTexture.min.js +1 -1
  32. package/babylon.roadProceduralTexture.min.js.map +1 -1
  33. package/babylon.starfieldProceduralTexture.js +212 -225
  34. package/babylon.starfieldProceduralTexture.js.map +1 -1
  35. package/babylon.starfieldProceduralTexture.min.js +1 -1
  36. package/babylon.starfieldProceduralTexture.min.js.map +1 -1
  37. package/babylon.woodProceduralTexture.js +102 -85
  38. package/babylon.woodProceduralTexture.js.map +1 -1
  39. package/babylon.woodProceduralTexture.min.js +1 -1
  40. package/babylon.woodProceduralTexture.min.js.map +1 -1
  41. package/babylonjs.proceduralTextures.d.ts +20 -20
  42. package/babylonjs.proceduralTextures.js +959 -1038
  43. package/babylonjs.proceduralTextures.js.map +1 -1
  44. package/babylonjs.proceduralTextures.min.js +1 -1
  45. package/babylonjs.proceduralTextures.min.js.map +1 -1
  46. package/babylonjs.proceduralTextures.module.d.ts +64 -64
  47. package/config.json +1 -1
  48. package/package.json +3 -3
  49. package/src/brick.ts +3 -14
  50. package/src/cloud.ts +3 -14
  51. package/src/fire.ts +3 -14
  52. package/src/grass.ts +3 -14
  53. package/src/index.ts +1 -1
  54. package/src/marble.ts +3 -14
  55. package/src/normalMap.ts +3 -14
  56. package/src/perlinNoise.ts +3 -14
  57. package/src/road.ts +3 -14
  58. package/src/starfield.ts +3 -14
  59. package/src/wood.ts +3 -14
  60. package/tsconfig.build.json +6 -3
  61. package/tsconfig.json +2 -1
  62. package/webpack.config.js +4 -0
@@ -7,39 +7,52 @@
7
7
  exports["babylonjs-procedural-textures"] = factory(require("babylonjs"));
8
8
  else
9
9
  root["PROCEDURALTEXTURES"] = factory(root["BABYLON"]);
10
- })((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), (__WEBPACK_EXTERNAL_MODULE_core_Misc_decorators__) => {
10
+ })((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), (__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) => {
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ "use strict";
13
13
  /******/ var __webpack_modules__ = ({
14
14
 
15
- /***/ "../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.fragment.js":
16
- /*!*************************************************************************************!*\
17
- !*** ../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.fragment.js ***!
18
- \*************************************************************************************/
15
+ /***/ "../../../dev/proceduralTextures/src/brick/brickProceduralTexture.fragment.ts":
16
+ /*!************************************************************************************!*\
17
+ !*** ../../../dev/proceduralTextures/src/brick/brickProceduralTexture.fragment.ts ***!
18
+ \************************************************************************************/
19
19
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
20
20
 
21
21
  __webpack_require__.r(__webpack_exports__);
22
22
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23
23
  /* harmony export */ brickProceduralTexturePixelShader: () => (/* binding */ brickProceduralTexturePixelShader)
24
24
  /* harmony export */ });
25
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
26
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
25
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators");
26
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
27
27
  // Do not edit.
28
28
 
29
- var name = "brickProceduralTexturePixelShader";
30
- var shader = "precision highp float;varying vec2 vPosition;varying vec2 vUV;uniform float numberOfBricksHeight;uniform float numberOfBricksWidth;uniform vec3 brickColor;uniform vec3 jointColor;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}\nfloat noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}\nfloat fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}\nreturn total;}\nfloat roundF(float number){return sign(number)*floor(abs(number)+0.5);}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{float brickW=1.0/numberOfBricksWidth;float brickH=1.0/numberOfBricksHeight;float jointWPercentage=0.01;float jointHPercentage=0.05;vec3 color=brickColor;float yi=vUV.y/brickH;float nyi=roundF(yi);float xi=vUV.x/brickW;if (mod(floor(yi),2.0)==0.0){xi=xi-0.5;}\nfloat nxi=roundF(xi);vec2 brickvUV=vec2((xi-floor(xi))/brickH,(yi-floor(yi))/ brickW);if (yi<nyi+jointHPercentage && yi>nyi-jointHPercentage){color=mix(jointColor,vec3(0.37,0.25,0.25),(yi-nyi)/jointHPercentage+0.2);}\nelse if (xi<nxi+jointWPercentage && xi>nxi-jointWPercentage){color=mix(jointColor,vec3(0.44,0.44,0.44),(xi-nxi)/jointWPercentage+0.2);}\nelse {float brickColorSwitch=mod(floor(yi)+floor(xi),3.0);if (brickColorSwitch==0.0)\ncolor=mix(color,vec3(0.33,0.33,0.33),0.3);else if (brickColorSwitch==2.0)\ncolor=mix(color,vec3(0.11,0.11,0.11),0.3);}\ngl_FragColor=vec4(color,1.0);}";
29
+ const name = "brickProceduralTexturePixelShader";
30
+ const shader = `precision highp float;varying vec2 vPosition;varying vec2 vUV;uniform float numberOfBricksHeight;uniform float numberOfBricksWidth;uniform vec3 brickColor;uniform vec3 jointColor;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}
31
+ float noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}
32
+ float fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}
33
+ return total;}
34
+ float roundF(float number){return sign(number)*floor(abs(number)+0.5);}
35
+ #define CUSTOM_FRAGMENT_DEFINITIONS
36
+ void main(void)
37
+ {float brickW=1.0/numberOfBricksWidth;float brickH=1.0/numberOfBricksHeight;float jointWPercentage=0.01;float jointHPercentage=0.05;vec3 color=brickColor;float yi=vUV.y/brickH;float nyi=roundF(yi);float xi=vUV.x/brickW;if (mod(floor(yi),2.0)==0.0){xi=xi-0.5;}
38
+ float nxi=roundF(xi);vec2 brickvUV=vec2((xi-floor(xi))/brickH,(yi-floor(yi))/ brickW);if (yi<nyi+jointHPercentage && yi>nyi-jointHPercentage){color=mix(jointColor,vec3(0.37,0.25,0.25),(yi-nyi)/jointHPercentage+0.2);}
39
+ else if (xi<nxi+jointWPercentage && xi>nxi-jointWPercentage){color=mix(jointColor,vec3(0.44,0.44,0.44),(xi-nxi)/jointWPercentage+0.2);}
40
+ else {float brickColorSwitch=mod(floor(yi)+floor(xi),3.0);if (brickColorSwitch==0.0)
41
+ color=mix(color,vec3(0.33,0.33,0.33),0.3);else if (brickColorSwitch==2.0)
42
+ color=mix(color,vec3(0.11,0.11,0.11),0.3);}
43
+ gl_FragColor=vec4(color,1.0);}`;
31
44
  // Sideeffect
32
- core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
45
+ babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
33
46
  /** @internal */
34
- var brickProceduralTexturePixelShader = { name: name, shader: shader };
47
+ const brickProceduralTexturePixelShader = { name, shader };
35
48
 
36
49
 
37
50
  /***/ }),
38
51
 
39
- /***/ "../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.js":
40
- /*!****************************************************************************!*\
41
- !*** ../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.js ***!
42
- \****************************************************************************/
52
+ /***/ "../../../dev/proceduralTextures/src/brick/brickProceduralTexture.ts":
53
+ /*!***************************************************************************!*\
54
+ !*** ../../../dev/proceduralTextures/src/brick/brickProceduralTexture.ts ***!
55
+ \***************************************************************************/
43
56
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
44
57
 
45
58
  __webpack_require__.r(__webpack_exports__);
@@ -47,86 +60,67 @@ __webpack_require__.r(__webpack_exports__);
47
60
  /* harmony export */ BrickProceduralTexture: () => (/* binding */ BrickProceduralTexture)
48
61
  /* harmony export */ });
49
62
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.mjs");
50
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Misc/typeStore */ "core/Misc/decorators");
51
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
52
- /* harmony import */ var _brickProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./brickProceduralTexture.fragment */ "../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.fragment.js");
63
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/decorators");
64
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
65
+ /* harmony import */ var _brickProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./brickProceduralTexture.fragment */ "../../../dev/proceduralTextures/src/brick/brickProceduralTexture.fragment.ts");
53
66
 
54
67
 
55
68
 
56
69
 
57
70
 
58
71
 
59
- var BrickProceduralTexture = /** @class */ (function (_super) {
60
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(BrickProceduralTexture, _super);
61
- function BrickProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
62
- if (scene === void 0) { scene = null; }
63
- var _this = _super.call(this, name, size, "brickProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
64
- _this._numberOfBricksHeight = 15;
65
- _this._numberOfBricksWidth = 5;
66
- _this._jointColor = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.72, 0.72, 0.72);
67
- _this._brickColor = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.77, 0.47, 0.4);
68
- _this.updateShaderUniforms();
69
- return _this;
72
+ class BrickProceduralTexture extends babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture {
73
+ constructor(name, size, scene = null, fallbackTexture, generateMipMaps) {
74
+ super(name, size, "brickProceduralTexture", scene, fallbackTexture, generateMipMaps);
75
+ this._numberOfBricksHeight = 15;
76
+ this._numberOfBricksWidth = 5;
77
+ this._jointColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.72, 0.72, 0.72);
78
+ this._brickColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.77, 0.47, 0.4);
79
+ this.updateShaderUniforms();
70
80
  }
71
- BrickProceduralTexture.prototype.updateShaderUniforms = function () {
81
+ updateShaderUniforms() {
72
82
  this.setFloat("numberOfBricksHeight", this._numberOfBricksHeight);
73
83
  this.setFloat("numberOfBricksWidth", this._numberOfBricksWidth);
74
84
  this.setColor3("brickColor", this._brickColor);
75
85
  this.setColor3("jointColor", this._jointColor);
76
- };
77
- Object.defineProperty(BrickProceduralTexture.prototype, "numberOfBricksHeight", {
78
- get: function () {
79
- return this._numberOfBricksHeight;
80
- },
81
- set: function (value) {
82
- this._numberOfBricksHeight = value;
83
- this.updateShaderUniforms();
84
- },
85
- enumerable: false,
86
- configurable: true
87
- });
88
- Object.defineProperty(BrickProceduralTexture.prototype, "numberOfBricksWidth", {
89
- get: function () {
90
- return this._numberOfBricksWidth;
91
- },
92
- set: function (value) {
93
- this._numberOfBricksWidth = value;
94
- this.updateShaderUniforms();
95
- },
96
- enumerable: false,
97
- configurable: true
98
- });
99
- Object.defineProperty(BrickProceduralTexture.prototype, "jointColor", {
100
- get: function () {
101
- return this._jointColor;
102
- },
103
- set: function (value) {
104
- this._jointColor = value;
105
- this.updateShaderUniforms();
106
- },
107
- enumerable: false,
108
- configurable: true
109
- });
110
- Object.defineProperty(BrickProceduralTexture.prototype, "brickColor", {
111
- get: function () {
112
- return this._brickColor;
113
- },
114
- set: function (value) {
115
- this._brickColor = value;
116
- this.updateShaderUniforms();
117
- },
118
- enumerable: false,
119
- configurable: true
120
- });
86
+ }
87
+ get numberOfBricksHeight() {
88
+ return this._numberOfBricksHeight;
89
+ }
90
+ set numberOfBricksHeight(value) {
91
+ this._numberOfBricksHeight = value;
92
+ this.updateShaderUniforms();
93
+ }
94
+ get numberOfBricksWidth() {
95
+ return this._numberOfBricksWidth;
96
+ }
97
+ set numberOfBricksWidth(value) {
98
+ this._numberOfBricksWidth = value;
99
+ this.updateShaderUniforms();
100
+ }
101
+ get jointColor() {
102
+ return this._jointColor;
103
+ }
104
+ set jointColor(value) {
105
+ this._jointColor = value;
106
+ this.updateShaderUniforms();
107
+ }
108
+ get brickColor() {
109
+ return this._brickColor;
110
+ }
111
+ set brickColor(value) {
112
+ this._brickColor = value;
113
+ this.updateShaderUniforms();
114
+ }
121
115
  /**
122
116
  * Serializes this brick procedural texture
123
117
  * @returns a serialized brick procedural texture object
124
118
  */
125
- BrickProceduralTexture.prototype.serialize = function () {
126
- var serializationObject = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
119
+ serialize() {
120
+ const serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, super.serialize());
127
121
  serializationObject.customType = "BABYLON.BrickProceduralTexture";
128
122
  return serializationObject;
129
- };
123
+ }
130
124
  /**
131
125
  * Creates a Brick Procedural Texture from parsed brick procedural texture data
132
126
  * @param parsedTexture defines parsed texture data
@@ -134,73 +128,83 @@ var BrickProceduralTexture = /** @class */ (function (_super) {
134
128
  * @param rootUrl defines the root URL containing brick procedural texture information
135
129
  * @returns a parsed Brick Procedural Texture
136
130
  */
137
- BrickProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
138
- var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(function () { return new BrickProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
131
+ static Parse(parsedTexture, scene, rootUrl) {
132
+ const texture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(() => new BrickProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), parsedTexture, scene, rootUrl);
139
133
  return texture;
140
- };
141
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
142
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
143
- ], BrickProceduralTexture.prototype, "numberOfBricksHeight", null);
144
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
145
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
146
- ], BrickProceduralTexture.prototype, "numberOfBricksWidth", null);
147
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
148
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor3)()
149
- ], BrickProceduralTexture.prototype, "jointColor", null);
150
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
151
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor3)()
152
- ], BrickProceduralTexture.prototype, "brickColor", null);
153
- return BrickProceduralTexture;
154
- }(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture));
155
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.BrickProceduralTexture", BrickProceduralTexture);
134
+ }
135
+ }
136
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
137
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
138
+ ], BrickProceduralTexture.prototype, "numberOfBricksHeight", null);
139
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
140
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
141
+ ], BrickProceduralTexture.prototype, "numberOfBricksWidth", null);
142
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
143
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor3)()
144
+ ], BrickProceduralTexture.prototype, "jointColor", null);
145
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
146
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor3)()
147
+ ], BrickProceduralTexture.prototype, "brickColor", null);
148
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.BrickProceduralTexture", BrickProceduralTexture);
156
149
 
157
150
 
158
151
  /***/ }),
159
152
 
160
- /***/ "../../../lts/proceduralTextures/dist/brick/index.js":
161
- /*!***********************************************************!*\
162
- !*** ../../../lts/proceduralTextures/dist/brick/index.js ***!
163
- \***********************************************************/
153
+ /***/ "../../../dev/proceduralTextures/src/brick/index.ts":
154
+ /*!**********************************************************!*\
155
+ !*** ../../../dev/proceduralTextures/src/brick/index.ts ***!
156
+ \**********************************************************/
164
157
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
165
158
 
166
159
  __webpack_require__.r(__webpack_exports__);
167
160
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
168
161
  /* harmony export */ BrickProceduralTexture: () => (/* reexport safe */ _brickProceduralTexture__WEBPACK_IMPORTED_MODULE_0__.BrickProceduralTexture)
169
162
  /* harmony export */ });
170
- /* harmony import */ var _brickProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brickProceduralTexture */ "../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.js");
163
+ /* harmony import */ var _brickProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brickProceduralTexture */ "../../../dev/proceduralTextures/src/brick/brickProceduralTexture.ts");
171
164
 
172
165
 
173
166
 
174
167
  /***/ }),
175
168
 
176
- /***/ "../../../lts/proceduralTextures/dist/cloud/cloudProceduralTexture.fragment.js":
177
- /*!*************************************************************************************!*\
178
- !*** ../../../lts/proceduralTextures/dist/cloud/cloudProceduralTexture.fragment.js ***!
179
- \*************************************************************************************/
169
+ /***/ "../../../dev/proceduralTextures/src/cloud/cloudProceduralTexture.fragment.ts":
170
+ /*!************************************************************************************!*\
171
+ !*** ../../../dev/proceduralTextures/src/cloud/cloudProceduralTexture.fragment.ts ***!
172
+ \************************************************************************************/
180
173
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
181
174
 
182
175
  __webpack_require__.r(__webpack_exports__);
183
176
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
184
177
  /* harmony export */ cloudProceduralTexturePixelShader: () => (/* binding */ cloudProceduralTexturePixelShader)
185
178
  /* harmony export */ });
186
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
187
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
179
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators");
180
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
188
181
  // Do not edit.
189
182
 
190
- var name = "cloudProceduralTexturePixelShader";
191
- var shader = "precision highp float;varying vec2 vUV;uniform vec4 skyColor;uniform vec4 cloudColor;uniform float amplitude;uniform int numOctaves;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}\nfloat noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}\nfloat fbm(vec2 n) {float total=0.0,ampl=amplitude;\n#ifdef WEBGL2\nfor (int i=0; i<numOctaves; i++) {\n#else\nfor (int i=0; i<4; i++) {\n#endif\ntotal+=noise(n)*ampl;n+=n;ampl*=0.5;}\nreturn total;}\nvoid main() {vec2 p=vUV*12.0;vec4 c=mix(skyColor,cloudColor,fbm(p));gl_FragColor=c;}\n";
183
+ const name = "cloudProceduralTexturePixelShader";
184
+ const shader = `precision highp float;varying vec2 vUV;uniform vec4 skyColor;uniform vec4 cloudColor;uniform float amplitude;uniform int numOctaves;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}
185
+ float noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}
186
+ float fbm(vec2 n) {float total=0.0,ampl=amplitude;
187
+ #ifdef WEBGL2
188
+ for (int i=0; i<numOctaves; i++) {
189
+ #else
190
+ for (int i=0; i<4; i++) {
191
+ #endif
192
+ total+=noise(n)*ampl;n+=n;ampl*=0.5;}
193
+ return total;}
194
+ void main() {vec2 p=vUV*12.0;vec4 c=mix(skyColor,cloudColor,fbm(p));gl_FragColor=c;}
195
+ `;
192
196
  // Sideeffect
193
- core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
197
+ babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
194
198
  /** @internal */
195
- var cloudProceduralTexturePixelShader = { name: name, shader: shader };
199
+ const cloudProceduralTexturePixelShader = { name, shader };
196
200
 
197
201
 
198
202
  /***/ }),
199
203
 
200
- /***/ "../../../lts/proceduralTextures/dist/cloud/cloudProceduralTexture.js":
201
- /*!****************************************************************************!*\
202
- !*** ../../../lts/proceduralTextures/dist/cloud/cloudProceduralTexture.js ***!
203
- \****************************************************************************/
204
+ /***/ "../../../dev/proceduralTextures/src/cloud/cloudProceduralTexture.ts":
205
+ /*!***************************************************************************!*\
206
+ !*** ../../../dev/proceduralTextures/src/cloud/cloudProceduralTexture.ts ***!
207
+ \***************************************************************************/
204
208
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
205
209
 
206
210
  __webpack_require__.r(__webpack_exports__);
@@ -208,86 +212,67 @@ __webpack_require__.r(__webpack_exports__);
208
212
  /* harmony export */ CloudProceduralTexture: () => (/* binding */ CloudProceduralTexture)
209
213
  /* harmony export */ });
210
214
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.mjs");
211
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Misc/typeStore */ "core/Misc/decorators");
212
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
213
- /* harmony import */ var _cloudProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cloudProceduralTexture.fragment */ "../../../lts/proceduralTextures/dist/cloud/cloudProceduralTexture.fragment.js");
215
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/decorators");
216
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
217
+ /* harmony import */ var _cloudProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cloudProceduralTexture.fragment */ "../../../dev/proceduralTextures/src/cloud/cloudProceduralTexture.fragment.ts");
214
218
 
215
219
 
216
220
 
217
221
 
218
222
 
219
223
 
220
- var CloudProceduralTexture = /** @class */ (function (_super) {
221
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(CloudProceduralTexture, _super);
222
- function CloudProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
223
- if (scene === void 0) { scene = null; }
224
- var _this = _super.call(this, name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
225
- _this._skyColor = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color4(0.15, 0.68, 1.0, 1.0);
226
- _this._cloudColor = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color4(1, 1, 1, 1.0);
227
- _this._amplitude = 1;
228
- _this._numOctaves = 4;
229
- _this.updateShaderUniforms();
230
- return _this;
224
+ class CloudProceduralTexture extends babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture {
225
+ constructor(name, size, scene = null, fallbackTexture, generateMipMaps) {
226
+ super(name, size, "cloudProceduralTexture", scene, fallbackTexture, generateMipMaps);
227
+ this._skyColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color4(0.15, 0.68, 1.0, 1.0);
228
+ this._cloudColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color4(1, 1, 1, 1.0);
229
+ this._amplitude = 1;
230
+ this._numOctaves = 4;
231
+ this.updateShaderUniforms();
231
232
  }
232
- CloudProceduralTexture.prototype.updateShaderUniforms = function () {
233
+ updateShaderUniforms() {
233
234
  this.setColor4("skyColor", this._skyColor);
234
235
  this.setColor4("cloudColor", this._cloudColor);
235
236
  this.setFloat("amplitude", this._amplitude);
236
237
  this.setInt("numOctaves", this._numOctaves);
237
- };
238
- Object.defineProperty(CloudProceduralTexture.prototype, "skyColor", {
239
- get: function () {
240
- return this._skyColor;
241
- },
242
- set: function (value) {
243
- this._skyColor = value;
244
- this.updateShaderUniforms();
245
- },
246
- enumerable: false,
247
- configurable: true
248
- });
249
- Object.defineProperty(CloudProceduralTexture.prototype, "cloudColor", {
250
- get: function () {
251
- return this._cloudColor;
252
- },
253
- set: function (value) {
254
- this._cloudColor = value;
255
- this.updateShaderUniforms();
256
- },
257
- enumerable: false,
258
- configurable: true
259
- });
260
- Object.defineProperty(CloudProceduralTexture.prototype, "amplitude", {
261
- get: function () {
262
- return this._amplitude;
263
- },
264
- set: function (value) {
265
- this._amplitude = value;
266
- this.updateShaderUniforms();
267
- },
268
- enumerable: false,
269
- configurable: true
270
- });
271
- Object.defineProperty(CloudProceduralTexture.prototype, "numOctaves", {
272
- get: function () {
273
- return this._numOctaves;
274
- },
275
- set: function (value) {
276
- this._numOctaves = value;
277
- this.updateShaderUniforms();
278
- },
279
- enumerable: false,
280
- configurable: true
281
- });
238
+ }
239
+ get skyColor() {
240
+ return this._skyColor;
241
+ }
242
+ set skyColor(value) {
243
+ this._skyColor = value;
244
+ this.updateShaderUniforms();
245
+ }
246
+ get cloudColor() {
247
+ return this._cloudColor;
248
+ }
249
+ set cloudColor(value) {
250
+ this._cloudColor = value;
251
+ this.updateShaderUniforms();
252
+ }
253
+ get amplitude() {
254
+ return this._amplitude;
255
+ }
256
+ set amplitude(value) {
257
+ this._amplitude = value;
258
+ this.updateShaderUniforms();
259
+ }
260
+ get numOctaves() {
261
+ return this._numOctaves;
262
+ }
263
+ set numOctaves(value) {
264
+ this._numOctaves = value;
265
+ this.updateShaderUniforms();
266
+ }
282
267
  /**
283
268
  * Serializes this cloud procedural texture
284
269
  * @returns a serialized cloud procedural texture object
285
270
  */
286
- CloudProceduralTexture.prototype.serialize = function () {
287
- var serializationObject = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
271
+ serialize() {
272
+ const serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, super.serialize());
288
273
  serializationObject.customType = "BABYLON.CloudProceduralTexture";
289
274
  return serializationObject;
290
- };
275
+ }
291
276
  /**
292
277
  * Creates a Cloud Procedural Texture from parsed cloud procedural texture data
293
278
  * @param parsedTexture defines parsed texture data
@@ -295,73 +280,76 @@ var CloudProceduralTexture = /** @class */ (function (_super) {
295
280
  * @param rootUrl defines the root URL containing cloud procedural texture information
296
281
  * @returns a parsed Cloud Procedural Texture
297
282
  */
298
- CloudProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
299
- var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(function () { return new CloudProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
283
+ static Parse(parsedTexture, scene, rootUrl) {
284
+ const texture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(() => new CloudProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), parsedTexture, scene, rootUrl);
300
285
  return texture;
301
- };
302
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
303
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor4)()
304
- ], CloudProceduralTexture.prototype, "skyColor", null);
305
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
306
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor4)()
307
- ], CloudProceduralTexture.prototype, "cloudColor", null);
308
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
309
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
310
- ], CloudProceduralTexture.prototype, "amplitude", null);
311
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
312
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
313
- ], CloudProceduralTexture.prototype, "numOctaves", null);
314
- return CloudProceduralTexture;
315
- }(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture));
316
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.CloudProceduralTexture", CloudProceduralTexture);
286
+ }
287
+ }
288
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
289
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor4)()
290
+ ], CloudProceduralTexture.prototype, "skyColor", null);
291
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
292
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor4)()
293
+ ], CloudProceduralTexture.prototype, "cloudColor", null);
294
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
295
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
296
+ ], CloudProceduralTexture.prototype, "amplitude", null);
297
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
298
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
299
+ ], CloudProceduralTexture.prototype, "numOctaves", null);
300
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.CloudProceduralTexture", CloudProceduralTexture);
317
301
 
318
302
 
319
303
  /***/ }),
320
304
 
321
- /***/ "../../../lts/proceduralTextures/dist/cloud/index.js":
322
- /*!***********************************************************!*\
323
- !*** ../../../lts/proceduralTextures/dist/cloud/index.js ***!
324
- \***********************************************************/
305
+ /***/ "../../../dev/proceduralTextures/src/cloud/index.ts":
306
+ /*!**********************************************************!*\
307
+ !*** ../../../dev/proceduralTextures/src/cloud/index.ts ***!
308
+ \**********************************************************/
325
309
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
326
310
 
327
311
  __webpack_require__.r(__webpack_exports__);
328
312
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
329
313
  /* harmony export */ CloudProceduralTexture: () => (/* reexport safe */ _cloudProceduralTexture__WEBPACK_IMPORTED_MODULE_0__.CloudProceduralTexture)
330
314
  /* harmony export */ });
331
- /* harmony import */ var _cloudProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cloudProceduralTexture */ "../../../lts/proceduralTextures/dist/cloud/cloudProceduralTexture.js");
315
+ /* harmony import */ var _cloudProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cloudProceduralTexture */ "../../../dev/proceduralTextures/src/cloud/cloudProceduralTexture.ts");
332
316
 
333
317
 
334
318
 
335
319
  /***/ }),
336
320
 
337
- /***/ "../../../lts/proceduralTextures/dist/fire/fireProceduralTexture.fragment.js":
338
- /*!***********************************************************************************!*\
339
- !*** ../../../lts/proceduralTextures/dist/fire/fireProceduralTexture.fragment.js ***!
340
- \***********************************************************************************/
321
+ /***/ "../../../dev/proceduralTextures/src/fire/fireProceduralTexture.fragment.ts":
322
+ /*!**********************************************************************************!*\
323
+ !*** ../../../dev/proceduralTextures/src/fire/fireProceduralTexture.fragment.ts ***!
324
+ \**********************************************************************************/
341
325
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
342
326
 
343
327
  __webpack_require__.r(__webpack_exports__);
344
328
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
345
329
  /* harmony export */ fireProceduralTexturePixelShader: () => (/* binding */ fireProceduralTexturePixelShader)
346
330
  /* harmony export */ });
347
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
348
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
331
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators");
332
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
349
333
  // Do not edit.
350
334
 
351
- var name = "fireProceduralTexturePixelShader";
352
- var shader = "precision highp float;uniform float time;uniform vec3 c1;uniform vec3 c2;uniform vec3 c3;uniform vec3 c4;uniform vec3 c5;uniform vec3 c6;uniform vec2 speed;uniform float shift;uniform float alphaThreshold;varying vec2 vUV;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}\nfloat noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}\nfloat fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}\nreturn total;}\nvoid main() {vec2 p=vUV*8.0;float q=fbm(p-time*0.1);vec2 r=vec2(fbm(p+q+time*speed.x-p.x-p.y),fbm(p+q-time*speed.y));vec3 c=mix(c1,c2,fbm(p+r))+mix(c3,c4,r.x)-mix(c5,c6,r.y);vec3 color=c*cos(shift*vUV.y);float luminance=dot(color.rgb,vec3(0.3,0.59,0.11));gl_FragColor=vec4(color,luminance*alphaThreshold+(1.0-alphaThreshold));}";
335
+ const name = "fireProceduralTexturePixelShader";
336
+ const shader = `precision highp float;uniform float time;uniform vec3 c1;uniform vec3 c2;uniform vec3 c3;uniform vec3 c4;uniform vec3 c5;uniform vec3 c6;uniform vec2 speed;uniform float shift;uniform float alphaThreshold;varying vec2 vUV;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}
337
+ float noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}
338
+ float fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}
339
+ return total;}
340
+ void main() {vec2 p=vUV*8.0;float q=fbm(p-time*0.1);vec2 r=vec2(fbm(p+q+time*speed.x-p.x-p.y),fbm(p+q-time*speed.y));vec3 c=mix(c1,c2,fbm(p+r))+mix(c3,c4,r.x)-mix(c5,c6,r.y);vec3 color=c*cos(shift*vUV.y);float luminance=dot(color.rgb,vec3(0.3,0.59,0.11));gl_FragColor=vec4(color,luminance*alphaThreshold+(1.0-alphaThreshold));}`;
353
341
  // Sideeffect
354
- core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
342
+ babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
355
343
  /** @internal */
356
- var fireProceduralTexturePixelShader = { name: name, shader: shader };
344
+ const fireProceduralTexturePixelShader = { name, shader };
357
345
 
358
346
 
359
347
  /***/ }),
360
348
 
361
- /***/ "../../../lts/proceduralTextures/dist/fire/fireProceduralTexture.js":
362
- /*!**************************************************************************!*\
363
- !*** ../../../lts/proceduralTextures/dist/fire/fireProceduralTexture.js ***!
364
- \**************************************************************************/
349
+ /***/ "../../../dev/proceduralTextures/src/fire/fireProceduralTexture.ts":
350
+ /*!*************************************************************************!*\
351
+ !*** ../../../dev/proceduralTextures/src/fire/fireProceduralTexture.ts ***!
352
+ \*************************************************************************/
365
353
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
366
354
 
367
355
  __webpack_require__.r(__webpack_exports__);
@@ -369,9 +357,9 @@ __webpack_require__.r(__webpack_exports__);
369
357
  /* harmony export */ FireProceduralTexture: () => (/* binding */ FireProceduralTexture)
370
358
  /* harmony export */ });
371
359
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.mjs");
372
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Misc/typeStore */ "core/Misc/decorators");
373
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
374
- /* harmony import */ var _fireProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fireProceduralTexture.fragment */ "../../../lts/proceduralTextures/dist/fire/fireProceduralTexture.fragment.js");
360
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/decorators");
361
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
362
+ /* harmony import */ var _fireProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./fireProceduralTexture.fragment */ "../../../dev/proceduralTextures/src/fire/fireProceduralTexture.fragment.ts");
375
363
 
376
364
 
377
365
 
@@ -379,20 +367,17 @@ __webpack_require__.r(__webpack_exports__);
379
367
 
380
368
 
381
369
 
382
- var FireProceduralTexture = /** @class */ (function (_super) {
383
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(FireProceduralTexture, _super);
384
- function FireProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
385
- if (scene === void 0) { scene = null; }
386
- var _this = _super.call(this, name, size, "fireProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
387
- _this._time = 0.0;
388
- _this._speed = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Vector2(0.5, 0.3);
389
- _this._autoGenerateTime = true;
390
- _this._alphaThreshold = 0.5;
391
- _this._fireColors = FireProceduralTexture.RedFireColors;
392
- _this.updateShaderUniforms();
393
- return _this;
370
+ class FireProceduralTexture extends babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture {
371
+ constructor(name, size, scene = null, fallbackTexture, generateMipMaps) {
372
+ super(name, size, "fireProceduralTexture", scene, fallbackTexture, generateMipMaps);
373
+ this._time = 0.0;
374
+ this._speed = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Vector2(0.5, 0.3);
375
+ this._autoGenerateTime = true;
376
+ this._alphaThreshold = 0.5;
377
+ this._fireColors = FireProceduralTexture.RedFireColors;
378
+ this.updateShaderUniforms();
394
379
  }
395
- FireProceduralTexture.prototype.updateShaderUniforms = function () {
380
+ updateShaderUniforms() {
396
381
  this.setFloat("time", this._time);
397
382
  this.setVector2("speed", this._speed);
398
383
  this.setColor3("c1", this._fireColors[0]);
@@ -402,110 +387,74 @@ var FireProceduralTexture = /** @class */ (function (_super) {
402
387
  this.setColor3("c5", this._fireColors[4]);
403
388
  this.setColor3("c6", this._fireColors[5]);
404
389
  this.setFloat("alphaThreshold", this._alphaThreshold);
405
- };
406
- FireProceduralTexture.prototype.render = function (useCameraPostProcess) {
407
- var scene = this.getScene();
390
+ }
391
+ render(useCameraPostProcess) {
392
+ const scene = this.getScene();
408
393
  if (this._autoGenerateTime && scene) {
409
394
  this._time += scene.getAnimationRatio() * 0.03;
410
395
  this.updateShaderUniforms();
411
396
  }
412
- _super.prototype.render.call(this, useCameraPostProcess);
413
- };
414
- Object.defineProperty(FireProceduralTexture, "PurpleFireColors", {
415
- get: function () {
416
- return [new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 0.0, 1.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.9, 0.0, 1.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.2, 0.0, 1.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(1.0, 0.9, 1.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.1, 0.1, 1.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.9, 0.9, 1.0)];
417
- },
418
- enumerable: false,
419
- configurable: true
420
- });
421
- Object.defineProperty(FireProceduralTexture, "GreenFireColors", {
422
- get: function () {
423
- return [new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 1.0, 0.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 1.0, 0.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.3, 0.4, 0.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 1.0, 0.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.2, 0.0, 0.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 1.0, 0.0)];
424
- },
425
- enumerable: false,
426
- configurable: true
427
- });
428
- Object.defineProperty(FireProceduralTexture, "RedFireColors", {
429
- get: function () {
430
- return [new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 0.0, 0.1), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.9, 0.0, 0.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.2, 0.0, 0.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(1.0, 0.9, 0.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.1, 0.1, 0.1), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.9, 0.9, 0.9)];
431
- },
432
- enumerable: false,
433
- configurable: true
434
- });
435
- Object.defineProperty(FireProceduralTexture, "BlueFireColors", {
436
- get: function () {
437
- return [new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.1, 0.0, 0.5), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.0, 0.0, 0.5), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.1, 0.0, 0.2), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.0, 0.0, 1.0), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.1, 0.2, 0.3), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.0, 0.2, 0.9)];
438
- },
439
- enumerable: false,
440
- configurable: true
441
- });
442
- Object.defineProperty(FireProceduralTexture.prototype, "autoGenerateTime", {
443
- get: function () {
444
- return this._autoGenerateTime;
445
- },
446
- set: function (value) {
447
- this._autoGenerateTime = value;
448
- },
449
- enumerable: false,
450
- configurable: true
451
- });
452
- Object.defineProperty(FireProceduralTexture.prototype, "fireColors", {
453
- get: function () {
454
- return this._fireColors;
455
- },
456
- set: function (value) {
457
- this._fireColors = value;
458
- this.updateShaderUniforms();
459
- },
460
- enumerable: false,
461
- configurable: true
462
- });
463
- Object.defineProperty(FireProceduralTexture.prototype, "time", {
464
- get: function () {
465
- return this._time;
466
- },
467
- set: function (value) {
468
- this._time = value;
469
- this.updateShaderUniforms();
470
- },
471
- enumerable: false,
472
- configurable: true
473
- });
474
- Object.defineProperty(FireProceduralTexture.prototype, "speed", {
475
- get: function () {
476
- return this._speed;
477
- },
478
- set: function (value) {
479
- this._speed = value;
480
- this.updateShaderUniforms();
481
- },
482
- enumerable: false,
483
- configurable: true
484
- });
485
- Object.defineProperty(FireProceduralTexture.prototype, "alphaThreshold", {
486
- get: function () {
487
- return this._alphaThreshold;
488
- },
489
- set: function (value) {
490
- this._alphaThreshold = value;
491
- this.updateShaderUniforms();
492
- },
493
- enumerable: false,
494
- configurable: true
495
- });
397
+ super.render(useCameraPostProcess);
398
+ }
399
+ static get PurpleFireColors() {
400
+ return [new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 0.0, 1.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.9, 0.0, 1.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.2, 0.0, 1.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(1.0, 0.9, 1.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.1, 0.1, 1.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.9, 0.9, 1.0)];
401
+ }
402
+ static get GreenFireColors() {
403
+ return [new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 1.0, 0.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 1.0, 0.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.3, 0.4, 0.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 1.0, 0.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.2, 0.0, 0.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 1.0, 0.0)];
404
+ }
405
+ static get RedFireColors() {
406
+ return [new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.5, 0.0, 0.1), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.9, 0.0, 0.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.2, 0.0, 0.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(1.0, 0.9, 0.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.1, 0.1, 0.1), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.9, 0.9, 0.9)];
407
+ }
408
+ static get BlueFireColors() {
409
+ return [new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.1, 0.0, 0.5), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.0, 0.0, 0.5), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.1, 0.0, 0.2), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.0, 0.0, 1.0), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.1, 0.2, 0.3), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.0, 0.2, 0.9)];
410
+ }
411
+ get autoGenerateTime() {
412
+ return this._autoGenerateTime;
413
+ }
414
+ set autoGenerateTime(value) {
415
+ this._autoGenerateTime = value;
416
+ }
417
+ get fireColors() {
418
+ return this._fireColors;
419
+ }
420
+ set fireColors(value) {
421
+ this._fireColors = value;
422
+ this.updateShaderUniforms();
423
+ }
424
+ get time() {
425
+ return this._time;
426
+ }
427
+ set time(value) {
428
+ this._time = value;
429
+ this.updateShaderUniforms();
430
+ }
431
+ get speed() {
432
+ return this._speed;
433
+ }
434
+ set speed(value) {
435
+ this._speed = value;
436
+ this.updateShaderUniforms();
437
+ }
438
+ get alphaThreshold() {
439
+ return this._alphaThreshold;
440
+ }
441
+ set alphaThreshold(value) {
442
+ this._alphaThreshold = value;
443
+ this.updateShaderUniforms();
444
+ }
496
445
  /**
497
446
  * Serializes this fire procedural texture
498
447
  * @returns a serialized fire procedural texture object
499
448
  */
500
- FireProceduralTexture.prototype.serialize = function () {
501
- var serializationObject = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
449
+ serialize() {
450
+ const serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, super.serialize());
502
451
  serializationObject.customType = "BABYLON.FireProceduralTexture";
503
452
  serializationObject.fireColors = [];
504
- for (var i = 0; i < this._fireColors.length; i++) {
453
+ for (let i = 0; i < this._fireColors.length; i++) {
505
454
  serializationObject.fireColors.push(this._fireColors[i].asArray());
506
455
  }
507
456
  return serializationObject;
508
- };
457
+ }
509
458
  /**
510
459
  * Creates a Fire Procedural Texture from parsed fire procedural texture data
511
460
  * @param parsedTexture defines parsed texture data
@@ -513,78 +462,86 @@ var FireProceduralTexture = /** @class */ (function (_super) {
513
462
  * @param rootUrl defines the root URL containing fire procedural texture information
514
463
  * @returns a parsed Fire Procedural Texture
515
464
  */
516
- FireProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
517
- var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(function () { return new FireProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
518
- var colors = [];
519
- for (var i = 0; i < parsedTexture.fireColors.length; i++) {
520
- colors.push(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3.FromArray(parsedTexture.fireColors[i]));
465
+ static Parse(parsedTexture, scene, rootUrl) {
466
+ const texture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(() => new FireProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), parsedTexture, scene, rootUrl);
467
+ const colors = [];
468
+ for (let i = 0; i < parsedTexture.fireColors.length; i++) {
469
+ colors.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3.FromArray(parsedTexture.fireColors[i]));
521
470
  }
522
471
  texture.fireColors = colors;
523
472
  return texture;
524
- };
525
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
526
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
527
- ], FireProceduralTexture.prototype, "autoGenerateTime", null);
528
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
529
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
530
- ], FireProceduralTexture.prototype, "time", null);
531
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
532
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsVector2)()
533
- ], FireProceduralTexture.prototype, "speed", null);
534
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
535
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
536
- ], FireProceduralTexture.prototype, "alphaThreshold", null);
537
- return FireProceduralTexture;
538
- }(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture));
539
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.FireProceduralTexture", FireProceduralTexture);
473
+ }
474
+ }
475
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
476
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
477
+ ], FireProceduralTexture.prototype, "autoGenerateTime", null);
478
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
479
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
480
+ ], FireProceduralTexture.prototype, "time", null);
481
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
482
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsVector2)()
483
+ ], FireProceduralTexture.prototype, "speed", null);
484
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
485
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
486
+ ], FireProceduralTexture.prototype, "alphaThreshold", null);
487
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.FireProceduralTexture", FireProceduralTexture);
540
488
 
541
489
 
542
490
  /***/ }),
543
491
 
544
- /***/ "../../../lts/proceduralTextures/dist/fire/index.js":
545
- /*!**********************************************************!*\
546
- !*** ../../../lts/proceduralTextures/dist/fire/index.js ***!
547
- \**********************************************************/
492
+ /***/ "../../../dev/proceduralTextures/src/fire/index.ts":
493
+ /*!*********************************************************!*\
494
+ !*** ../../../dev/proceduralTextures/src/fire/index.ts ***!
495
+ \*********************************************************/
548
496
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
549
497
 
550
498
  __webpack_require__.r(__webpack_exports__);
551
499
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
552
500
  /* harmony export */ FireProceduralTexture: () => (/* reexport safe */ _fireProceduralTexture__WEBPACK_IMPORTED_MODULE_0__.FireProceduralTexture)
553
501
  /* harmony export */ });
554
- /* harmony import */ var _fireProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fireProceduralTexture */ "../../../lts/proceduralTextures/dist/fire/fireProceduralTexture.js");
502
+ /* harmony import */ var _fireProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fireProceduralTexture */ "../../../dev/proceduralTextures/src/fire/fireProceduralTexture.ts");
555
503
 
556
504
 
557
505
 
558
506
  /***/ }),
559
507
 
560
- /***/ "../../../lts/proceduralTextures/dist/grass/grassProceduralTexture.fragment.js":
561
- /*!*************************************************************************************!*\
562
- !*** ../../../lts/proceduralTextures/dist/grass/grassProceduralTexture.fragment.js ***!
563
- \*************************************************************************************/
508
+ /***/ "../../../dev/proceduralTextures/src/grass/grassProceduralTexture.fragment.ts":
509
+ /*!************************************************************************************!*\
510
+ !*** ../../../dev/proceduralTextures/src/grass/grassProceduralTexture.fragment.ts ***!
511
+ \************************************************************************************/
564
512
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
565
513
 
566
514
  __webpack_require__.r(__webpack_exports__);
567
515
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
568
516
  /* harmony export */ grassProceduralTexturePixelShader: () => (/* binding */ grassProceduralTexturePixelShader)
569
517
  /* harmony export */ });
570
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
571
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
518
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators");
519
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
572
520
  // Do not edit.
573
521
 
574
- var name = "grassProceduralTexturePixelShader";
575
- var shader = "precision highp float;varying vec2 vPosition;varying vec2 vUV;uniform vec3 herb1Color;uniform vec3 herb2Color;uniform vec3 herb3Color;uniform vec3 groundColor;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}\nfloat noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}\nfloat fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}\nreturn total;}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nvec3 color=mix(groundColor,herb1Color,rand(gl_FragCoord.xy*4.0));color=mix(color,herb2Color,rand(gl_FragCoord.xy*8.0));color=mix(color,herb3Color,rand(gl_FragCoord.xy));color=mix(color,herb1Color,fbm(gl_FragCoord.xy*16.0));gl_FragColor=vec4(color,1.0);\n#define CUSTOM_FRAGMENT_MAIN_END\n}";
522
+ const name = "grassProceduralTexturePixelShader";
523
+ const shader = `precision highp float;varying vec2 vPosition;varying vec2 vUV;uniform vec3 herb1Color;uniform vec3 herb2Color;uniform vec3 herb3Color;uniform vec3 groundColor;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}
524
+ float noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}
525
+ float fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}
526
+ return total;}
527
+ #define CUSTOM_FRAGMENT_DEFINITIONS
528
+ void main(void) {
529
+ #define CUSTOM_FRAGMENT_MAIN_BEGIN
530
+ vec3 color=mix(groundColor,herb1Color,rand(gl_FragCoord.xy*4.0));color=mix(color,herb2Color,rand(gl_FragCoord.xy*8.0));color=mix(color,herb3Color,rand(gl_FragCoord.xy));color=mix(color,herb1Color,fbm(gl_FragCoord.xy*16.0));gl_FragColor=vec4(color,1.0);
531
+ #define CUSTOM_FRAGMENT_MAIN_END
532
+ }`;
576
533
  // Sideeffect
577
- core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
534
+ babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
578
535
  /** @internal */
579
- var grassProceduralTexturePixelShader = { name: name, shader: shader };
536
+ const grassProceduralTexturePixelShader = { name, shader };
580
537
 
581
538
 
582
539
  /***/ }),
583
540
 
584
- /***/ "../../../lts/proceduralTextures/dist/grass/grassProceduralTexture.js":
585
- /*!****************************************************************************!*\
586
- !*** ../../../lts/proceduralTextures/dist/grass/grassProceduralTexture.js ***!
587
- \****************************************************************************/
541
+ /***/ "../../../dev/proceduralTextures/src/grass/grassProceduralTexture.ts":
542
+ /*!***************************************************************************!*\
543
+ !*** ../../../dev/proceduralTextures/src/grass/grassProceduralTexture.ts ***!
544
+ \***************************************************************************/
588
545
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
589
546
 
590
547
  __webpack_require__.r(__webpack_exports__);
@@ -592,66 +549,55 @@ __webpack_require__.r(__webpack_exports__);
592
549
  /* harmony export */ GrassProceduralTexture: () => (/* binding */ GrassProceduralTexture)
593
550
  /* harmony export */ });
594
551
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.mjs");
595
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Misc/typeStore */ "core/Misc/decorators");
596
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
597
- /* harmony import */ var _grassProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./grassProceduralTexture.fragment */ "../../../lts/proceduralTextures/dist/grass/grassProceduralTexture.fragment.js");
552
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/decorators");
553
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
554
+ /* harmony import */ var _grassProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./grassProceduralTexture.fragment */ "../../../dev/proceduralTextures/src/grass/grassProceduralTexture.fragment.ts");
598
555
 
599
556
 
600
557
 
601
558
 
602
559
 
603
560
 
604
- var GrassProceduralTexture = /** @class */ (function (_super) {
605
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(GrassProceduralTexture, _super);
606
- function GrassProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
607
- if (scene === void 0) { scene = null; }
608
- var _this = _super.call(this, name, size, "grassProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
609
- _this._groundColor = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(1, 1, 1);
610
- _this._grassColors = [new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.29, 0.38, 0.02), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.36, 0.49, 0.09), new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.51, 0.6, 0.28)];
611
- _this.updateShaderUniforms();
612
- return _this;
561
+ class GrassProceduralTexture extends babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture {
562
+ constructor(name, size, scene = null, fallbackTexture, generateMipMaps) {
563
+ super(name, size, "grassProceduralTexture", scene, fallbackTexture, generateMipMaps);
564
+ this._groundColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(1, 1, 1);
565
+ this._grassColors = [new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.29, 0.38, 0.02), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.36, 0.49, 0.09), new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.51, 0.6, 0.28)];
566
+ this.updateShaderUniforms();
613
567
  }
614
- GrassProceduralTexture.prototype.updateShaderUniforms = function () {
568
+ updateShaderUniforms() {
615
569
  this.setColor3("herb1Color", this._grassColors[0]);
616
570
  this.setColor3("herb2Color", this._grassColors[1]);
617
571
  this.setColor3("herb3Color", this._grassColors[2]);
618
572
  this.setColor3("groundColor", this._groundColor);
619
- };
620
- Object.defineProperty(GrassProceduralTexture.prototype, "grassColors", {
621
- get: function () {
622
- return this._grassColors;
623
- },
624
- set: function (value) {
625
- this._grassColors = value;
626
- this.updateShaderUniforms();
627
- },
628
- enumerable: false,
629
- configurable: true
630
- });
631
- Object.defineProperty(GrassProceduralTexture.prototype, "groundColor", {
632
- get: function () {
633
- return this._groundColor;
634
- },
635
- set: function (value) {
636
- this._groundColor = value;
637
- this.updateShaderUniforms();
638
- },
639
- enumerable: false,
640
- configurable: true
641
- });
573
+ }
574
+ get grassColors() {
575
+ return this._grassColors;
576
+ }
577
+ set grassColors(value) {
578
+ this._grassColors = value;
579
+ this.updateShaderUniforms();
580
+ }
581
+ get groundColor() {
582
+ return this._groundColor;
583
+ }
584
+ set groundColor(value) {
585
+ this._groundColor = value;
586
+ this.updateShaderUniforms();
587
+ }
642
588
  /**
643
589
  * Serializes this grass procedural texture
644
590
  * @returns a serialized grass procedural texture object
645
591
  */
646
- GrassProceduralTexture.prototype.serialize = function () {
647
- var serializationObject = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
592
+ serialize() {
593
+ const serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, super.serialize());
648
594
  serializationObject.customType = "BABYLON.GrassProceduralTexture";
649
595
  serializationObject.grassColors = [];
650
- for (var i = 0; i < this._grassColors.length; i++) {
596
+ for (let i = 0; i < this._grassColors.length; i++) {
651
597
  serializationObject.grassColors.push(this._grassColors[i].asArray());
652
598
  }
653
599
  return serializationObject;
654
- };
600
+ }
655
601
  /**
656
602
  * Creates a Grass Procedural Texture from parsed grass procedural texture data
657
603
  * @param parsedTexture defines parsed texture data
@@ -659,45 +605,44 @@ var GrassProceduralTexture = /** @class */ (function (_super) {
659
605
  * @param rootUrl defines the root URL containing grass procedural texture information
660
606
  * @returns a parsed Grass Procedural Texture
661
607
  */
662
- GrassProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
663
- var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(function () { return new GrassProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
664
- var colors = [];
665
- for (var i = 0; i < parsedTexture.grassColors.length; i++) {
666
- colors.push(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3.FromArray(parsedTexture.grassColors[i]));
608
+ static Parse(parsedTexture, scene, rootUrl) {
609
+ const texture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(() => new GrassProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), parsedTexture, scene, rootUrl);
610
+ const colors = [];
611
+ for (let i = 0; i < parsedTexture.grassColors.length; i++) {
612
+ colors.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3.FromArray(parsedTexture.grassColors[i]));
667
613
  }
668
614
  texture.grassColors = colors;
669
615
  return texture;
670
- };
671
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
672
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor3)()
673
- ], GrassProceduralTexture.prototype, "groundColor", null);
674
- return GrassProceduralTexture;
675
- }(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture));
676
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.GrassProceduralTexture", GrassProceduralTexture);
616
+ }
617
+ }
618
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
619
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor3)()
620
+ ], GrassProceduralTexture.prototype, "groundColor", null);
621
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.GrassProceduralTexture", GrassProceduralTexture);
677
622
 
678
623
 
679
624
  /***/ }),
680
625
 
681
- /***/ "../../../lts/proceduralTextures/dist/grass/index.js":
682
- /*!***********************************************************!*\
683
- !*** ../../../lts/proceduralTextures/dist/grass/index.js ***!
684
- \***********************************************************/
626
+ /***/ "../../../dev/proceduralTextures/src/grass/index.ts":
627
+ /*!**********************************************************!*\
628
+ !*** ../../../dev/proceduralTextures/src/grass/index.ts ***!
629
+ \**********************************************************/
685
630
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
686
631
 
687
632
  __webpack_require__.r(__webpack_exports__);
688
633
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
689
634
  /* harmony export */ GrassProceduralTexture: () => (/* reexport safe */ _grassProceduralTexture__WEBPACK_IMPORTED_MODULE_0__.GrassProceduralTexture)
690
635
  /* harmony export */ });
691
- /* harmony import */ var _grassProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./grassProceduralTexture */ "../../../lts/proceduralTextures/dist/grass/grassProceduralTexture.js");
636
+ /* harmony import */ var _grassProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./grassProceduralTexture */ "../../../dev/proceduralTextures/src/grass/grassProceduralTexture.ts");
692
637
 
693
638
 
694
639
 
695
640
  /***/ }),
696
641
 
697
- /***/ "../../../lts/proceduralTextures/dist/index.js":
698
- /*!*****************************************************!*\
699
- !*** ../../../lts/proceduralTextures/dist/index.js ***!
700
- \*****************************************************/
642
+ /***/ "../../../dev/proceduralTextures/src/index.ts":
643
+ /*!****************************************************!*\
644
+ !*** ../../../dev/proceduralTextures/src/index.ts ***!
645
+ \****************************************************/
701
646
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
702
647
 
703
648
  __webpack_require__.r(__webpack_exports__);
@@ -713,16 +658,16 @@ __webpack_require__.r(__webpack_exports__);
713
658
  /* harmony export */ StarfieldProceduralTexture: () => (/* reexport safe */ _starfield_index__WEBPACK_IMPORTED_MODULE_8__.StarfieldProceduralTexture),
714
659
  /* harmony export */ WoodProceduralTexture: () => (/* reexport safe */ _wood_index__WEBPACK_IMPORTED_MODULE_9__.WoodProceduralTexture)
715
660
  /* harmony export */ });
716
- /* harmony import */ var _brick_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brick/index */ "../../../lts/proceduralTextures/dist/brick/index.js");
717
- /* harmony import */ var _cloud_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cloud/index */ "../../../lts/proceduralTextures/dist/cloud/index.js");
718
- /* harmony import */ var _fire_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fire/index */ "../../../lts/proceduralTextures/dist/fire/index.js");
719
- /* harmony import */ var _grass_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./grass/index */ "../../../lts/proceduralTextures/dist/grass/index.js");
720
- /* harmony import */ var _marble_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./marble/index */ "../../../lts/proceduralTextures/dist/marble/index.js");
721
- /* harmony import */ var _normalMap_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./normalMap/index */ "../../../lts/proceduralTextures/dist/normalMap/index.js");
722
- /* harmony import */ var _perlinNoise_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./perlinNoise/index */ "../../../lts/proceduralTextures/dist/perlinNoise/index.js");
723
- /* harmony import */ var _road_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./road/index */ "../../../lts/proceduralTextures/dist/road/index.js");
724
- /* harmony import */ var _starfield_index__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./starfield/index */ "../../../lts/proceduralTextures/dist/starfield/index.js");
725
- /* harmony import */ var _wood_index__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./wood/index */ "../../../lts/proceduralTextures/dist/wood/index.js");
661
+ /* harmony import */ var _brick_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brick/index */ "../../../dev/proceduralTextures/src/brick/index.ts");
662
+ /* harmony import */ var _cloud_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cloud/index */ "../../../dev/proceduralTextures/src/cloud/index.ts");
663
+ /* harmony import */ var _fire_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fire/index */ "../../../dev/proceduralTextures/src/fire/index.ts");
664
+ /* harmony import */ var _grass_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./grass/index */ "../../../dev/proceduralTextures/src/grass/index.ts");
665
+ /* harmony import */ var _marble_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./marble/index */ "../../../dev/proceduralTextures/src/marble/index.ts");
666
+ /* harmony import */ var _normalMap_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./normalMap/index */ "../../../dev/proceduralTextures/src/normalMap/index.ts");
667
+ /* harmony import */ var _perlinNoise_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./perlinNoise/index */ "../../../dev/proceduralTextures/src/perlinNoise/index.ts");
668
+ /* harmony import */ var _road_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./road/index */ "../../../dev/proceduralTextures/src/road/index.ts");
669
+ /* harmony import */ var _starfield_index__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./starfield/index */ "../../../dev/proceduralTextures/src/starfield/index.ts");
670
+ /* harmony import */ var _wood_index__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./wood/index */ "../../../dev/proceduralTextures/src/wood/index.ts");
726
671
  /* eslint-disable import/no-internal-modules */
727
672
 
728
673
 
@@ -738,90 +683,50 @@ __webpack_require__.r(__webpack_exports__);
738
683
 
739
684
  /***/ }),
740
685
 
741
- /***/ "../../../lts/proceduralTextures/dist/legacy/legacy.js":
742
- /*!*************************************************************!*\
743
- !*** ../../../lts/proceduralTextures/dist/legacy/legacy.js ***!
744
- \*************************************************************/
745
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
746
-
747
- __webpack_require__.r(__webpack_exports__);
748
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
749
- /* harmony export */ BrickProceduralTexture: () => (/* reexport safe */ _index__WEBPACK_IMPORTED_MODULE_0__.BrickProceduralTexture),
750
- /* harmony export */ CloudProceduralTexture: () => (/* reexport safe */ _index__WEBPACK_IMPORTED_MODULE_0__.CloudProceduralTexture),
751
- /* harmony export */ FireProceduralTexture: () => (/* reexport safe */ _index__WEBPACK_IMPORTED_MODULE_0__.FireProceduralTexture),
752
- /* harmony export */ GrassProceduralTexture: () => (/* reexport safe */ _index__WEBPACK_IMPORTED_MODULE_0__.GrassProceduralTexture),
753
- /* harmony export */ MarbleProceduralTexture: () => (/* reexport safe */ _index__WEBPACK_IMPORTED_MODULE_0__.MarbleProceduralTexture),
754
- /* harmony export */ NormalMapProceduralTexture: () => (/* reexport safe */ _index__WEBPACK_IMPORTED_MODULE_0__.NormalMapProceduralTexture),
755
- /* harmony export */ PerlinNoiseProceduralTexture: () => (/* reexport safe */ _index__WEBPACK_IMPORTED_MODULE_0__.PerlinNoiseProceduralTexture),
756
- /* harmony export */ RoadProceduralTexture: () => (/* reexport safe */ _index__WEBPACK_IMPORTED_MODULE_0__.RoadProceduralTexture),
757
- /* harmony export */ StarfieldProceduralTexture: () => (/* reexport safe */ _index__WEBPACK_IMPORTED_MODULE_0__.StarfieldProceduralTexture),
758
- /* harmony export */ WoodProceduralTexture: () => (/* reexport safe */ _index__WEBPACK_IMPORTED_MODULE_0__.WoodProceduralTexture)
759
- /* harmony export */ });
760
- /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../index */ "../../../lts/proceduralTextures/dist/index.js");
761
- /* eslint-disable import/no-internal-modules */
762
-
763
- /**
764
- * Legacy support, defining window.BABYLON.GridMaterial... (global variable).
765
- *
766
- * This is the entry point for the UMD module.
767
- * The entry point for a future ESM package should be index.ts
768
- */
769
- var globalObject = typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : undefined;
770
- if (typeof globalObject !== "undefined") {
771
- globalObject.BABYLON = globalObject.BABYLON || {};
772
- for (var mat in _index__WEBPACK_IMPORTED_MODULE_0__) {
773
- globalObject.BABYLON[mat] = _index__WEBPACK_IMPORTED_MODULE_0__[mat];
774
- }
775
- }
776
-
777
-
778
-
779
- /***/ }),
780
-
781
- /***/ "../../../lts/proceduralTextures/dist/marble/index.js":
782
- /*!************************************************************!*\
783
- !*** ../../../lts/proceduralTextures/dist/marble/index.js ***!
784
- \************************************************************/
686
+ /***/ "../../../dev/proceduralTextures/src/marble/index.ts":
687
+ /*!***********************************************************!*\
688
+ !*** ../../../dev/proceduralTextures/src/marble/index.ts ***!
689
+ \***********************************************************/
785
690
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
786
691
 
787
692
  __webpack_require__.r(__webpack_exports__);
788
693
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
789
694
  /* harmony export */ MarbleProceduralTexture: () => (/* reexport safe */ _marbleProceduralTexture__WEBPACK_IMPORTED_MODULE_0__.MarbleProceduralTexture)
790
695
  /* harmony export */ });
791
- /* harmony import */ var _marbleProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./marbleProceduralTexture */ "../../../lts/proceduralTextures/dist/marble/marbleProceduralTexture.js");
696
+ /* harmony import */ var _marbleProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./marbleProceduralTexture */ "../../../dev/proceduralTextures/src/marble/marbleProceduralTexture.ts");
792
697
 
793
698
 
794
699
 
795
700
  /***/ }),
796
701
 
797
- /***/ "../../../lts/proceduralTextures/dist/marble/marbleProceduralTexture.fragment.js":
798
- /*!***************************************************************************************!*\
799
- !*** ../../../lts/proceduralTextures/dist/marble/marbleProceduralTexture.fragment.js ***!
800
- \***************************************************************************************/
702
+ /***/ "../../../dev/proceduralTextures/src/marble/marbleProceduralTexture.fragment.ts":
703
+ /*!**************************************************************************************!*\
704
+ !*** ../../../dev/proceduralTextures/src/marble/marbleProceduralTexture.fragment.ts ***!
705
+ \**************************************************************************************/
801
706
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
802
707
 
803
708
  __webpack_require__.r(__webpack_exports__);
804
709
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
805
710
  /* harmony export */ marbleProceduralTexturePixelShader: () => (/* binding */ marbleProceduralTexturePixelShader)
806
711
  /* harmony export */ });
807
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
808
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
712
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators");
713
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
809
714
  // Do not edit.
810
715
 
811
- var name = "marbleProceduralTexturePixelShader";
812
- var shader = "precision highp float;\nvarying vec2 vPosition;\nvarying vec2 vUV;\nuniform float numberOfTilesHeight;\nuniform float numberOfTilesWidth;\nuniform float amplitude;\nuniform vec3 marbleColor;\nuniform vec3 jointColor;\nconst vec3 tileSize=vec3(1.1,1.0,1.1);\nconst vec3 tilePct=vec3(0.98,1.0,0.98);\nfloat rand(vec2 n) {\nreturn fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);\n}\nfloat noise(vec2 n) {\nconst vec2 d=vec2(0.0,1.0);\nvec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));\nreturn mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);\n}\nfloat turbulence(vec2 P)\n{\nfloat val=0.0;\nfloat freq=1.0;\nfor (int i=0; i<4; i++)\n{\nval+=abs(noise(P*freq)/freq);\nfreq*=2.07;\n}\nreturn val;\n}\nfloat roundF(float number){\nreturn sign(number)*floor(abs(number)+0.5);\n}\nvec3 marble_color(float x)\n{\nvec3 col;\nx=0.5*(x+1.);\nx=sqrt(x); \nx=sqrt(x);\nx=sqrt(x);\ncol=vec3(.2+.75*x); \ncol.b*=0.95; \nreturn col;\n}\nvoid main()\n{\nfloat brickW=1.0/numberOfTilesWidth;\nfloat brickH=1.0/numberOfTilesHeight;\nfloat jointWPercentage=0.01;\nfloat jointHPercentage=0.01;\nvec3 color=marbleColor;\nfloat yi=vUV.y/brickH;\nfloat nyi=roundF(yi);\nfloat xi=vUV.x/brickW;\nif (mod(floor(yi),2.0)==0.0){\nxi=xi-0.5;\n}\nfloat nxi=roundF(xi);\nvec2 brickvUV=vec2((xi-floor(xi))/brickH,(yi-floor(yi))/brickW);\nif (yi<nyi+jointHPercentage && yi>nyi-jointHPercentage){\ncolor=mix(jointColor,vec3(0.37,0.25,0.25),(yi-nyi)/jointHPercentage+0.2);\n}\nelse if (xi<nxi+jointWPercentage && xi>nxi-jointWPercentage){\ncolor=mix(jointColor,vec3(0.44,0.44,0.44),(xi-nxi)/jointWPercentage+0.2);\n}\nelse {\nfloat t=6.28*brickvUV.x/(tileSize.x+noise(vec2(vUV)*6.0));\nt+=amplitude*turbulence(brickvUV.xy);\nt=sin(t);\ncolor=marble_color(t);\n}\ngl_FragColor=vec4(color,0.0);\n}";
716
+ const name = "marbleProceduralTexturePixelShader";
717
+ const shader = `precision highp float;
813
718
  // Sideeffect
814
- core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
719
+ babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
815
720
  /** @internal */
816
- var marbleProceduralTexturePixelShader = { name: name, shader: shader };
721
+ const marbleProceduralTexturePixelShader = { name, shader };
817
722
 
818
723
 
819
724
  /***/ }),
820
725
 
821
- /***/ "../../../lts/proceduralTextures/dist/marble/marbleProceduralTexture.js":
822
- /*!******************************************************************************!*\
823
- !*** ../../../lts/proceduralTextures/dist/marble/marbleProceduralTexture.js ***!
824
- \******************************************************************************/
726
+ /***/ "../../../dev/proceduralTextures/src/marble/marbleProceduralTexture.ts":
727
+ /*!*****************************************************************************!*\
728
+ !*** ../../../dev/proceduralTextures/src/marble/marbleProceduralTexture.ts ***!
729
+ \*****************************************************************************/
825
730
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
826
731
 
827
732
  __webpack_require__.r(__webpack_exports__);
@@ -829,86 +734,67 @@ __webpack_require__.r(__webpack_exports__);
829
734
  /* harmony export */ MarbleProceduralTexture: () => (/* binding */ MarbleProceduralTexture)
830
735
  /* harmony export */ });
831
736
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.mjs");
832
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Misc/typeStore */ "core/Misc/decorators");
833
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
834
- /* harmony import */ var _marbleProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./marbleProceduralTexture.fragment */ "../../../lts/proceduralTextures/dist/marble/marbleProceduralTexture.fragment.js");
737
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/decorators");
738
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
739
+ /* harmony import */ var _marbleProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./marbleProceduralTexture.fragment */ "../../../dev/proceduralTextures/src/marble/marbleProceduralTexture.fragment.ts");
835
740
 
836
741
 
837
742
 
838
743
 
839
744
 
840
745
 
841
- var MarbleProceduralTexture = /** @class */ (function (_super) {
842
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(MarbleProceduralTexture, _super);
843
- function MarbleProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
844
- if (scene === void 0) { scene = null; }
845
- var _this = _super.call(this, name, size, "marbleProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
846
- _this._numberOfTilesHeight = 3;
847
- _this._numberOfTilesWidth = 3;
848
- _this._amplitude = 9.0;
849
- _this._jointColor = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.72, 0.72, 0.72);
850
- _this.updateShaderUniforms();
851
- return _this;
746
+ class MarbleProceduralTexture extends babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture {
747
+ constructor(name, size, scene = null, fallbackTexture, generateMipMaps) {
748
+ super(name, size, "marbleProceduralTexture", scene, fallbackTexture, generateMipMaps);
749
+ this._numberOfTilesHeight = 3;
750
+ this._numberOfTilesWidth = 3;
751
+ this._amplitude = 9.0;
752
+ this._jointColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.72, 0.72, 0.72);
753
+ this.updateShaderUniforms();
852
754
  }
853
- MarbleProceduralTexture.prototype.updateShaderUniforms = function () {
755
+ updateShaderUniforms() {
854
756
  this.setFloat("numberOfTilesHeight", this._numberOfTilesHeight);
855
757
  this.setFloat("numberOfTilesWidth", this._numberOfTilesWidth);
856
758
  this.setFloat("amplitude", this._amplitude);
857
759
  this.setColor3("jointColor", this._jointColor);
858
- };
859
- Object.defineProperty(MarbleProceduralTexture.prototype, "numberOfTilesHeight", {
860
- get: function () {
861
- return this._numberOfTilesHeight;
862
- },
863
- set: function (value) {
864
- this._numberOfTilesHeight = value;
865
- this.updateShaderUniforms();
866
- },
867
- enumerable: false,
868
- configurable: true
869
- });
870
- Object.defineProperty(MarbleProceduralTexture.prototype, "amplitude", {
871
- get: function () {
872
- return this._amplitude;
873
- },
874
- set: function (value) {
875
- this._amplitude = value;
876
- this.updateShaderUniforms();
877
- },
878
- enumerable: false,
879
- configurable: true
880
- });
881
- Object.defineProperty(MarbleProceduralTexture.prototype, "numberOfTilesWidth", {
882
- get: function () {
883
- return this._numberOfTilesWidth;
884
- },
885
- set: function (value) {
886
- this._numberOfTilesWidth = value;
887
- this.updateShaderUniforms();
888
- },
889
- enumerable: false,
890
- configurable: true
891
- });
892
- Object.defineProperty(MarbleProceduralTexture.prototype, "jointColor", {
893
- get: function () {
894
- return this._jointColor;
895
- },
896
- set: function (value) {
897
- this._jointColor = value;
898
- this.updateShaderUniforms();
899
- },
900
- enumerable: false,
901
- configurable: true
902
- });
760
+ }
761
+ get numberOfTilesHeight() {
762
+ return this._numberOfTilesHeight;
763
+ }
764
+ set numberOfTilesHeight(value) {
765
+ this._numberOfTilesHeight = value;
766
+ this.updateShaderUniforms();
767
+ }
768
+ get amplitude() {
769
+ return this._amplitude;
770
+ }
771
+ set amplitude(value) {
772
+ this._amplitude = value;
773
+ this.updateShaderUniforms();
774
+ }
775
+ get numberOfTilesWidth() {
776
+ return this._numberOfTilesWidth;
777
+ }
778
+ set numberOfTilesWidth(value) {
779
+ this._numberOfTilesWidth = value;
780
+ this.updateShaderUniforms();
781
+ }
782
+ get jointColor() {
783
+ return this._jointColor;
784
+ }
785
+ set jointColor(value) {
786
+ this._jointColor = value;
787
+ this.updateShaderUniforms();
788
+ }
903
789
  /**
904
790
  * Serializes this marble procedural texture
905
791
  * @returns a serialized marble procedural texture object
906
792
  */
907
- MarbleProceduralTexture.prototype.serialize = function () {
908
- var serializationObject = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
793
+ serialize() {
794
+ const serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, super.serialize());
909
795
  serializationObject.customType = "BABYLON.MarbleProceduralTexture";
910
796
  return serializationObject;
911
- };
797
+ }
912
798
  /**
913
799
  * Creates a Marble Procedural Texture from parsed marble procedural texture data
914
800
  * @param parsedTexture defines parsed texture data
@@ -916,73 +802,76 @@ var MarbleProceduralTexture = /** @class */ (function (_super) {
916
802
  * @param rootUrl defines the root URL containing marble procedural texture information
917
803
  * @returns a parsed Marble Procedural Texture
918
804
  */
919
- MarbleProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
920
- var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(function () { return new MarbleProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
805
+ static Parse(parsedTexture, scene, rootUrl) {
806
+ const texture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(() => new MarbleProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), parsedTexture, scene, rootUrl);
921
807
  return texture;
922
- };
923
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
924
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
925
- ], MarbleProceduralTexture.prototype, "numberOfTilesHeight", null);
926
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
927
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
928
- ], MarbleProceduralTexture.prototype, "amplitude", null);
929
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
930
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
931
- ], MarbleProceduralTexture.prototype, "numberOfTilesWidth", null);
932
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
933
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
934
- ], MarbleProceduralTexture.prototype, "jointColor", null);
935
- return MarbleProceduralTexture;
936
- }(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture));
937
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.MarbleProceduralTexture", MarbleProceduralTexture);
808
+ }
809
+ }
810
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
811
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
812
+ ], MarbleProceduralTexture.prototype, "numberOfTilesHeight", null);
813
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
814
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
815
+ ], MarbleProceduralTexture.prototype, "amplitude", null);
816
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
817
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
818
+ ], MarbleProceduralTexture.prototype, "numberOfTilesWidth", null);
819
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
820
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
821
+ ], MarbleProceduralTexture.prototype, "jointColor", null);
822
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.MarbleProceduralTexture", MarbleProceduralTexture);
938
823
 
939
824
 
940
825
  /***/ }),
941
826
 
942
- /***/ "../../../lts/proceduralTextures/dist/normalMap/index.js":
943
- /*!***************************************************************!*\
944
- !*** ../../../lts/proceduralTextures/dist/normalMap/index.js ***!
945
- \***************************************************************/
827
+ /***/ "../../../dev/proceduralTextures/src/normalMap/index.ts":
828
+ /*!**************************************************************!*\
829
+ !*** ../../../dev/proceduralTextures/src/normalMap/index.ts ***!
830
+ \**************************************************************/
946
831
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
947
832
 
948
833
  __webpack_require__.r(__webpack_exports__);
949
834
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
950
835
  /* harmony export */ NormalMapProceduralTexture: () => (/* reexport safe */ _normalMapProceduralTexture__WEBPACK_IMPORTED_MODULE_0__.NormalMapProceduralTexture)
951
836
  /* harmony export */ });
952
- /* harmony import */ var _normalMapProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./normalMapProceduralTexture */ "../../../lts/proceduralTextures/dist/normalMap/normalMapProceduralTexture.js");
837
+ /* harmony import */ var _normalMapProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./normalMapProceduralTexture */ "../../../dev/proceduralTextures/src/normalMap/normalMapProceduralTexture.ts");
953
838
 
954
839
 
955
840
 
956
841
  /***/ }),
957
842
 
958
- /***/ "../../../lts/proceduralTextures/dist/normalMap/normalMapProceduralTexture.fragment.js":
959
- /*!*********************************************************************************************!*\
960
- !*** ../../../lts/proceduralTextures/dist/normalMap/normalMapProceduralTexture.fragment.js ***!
961
- \*********************************************************************************************/
843
+ /***/ "../../../dev/proceduralTextures/src/normalMap/normalMapProceduralTexture.fragment.ts":
844
+ /*!********************************************************************************************!*\
845
+ !*** ../../../dev/proceduralTextures/src/normalMap/normalMapProceduralTexture.fragment.ts ***!
846
+ \********************************************************************************************/
962
847
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
963
848
 
964
849
  __webpack_require__.r(__webpack_exports__);
965
850
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
966
851
  /* harmony export */ normalMapProceduralTexturePixelShader: () => (/* binding */ normalMapProceduralTexturePixelShader)
967
852
  /* harmony export */ });
968
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
969
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
853
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators");
854
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
970
855
  // Do not edit.
971
856
 
972
- var name = "normalMapProceduralTexturePixelShader";
973
- var shader = "precision highp float;uniform sampler2D baseSampler;uniform float size;varying vec2 vUV;const vec3 LUMA_COEFFICIENT=vec3(0.2126,0.7152,0.0722);float lumaAtCoord(vec2 coord)\n{vec3 pixel=texture2D(baseSampler,coord).rgb;float luma=dot(pixel,LUMA_COEFFICIENT);return luma;}\nvoid main()\n{float lumaU0=lumaAtCoord(vUV+vec2(-1.0, 0.0)/size);float lumaU1=lumaAtCoord(vUV+vec2( 1.0, 0.0)/size);float lumaV0=lumaAtCoord(vUV+vec2( 0.0,-1.0)/size);float lumaV1=lumaAtCoord(vUV+vec2( 0.0, 1.0)/size);vec2 slope=(vec2(lumaU0-lumaU1,lumaV0-lumaV1)+1.0)*0.5;gl_FragColor=vec4(slope,1.0,1.0);}\n";
857
+ const name = "normalMapProceduralTexturePixelShader";
858
+ const shader = `precision highp float;uniform sampler2D baseSampler;uniform float size;varying vec2 vUV;const vec3 LUMA_COEFFICIENT=vec3(0.2126,0.7152,0.0722);float lumaAtCoord(vec2 coord)
859
+ {vec3 pixel=texture2D(baseSampler,coord).rgb;float luma=dot(pixel,LUMA_COEFFICIENT);return luma;}
860
+ void main()
861
+ {float lumaU0=lumaAtCoord(vUV+vec2(-1.0, 0.0)/size);float lumaU1=lumaAtCoord(vUV+vec2( 1.0, 0.0)/size);float lumaV0=lumaAtCoord(vUV+vec2( 0.0,-1.0)/size);float lumaV1=lumaAtCoord(vUV+vec2( 0.0, 1.0)/size);vec2 slope=(vec2(lumaU0-lumaU1,lumaV0-lumaV1)+1.0)*0.5;gl_FragColor=vec4(slope,1.0,1.0);}
862
+ `;
974
863
  // Sideeffect
975
- core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
864
+ babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
976
865
  /** @internal */
977
- var normalMapProceduralTexturePixelShader = { name: name, shader: shader };
866
+ const normalMapProceduralTexturePixelShader = { name, shader };
978
867
 
979
868
 
980
869
  /***/ }),
981
870
 
982
- /***/ "../../../lts/proceduralTextures/dist/normalMap/normalMapProceduralTexture.js":
983
- /*!************************************************************************************!*\
984
- !*** ../../../lts/proceduralTextures/dist/normalMap/normalMapProceduralTexture.js ***!
985
- \************************************************************************************/
871
+ /***/ "../../../dev/proceduralTextures/src/normalMap/normalMapProceduralTexture.ts":
872
+ /*!***********************************************************************************!*\
873
+ !*** ../../../dev/proceduralTextures/src/normalMap/normalMapProceduralTexture.ts ***!
874
+ \***********************************************************************************/
986
875
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
987
876
 
988
877
  __webpack_require__.r(__webpack_exports__);
@@ -990,60 +879,53 @@ __webpack_require__.r(__webpack_exports__);
990
879
  /* harmony export */ NormalMapProceduralTexture: () => (/* binding */ NormalMapProceduralTexture)
991
880
  /* harmony export */ });
992
881
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.mjs");
993
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Misc/typeStore */ "core/Misc/decorators");
994
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
995
- /* harmony import */ var _normalMapProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normalMapProceduralTexture.fragment */ "../../../lts/proceduralTextures/dist/normalMap/normalMapProceduralTexture.fragment.js");
882
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/decorators");
883
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
884
+ /* harmony import */ var _normalMapProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normalMapProceduralTexture.fragment */ "../../../dev/proceduralTextures/src/normalMap/normalMapProceduralTexture.fragment.ts");
996
885
 
997
886
 
998
887
 
999
888
 
1000
889
 
1001
- var NormalMapProceduralTexture = /** @class */ (function (_super) {
1002
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(NormalMapProceduralTexture, _super);
1003
- function NormalMapProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
1004
- if (scene === void 0) { scene = null; }
1005
- var _this = _super.call(this, name, size, "normalMapProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
1006
- _this.updateShaderUniforms();
1007
- return _this;
890
+ class NormalMapProceduralTexture extends babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture {
891
+ constructor(name, size, scene = null, fallbackTexture, generateMipMaps) {
892
+ super(name, size, "normalMapProceduralTexture", scene, fallbackTexture, generateMipMaps);
893
+ this.updateShaderUniforms();
1008
894
  }
1009
- NormalMapProceduralTexture.prototype.updateShaderUniforms = function () {
895
+ updateShaderUniforms() {
1010
896
  this.setTexture("baseSampler", this._baseTexture);
1011
897
  this.setFloat("size", this.getRenderSize());
1012
- };
1013
- NormalMapProceduralTexture.prototype.render = function (useCameraPostProcess) {
1014
- _super.prototype.render.call(this, useCameraPostProcess);
1015
- };
1016
- NormalMapProceduralTexture.prototype.resize = function (size, generateMipMaps) {
1017
- _super.prototype.resize.call(this, size, generateMipMaps);
898
+ }
899
+ render(useCameraPostProcess) {
900
+ super.render(useCameraPostProcess);
901
+ }
902
+ resize(size, generateMipMaps) {
903
+ super.resize(size, generateMipMaps);
1018
904
  // We need to update the "size" uniform
1019
905
  this.updateShaderUniforms();
1020
- };
1021
- NormalMapProceduralTexture.prototype.isReady = function () {
906
+ }
907
+ isReady() {
1022
908
  if (!this._baseTexture || !this._baseTexture.isReady()) {
1023
909
  return false;
1024
910
  }
1025
- return _super.prototype.isReady.call(this);
1026
- };
1027
- Object.defineProperty(NormalMapProceduralTexture.prototype, "baseTexture", {
1028
- get: function () {
1029
- return this._baseTexture;
1030
- },
1031
- set: function (texture) {
1032
- this._baseTexture = texture;
1033
- this.updateShaderUniforms();
1034
- },
1035
- enumerable: false,
1036
- configurable: true
1037
- });
911
+ return super.isReady();
912
+ }
913
+ get baseTexture() {
914
+ return this._baseTexture;
915
+ }
916
+ set baseTexture(texture) {
917
+ this._baseTexture = texture;
918
+ this.updateShaderUniforms();
919
+ }
1038
920
  /**
1039
921
  * Serializes this normal map procedural texture
1040
922
  * @returns a serialized normal map procedural texture object
1041
923
  */
1042
- NormalMapProceduralTexture.prototype.serialize = function () {
1043
- var serializationObject = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
924
+ serialize() {
925
+ const serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, super.serialize());
1044
926
  serializationObject.customType = "BABYLON.NormalMapProceduralTexture";
1045
927
  return serializationObject;
1046
- };
928
+ }
1047
929
  /**
1048
930
  * Creates a Normal Map Procedural Texture from parsed normal map procedural texture data
1049
931
  * @param parsedTexture defines parsed texture data
@@ -1051,64 +933,101 @@ var NormalMapProceduralTexture = /** @class */ (function (_super) {
1051
933
  * @param rootUrl defines the root URL containing normal map procedural texture information
1052
934
  * @returns a parsed Normal Map Procedural Texture
1053
935
  */
1054
- NormalMapProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
1055
- var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(function () { return new NormalMapProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
936
+ static Parse(parsedTexture, scene, rootUrl) {
937
+ const texture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(() => new NormalMapProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), parsedTexture, scene, rootUrl);
1056
938
  return texture;
1057
- };
1058
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1059
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsTexture)()
1060
- ], NormalMapProceduralTexture.prototype, "baseTexture", null);
1061
- return NormalMapProceduralTexture;
1062
- }(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture));
1063
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.NormalMapProceduralTexture", NormalMapProceduralTexture);
939
+ }
940
+ }
941
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
942
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsTexture)()
943
+ ], NormalMapProceduralTexture.prototype, "baseTexture", null);
944
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.NormalMapProceduralTexture", NormalMapProceduralTexture);
1064
945
 
1065
946
 
1066
947
  /***/ }),
1067
948
 
1068
- /***/ "../../../lts/proceduralTextures/dist/perlinNoise/index.js":
1069
- /*!*****************************************************************!*\
1070
- !*** ../../../lts/proceduralTextures/dist/perlinNoise/index.js ***!
1071
- \*****************************************************************/
949
+ /***/ "../../../dev/proceduralTextures/src/perlinNoise/index.ts":
950
+ /*!****************************************************************!*\
951
+ !*** ../../../dev/proceduralTextures/src/perlinNoise/index.ts ***!
952
+ \****************************************************************/
1072
953
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1073
954
 
1074
955
  __webpack_require__.r(__webpack_exports__);
1075
956
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1076
957
  /* harmony export */ PerlinNoiseProceduralTexture: () => (/* reexport safe */ _perlinNoiseProceduralTexture__WEBPACK_IMPORTED_MODULE_0__.PerlinNoiseProceduralTexture)
1077
958
  /* harmony export */ });
1078
- /* harmony import */ var _perlinNoiseProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./perlinNoiseProceduralTexture */ "../../../lts/proceduralTextures/dist/perlinNoise/perlinNoiseProceduralTexture.js");
959
+ /* harmony import */ var _perlinNoiseProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./perlinNoiseProceduralTexture */ "../../../dev/proceduralTextures/src/perlinNoise/perlinNoiseProceduralTexture.ts");
1079
960
 
1080
961
 
1081
962
 
1082
963
  /***/ }),
1083
964
 
1084
- /***/ "../../../lts/proceduralTextures/dist/perlinNoise/perlinNoiseProceduralTexture.fragment.js":
1085
- /*!*************************************************************************************************!*\
1086
- !*** ../../../lts/proceduralTextures/dist/perlinNoise/perlinNoiseProceduralTexture.fragment.js ***!
1087
- \*************************************************************************************************/
965
+ /***/ "../../../dev/proceduralTextures/src/perlinNoise/perlinNoiseProceduralTexture.fragment.ts":
966
+ /*!************************************************************************************************!*\
967
+ !*** ../../../dev/proceduralTextures/src/perlinNoise/perlinNoiseProceduralTexture.fragment.ts ***!
968
+ \************************************************************************************************/
1088
969
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1089
970
 
1090
971
  __webpack_require__.r(__webpack_exports__);
1091
972
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1092
973
  /* harmony export */ perlinNoiseProceduralTexturePixelShader: () => (/* binding */ perlinNoiseProceduralTexturePixelShader)
1093
974
  /* harmony export */ });
1094
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
1095
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
975
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators");
976
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
1096
977
  // Do not edit.
1097
978
 
1098
- var name = "perlinNoiseProceduralTexturePixelShader";
1099
- var shader = "precision highp float;uniform float size;uniform float time;uniform float translationSpeed;varying vec2 vUV;float r(float n)\n{return fract(cos(n*89.42)*343.42);}\nvec2 r(vec2 n)\n{return vec2(r(n.x*23.62-300.0+n.y*34.35),r(n.x*45.13+256.0+n.y*38.89)); }\nfloat worley(vec2 n,float s)\n{float dis=1.0;for(int x=-1; x<=1; x++)\n{for(int y=-1; y<=1; y++)\n{vec2 p=floor(n/s)+vec2(x,y);float d=length(r(p)+vec2(x,y)-fract(n/s));if (dis>d)\ndis=d;}}\nreturn 1.0-dis;}\nvec3 hash33(vec3 p3)\n{p3=fract(p3*vec3(0.1031,0.11369,0.13787));p3+=dot(p3,p3.yxz+19.19);return -1.0+2.0*fract(vec3((p3.x+p3.y)*p3.z,(p3.x+p3.z)*p3.y,(p3.y+p3.z)*p3.x));}\nfloat perlinNoise(vec3 p)\n{vec3 pi=floor(p);vec3 pf=p-pi;vec3 w=pf*pf*(3.0-2.0*pf);return mix(\nmix(\nmix(\ndot(pf-vec3(0,0,0),hash33(pi+vec3(0,0,0))),\ndot(pf-vec3(1,0,0),hash33(pi+vec3(1,0,0))),w.x\n),mix(\ndot(pf-vec3(0,0,1),hash33(pi+vec3(0,0,1))),\ndot(pf-vec3(1,0,1),hash33(pi+vec3(1,0,1))),w.x\n),w.z\n),mix(\nmix(\ndot(pf-vec3(0,1,0),hash33(pi+vec3(0,1,0))),\ndot(pf-vec3(1,1,0),hash33(pi+vec3(1,1,0))),w.x\n),mix(\ndot(pf-vec3(0,1,1),hash33(pi+vec3(0,1,1))),\ndot(pf-vec3(1,1,1),hash33(pi+vec3(1,1,1))),w.x\n),w.z\n),w.y\n);}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{vec2 uv=gl_FragCoord.xy+translationSpeed;float dis=(\n1.0+perlinNoise(vec3(uv/vec2(size,size),time*0.05)*8.0))\n* (1.0+(worley(uv,32.0)+ 0.5*worley(2.0*uv,32.0)+0.25*worley(4.0*uv,32.0))\n);gl_FragColor=vec4(vec3(dis/4.0),1.0);}\n";
979
+ const name = "perlinNoiseProceduralTexturePixelShader";
980
+ const shader = `precision highp float;uniform float size;uniform float time;uniform float translationSpeed;varying vec2 vUV;float r(float n)
981
+ {return fract(cos(n*89.42)*343.42);}
982
+ vec2 r(vec2 n)
983
+ {return vec2(r(n.x*23.62-300.0+n.y*34.35),r(n.x*45.13+256.0+n.y*38.89)); }
984
+ float worley(vec2 n,float s)
985
+ {float dis=1.0;for(int x=-1; x<=1; x++)
986
+ {for(int y=-1; y<=1; y++)
987
+ {vec2 p=floor(n/s)+vec2(x,y);float d=length(r(p)+vec2(x,y)-fract(n/s));if (dis>d)
988
+ dis=d;}}
989
+ return 1.0-dis;}
990
+ vec3 hash33(vec3 p3)
991
+ {p3=fract(p3*vec3(0.1031,0.11369,0.13787));p3+=dot(p3,p3.yxz+19.19);return -1.0+2.0*fract(vec3((p3.x+p3.y)*p3.z,(p3.x+p3.z)*p3.y,(p3.y+p3.z)*p3.x));}
992
+ float perlinNoise(vec3 p)
993
+ {vec3 pi=floor(p);vec3 pf=p-pi;vec3 w=pf*pf*(3.0-2.0*pf);return mix(
994
+ mix(
995
+ mix(
996
+ dot(pf-vec3(0,0,0),hash33(pi+vec3(0,0,0))),
997
+ dot(pf-vec3(1,0,0),hash33(pi+vec3(1,0,0))),w.x
998
+ ),mix(
999
+ dot(pf-vec3(0,0,1),hash33(pi+vec3(0,0,1))),
1000
+ dot(pf-vec3(1,0,1),hash33(pi+vec3(1,0,1))),w.x
1001
+ ),w.z
1002
+ ),mix(
1003
+ mix(
1004
+ dot(pf-vec3(0,1,0),hash33(pi+vec3(0,1,0))),
1005
+ dot(pf-vec3(1,1,0),hash33(pi+vec3(1,1,0))),w.x
1006
+ ),mix(
1007
+ dot(pf-vec3(0,1,1),hash33(pi+vec3(0,1,1))),
1008
+ dot(pf-vec3(1,1,1),hash33(pi+vec3(1,1,1))),w.x
1009
+ ),w.z
1010
+ ),w.y
1011
+ );}
1012
+ #define CUSTOM_FRAGMENT_DEFINITIONS
1013
+ void main(void)
1014
+ {vec2 uv=gl_FragCoord.xy+translationSpeed;float dis=(
1015
+ 1.0+perlinNoise(vec3(uv/vec2(size,size),time*0.05)*8.0))
1016
+ * (1.0+(worley(uv,32.0)+ 0.5*worley(2.0*uv,32.0)+0.25*worley(4.0*uv,32.0))
1017
+ );gl_FragColor=vec4(vec3(dis/4.0),1.0);}
1018
+ `;
1100
1019
  // Sideeffect
1101
- core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
1020
+ babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
1102
1021
  /** @internal */
1103
- var perlinNoiseProceduralTexturePixelShader = { name: name, shader: shader };
1022
+ const perlinNoiseProceduralTexturePixelShader = { name, shader };
1104
1023
 
1105
1024
 
1106
1025
  /***/ }),
1107
1026
 
1108
- /***/ "../../../lts/proceduralTextures/dist/perlinNoise/perlinNoiseProceduralTexture.js":
1109
- /*!****************************************************************************************!*\
1110
- !*** ../../../lts/proceduralTextures/dist/perlinNoise/perlinNoiseProceduralTexture.js ***!
1111
- \****************************************************************************************/
1027
+ /***/ "../../../dev/proceduralTextures/src/perlinNoise/perlinNoiseProceduralTexture.ts":
1028
+ /*!***************************************************************************************!*\
1029
+ !*** ../../../dev/proceduralTextures/src/perlinNoise/perlinNoiseProceduralTexture.ts ***!
1030
+ \***************************************************************************************/
1112
1031
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1113
1032
 
1114
1033
  __webpack_require__.r(__webpack_exports__);
@@ -1116,54 +1035,51 @@ __webpack_require__.r(__webpack_exports__);
1116
1035
  /* harmony export */ PerlinNoiseProceduralTexture: () => (/* binding */ PerlinNoiseProceduralTexture)
1117
1036
  /* harmony export */ });
1118
1037
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.mjs");
1119
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Misc/typeStore */ "core/Misc/decorators");
1120
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
1121
- /* harmony import */ var _perlinNoiseProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./perlinNoiseProceduralTexture.fragment */ "../../../lts/proceduralTextures/dist/perlinNoise/perlinNoiseProceduralTexture.fragment.js");
1038
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/decorators");
1039
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
1040
+ /* harmony import */ var _perlinNoiseProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./perlinNoiseProceduralTexture.fragment */ "../../../dev/proceduralTextures/src/perlinNoise/perlinNoiseProceduralTexture.fragment.ts");
1122
1041
 
1123
1042
 
1124
1043
 
1125
1044
 
1126
1045
 
1127
- var PerlinNoiseProceduralTexture = /** @class */ (function (_super) {
1128
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(PerlinNoiseProceduralTexture, _super);
1129
- function PerlinNoiseProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
1130
- if (scene === void 0) { scene = null; }
1131
- var _this = _super.call(this, name, size, "perlinNoiseProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
1132
- _this.time = 0.0;
1133
- _this.timeScale = 1.0;
1134
- _this.translationSpeed = 1.0;
1135
- _this._currentTranslation = 0;
1136
- _this.updateShaderUniforms();
1137
- return _this;
1046
+ class PerlinNoiseProceduralTexture extends babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture {
1047
+ constructor(name, size, scene = null, fallbackTexture, generateMipMaps) {
1048
+ super(name, size, "perlinNoiseProceduralTexture", scene, fallbackTexture, generateMipMaps);
1049
+ this.time = 0.0;
1050
+ this.timeScale = 1.0;
1051
+ this.translationSpeed = 1.0;
1052
+ this._currentTranslation = 0;
1053
+ this.updateShaderUniforms();
1138
1054
  }
1139
- PerlinNoiseProceduralTexture.prototype.updateShaderUniforms = function () {
1055
+ updateShaderUniforms() {
1140
1056
  this.setFloat("size", this.getRenderSize());
1141
- var scene = this.getScene();
1057
+ const scene = this.getScene();
1142
1058
  if (!scene) {
1143
1059
  return;
1144
1060
  }
1145
- var deltaTime = scene.getEngine().getDeltaTime();
1061
+ const deltaTime = scene.getEngine().getDeltaTime();
1146
1062
  this.time += deltaTime;
1147
1063
  this.setFloat("time", (this.time * this.timeScale) / 1000);
1148
1064
  this._currentTranslation += (deltaTime * this.translationSpeed) / 1000.0;
1149
1065
  this.setFloat("translationSpeed", this._currentTranslation);
1150
- };
1151
- PerlinNoiseProceduralTexture.prototype.render = function (useCameraPostProcess) {
1066
+ }
1067
+ render(useCameraPostProcess) {
1152
1068
  this.updateShaderUniforms();
1153
- _super.prototype.render.call(this, useCameraPostProcess);
1154
- };
1155
- PerlinNoiseProceduralTexture.prototype.resize = function (size, generateMipMaps) {
1156
- _super.prototype.resize.call(this, size, generateMipMaps);
1157
- };
1069
+ super.render(useCameraPostProcess);
1070
+ }
1071
+ resize(size, generateMipMaps) {
1072
+ super.resize(size, generateMipMaps);
1073
+ }
1158
1074
  /**
1159
1075
  * Serializes this perlin noise procedural texture
1160
1076
  * @returns a serialized perlin noise procedural texture object
1161
1077
  */
1162
- PerlinNoiseProceduralTexture.prototype.serialize = function () {
1163
- var serializationObject = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
1078
+ serialize() {
1079
+ const serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, super.serialize());
1164
1080
  serializationObject.customType = "BABYLON.PerlinNoiseProceduralTexture";
1165
1081
  return serializationObject;
1166
- };
1082
+ }
1167
1083
  /**
1168
1084
  * Creates a Perlin Noise Procedural Texture from parsed perlin noise procedural texture data
1169
1085
  * @param parsedTexture defines parsed texture data
@@ -1171,70 +1087,79 @@ var PerlinNoiseProceduralTexture = /** @class */ (function (_super) {
1171
1087
  * @param rootUrl defines the root URL containing perlin noise procedural texture information
1172
1088
  * @returns a parsed Perlin Noise Procedural Texture
1173
1089
  */
1174
- PerlinNoiseProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
1175
- var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(function () { return new PerlinNoiseProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
1090
+ static Parse(parsedTexture, scene, rootUrl) {
1091
+ const texture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(() => new PerlinNoiseProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), parsedTexture, scene, rootUrl);
1176
1092
  return texture;
1177
- };
1178
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1179
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1180
- ], PerlinNoiseProceduralTexture.prototype, "time", void 0);
1181
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1182
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1183
- ], PerlinNoiseProceduralTexture.prototype, "timeScale", void 0);
1184
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1185
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1186
- ], PerlinNoiseProceduralTexture.prototype, "translationSpeed", void 0);
1187
- return PerlinNoiseProceduralTexture;
1188
- }(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture));
1189
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.PerlinNoiseProceduralTexture", PerlinNoiseProceduralTexture);
1093
+ }
1094
+ }
1095
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1096
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1097
+ ], PerlinNoiseProceduralTexture.prototype, "time", void 0);
1098
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1099
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1100
+ ], PerlinNoiseProceduralTexture.prototype, "timeScale", void 0);
1101
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1102
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1103
+ ], PerlinNoiseProceduralTexture.prototype, "translationSpeed", void 0);
1104
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.PerlinNoiseProceduralTexture", PerlinNoiseProceduralTexture);
1190
1105
 
1191
1106
 
1192
1107
  /***/ }),
1193
1108
 
1194
- /***/ "../../../lts/proceduralTextures/dist/road/index.js":
1195
- /*!**********************************************************!*\
1196
- !*** ../../../lts/proceduralTextures/dist/road/index.js ***!
1197
- \**********************************************************/
1109
+ /***/ "../../../dev/proceduralTextures/src/road/index.ts":
1110
+ /*!*********************************************************!*\
1111
+ !*** ../../../dev/proceduralTextures/src/road/index.ts ***!
1112
+ \*********************************************************/
1198
1113
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1199
1114
 
1200
1115
  __webpack_require__.r(__webpack_exports__);
1201
1116
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1202
1117
  /* harmony export */ RoadProceduralTexture: () => (/* reexport safe */ _roadProceduralTexture__WEBPACK_IMPORTED_MODULE_0__.RoadProceduralTexture)
1203
1118
  /* harmony export */ });
1204
- /* harmony import */ var _roadProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./roadProceduralTexture */ "../../../lts/proceduralTextures/dist/road/roadProceduralTexture.js");
1119
+ /* harmony import */ var _roadProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./roadProceduralTexture */ "../../../dev/proceduralTextures/src/road/roadProceduralTexture.ts");
1205
1120
 
1206
1121
 
1207
1122
 
1208
1123
  /***/ }),
1209
1124
 
1210
- /***/ "../../../lts/proceduralTextures/dist/road/roadProceduralTexture.fragment.js":
1211
- /*!***********************************************************************************!*\
1212
- !*** ../../../lts/proceduralTextures/dist/road/roadProceduralTexture.fragment.js ***!
1213
- \***********************************************************************************/
1125
+ /***/ "../../../dev/proceduralTextures/src/road/roadProceduralTexture.fragment.ts":
1126
+ /*!**********************************************************************************!*\
1127
+ !*** ../../../dev/proceduralTextures/src/road/roadProceduralTexture.fragment.ts ***!
1128
+ \**********************************************************************************/
1214
1129
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1215
1130
 
1216
1131
  __webpack_require__.r(__webpack_exports__);
1217
1132
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1218
1133
  /* harmony export */ roadProceduralTexturePixelShader: () => (/* binding */ roadProceduralTexturePixelShader)
1219
1134
  /* harmony export */ });
1220
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
1221
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
1135
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators");
1136
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
1222
1137
  // Do not edit.
1223
1138
 
1224
- var name = "roadProceduralTexturePixelShader";
1225
- var shader = "precision highp float;varying vec2 vUV; \nuniform vec3 roadColor;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}\nfloat noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}\nfloat fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}\nreturn total;}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nfloat ratioy=mod(gl_FragCoord.y*100.0 ,fbm(vUV*2.0));vec3 color=roadColor*ratioy;gl_FragColor=vec4(color,1.0);\n#define CUSTOM_FRAGMENT_MAIN_END\n}";
1139
+ const name = "roadProceduralTexturePixelShader";
1140
+ const shader = `precision highp float;varying vec2 vUV;
1141
+ uniform vec3 roadColor;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}
1142
+ float noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}
1143
+ float fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}
1144
+ return total;}
1145
+ #define CUSTOM_FRAGMENT_DEFINITIONS
1146
+ void main(void) {
1147
+ #define CUSTOM_FRAGMENT_MAIN_BEGIN
1148
+ float ratioy=mod(gl_FragCoord.y*100.0 ,fbm(vUV*2.0));vec3 color=roadColor*ratioy;gl_FragColor=vec4(color,1.0);
1149
+ #define CUSTOM_FRAGMENT_MAIN_END
1150
+ }`;
1226
1151
  // Sideeffect
1227
- core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
1152
+ babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
1228
1153
  /** @internal */
1229
- var roadProceduralTexturePixelShader = { name: name, shader: shader };
1154
+ const roadProceduralTexturePixelShader = { name, shader };
1230
1155
 
1231
1156
 
1232
1157
  /***/ }),
1233
1158
 
1234
- /***/ "../../../lts/proceduralTextures/dist/road/roadProceduralTexture.js":
1235
- /*!**************************************************************************!*\
1236
- !*** ../../../lts/proceduralTextures/dist/road/roadProceduralTexture.js ***!
1237
- \**************************************************************************/
1159
+ /***/ "../../../dev/proceduralTextures/src/road/roadProceduralTexture.ts":
1160
+ /*!*************************************************************************!*\
1161
+ !*** ../../../dev/proceduralTextures/src/road/roadProceduralTexture.ts ***!
1162
+ \*************************************************************************/
1238
1163
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1239
1164
 
1240
1165
  __webpack_require__.r(__webpack_exports__);
@@ -1242,47 +1167,40 @@ __webpack_require__.r(__webpack_exports__);
1242
1167
  /* harmony export */ RoadProceduralTexture: () => (/* binding */ RoadProceduralTexture)
1243
1168
  /* harmony export */ });
1244
1169
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.mjs");
1245
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Misc/typeStore */ "core/Misc/decorators");
1246
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
1247
- /* harmony import */ var _roadProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./roadProceduralTexture.fragment */ "../../../lts/proceduralTextures/dist/road/roadProceduralTexture.fragment.js");
1170
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/decorators");
1171
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
1172
+ /* harmony import */ var _roadProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./roadProceduralTexture.fragment */ "../../../dev/proceduralTextures/src/road/roadProceduralTexture.fragment.ts");
1248
1173
 
1249
1174
 
1250
1175
 
1251
1176
 
1252
1177
 
1253
1178
 
1254
- var RoadProceduralTexture = /** @class */ (function (_super) {
1255
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(RoadProceduralTexture, _super);
1256
- function RoadProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
1257
- if (scene === void 0) { scene = null; }
1258
- var _this = _super.call(this, name, size, "roadProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
1259
- _this._roadColor = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.53, 0.53, 0.53);
1260
- _this.updateShaderUniforms();
1261
- return _this;
1179
+ class RoadProceduralTexture extends babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture {
1180
+ constructor(name, size, scene = null, fallbackTexture, generateMipMaps) {
1181
+ super(name, size, "roadProceduralTexture", scene, fallbackTexture, generateMipMaps);
1182
+ this._roadColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.53, 0.53, 0.53);
1183
+ this.updateShaderUniforms();
1262
1184
  }
1263
- RoadProceduralTexture.prototype.updateShaderUniforms = function () {
1185
+ updateShaderUniforms() {
1264
1186
  this.setColor3("roadColor", this._roadColor);
1265
- };
1266
- Object.defineProperty(RoadProceduralTexture.prototype, "roadColor", {
1267
- get: function () {
1268
- return this._roadColor;
1269
- },
1270
- set: function (value) {
1271
- this._roadColor = value;
1272
- this.updateShaderUniforms();
1273
- },
1274
- enumerable: false,
1275
- configurable: true
1276
- });
1187
+ }
1188
+ get roadColor() {
1189
+ return this._roadColor;
1190
+ }
1191
+ set roadColor(value) {
1192
+ this._roadColor = value;
1193
+ this.updateShaderUniforms();
1194
+ }
1277
1195
  /**
1278
1196
  * Serializes this road procedural texture
1279
1197
  * @returns a serialized road procedural texture object
1280
1198
  */
1281
- RoadProceduralTexture.prototype.serialize = function () {
1282
- var serializationObject = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
1199
+ serialize() {
1200
+ const serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, super.serialize());
1283
1201
  serializationObject.customType = "BABYLON.RoadProceduralTexture";
1284
1202
  return serializationObject;
1285
- };
1203
+ }
1286
1204
  /**
1287
1205
  * Creates a Road Procedural Texture from parsed road procedural texture data
1288
1206
  * @param parsedTexture defines parsed texture data
@@ -1290,64 +1208,78 @@ var RoadProceduralTexture = /** @class */ (function (_super) {
1290
1208
  * @param rootUrl defines the root URL containing road procedural texture information
1291
1209
  * @returns a parsed Road Procedural Texture
1292
1210
  */
1293
- RoadProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
1294
- var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(function () { return new RoadProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
1211
+ static Parse(parsedTexture, scene, rootUrl) {
1212
+ const texture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(() => new RoadProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), parsedTexture, scene, rootUrl);
1295
1213
  return texture;
1296
- };
1297
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1298
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor3)()
1299
- ], RoadProceduralTexture.prototype, "roadColor", null);
1300
- return RoadProceduralTexture;
1301
- }(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture));
1302
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.RoadProceduralTexture", RoadProceduralTexture);
1214
+ }
1215
+ }
1216
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1217
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor3)()
1218
+ ], RoadProceduralTexture.prototype, "roadColor", null);
1219
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.RoadProceduralTexture", RoadProceduralTexture);
1303
1220
 
1304
1221
 
1305
1222
  /***/ }),
1306
1223
 
1307
- /***/ "../../../lts/proceduralTextures/dist/starfield/index.js":
1308
- /*!***************************************************************!*\
1309
- !*** ../../../lts/proceduralTextures/dist/starfield/index.js ***!
1310
- \***************************************************************/
1224
+ /***/ "../../../dev/proceduralTextures/src/starfield/index.ts":
1225
+ /*!**************************************************************!*\
1226
+ !*** ../../../dev/proceduralTextures/src/starfield/index.ts ***!
1227
+ \**************************************************************/
1311
1228
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1312
1229
 
1313
1230
  __webpack_require__.r(__webpack_exports__);
1314
1231
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1315
1232
  /* harmony export */ StarfieldProceduralTexture: () => (/* reexport safe */ _starfieldProceduralTexture__WEBPACK_IMPORTED_MODULE_0__.StarfieldProceduralTexture)
1316
1233
  /* harmony export */ });
1317
- /* harmony import */ var _starfieldProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./starfieldProceduralTexture */ "../../../lts/proceduralTextures/dist/starfield/starfieldProceduralTexture.js");
1234
+ /* harmony import */ var _starfieldProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./starfieldProceduralTexture */ "../../../dev/proceduralTextures/src/starfield/starfieldProceduralTexture.ts");
1318
1235
 
1319
1236
 
1320
1237
 
1321
1238
  /***/ }),
1322
1239
 
1323
- /***/ "../../../lts/proceduralTextures/dist/starfield/starfieldProceduralTexture.fragment.js":
1324
- /*!*********************************************************************************************!*\
1325
- !*** ../../../lts/proceduralTextures/dist/starfield/starfieldProceduralTexture.fragment.js ***!
1326
- \*********************************************************************************************/
1240
+ /***/ "../../../dev/proceduralTextures/src/starfield/starfieldProceduralTexture.fragment.ts":
1241
+ /*!********************************************************************************************!*\
1242
+ !*** ../../../dev/proceduralTextures/src/starfield/starfieldProceduralTexture.fragment.ts ***!
1243
+ \********************************************************************************************/
1327
1244
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1328
1245
 
1329
1246
  __webpack_require__.r(__webpack_exports__);
1330
1247
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1331
1248
  /* harmony export */ starfieldProceduralTexturePixelShader: () => (/* binding */ starfieldProceduralTexturePixelShader)
1332
1249
  /* harmony export */ });
1333
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
1334
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
1250
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators");
1251
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
1335
1252
  // Do not edit.
1336
1253
 
1337
- var name = "starfieldProceduralTexturePixelShader";
1338
- var shader = "precision highp float;\n#define volsteps 20\n#define iterations 15\nvarying vec2 vPosition;varying vec2 vUV;uniform float time;uniform float alpha;uniform float beta;uniform float zoom;uniform float formuparam;uniform float stepsize;uniform float tile;uniform float brightness;uniform float darkmatter;uniform float distfading;uniform float saturation;void main()\n{vec3 dir=vec3(vUV*zoom,1.);float localTime=time*0.0001;mat2 rot1=mat2(cos(alpha),sin(alpha),-sin(alpha),cos(alpha));mat2 rot2=mat2(cos(beta),sin(beta),-sin(beta),cos(beta));dir.xz*=rot1;dir.xy*=rot2;vec3 from_=vec3(1.,.5,0.5);from_+=vec3(-2.,localTime*2.,localTime);from_.xz*=rot1;from_.xy*=rot2;float s=0.1,fade=1.;vec3 v=vec3(0.);for (int r=0; r<volsteps; r++) {vec3 p=from_+s*dir*.5;p=abs(vec3(tile)-mod(p,vec3(tile*2.))); \nfloat pa,a=pa=0.;for (int i=0; i<iterations; i++) {p=abs(p)/dot(p,p)-formuparam; \na+=abs(length(p)-pa); \npa=length(p);}\nfloat dm=max(0.,darkmatter-a*a*.001); \na*=a*a; \nif (r>6) fade*=1.-dm; \nv+=fade;v+=vec3(s,s*s,s*s*s*s)*a*brightness*fade; \nfade*=distfading; \ns+=stepsize;}\nv=mix(vec3(length(v)),v,saturation); \ngl_FragColor=vec4(v*.01,1.);}";
1254
+ const name = "starfieldProceduralTexturePixelShader";
1255
+ const shader = `precision highp float;
1256
+ #define volsteps 20
1257
+ #define iterations 15
1258
+ varying vec2 vPosition;varying vec2 vUV;uniform float time;uniform float alpha;uniform float beta;uniform float zoom;uniform float formuparam;uniform float stepsize;uniform float tile;uniform float brightness;uniform float darkmatter;uniform float distfading;uniform float saturation;void main()
1259
+ {vec3 dir=vec3(vUV*zoom,1.);float localTime=time*0.0001;mat2 rot1=mat2(cos(alpha),sin(alpha),-sin(alpha),cos(alpha));mat2 rot2=mat2(cos(beta),sin(beta),-sin(beta),cos(beta));dir.xz*=rot1;dir.xy*=rot2;vec3 from_=vec3(1.,.5,0.5);from_+=vec3(-2.,localTime*2.,localTime);from_.xz*=rot1;from_.xy*=rot2;float s=0.1,fade=1.;vec3 v=vec3(0.);for (int r=0; r<volsteps; r++) {vec3 p=from_+s*dir*.5;p=abs(vec3(tile)-mod(p,vec3(tile*2.)));
1260
+ float pa,a=pa=0.;for (int i=0; i<iterations; i++) {p=abs(p)/dot(p,p)-formuparam;
1261
+ a+=abs(length(p)-pa);
1262
+ pa=length(p);}
1263
+ float dm=max(0.,darkmatter-a*a*.001);
1264
+ a*=a*a;
1265
+ if (r>6) fade*=1.-dm;
1266
+ v+=fade;v+=vec3(s,s*s,s*s*s*s)*a*brightness*fade;
1267
+ fade*=distfading;
1268
+ s+=stepsize;}
1269
+ v=mix(vec3(length(v)),v,saturation);
1270
+ gl_FragColor=vec4(v*.01,1.);}`;
1339
1271
  // Sideeffect
1340
- core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
1272
+ babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
1341
1273
  /** @internal */
1342
- var starfieldProceduralTexturePixelShader = { name: name, shader: shader };
1274
+ const starfieldProceduralTexturePixelShader = { name, shader };
1343
1275
 
1344
1276
 
1345
1277
  /***/ }),
1346
1278
 
1347
- /***/ "../../../lts/proceduralTextures/dist/starfield/starfieldProceduralTexture.js":
1348
- /*!************************************************************************************!*\
1349
- !*** ../../../lts/proceduralTextures/dist/starfield/starfieldProceduralTexture.js ***!
1350
- \************************************************************************************/
1279
+ /***/ "../../../dev/proceduralTextures/src/starfield/starfieldProceduralTexture.ts":
1280
+ /*!***********************************************************************************!*\
1281
+ !*** ../../../dev/proceduralTextures/src/starfield/starfieldProceduralTexture.ts ***!
1282
+ \***********************************************************************************/
1351
1283
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1352
1284
 
1353
1285
  __webpack_require__.r(__webpack_exports__);
@@ -1355,34 +1287,31 @@ __webpack_require__.r(__webpack_exports__);
1355
1287
  /* harmony export */ StarfieldProceduralTexture: () => (/* binding */ StarfieldProceduralTexture)
1356
1288
  /* harmony export */ });
1357
1289
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.mjs");
1358
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Misc/typeStore */ "core/Misc/decorators");
1359
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
1360
- /* harmony import */ var _starfieldProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./starfieldProceduralTexture.fragment */ "../../../lts/proceduralTextures/dist/starfield/starfieldProceduralTexture.fragment.js");
1361
-
1362
-
1363
-
1364
-
1365
-
1366
- var StarfieldProceduralTexture = /** @class */ (function (_super) {
1367
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(StarfieldProceduralTexture, _super);
1368
- function StarfieldProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
1369
- if (scene === void 0) { scene = null; }
1370
- var _this = _super.call(this, name, size, "starfieldProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
1371
- _this._time = 1;
1372
- _this._alpha = 0.5;
1373
- _this._beta = 0.8;
1374
- _this._zoom = 0.8;
1375
- _this._formuparam = 0.53;
1376
- _this._stepsize = 0.1;
1377
- _this._tile = 0.85;
1378
- _this._brightness = 0.0015;
1379
- _this._darkmatter = 0.4;
1380
- _this._distfading = 0.73;
1381
- _this._saturation = 0.85;
1382
- _this.updateShaderUniforms();
1383
- return _this;
1384
- }
1385
- StarfieldProceduralTexture.prototype.updateShaderUniforms = function () {
1290
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/decorators");
1291
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
1292
+ /* harmony import */ var _starfieldProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./starfieldProceduralTexture.fragment */ "../../../dev/proceduralTextures/src/starfield/starfieldProceduralTexture.fragment.ts");
1293
+
1294
+
1295
+
1296
+
1297
+
1298
+ class StarfieldProceduralTexture extends babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture {
1299
+ constructor(name, size, scene = null, fallbackTexture, generateMipMaps) {
1300
+ super(name, size, "starfieldProceduralTexture", scene, fallbackTexture, generateMipMaps);
1301
+ this._time = 1;
1302
+ this._alpha = 0.5;
1303
+ this._beta = 0.8;
1304
+ this._zoom = 0.8;
1305
+ this._formuparam = 0.53;
1306
+ this._stepsize = 0.1;
1307
+ this._tile = 0.85;
1308
+ this._brightness = 0.0015;
1309
+ this._darkmatter = 0.4;
1310
+ this._distfading = 0.73;
1311
+ this._saturation = 0.85;
1312
+ this.updateShaderUniforms();
1313
+ }
1314
+ updateShaderUniforms() {
1386
1315
  this.setFloat("time", this._time);
1387
1316
  this.setFloat("alpha", this._alpha);
1388
1317
  this.setFloat("beta", this._beta);
@@ -1394,137 +1323,93 @@ var StarfieldProceduralTexture = /** @class */ (function (_super) {
1394
1323
  this.setFloat("darkmatter", this._darkmatter);
1395
1324
  this.setFloat("distfading", this._distfading);
1396
1325
  this.setFloat("saturation", this._saturation);
1397
- };
1398
- Object.defineProperty(StarfieldProceduralTexture.prototype, "time", {
1399
- get: function () {
1400
- return this._time;
1401
- },
1402
- set: function (value) {
1403
- this._time = value;
1404
- this.updateShaderUniforms();
1405
- },
1406
- enumerable: false,
1407
- configurable: true
1408
- });
1409
- Object.defineProperty(StarfieldProceduralTexture.prototype, "alpha", {
1410
- get: function () {
1411
- return this._alpha;
1412
- },
1413
- set: function (value) {
1414
- this._alpha = value;
1415
- this.updateShaderUniforms();
1416
- },
1417
- enumerable: false,
1418
- configurable: true
1419
- });
1420
- Object.defineProperty(StarfieldProceduralTexture.prototype, "beta", {
1421
- get: function () {
1422
- return this._beta;
1423
- },
1424
- set: function (value) {
1425
- this._beta = value;
1426
- this.updateShaderUniforms();
1427
- },
1428
- enumerable: false,
1429
- configurable: true
1430
- });
1431
- Object.defineProperty(StarfieldProceduralTexture.prototype, "formuparam", {
1432
- get: function () {
1433
- return this._formuparam;
1434
- },
1435
- set: function (value) {
1436
- this._formuparam = value;
1437
- this.updateShaderUniforms();
1438
- },
1439
- enumerable: false,
1440
- configurable: true
1441
- });
1442
- Object.defineProperty(StarfieldProceduralTexture.prototype, "stepsize", {
1443
- get: function () {
1444
- return this._stepsize;
1445
- },
1446
- set: function (value) {
1447
- this._stepsize = value;
1448
- this.updateShaderUniforms();
1449
- },
1450
- enumerable: false,
1451
- configurable: true
1452
- });
1453
- Object.defineProperty(StarfieldProceduralTexture.prototype, "zoom", {
1454
- get: function () {
1455
- return this._zoom;
1456
- },
1457
- set: function (value) {
1458
- this._zoom = value;
1459
- this.updateShaderUniforms();
1460
- },
1461
- enumerable: false,
1462
- configurable: true
1463
- });
1464
- Object.defineProperty(StarfieldProceduralTexture.prototype, "tile", {
1465
- get: function () {
1466
- return this._tile;
1467
- },
1468
- set: function (value) {
1469
- this._tile = value;
1470
- this.updateShaderUniforms();
1471
- },
1472
- enumerable: false,
1473
- configurable: true
1474
- });
1475
- Object.defineProperty(StarfieldProceduralTexture.prototype, "brightness", {
1476
- get: function () {
1477
- return this._brightness;
1478
- },
1479
- set: function (value) {
1480
- this._brightness = value;
1481
- this.updateShaderUniforms();
1482
- },
1483
- enumerable: false,
1484
- configurable: true
1485
- });
1486
- Object.defineProperty(StarfieldProceduralTexture.prototype, "darkmatter", {
1487
- get: function () {
1488
- return this._darkmatter;
1489
- },
1490
- set: function (value) {
1491
- this._darkmatter = value;
1492
- this.updateShaderUniforms();
1493
- },
1494
- enumerable: false,
1495
- configurable: true
1496
- });
1497
- Object.defineProperty(StarfieldProceduralTexture.prototype, "distfading", {
1498
- get: function () {
1499
- return this._distfading;
1500
- },
1501
- set: function (value) {
1502
- this._distfading = value;
1503
- this.updateShaderUniforms();
1504
- },
1505
- enumerable: false,
1506
- configurable: true
1507
- });
1508
- Object.defineProperty(StarfieldProceduralTexture.prototype, "saturation", {
1509
- get: function () {
1510
- return this._saturation;
1511
- },
1512
- set: function (value) {
1513
- this._saturation = value;
1514
- this.updateShaderUniforms();
1515
- },
1516
- enumerable: false,
1517
- configurable: true
1518
- });
1326
+ }
1327
+ get time() {
1328
+ return this._time;
1329
+ }
1330
+ set time(value) {
1331
+ this._time = value;
1332
+ this.updateShaderUniforms();
1333
+ }
1334
+ get alpha() {
1335
+ return this._alpha;
1336
+ }
1337
+ set alpha(value) {
1338
+ this._alpha = value;
1339
+ this.updateShaderUniforms();
1340
+ }
1341
+ get beta() {
1342
+ return this._beta;
1343
+ }
1344
+ set beta(value) {
1345
+ this._beta = value;
1346
+ this.updateShaderUniforms();
1347
+ }
1348
+ get formuparam() {
1349
+ return this._formuparam;
1350
+ }
1351
+ set formuparam(value) {
1352
+ this._formuparam = value;
1353
+ this.updateShaderUniforms();
1354
+ }
1355
+ get stepsize() {
1356
+ return this._stepsize;
1357
+ }
1358
+ set stepsize(value) {
1359
+ this._stepsize = value;
1360
+ this.updateShaderUniforms();
1361
+ }
1362
+ get zoom() {
1363
+ return this._zoom;
1364
+ }
1365
+ set zoom(value) {
1366
+ this._zoom = value;
1367
+ this.updateShaderUniforms();
1368
+ }
1369
+ get tile() {
1370
+ return this._tile;
1371
+ }
1372
+ set tile(value) {
1373
+ this._tile = value;
1374
+ this.updateShaderUniforms();
1375
+ }
1376
+ get brightness() {
1377
+ return this._brightness;
1378
+ }
1379
+ set brightness(value) {
1380
+ this._brightness = value;
1381
+ this.updateShaderUniforms();
1382
+ }
1383
+ get darkmatter() {
1384
+ return this._darkmatter;
1385
+ }
1386
+ set darkmatter(value) {
1387
+ this._darkmatter = value;
1388
+ this.updateShaderUniforms();
1389
+ }
1390
+ get distfading() {
1391
+ return this._distfading;
1392
+ }
1393
+ set distfading(value) {
1394
+ this._distfading = value;
1395
+ this.updateShaderUniforms();
1396
+ }
1397
+ get saturation() {
1398
+ return this._saturation;
1399
+ }
1400
+ set saturation(value) {
1401
+ this._saturation = value;
1402
+ this.updateShaderUniforms();
1403
+ }
1519
1404
  /**
1520
1405
  * Serializes this starfield procedural texture
1521
1406
  * @returns a serialized starfield procedural texture object
1522
1407
  */
1523
- StarfieldProceduralTexture.prototype.serialize = function () {
1524
- var serializationObject = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
1408
+ serialize() {
1409
+ const serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, super.serialize());
1525
1410
  serializationObject.customType = "BABYLON.StarfieldProceduralTexture";
1526
1411
  return serializationObject;
1527
- };
1412
+ }
1528
1413
  /**
1529
1414
  * Creates a Starfield Procedural Texture from parsed startfield procedural texture data
1530
1415
  * @param parsedTexture defines parsed texture data
@@ -1532,94 +1417,102 @@ var StarfieldProceduralTexture = /** @class */ (function (_super) {
1532
1417
  * @param rootUrl defines the root URL containing startfield procedural texture information
1533
1418
  * @returns a parsed Starfield Procedural Texture
1534
1419
  */
1535
- StarfieldProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
1536
- var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(function () { return new StarfieldProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
1420
+ static Parse(parsedTexture, scene, rootUrl) {
1421
+ const texture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(() => new StarfieldProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), parsedTexture, scene, rootUrl);
1537
1422
  return texture;
1538
- };
1539
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1540
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1541
- ], StarfieldProceduralTexture.prototype, "time", null);
1542
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1543
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1544
- ], StarfieldProceduralTexture.prototype, "alpha", null);
1545
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1546
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1547
- ], StarfieldProceduralTexture.prototype, "beta", null);
1548
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1549
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1550
- ], StarfieldProceduralTexture.prototype, "formuparam", null);
1551
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1552
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1553
- ], StarfieldProceduralTexture.prototype, "stepsize", null);
1554
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1555
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1556
- ], StarfieldProceduralTexture.prototype, "zoom", null);
1557
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1558
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1559
- ], StarfieldProceduralTexture.prototype, "tile", null);
1560
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1561
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1562
- ], StarfieldProceduralTexture.prototype, "brightness", null);
1563
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1564
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1565
- ], StarfieldProceduralTexture.prototype, "darkmatter", null);
1566
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1567
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1568
- ], StarfieldProceduralTexture.prototype, "distfading", null);
1569
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1570
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1571
- ], StarfieldProceduralTexture.prototype, "saturation", null);
1572
- return StarfieldProceduralTexture;
1573
- }(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture));
1574
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.StarfieldProceduralTexture", StarfieldProceduralTexture);
1423
+ }
1424
+ }
1425
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1426
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1427
+ ], StarfieldProceduralTexture.prototype, "time", null);
1428
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1429
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1430
+ ], StarfieldProceduralTexture.prototype, "alpha", null);
1431
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1432
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1433
+ ], StarfieldProceduralTexture.prototype, "beta", null);
1434
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1435
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1436
+ ], StarfieldProceduralTexture.prototype, "formuparam", null);
1437
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1438
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1439
+ ], StarfieldProceduralTexture.prototype, "stepsize", null);
1440
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1441
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1442
+ ], StarfieldProceduralTexture.prototype, "zoom", null);
1443
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1444
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1445
+ ], StarfieldProceduralTexture.prototype, "tile", null);
1446
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1447
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1448
+ ], StarfieldProceduralTexture.prototype, "brightness", null);
1449
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1450
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1451
+ ], StarfieldProceduralTexture.prototype, "darkmatter", null);
1452
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1453
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1454
+ ], StarfieldProceduralTexture.prototype, "distfading", null);
1455
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1456
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1457
+ ], StarfieldProceduralTexture.prototype, "saturation", null);
1458
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.StarfieldProceduralTexture", StarfieldProceduralTexture);
1575
1459
 
1576
1460
 
1577
1461
  /***/ }),
1578
1462
 
1579
- /***/ "../../../lts/proceduralTextures/dist/wood/index.js":
1580
- /*!**********************************************************!*\
1581
- !*** ../../../lts/proceduralTextures/dist/wood/index.js ***!
1582
- \**********************************************************/
1463
+ /***/ "../../../dev/proceduralTextures/src/wood/index.ts":
1464
+ /*!*********************************************************!*\
1465
+ !*** ../../../dev/proceduralTextures/src/wood/index.ts ***!
1466
+ \*********************************************************/
1583
1467
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1584
1468
 
1585
1469
  __webpack_require__.r(__webpack_exports__);
1586
1470
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1587
1471
  /* harmony export */ WoodProceduralTexture: () => (/* reexport safe */ _woodProceduralTexture__WEBPACK_IMPORTED_MODULE_0__.WoodProceduralTexture)
1588
1472
  /* harmony export */ });
1589
- /* harmony import */ var _woodProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./woodProceduralTexture */ "../../../lts/proceduralTextures/dist/wood/woodProceduralTexture.js");
1473
+ /* harmony import */ var _woodProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./woodProceduralTexture */ "../../../dev/proceduralTextures/src/wood/woodProceduralTexture.ts");
1590
1474
 
1591
1475
 
1592
1476
 
1593
1477
  /***/ }),
1594
1478
 
1595
- /***/ "../../../lts/proceduralTextures/dist/wood/woodProceduralTexture.fragment.js":
1596
- /*!***********************************************************************************!*\
1597
- !*** ../../../lts/proceduralTextures/dist/wood/woodProceduralTexture.fragment.js ***!
1598
- \***********************************************************************************/
1479
+ /***/ "../../../dev/proceduralTextures/src/wood/woodProceduralTexture.fragment.ts":
1480
+ /*!**********************************************************************************!*\
1481
+ !*** ../../../dev/proceduralTextures/src/wood/woodProceduralTexture.fragment.ts ***!
1482
+ \**********************************************************************************/
1599
1483
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1600
1484
 
1601
1485
  __webpack_require__.r(__webpack_exports__);
1602
1486
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1603
1487
  /* harmony export */ woodProceduralTexturePixelShader: () => (/* binding */ woodProceduralTexturePixelShader)
1604
1488
  /* harmony export */ });
1605
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
1606
- /* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
1489
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Engines/shaderStore */ "babylonjs/Misc/decorators");
1490
+ /* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
1607
1491
  // Do not edit.
1608
1492
 
1609
- var name = "woodProceduralTexturePixelShader";
1610
- var shader = "precision highp float;varying vec2 vPosition;varying vec2 vUV;uniform float ampScale;uniform vec3 woodColor;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}\nfloat noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}\nfloat fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}\nreturn total;}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\nfloat ratioy=mod(vUV.x*ampScale,2.0+fbm(vUV*0.8));vec3 wood=woodColor*ratioy;gl_FragColor=vec4(wood,1.0);\n#define CUSTOM_FRAGMENT_MAIN_END\n}";
1493
+ const name = "woodProceduralTexturePixelShader";
1494
+ const shader = `precision highp float;varying vec2 vPosition;varying vec2 vUV;uniform float ampScale;uniform vec3 woodColor;float rand(vec2 n) {return fract(cos(dot(n,vec2(12.9898,4.1414)))*43758.5453);}
1495
+ float noise(vec2 n) {const vec2 d=vec2(0.0,1.0);vec2 b=floor(n),f=smoothstep(vec2(0.0),vec2(1.0),fract(n));return mix(mix(rand(b),rand(b+d.yx),f.x),mix(rand(b+d.xy),rand(b+d.yy),f.x),f.y);}
1496
+ float fbm(vec2 n) {float total=0.0,amplitude=1.0;for (int i=0; i<4; i++) {total+=noise(n)*amplitude;n+=n;amplitude*=0.5;}
1497
+ return total;}
1498
+ #define CUSTOM_FRAGMENT_DEFINITIONS
1499
+ void main(void) {
1500
+ #define CUSTOM_FRAGMENT_MAIN_BEGIN
1501
+ float ratioy=mod(vUV.x*ampScale,2.0+fbm(vUV*0.8));vec3 wood=woodColor*ratioy;gl_FragColor=vec4(wood,1.0);
1502
+ #define CUSTOM_FRAGMENT_MAIN_END
1503
+ }`;
1611
1504
  // Sideeffect
1612
- core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
1505
+ babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
1613
1506
  /** @internal */
1614
- var woodProceduralTexturePixelShader = { name: name, shader: shader };
1507
+ const woodProceduralTexturePixelShader = { name, shader };
1615
1508
 
1616
1509
 
1617
1510
  /***/ }),
1618
1511
 
1619
- /***/ "../../../lts/proceduralTextures/dist/wood/woodProceduralTexture.js":
1620
- /*!**************************************************************************!*\
1621
- !*** ../../../lts/proceduralTextures/dist/wood/woodProceduralTexture.js ***!
1622
- \**************************************************************************/
1512
+ /***/ "../../../dev/proceduralTextures/src/wood/woodProceduralTexture.ts":
1513
+ /*!*************************************************************************!*\
1514
+ !*** ../../../dev/proceduralTextures/src/wood/woodProceduralTexture.ts ***!
1515
+ \*************************************************************************/
1623
1516
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1624
1517
 
1625
1518
  __webpack_require__.r(__webpack_exports__);
@@ -1627,60 +1520,49 @@ __webpack_require__.r(__webpack_exports__);
1627
1520
  /* harmony export */ WoodProceduralTexture: () => (/* binding */ WoodProceduralTexture)
1628
1521
  /* harmony export */ });
1629
1522
  /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.mjs");
1630
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Misc/typeStore */ "core/Misc/decorators");
1631
- /* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
1632
- /* harmony import */ var _woodProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./woodProceduralTexture.fragment */ "../../../lts/proceduralTextures/dist/wood/woodProceduralTexture.fragment.js");
1523
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Misc/typeStore */ "babylonjs/Misc/decorators");
1524
+ /* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
1525
+ /* harmony import */ var _woodProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./woodProceduralTexture.fragment */ "../../../dev/proceduralTextures/src/wood/woodProceduralTexture.fragment.ts");
1633
1526
 
1634
1527
 
1635
1528
 
1636
1529
 
1637
1530
 
1638
1531
 
1639
- var WoodProceduralTexture = /** @class */ (function (_super) {
1640
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__extends)(WoodProceduralTexture, _super);
1641
- function WoodProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
1642
- if (scene === void 0) { scene = null; }
1643
- var _this = _super.call(this, name, size, "woodProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
1644
- _this._ampScale = 100.0;
1645
- _this._woodColor = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.32, 0.17, 0.09);
1646
- _this.updateShaderUniforms();
1647
- return _this;
1532
+ class WoodProceduralTexture extends babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture {
1533
+ constructor(name, size, scene = null, fallbackTexture, generateMipMaps) {
1534
+ super(name, size, "woodProceduralTexture", scene, fallbackTexture, generateMipMaps);
1535
+ this._ampScale = 100.0;
1536
+ this._woodColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(0.32, 0.17, 0.09);
1537
+ this.updateShaderUniforms();
1648
1538
  }
1649
- WoodProceduralTexture.prototype.updateShaderUniforms = function () {
1539
+ updateShaderUniforms() {
1650
1540
  this.setFloat("ampScale", this._ampScale);
1651
1541
  this.setColor3("woodColor", this._woodColor);
1652
- };
1653
- Object.defineProperty(WoodProceduralTexture.prototype, "ampScale", {
1654
- get: function () {
1655
- return this._ampScale;
1656
- },
1657
- set: function (value) {
1658
- this._ampScale = value;
1659
- this.updateShaderUniforms();
1660
- },
1661
- enumerable: false,
1662
- configurable: true
1663
- });
1664
- Object.defineProperty(WoodProceduralTexture.prototype, "woodColor", {
1665
- get: function () {
1666
- return this._woodColor;
1667
- },
1668
- set: function (value) {
1669
- this._woodColor = value;
1670
- this.updateShaderUniforms();
1671
- },
1672
- enumerable: false,
1673
- configurable: true
1674
- });
1542
+ }
1543
+ get ampScale() {
1544
+ return this._ampScale;
1545
+ }
1546
+ set ampScale(value) {
1547
+ this._ampScale = value;
1548
+ this.updateShaderUniforms();
1549
+ }
1550
+ get woodColor() {
1551
+ return this._woodColor;
1552
+ }
1553
+ set woodColor(value) {
1554
+ this._woodColor = value;
1555
+ this.updateShaderUniforms();
1556
+ }
1675
1557
  /**
1676
1558
  * Serializes this wood procedural texture
1677
1559
  * @returns a serialized wood procedural texture object
1678
1560
  */
1679
- WoodProceduralTexture.prototype.serialize = function () {
1680
- var serializationObject = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
1561
+ serialize() {
1562
+ const serializationObject = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Serialize(this, super.serialize());
1681
1563
  serializationObject.customType = "BABYLON.WoodProceduralTexture";
1682
1564
  return serializationObject;
1683
- };
1565
+ }
1684
1566
  /**
1685
1567
  * Creates a Wood Procedural Texture from parsed wood procedural texture data
1686
1568
  * @param parsedTexture defines parsed texture data
@@ -1688,30 +1570,69 @@ var WoodProceduralTexture = /** @class */ (function (_super) {
1688
1570
  * @param rootUrl defines the root URL containing wood procedural texture information
1689
1571
  * @returns a parsed Wood Procedural Texture
1690
1572
  */
1691
- WoodProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
1692
- var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(function () { return new WoodProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
1573
+ static Parse(parsedTexture, scene, rootUrl) {
1574
+ const texture = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(() => new WoodProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps), parsedTexture, scene, rootUrl);
1693
1575
  return texture;
1694
- };
1695
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1696
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1697
- ], WoodProceduralTexture.prototype, "ampScale", null);
1698
- (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1699
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor3)()
1700
- ], WoodProceduralTexture.prototype, "woodColor", null);
1701
- return WoodProceduralTexture;
1702
- }(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.ProceduralTexture));
1703
- (0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.WoodProceduralTexture", WoodProceduralTexture);
1576
+ }
1577
+ }
1578
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1579
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)()
1580
+ ], WoodProceduralTexture.prototype, "ampScale", null);
1581
+ (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
1582
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor3)()
1583
+ ], WoodProceduralTexture.prototype, "woodColor", null);
1584
+ (0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.WoodProceduralTexture", WoodProceduralTexture);
1585
+
1586
+
1587
+ /***/ }),
1588
+
1589
+ /***/ "../../../lts/proceduralTextures/src/legacy/legacy.ts":
1590
+ /*!************************************************************!*\
1591
+ !*** ../../../lts/proceduralTextures/src/legacy/legacy.ts ***!
1592
+ \************************************************************/
1593
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1594
+
1595
+ __webpack_require__.r(__webpack_exports__);
1596
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1597
+ /* harmony export */ BrickProceduralTexture: () => (/* reexport safe */ procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__.BrickProceduralTexture),
1598
+ /* harmony export */ CloudProceduralTexture: () => (/* reexport safe */ procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__.CloudProceduralTexture),
1599
+ /* harmony export */ FireProceduralTexture: () => (/* reexport safe */ procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__.FireProceduralTexture),
1600
+ /* harmony export */ GrassProceduralTexture: () => (/* reexport safe */ procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__.GrassProceduralTexture),
1601
+ /* harmony export */ MarbleProceduralTexture: () => (/* reexport safe */ procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__.MarbleProceduralTexture),
1602
+ /* harmony export */ NormalMapProceduralTexture: () => (/* reexport safe */ procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__.NormalMapProceduralTexture),
1603
+ /* harmony export */ PerlinNoiseProceduralTexture: () => (/* reexport safe */ procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__.PerlinNoiseProceduralTexture),
1604
+ /* harmony export */ RoadProceduralTexture: () => (/* reexport safe */ procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__.RoadProceduralTexture),
1605
+ /* harmony export */ StarfieldProceduralTexture: () => (/* reexport safe */ procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__.StarfieldProceduralTexture),
1606
+ /* harmony export */ WoodProceduralTexture: () => (/* reexport safe */ procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__.WoodProceduralTexture)
1607
+ /* harmony export */ });
1608
+ /* harmony import */ var procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! procedural-textures/index */ "../../../dev/proceduralTextures/src/index.ts");
1609
+ /* eslint-disable import/no-internal-modules */
1610
+
1611
+ /**
1612
+ * Legacy support, defining window.BABYLON.GridMaterial... (global variable).
1613
+ *
1614
+ * This is the entry point for the UMD module.
1615
+ * The entry point for a future ESM package should be index.ts
1616
+ */
1617
+ const globalObject = typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : undefined;
1618
+ if (typeof globalObject !== "undefined") {
1619
+ globalObject.BABYLON = globalObject.BABYLON || {};
1620
+ for (const mat in procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__) {
1621
+ globalObject.BABYLON[mat] = procedural_textures_index__WEBPACK_IMPORTED_MODULE_0__[mat];
1622
+ }
1623
+ }
1624
+
1704
1625
 
1705
1626
 
1706
1627
  /***/ }),
1707
1628
 
1708
- /***/ "core/Misc/decorators":
1629
+ /***/ "babylonjs/Misc/decorators":
1709
1630
  /*!****************************************************************************************************!*\
1710
1631
  !*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
1711
1632
  \****************************************************************************************************/
1712
1633
  /***/ ((module) => {
1713
1634
 
1714
- module.exports = __WEBPACK_EXTERNAL_MODULE_core_Misc_decorators__;
1635
+ module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
1715
1636
 
1716
1637
  /***/ }),
1717
1638
 
@@ -2168,12 +2089,12 @@ var __webpack_exports__ = {};
2168
2089
  __webpack_require__.r(__webpack_exports__);
2169
2090
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2170
2091
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
2171
- /* harmony export */ proceduralTextures: () => (/* reexport module object */ procedural_textures_legacy_legacy__WEBPACK_IMPORTED_MODULE_0__)
2092
+ /* harmony export */ proceduralTextures: () => (/* reexport module object */ _lts_procedural_textures_legacy_legacy__WEBPACK_IMPORTED_MODULE_0__)
2172
2093
  /* harmony export */ });
2173
- /* harmony import */ var procedural_textures_legacy_legacy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! procedural-textures/legacy/legacy */ "../../../lts/proceduralTextures/dist/legacy/legacy.js");
2094
+ /* harmony import */ var _lts_procedural_textures_legacy_legacy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lts/procedural-textures/legacy/legacy */ "../../../lts/proceduralTextures/src/legacy/legacy.ts");
2174
2095
 
2175
2096
 
2176
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (procedural_textures_legacy_legacy__WEBPACK_IMPORTED_MODULE_0__);
2097
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_lts_procedural_textures_legacy_legacy__WEBPACK_IMPORTED_MODULE_0__);
2177
2098
 
2178
2099
  })();
2179
2100