babylonjs-procedural-textures 6.11.0 → 6.11.2

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