babylonjs-procedural-textures 5.0.0-rc.9 → 5.0.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.
- package/babylon.brickProceduralTexture.js +575 -0
- package/babylon.brickProceduralTexture.js.map +1 -0
- package/babylon.brickProceduralTexture.min.js +3 -0
- package/babylon.brickProceduralTexture.min.js.LICENSE.txt +14 -0
- package/babylon.brickProceduralTexture.min.js.map +1 -0
- package/babylon.cloudProceduralTexture.js +575 -0
- package/babylon.cloudProceduralTexture.js.map +1 -0
- package/babylon.cloudProceduralTexture.min.js +3 -0
- package/babylon.cloudProceduralTexture.min.js.LICENSE.txt +14 -0
- package/babylon.cloudProceduralTexture.min.js.map +1 -0
- package/babylon.fireProceduralTexture.js +637 -0
- package/babylon.fireProceduralTexture.js.map +1 -0
- package/babylon.fireProceduralTexture.min.js +3 -0
- package/babylon.fireProceduralTexture.min.js.LICENSE.txt +14 -0
- package/babylon.fireProceduralTexture.min.js.map +1 -0
- package/babylon.grassProceduralTexture.js +551 -0
- package/babylon.grassProceduralTexture.js.map +1 -0
- package/babylon.grassProceduralTexture.min.js +3 -0
- package/babylon.grassProceduralTexture.min.js.LICENSE.txt +14 -0
- package/babylon.grassProceduralTexture.min.js.map +1 -0
- package/babylon.marbleProceduralTexture.js +575 -0
- package/babylon.marbleProceduralTexture.js.map +1 -0
- package/babylon.marbleProceduralTexture.min.js +3 -0
- package/babylon.marbleProceduralTexture.min.js.LICENSE.txt +14 -0
- package/babylon.marbleProceduralTexture.min.js.map +1 -0
- package/babylon.normalMapProceduralTexture.js +540 -0
- package/babylon.normalMapProceduralTexture.js.map +1 -0
- package/babylon.normalMapProceduralTexture.min.js +3 -0
- package/babylon.normalMapProceduralTexture.min.js.LICENSE.txt +14 -0
- package/babylon.normalMapProceduralTexture.min.js.map +1 -0
- package/babylon.perlinNoiseProceduralTexture.js +540 -0
- package/babylon.perlinNoiseProceduralTexture.js.map +1 -0
- package/babylon.perlinNoiseProceduralTexture.min.js +3 -0
- package/babylon.perlinNoiseProceduralTexture.min.js.LICENSE.txt +14 -0
- package/babylon.perlinNoiseProceduralTexture.min.js.map +1 -0
- package/babylon.roadProceduralTexture.js +527 -0
- package/babylon.roadProceduralTexture.js.map +1 -0
- package/babylon.roadProceduralTexture.min.js +3 -0
- package/babylon.roadProceduralTexture.min.js.LICENSE.txt +14 -0
- package/babylon.roadProceduralTexture.min.js.map +1 -0
- package/babylon.starfieldProceduralTexture.js +686 -0
- package/babylon.starfieldProceduralTexture.js.map +1 -0
- package/babylon.starfieldProceduralTexture.min.js +3 -0
- package/babylon.starfieldProceduralTexture.min.js.LICENSE.txt +14 -0
- package/babylon.starfieldProceduralTexture.min.js.map +1 -0
- package/babylon.woodProceduralTexture.js +543 -0
- package/babylon.woodProceduralTexture.js.map +1 -0
- package/babylon.woodProceduralTexture.min.js +3 -0
- package/babylon.woodProceduralTexture.min.js.LICENSE.txt +14 -0
- package/babylon.woodProceduralTexture.min.js.map +1 -0
- package/babylonjs.proceduralTextures.d.ts +425 -0
- package/babylonjs.proceduralTextures.js +15 -13
- package/babylonjs.proceduralTextures.js.map +1 -1
- package/babylonjs.proceduralTextures.min.js.map +1 -1
- package/babylonjs.proceduralTextures.module.d.ts +78 -78
- package/license.md +71 -0
- package/package.json +19 -3
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory(require("babylonjs"));
|
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
|
5
|
+
define("babylonjs-procedural-textures", ["babylonjs"], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["babylonjs-procedural-textures"] = factory(require("babylonjs"));
|
|
8
|
+
else
|
|
9
|
+
root["PROCEDURALTEXTURES"] = factory(root["BABYLON"]);
|
|
10
|
+
})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), function(__WEBPACK_EXTERNAL_MODULE_core_Misc_decorators__) {
|
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
|
12
|
+
/******/ "use strict";
|
|
13
|
+
/******/ var __webpack_modules__ = ({
|
|
14
|
+
|
|
15
|
+
/***/ "../../../../node_modules/tslib/tslib.es6.js":
|
|
16
|
+
/*!***************************************************!*\
|
|
17
|
+
!*** ../../../../node_modules/tslib/tslib.es6.js ***!
|
|
18
|
+
\***************************************************/
|
|
19
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
20
|
+
|
|
21
|
+
__webpack_require__.r(__webpack_exports__);
|
|
22
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23
|
+
/* harmony export */ "__assign": () => (/* binding */ __assign),
|
|
24
|
+
/* harmony export */ "__asyncDelegator": () => (/* binding */ __asyncDelegator),
|
|
25
|
+
/* harmony export */ "__asyncGenerator": () => (/* binding */ __asyncGenerator),
|
|
26
|
+
/* harmony export */ "__asyncValues": () => (/* binding */ __asyncValues),
|
|
27
|
+
/* harmony export */ "__await": () => (/* binding */ __await),
|
|
28
|
+
/* harmony export */ "__awaiter": () => (/* binding */ __awaiter),
|
|
29
|
+
/* harmony export */ "__classPrivateFieldGet": () => (/* binding */ __classPrivateFieldGet),
|
|
30
|
+
/* harmony export */ "__classPrivateFieldSet": () => (/* binding */ __classPrivateFieldSet),
|
|
31
|
+
/* harmony export */ "__createBinding": () => (/* binding */ __createBinding),
|
|
32
|
+
/* harmony export */ "__decorate": () => (/* binding */ __decorate),
|
|
33
|
+
/* harmony export */ "__exportStar": () => (/* binding */ __exportStar),
|
|
34
|
+
/* harmony export */ "__extends": () => (/* binding */ __extends),
|
|
35
|
+
/* harmony export */ "__generator": () => (/* binding */ __generator),
|
|
36
|
+
/* harmony export */ "__importDefault": () => (/* binding */ __importDefault),
|
|
37
|
+
/* harmony export */ "__importStar": () => (/* binding */ __importStar),
|
|
38
|
+
/* harmony export */ "__makeTemplateObject": () => (/* binding */ __makeTemplateObject),
|
|
39
|
+
/* harmony export */ "__metadata": () => (/* binding */ __metadata),
|
|
40
|
+
/* harmony export */ "__param": () => (/* binding */ __param),
|
|
41
|
+
/* harmony export */ "__read": () => (/* binding */ __read),
|
|
42
|
+
/* harmony export */ "__rest": () => (/* binding */ __rest),
|
|
43
|
+
/* harmony export */ "__spread": () => (/* binding */ __spread),
|
|
44
|
+
/* harmony export */ "__spreadArray": () => (/* binding */ __spreadArray),
|
|
45
|
+
/* harmony export */ "__spreadArrays": () => (/* binding */ __spreadArrays),
|
|
46
|
+
/* harmony export */ "__values": () => (/* binding */ __values)
|
|
47
|
+
/* harmony export */ });
|
|
48
|
+
/*! *****************************************************************************
|
|
49
|
+
Copyright (c) Microsoft Corporation.
|
|
50
|
+
|
|
51
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
52
|
+
purpose with or without fee is hereby granted.
|
|
53
|
+
|
|
54
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
55
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
56
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
57
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
58
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
59
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
60
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
61
|
+
***************************************************************************** */
|
|
62
|
+
/* global Reflect, Promise */
|
|
63
|
+
|
|
64
|
+
var extendStatics = function(d, b) {
|
|
65
|
+
extendStatics = Object.setPrototypeOf ||
|
|
66
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
67
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
68
|
+
return extendStatics(d, b);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
function __extends(d, b) {
|
|
72
|
+
if (typeof b !== "function" && b !== null)
|
|
73
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
74
|
+
extendStatics(d, b);
|
|
75
|
+
function __() { this.constructor = d; }
|
|
76
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var __assign = function() {
|
|
80
|
+
__assign = Object.assign || function __assign(t) {
|
|
81
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
82
|
+
s = arguments[i];
|
|
83
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
84
|
+
}
|
|
85
|
+
return t;
|
|
86
|
+
}
|
|
87
|
+
return __assign.apply(this, arguments);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function __rest(s, e) {
|
|
91
|
+
var t = {};
|
|
92
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
93
|
+
t[p] = s[p];
|
|
94
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
95
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
96
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
97
|
+
t[p[i]] = s[p[i]];
|
|
98
|
+
}
|
|
99
|
+
return t;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function __decorate(decorators, target, key, desc) {
|
|
103
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
104
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
105
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
106
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function __param(paramIndex, decorator) {
|
|
110
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function __metadata(metadataKey, metadataValue) {
|
|
114
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
118
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
119
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
120
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
121
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
122
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
123
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function __generator(thisArg, body) {
|
|
128
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
129
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
130
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
131
|
+
function step(op) {
|
|
132
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
133
|
+
while (_) try {
|
|
134
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
135
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
136
|
+
switch (op[0]) {
|
|
137
|
+
case 0: case 1: t = op; break;
|
|
138
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
139
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
140
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
141
|
+
default:
|
|
142
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
143
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
144
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
145
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
146
|
+
if (t[2]) _.ops.pop();
|
|
147
|
+
_.trys.pop(); continue;
|
|
148
|
+
}
|
|
149
|
+
op = body.call(thisArg, _);
|
|
150
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
151
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
var __createBinding = Object.create ? (function(o, m, k, k2) {
|
|
156
|
+
if (k2 === undefined) k2 = k;
|
|
157
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
158
|
+
}) : (function(o, m, k, k2) {
|
|
159
|
+
if (k2 === undefined) k2 = k;
|
|
160
|
+
o[k2] = m[k];
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
function __exportStar(m, o) {
|
|
164
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function __values(o) {
|
|
168
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
169
|
+
if (m) return m.call(o);
|
|
170
|
+
if (o && typeof o.length === "number") return {
|
|
171
|
+
next: function () {
|
|
172
|
+
if (o && i >= o.length) o = void 0;
|
|
173
|
+
return { value: o && o[i++], done: !o };
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function __read(o, n) {
|
|
180
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
181
|
+
if (!m) return o;
|
|
182
|
+
var i = m.call(o), r, ar = [], e;
|
|
183
|
+
try {
|
|
184
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
185
|
+
}
|
|
186
|
+
catch (error) { e = { error: error }; }
|
|
187
|
+
finally {
|
|
188
|
+
try {
|
|
189
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
190
|
+
}
|
|
191
|
+
finally { if (e) throw e.error; }
|
|
192
|
+
}
|
|
193
|
+
return ar;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** @deprecated */
|
|
197
|
+
function __spread() {
|
|
198
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
199
|
+
ar = ar.concat(__read(arguments[i]));
|
|
200
|
+
return ar;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** @deprecated */
|
|
204
|
+
function __spreadArrays() {
|
|
205
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
206
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
207
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
208
|
+
r[k] = a[j];
|
|
209
|
+
return r;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function __spreadArray(to, from, pack) {
|
|
213
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
214
|
+
if (ar || !(i in from)) {
|
|
215
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
216
|
+
ar[i] = from[i];
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function __await(v) {
|
|
223
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
227
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
228
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
229
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
230
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
231
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
232
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
233
|
+
function fulfill(value) { resume("next", value); }
|
|
234
|
+
function reject(value) { resume("throw", value); }
|
|
235
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function __asyncDelegator(o) {
|
|
239
|
+
var i, p;
|
|
240
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
241
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function __asyncValues(o) {
|
|
245
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
246
|
+
var m = o[Symbol.asyncIterator], i;
|
|
247
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
248
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
249
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function __makeTemplateObject(cooked, raw) {
|
|
253
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
254
|
+
return cooked;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
var __setModuleDefault = Object.create ? (function(o, v) {
|
|
258
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
259
|
+
}) : function(o, v) {
|
|
260
|
+
o["default"] = v;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
function __importStar(mod) {
|
|
264
|
+
if (mod && mod.__esModule) return mod;
|
|
265
|
+
var result = {};
|
|
266
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
267
|
+
__setModuleDefault(result, mod);
|
|
268
|
+
return result;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
function __importDefault(mod) {
|
|
272
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
276
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
277
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
278
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
282
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
283
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
284
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
285
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
/***/ }),
|
|
290
|
+
|
|
291
|
+
/***/ "../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.fragment.js":
|
|
292
|
+
/*!*************************************************************************************!*\
|
|
293
|
+
!*** ../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.fragment.js ***!
|
|
294
|
+
\*************************************************************************************/
|
|
295
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
296
|
+
|
|
297
|
+
__webpack_require__.r(__webpack_exports__);
|
|
298
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
299
|
+
/* harmony export */ "brickProceduralTexturePixelShader": () => (/* binding */ brickProceduralTexturePixelShader)
|
|
300
|
+
/* harmony export */ });
|
|
301
|
+
/* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Engines/shaderStore */ "core/Misc/decorators");
|
|
302
|
+
/* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
|
|
303
|
+
// Do not edit.
|
|
304
|
+
|
|
305
|
+
var name = "brickProceduralTexturePixelShader";
|
|
306
|
+
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);}";
|
|
307
|
+
// Sideeffect
|
|
308
|
+
core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
|
|
309
|
+
/** @hidden */
|
|
310
|
+
var brickProceduralTexturePixelShader = { name: name, shader: shader };
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
/***/ }),
|
|
314
|
+
|
|
315
|
+
/***/ "../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.js":
|
|
316
|
+
/*!****************************************************************************!*\
|
|
317
|
+
!*** ../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.js ***!
|
|
318
|
+
\****************************************************************************/
|
|
319
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
320
|
+
|
|
321
|
+
__webpack_require__.r(__webpack_exports__);
|
|
322
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
323
|
+
/* harmony export */ "BrickProceduralTexture": () => (/* binding */ BrickProceduralTexture)
|
|
324
|
+
/* harmony export */ });
|
|
325
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.js");
|
|
326
|
+
/* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/Misc/typeStore */ "core/Misc/decorators");
|
|
327
|
+
/* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
|
|
328
|
+
/* harmony import */ var _brickProceduralTexture_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./brickProceduralTexture.fragment */ "../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.fragment.js");
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
var BrickProceduralTexture = /** @class */ (function (_super) {
|
|
336
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(BrickProceduralTexture, _super);
|
|
337
|
+
function BrickProceduralTexture(name, size, scene, fallbackTexture, generateMipMaps) {
|
|
338
|
+
if (scene === void 0) { scene = null; }
|
|
339
|
+
var _this = _super.call(this, name, size, "brickProceduralTexture", scene, fallbackTexture, generateMipMaps) || this;
|
|
340
|
+
_this._numberOfBricksHeight = 15;
|
|
341
|
+
_this._numberOfBricksWidth = 5;
|
|
342
|
+
_this._jointColor = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Color3(0.72, 0.72, 0.72);
|
|
343
|
+
_this._brickColor = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Color3(0.77, 0.47, 0.4);
|
|
344
|
+
_this.updateShaderUniforms();
|
|
345
|
+
return _this;
|
|
346
|
+
}
|
|
347
|
+
BrickProceduralTexture.prototype.updateShaderUniforms = function () {
|
|
348
|
+
this.setFloat("numberOfBricksHeight", this._numberOfBricksHeight);
|
|
349
|
+
this.setFloat("numberOfBricksWidth", this._numberOfBricksWidth);
|
|
350
|
+
this.setColor3("brickColor", this._brickColor);
|
|
351
|
+
this.setColor3("jointColor", this._jointColor);
|
|
352
|
+
};
|
|
353
|
+
Object.defineProperty(BrickProceduralTexture.prototype, "numberOfBricksHeight", {
|
|
354
|
+
get: function () {
|
|
355
|
+
return this._numberOfBricksHeight;
|
|
356
|
+
},
|
|
357
|
+
set: function (value) {
|
|
358
|
+
this._numberOfBricksHeight = value;
|
|
359
|
+
this.updateShaderUniforms();
|
|
360
|
+
},
|
|
361
|
+
enumerable: false,
|
|
362
|
+
configurable: true
|
|
363
|
+
});
|
|
364
|
+
Object.defineProperty(BrickProceduralTexture.prototype, "numberOfBricksWidth", {
|
|
365
|
+
get: function () {
|
|
366
|
+
return this._numberOfBricksWidth;
|
|
367
|
+
},
|
|
368
|
+
set: function (value) {
|
|
369
|
+
this._numberOfBricksWidth = value;
|
|
370
|
+
this.updateShaderUniforms();
|
|
371
|
+
},
|
|
372
|
+
enumerable: false,
|
|
373
|
+
configurable: true
|
|
374
|
+
});
|
|
375
|
+
Object.defineProperty(BrickProceduralTexture.prototype, "jointColor", {
|
|
376
|
+
get: function () {
|
|
377
|
+
return this._jointColor;
|
|
378
|
+
},
|
|
379
|
+
set: function (value) {
|
|
380
|
+
this._jointColor = value;
|
|
381
|
+
this.updateShaderUniforms();
|
|
382
|
+
},
|
|
383
|
+
enumerable: false,
|
|
384
|
+
configurable: true
|
|
385
|
+
});
|
|
386
|
+
Object.defineProperty(BrickProceduralTexture.prototype, "brickColor", {
|
|
387
|
+
get: function () {
|
|
388
|
+
return this._brickColor;
|
|
389
|
+
},
|
|
390
|
+
set: function (value) {
|
|
391
|
+
this._brickColor = value;
|
|
392
|
+
this.updateShaderUniforms();
|
|
393
|
+
},
|
|
394
|
+
enumerable: false,
|
|
395
|
+
configurable: true
|
|
396
|
+
});
|
|
397
|
+
/**
|
|
398
|
+
* Serializes this brick procedural texture
|
|
399
|
+
* @returns a serialized brick procedural texture object
|
|
400
|
+
*/
|
|
401
|
+
BrickProceduralTexture.prototype.serialize = function () {
|
|
402
|
+
var serializationObject = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Serialize(this, _super.prototype.serialize.call(this));
|
|
403
|
+
serializationObject.customType = "BABYLON.BrickProceduralTexture";
|
|
404
|
+
return serializationObject;
|
|
405
|
+
};
|
|
406
|
+
/**
|
|
407
|
+
* Creates a Brick Procedural Texture from parsed brick procedural texture data
|
|
408
|
+
* @param parsedTexture defines parsed texture data
|
|
409
|
+
* @param scene defines the current scene
|
|
410
|
+
* @param rootUrl defines the root URL containing brick procedural texture information
|
|
411
|
+
* @returns a parsed Brick Procedural Texture
|
|
412
|
+
*/
|
|
413
|
+
BrickProceduralTexture.Parse = function (parsedTexture, scene, rootUrl) {
|
|
414
|
+
var texture = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Parse(function () { return new BrickProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps); }, parsedTexture, scene, rootUrl);
|
|
415
|
+
return texture;
|
|
416
|
+
};
|
|
417
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
418
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serialize)()
|
|
419
|
+
], BrickProceduralTexture.prototype, "numberOfBricksHeight", null);
|
|
420
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
421
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serialize)()
|
|
422
|
+
], BrickProceduralTexture.prototype, "numberOfBricksWidth", null);
|
|
423
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
424
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serializeAsColor3)()
|
|
425
|
+
], BrickProceduralTexture.prototype, "jointColor", null);
|
|
426
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
427
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serializeAsColor3)()
|
|
428
|
+
], BrickProceduralTexture.prototype, "brickColor", null);
|
|
429
|
+
return BrickProceduralTexture;
|
|
430
|
+
}(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.ProceduralTexture));
|
|
431
|
+
|
|
432
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.RegisterClass)("BABYLON.BrickProceduralTexture", BrickProceduralTexture);
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
/***/ }),
|
|
436
|
+
|
|
437
|
+
/***/ "../../../lts/proceduralTextures/dist/brick/index.js":
|
|
438
|
+
/*!***********************************************************!*\
|
|
439
|
+
!*** ../../../lts/proceduralTextures/dist/brick/index.js ***!
|
|
440
|
+
\***********************************************************/
|
|
441
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
442
|
+
|
|
443
|
+
__webpack_require__.r(__webpack_exports__);
|
|
444
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
445
|
+
/* harmony export */ "BrickProceduralTexture": () => (/* reexport safe */ _brickProceduralTexture__WEBPACK_IMPORTED_MODULE_0__.BrickProceduralTexture)
|
|
446
|
+
/* harmony export */ });
|
|
447
|
+
/* harmony import */ var _brickProceduralTexture__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brickProceduralTexture */ "../../../lts/proceduralTextures/dist/brick/brickProceduralTexture.js");
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
/***/ }),
|
|
452
|
+
|
|
453
|
+
/***/ "core/Misc/decorators":
|
|
454
|
+
/*!****************************************************************************************************!*\
|
|
455
|
+
!*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
|
|
456
|
+
\****************************************************************************************************/
|
|
457
|
+
/***/ ((module) => {
|
|
458
|
+
|
|
459
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_core_Misc_decorators__;
|
|
460
|
+
|
|
461
|
+
/***/ })
|
|
462
|
+
|
|
463
|
+
/******/ });
|
|
464
|
+
/************************************************************************/
|
|
465
|
+
/******/ // The module cache
|
|
466
|
+
/******/ var __webpack_module_cache__ = {};
|
|
467
|
+
/******/
|
|
468
|
+
/******/ // The require function
|
|
469
|
+
/******/ function __webpack_require__(moduleId) {
|
|
470
|
+
/******/ // Check if module is in cache
|
|
471
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
472
|
+
/******/ if (cachedModule !== undefined) {
|
|
473
|
+
/******/ return cachedModule.exports;
|
|
474
|
+
/******/ }
|
|
475
|
+
/******/ // Create a new module (and put it into the cache)
|
|
476
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
477
|
+
/******/ // no module.id needed
|
|
478
|
+
/******/ // no module.loaded needed
|
|
479
|
+
/******/ exports: {}
|
|
480
|
+
/******/ };
|
|
481
|
+
/******/
|
|
482
|
+
/******/ // Execute the module function
|
|
483
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
484
|
+
/******/
|
|
485
|
+
/******/ // Return the exports of the module
|
|
486
|
+
/******/ return module.exports;
|
|
487
|
+
/******/ }
|
|
488
|
+
/******/
|
|
489
|
+
/************************************************************************/
|
|
490
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
491
|
+
/******/ (() => {
|
|
492
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
493
|
+
/******/ __webpack_require__.n = (module) => {
|
|
494
|
+
/******/ var getter = module && module.__esModule ?
|
|
495
|
+
/******/ () => (module['default']) :
|
|
496
|
+
/******/ () => (module);
|
|
497
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
498
|
+
/******/ return getter;
|
|
499
|
+
/******/ };
|
|
500
|
+
/******/ })();
|
|
501
|
+
/******/
|
|
502
|
+
/******/ /* webpack/runtime/define property getters */
|
|
503
|
+
/******/ (() => {
|
|
504
|
+
/******/ // define getter functions for harmony exports
|
|
505
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
506
|
+
/******/ for(var key in definition) {
|
|
507
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
508
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
509
|
+
/******/ }
|
|
510
|
+
/******/ }
|
|
511
|
+
/******/ };
|
|
512
|
+
/******/ })();
|
|
513
|
+
/******/
|
|
514
|
+
/******/ /* webpack/runtime/global */
|
|
515
|
+
/******/ (() => {
|
|
516
|
+
/******/ __webpack_require__.g = (function() {
|
|
517
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
518
|
+
/******/ try {
|
|
519
|
+
/******/ return this || new Function('return this')();
|
|
520
|
+
/******/ } catch (e) {
|
|
521
|
+
/******/ if (typeof window === 'object') return window;
|
|
522
|
+
/******/ }
|
|
523
|
+
/******/ })();
|
|
524
|
+
/******/ })();
|
|
525
|
+
/******/
|
|
526
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
527
|
+
/******/ (() => {
|
|
528
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
529
|
+
/******/ })();
|
|
530
|
+
/******/
|
|
531
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
532
|
+
/******/ (() => {
|
|
533
|
+
/******/ // define __esModule on exports
|
|
534
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
535
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
536
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
537
|
+
/******/ }
|
|
538
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
539
|
+
/******/ };
|
|
540
|
+
/******/ })();
|
|
541
|
+
/******/
|
|
542
|
+
/************************************************************************/
|
|
543
|
+
var __webpack_exports__ = {};
|
|
544
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
545
|
+
(() => {
|
|
546
|
+
/*!**********************!*\
|
|
547
|
+
!*** ./src/brick.ts ***!
|
|
548
|
+
\**********************/
|
|
549
|
+
__webpack_require__.r(__webpack_exports__);
|
|
550
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
551
|
+
/* harmony export */ "BrickProceduralTexture": () => (/* reexport safe */ procedural_textures_brick_index__WEBPACK_IMPORTED_MODULE_0__.BrickProceduralTexture)
|
|
552
|
+
/* harmony export */ });
|
|
553
|
+
/* harmony import */ var procedural_textures_brick_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! procedural-textures/brick/index */ "../../../lts/proceduralTextures/dist/brick/index.js");
|
|
554
|
+
/* eslint-disable import/no-internal-modules */
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* This is the entry point for the UMD module.
|
|
558
|
+
* The entry point for a future ESM package should be index.ts
|
|
559
|
+
*/
|
|
560
|
+
const globalObject = typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : undefined;
|
|
561
|
+
if (typeof globalObject !== "undefined") {
|
|
562
|
+
for (const key in procedural_textures_brick_index__WEBPACK_IMPORTED_MODULE_0__) {
|
|
563
|
+
globalObject.BABYLON[key] = procedural_textures_brick_index__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
})();
|
|
569
|
+
|
|
570
|
+
__webpack_exports__ = __webpack_exports__["default"];
|
|
571
|
+
/******/ return __webpack_exports__;
|
|
572
|
+
/******/ })()
|
|
573
|
+
;
|
|
574
|
+
});
|
|
575
|
+
//# sourceMappingURL=babylon.brickProceduralTexture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"babylon.brickProceduralTexture.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB,sCAAsC,kBAAkB;AACnF,0BAA0B;AAC1B;AACA;AACA;AACO;AACP;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACO;AACP;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,6DAA6D,cAAc;AAC3E;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACO;AACP,oCAAoC;AACpC;AACA;AACO;AACP;AACA;AACA;AACO;AACP,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACO;AACP,cAAc,6BAA6B,0BAA0B,cAAc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,OAAO,YAAY,KAAK,WAAW,EAAE;IACrC,KAAK,MAAM,GAAG,IAAI,4DAAiB,EAAE;QAC3B,YAAa,CAAC,OAAO,CAAC,GAAG,CAAC,GAAS,4DAAkB,CAAC,GAAG,CAAC,CAAC;KACpE;CACJ;AAE+C","sources":["webpack://PROCEDURALTEXTURES/webpack/universalModuleDefinition","webpack://PROCEDURALTEXTURES/../../../../node_modules/tslib/tslib.es6.js","webpack://PROCEDURALTEXTURES/../../../lts/proceduralTextures/generated/brick/brickProceduralTexture.fragment.ts","webpack://PROCEDURALTEXTURES/../../../lts/proceduralTextures/generated/brick/brickProceduralTexture.ts","webpack://PROCEDURALTEXTURES/../../../lts/proceduralTextures/generated/brick/index.ts","webpack://PROCEDURALTEXTURES/external umd {\"root\":\"BABYLON\",\"commonjs\":\"babylonjs\",\"commonjs2\":\"babylonjs\",\"amd\":\"babylonjs\"}","webpack://PROCEDURALTEXTURES/webpack/bootstrap","webpack://PROCEDURALTEXTURES/webpack/runtime/compat get default export","webpack://PROCEDURALTEXTURES/webpack/runtime/define property getters","webpack://PROCEDURALTEXTURES/webpack/runtime/global","webpack://PROCEDURALTEXTURES/webpack/runtime/hasOwnProperty shorthand","webpack://PROCEDURALTEXTURES/webpack/runtime/make namespace object","webpack://PROCEDURALTEXTURES/./src/brick.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"babylonjs\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"babylonjs-procedural-textures\", [\"babylonjs\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"babylonjs-procedural-textures\"] = factory(require(\"babylonjs\"));\n\telse\n\t\troot[\"PROCEDURALTEXTURES\"] = factory(root[\"BABYLON\"]);\n})((typeof self !== \"undefined\" ? self : typeof global !== \"undefined\" ? global : this), function(__WEBPACK_EXTERNAL_MODULE_core_Misc_decorators__) {\nreturn ","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","// Do not edit.\nimport { ShaderStore } from \"core/Engines/shaderStore\";\n\nconst name = \"brickProceduralTexturePixelShader\";\nconst 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);}`;\n// Sideeffect\nShaderStore.ShadersStore[name] = shader;\n/** @hidden */\nexport const brickProceduralTexturePixelShader = { name, shader };\n","import { serialize, serializeAsColor3, SerializationHelper } from \"core/Misc/decorators\";\r\nimport { Color3 } from \"core/Maths/math.color\";\r\nimport type { Texture } from \"core/Materials/Textures/texture\";\r\nimport { ProceduralTexture } from \"core/Materials/Textures/Procedurals/proceduralTexture\";\r\nimport type { Scene } from \"core/scene\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport type { Nullable } from \"core/types\";\r\n\r\nimport \"./brickProceduralTexture.fragment\";\r\n\r\nexport class BrickProceduralTexture extends ProceduralTexture {\r\n private _numberOfBricksHeight: number = 15;\r\n private _numberOfBricksWidth: number = 5;\r\n private _jointColor = new Color3(0.72, 0.72, 0.72);\r\n private _brickColor = new Color3(0.77, 0.47, 0.4);\r\n\r\n constructor(name: string, size: number, scene: Nullable<Scene> = null, fallbackTexture?: Texture, generateMipMaps?: boolean) {\r\n super(name, size, \"brickProceduralTexture\", scene, fallbackTexture, generateMipMaps);\r\n this.updateShaderUniforms();\r\n }\r\n\r\n public updateShaderUniforms() {\r\n this.setFloat(\"numberOfBricksHeight\", this._numberOfBricksHeight);\r\n this.setFloat(\"numberOfBricksWidth\", this._numberOfBricksWidth);\r\n this.setColor3(\"brickColor\", this._brickColor);\r\n this.setColor3(\"jointColor\", this._jointColor);\r\n }\r\n\r\n @serialize()\r\n public get numberOfBricksHeight(): number {\r\n return this._numberOfBricksHeight;\r\n }\r\n\r\n public set numberOfBricksHeight(value: number) {\r\n this._numberOfBricksHeight = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serialize()\r\n public get numberOfBricksWidth(): number {\r\n return this._numberOfBricksWidth;\r\n }\r\n\r\n public set numberOfBricksWidth(value: number) {\r\n this._numberOfBricksWidth = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serializeAsColor3()\r\n public get jointColor(): Color3 {\r\n return this._jointColor;\r\n }\r\n\r\n public set jointColor(value: Color3) {\r\n this._jointColor = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n @serializeAsColor3()\r\n public get brickColor(): Color3 {\r\n return this._brickColor;\r\n }\r\n\r\n public set brickColor(value: Color3) {\r\n this._brickColor = value;\r\n this.updateShaderUniforms();\r\n }\r\n\r\n /**\r\n * Serializes this brick procedural texture\r\n * @returns a serialized brick procedural texture object\r\n */\r\n public serialize(): any {\r\n const serializationObject = SerializationHelper.Serialize(this, super.serialize());\r\n serializationObject.customType = \"BABYLON.BrickProceduralTexture\";\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Creates a Brick Procedural Texture from parsed brick procedural texture data\r\n * @param parsedTexture defines parsed texture data\r\n * @param scene defines the current scene\r\n * @param rootUrl defines the root URL containing brick procedural texture information\r\n * @returns a parsed Brick Procedural Texture\r\n */\r\n public static Parse(parsedTexture: any, scene: Scene, rootUrl: string): BrickProceduralTexture {\r\n const texture = SerializationHelper.Parse(\r\n () => new BrickProceduralTexture(parsedTexture.name, parsedTexture._size, scene, undefined, parsedTexture._generateMipMaps),\r\n parsedTexture,\r\n scene,\r\n rootUrl\r\n );\r\n\r\n return texture;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.BrickProceduralTexture\", BrickProceduralTexture);\r\n","export * from \"./brickProceduralTexture\";\r\n","module.exports = __WEBPACK_EXTERNAL_MODULE_core_Misc_decorators__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/* eslint-disable import/no-internal-modules */\r\nimport * as proceduralTexture from \"procedural-textures/brick/index\";\r\n\r\n/**\r\n * This is the entry point for the UMD module.\r\n * The entry point for a future ESM package should be index.ts\r\n */\r\nconst globalObject = typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : undefined;\r\nif (typeof globalObject !== \"undefined\") {\r\n for (const key in proceduralTexture) {\r\n (<any>globalObject).BABYLON[key] = (<any>proceduralTexture)[key];\r\n }\r\n}\r\n\r\nexport * from \"procedural-textures/brick/index\";\r\n"],"names":[],"sourceRoot":""}
|