babylonjs-materials 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.cellMaterial.js +844 -0
- package/babylon.cellMaterial.js.map +1 -0
- package/babylon.cellMaterial.min.js +3 -0
- package/babylon.cellMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.cellMaterial.min.js.map +1 -0
- package/babylon.customMaterial.js +952 -0
- package/babylon.customMaterial.js.map +1 -0
- package/babylon.customMaterial.min.js +3 -0
- package/babylon.customMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.customMaterial.min.js.map +1 -0
- package/babylon.fireMaterial.js +873 -0
- package/babylon.fireMaterial.js.map +1 -0
- package/babylon.fireMaterial.min.js +3 -0
- package/babylon.fireMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.fireMaterial.min.js.map +1 -0
- package/babylon.furMaterial.js +1040 -0
- package/babylon.furMaterial.js.map +1 -0
- package/babylon.furMaterial.min.js +3 -0
- package/babylon.furMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.furMaterial.min.js.map +1 -0
- package/babylon.gradientMaterial.js +815 -0
- package/babylon.gradientMaterial.js.map +1 -0
- package/babylon.gradientMaterial.min.js +3 -0
- package/babylon.gradientMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.gradientMaterial.min.js.map +1 -0
- package/babylon.gridMaterial.js +798 -0
- package/babylon.gridMaterial.js.map +1 -0
- package/babylon.gridMaterial.min.js +3 -0
- package/babylon.gridMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.gridMaterial.min.js.map +1 -0
- package/babylon.lavaMaterial.js +934 -0
- package/babylon.lavaMaterial.js.map +1 -0
- package/babylon.lavaMaterial.min.js +3 -0
- package/babylon.lavaMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.lavaMaterial.min.js.map +1 -0
- package/babylon.mixMaterial.js +1050 -0
- package/babylon.mixMaterial.js.map +1 -0
- package/babylon.mixMaterial.min.js +3 -0
- package/babylon.mixMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.mixMaterial.min.js.map +1 -0
- package/babylon.normalMaterial.js +876 -0
- package/babylon.normalMaterial.js.map +1 -0
- package/babylon.normalMaterial.min.js +3 -0
- package/babylon.normalMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.normalMaterial.min.js.map +1 -0
- package/babylon.shadowOnlyMaterial.js +793 -0
- package/babylon.shadowOnlyMaterial.js.map +1 -0
- package/babylon.shadowOnlyMaterial.min.js +3 -0
- package/babylon.shadowOnlyMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.shadowOnlyMaterial.min.js.map +1 -0
- package/babylon.simpleMaterial.js +835 -0
- package/babylon.simpleMaterial.js.map +1 -0
- package/babylon.simpleMaterial.min.js +3 -0
- package/babylon.simpleMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.simpleMaterial.min.js.map +1 -0
- package/babylon.skyMaterial.js +883 -0
- package/babylon.skyMaterial.js.map +1 -0
- package/babylon.skyMaterial.min.js +3 -0
- package/babylon.skyMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.skyMaterial.min.js.map +1 -0
- package/babylon.terrainMaterial.js +966 -0
- package/babylon.terrainMaterial.js.map +1 -0
- package/babylon.terrainMaterial.min.js +3 -0
- package/babylon.terrainMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.terrainMaterial.min.js.map +1 -0
- package/babylon.triPlanarMaterial.js +943 -0
- package/babylon.triPlanarMaterial.js.map +1 -0
- package/babylon.triPlanarMaterial.min.js +3 -0
- package/babylon.triPlanarMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.triPlanarMaterial.min.js.map +1 -0
- package/babylon.waterMaterial.js +1280 -0
- package/babylon.waterMaterial.js.map +1 -0
- package/babylon.waterMaterial.min.js +3 -0
- package/babylon.waterMaterial.min.js.LICENSE.txt +14 -0
- package/babylon.waterMaterial.min.js.map +1 -0
- package/babylonjs.materials.d.ts +1090 -0
- package/babylonjs.materials.js +24 -22
- package/babylonjs.materials.js.map +1 -1
- package/babylonjs.materials.min.js.map +1 -1
- package/babylonjs.materials.module.d.ts +212 -209
- package/license.md +71 -0
- package/package.json +21 -5
|
@@ -0,0 +1,844 @@
|
|
|
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-materials", ["babylonjs"], factory);
|
|
6
|
+
else if(typeof exports === 'object')
|
|
7
|
+
exports["babylonjs-materials"] = factory(require("babylonjs"));
|
|
8
|
+
else
|
|
9
|
+
root["MATERIALS"] = 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/materials/dist/cell/cell.fragment.js":
|
|
292
|
+
/*!*********************************************************!*\
|
|
293
|
+
!*** ../../../lts/materials/dist/cell/cell.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 */ "cellPixelShader": () => (/* binding */ cellPixelShader)
|
|
300
|
+
/* harmony export */ });
|
|
301
|
+
/* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Shaders/ShadersInclude/imageProcessingCompatibility */ "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
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
var name = "cellPixelShader";
|
|
318
|
+
var shader = "precision highp float;\nuniform vec4 vEyePosition;\nuniform vec4 vDiffuseColor;\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include<helperFunctions>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#include<lightsFragmentFunctions>\n#include<shadowsFragmentFunctions>\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform sampler2D diffuseSampler;\nuniform vec2 vDiffuseInfos;\n#endif\n#include<clipPlaneFragmentDeclaration>\n#include<fogFragmentDeclaration>\nvec3 computeCustomDiffuseLighting(lightingInfo info,vec3 diffuseBase,float shadow)\n{\ndiffuseBase=info.diffuse*shadow;\n#ifdef CELLBASIC\nfloat level=1.0;\nif (info.ndl<0.5)\nlevel=0.5;\ndiffuseBase.rgb*vec3(level,level,level);\n#else\nfloat ToonThresholds[4];\nToonThresholds[0]=0.95;\nToonThresholds[1]=0.5;\nToonThresholds[2]=0.2;\nToonThresholds[3]=0.03;\nfloat ToonBrightnessLevels[5];\nToonBrightnessLevels[0]=1.0;\nToonBrightnessLevels[1]=0.8;\nToonBrightnessLevels[2]=0.6;\nToonBrightnessLevels[3]=0.35;\nToonBrightnessLevels[4]=0.2;\nif (info.ndl>ToonThresholds[0])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[0];\n}\nelse if (info.ndl>ToonThresholds[1])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[1];\n}\nelse if (info.ndl>ToonThresholds[2])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[2];\n}\nelse if (info.ndl>ToonThresholds[3])\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[3];\n}\nelse\n{\ndiffuseBase.rgb*=ToonBrightnessLevels[4];\n}\n#endif\nreturn max(diffuseBase,vec3(0.2));\n}\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void)\n{\n#define CUSTOM_FRAGMENT_MAIN_BEGIN\n#include<clipPlaneFragment>\nvec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW);\nvec4 baseColor=vec4(1.,1.,1.,1.);\nvec3 diffuseColor=vDiffuseColor.rgb;\nfloat alpha=vDiffuseColor.a;\n#ifdef DIFFUSE\nbaseColor=texture2D(diffuseSampler,vDiffuseUV);\n#ifdef ALPHATEST\nif (baseColor.a<0.4)\ndiscard;\n#endif\n#include<depthPrePass>\nbaseColor.rgb*=vDiffuseInfos.y;\n#endif\n#ifdef VERTEXCOLOR\nbaseColor.rgb*=vColor.rgb;\n#endif\n#ifdef NORMAL\nvec3 normalW=normalize(vNormalW);\n#else\nvec3 normalW=vec3(1.0,1.0,1.0);\n#endif\nlightingInfo info;\nvec3 diffuseBase=vec3(0.,0.,0.);\nfloat shadow=1.;\nfloat glossiness=0.;\n#ifdef SPECULARTERM\nvec3 specularBase=vec3(0.,0.,0.);\n#endif \n#include<lightFragment>[0..maxSimultaneousLights]\n#ifdef VERTEXALPHA\nalpha*=vColor.a;\n#endif\nvec3 finalDiffuse=clamp(diffuseBase*diffuseColor,0.0,1.0)*baseColor.rgb;\nvec4 color=vec4(finalDiffuse,alpha);\n#include<fogFragment>\ngl_FragColor=color;\n#include<imageProcessingCompatibility>\n#define CUSTOM_FRAGMENT_MAIN_END\n}";
|
|
319
|
+
// Sideeffect
|
|
320
|
+
core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
|
|
321
|
+
/** @hidden */
|
|
322
|
+
var cellPixelShader = { name: name, shader: shader };
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
/***/ }),
|
|
326
|
+
|
|
327
|
+
/***/ "../../../lts/materials/dist/cell/cell.vertex.js":
|
|
328
|
+
/*!*******************************************************!*\
|
|
329
|
+
!*** ../../../lts/materials/dist/cell/cell.vertex.js ***!
|
|
330
|
+
\*******************************************************/
|
|
331
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
332
|
+
|
|
333
|
+
__webpack_require__.r(__webpack_exports__);
|
|
334
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
335
|
+
/* harmony export */ "cellVertexShader": () => (/* binding */ cellVertexShader)
|
|
336
|
+
/* harmony export */ });
|
|
337
|
+
/* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Shaders/ShadersInclude/shadowsVertex */ "core/Misc/decorators");
|
|
338
|
+
/* harmony import */ var core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
|
|
339
|
+
// Do not edit.
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
var name = "cellVertexShader";
|
|
355
|
+
var shader = "precision highp float;\nattribute vec3 position;\n#ifdef NORMAL\nattribute vec3 normal;\n#endif\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#ifdef VERTEXCOLOR\nattribute vec4 color;\n#endif\n#include<bonesDeclaration>\n#include<bakedVertexAnimationDeclaration>\n#include<instancesDeclaration>\nuniform mat4 view;\nuniform mat4 viewProjection;\n#ifdef DIFFUSE\nvarying vec2 vDiffuseUV;\nuniform mat4 diffuseMatrix;\nuniform vec2 vDiffuseInfos;\n#endif\n#ifdef POINTSIZE\nuniform float pointSize;\n#endif\nvarying vec3 vPositionW;\n#ifdef NORMAL\nvarying vec3 vNormalW;\n#endif\n#ifdef VERTEXCOLOR\nvarying vec4 vColor;\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<__decl__lightFragment>[0..maxSimultaneousLights]\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\n#include<bonesVertex>\n#include<bakedVertexAnimation>\nvec4 worldPos=finalWorld*vec4(position,1.0);\ngl_Position=viewProjection*worldPos;\nvPositionW=vec3(worldPos);\n#ifdef NORMAL\nvNormalW=normalize(vec3(finalWorld*vec4(normal,0.0)));\n#endif\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\n#ifdef DIFFUSE\nif (vDiffuseInfos.x==0.)\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0));\n}\n#endif\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<shadowsVertex>[0..maxSimultaneousLights]\n#ifdef VERTEXCOLOR\nvColor=color;\n#elif INSTANCESCOLOR\nvColor=instanceColor;\n#endif\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#define CUSTOM_VERTEX_MAIN_END\n}\n";
|
|
356
|
+
// Sideeffect
|
|
357
|
+
core_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
|
|
358
|
+
/** @hidden */
|
|
359
|
+
var cellVertexShader = { name: name, shader: shader };
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
/***/ }),
|
|
363
|
+
|
|
364
|
+
/***/ "../../../lts/materials/dist/cell/cellMaterial.js":
|
|
365
|
+
/*!********************************************************!*\
|
|
366
|
+
!*** ../../../lts/materials/dist/cell/cellMaterial.js ***!
|
|
367
|
+
\********************************************************/
|
|
368
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
369
|
+
|
|
370
|
+
__webpack_require__.r(__webpack_exports__);
|
|
371
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
372
|
+
/* harmony export */ "CellMaterial": () => (/* binding */ CellMaterial)
|
|
373
|
+
/* harmony export */ });
|
|
374
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.js");
|
|
375
|
+
/* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core/Materials/effectFallbacks */ "core/Misc/decorators");
|
|
376
|
+
/* harmony import */ var core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__);
|
|
377
|
+
/* harmony import */ var _cell_fragment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cell.fragment */ "../../../lts/materials/dist/cell/cell.fragment.js");
|
|
378
|
+
/* harmony import */ var _cell_vertex__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cell.vertex */ "../../../lts/materials/dist/cell/cell.vertex.js");
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
var CellMaterialDefines = /** @class */ (function (_super) {
|
|
393
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(CellMaterialDefines, _super);
|
|
394
|
+
function CellMaterialDefines() {
|
|
395
|
+
var _this = _super.call(this) || this;
|
|
396
|
+
_this.DIFFUSE = false;
|
|
397
|
+
_this.CLIPPLANE = false;
|
|
398
|
+
_this.CLIPPLANE2 = false;
|
|
399
|
+
_this.CLIPPLANE3 = false;
|
|
400
|
+
_this.CLIPPLANE4 = false;
|
|
401
|
+
_this.CLIPPLANE5 = false;
|
|
402
|
+
_this.CLIPPLANE6 = false;
|
|
403
|
+
_this.ALPHATEST = false;
|
|
404
|
+
_this.POINTSIZE = false;
|
|
405
|
+
_this.FOG = false;
|
|
406
|
+
_this.NORMAL = false;
|
|
407
|
+
_this.UV1 = false;
|
|
408
|
+
_this.UV2 = false;
|
|
409
|
+
_this.VERTEXCOLOR = false;
|
|
410
|
+
_this.VERTEXALPHA = false;
|
|
411
|
+
_this.NUM_BONE_INFLUENCERS = 0;
|
|
412
|
+
_this.BonesPerMesh = 0;
|
|
413
|
+
_this.INSTANCES = false;
|
|
414
|
+
_this.INSTANCESCOLOR = false;
|
|
415
|
+
_this.NDOTL = true;
|
|
416
|
+
_this.CUSTOMUSERLIGHTING = true;
|
|
417
|
+
_this.CELLBASIC = true;
|
|
418
|
+
_this.DEPTHPREPASS = false;
|
|
419
|
+
_this.IMAGEPROCESSINGPOSTPROCESS = false;
|
|
420
|
+
_this.SKIPFINALCOLORCLAMP = false;
|
|
421
|
+
_this.rebuild();
|
|
422
|
+
return _this;
|
|
423
|
+
}
|
|
424
|
+
return CellMaterialDefines;
|
|
425
|
+
}(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialDefines));
|
|
426
|
+
var CellMaterial = /** @class */ (function (_super) {
|
|
427
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__extends)(CellMaterial, _super);
|
|
428
|
+
function CellMaterial(name, scene) {
|
|
429
|
+
var _this = _super.call(this, name, scene) || this;
|
|
430
|
+
_this.diffuseColor = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Color3(1, 1, 1);
|
|
431
|
+
_this._computeHighLevel = false;
|
|
432
|
+
_this._disableLighting = false;
|
|
433
|
+
_this._maxSimultaneousLights = 4;
|
|
434
|
+
return _this;
|
|
435
|
+
}
|
|
436
|
+
CellMaterial.prototype.needAlphaBlending = function () {
|
|
437
|
+
return this.alpha < 1.0;
|
|
438
|
+
};
|
|
439
|
+
CellMaterial.prototype.needAlphaTesting = function () {
|
|
440
|
+
return false;
|
|
441
|
+
};
|
|
442
|
+
CellMaterial.prototype.getAlphaTestTexture = function () {
|
|
443
|
+
return null;
|
|
444
|
+
};
|
|
445
|
+
// Methods
|
|
446
|
+
CellMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) {
|
|
447
|
+
if (this.isFrozen) {
|
|
448
|
+
if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {
|
|
449
|
+
return true;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
if (!subMesh.materialDefines) {
|
|
453
|
+
subMesh.materialDefines = new CellMaterialDefines();
|
|
454
|
+
}
|
|
455
|
+
var defines = subMesh.materialDefines;
|
|
456
|
+
var scene = this.getScene();
|
|
457
|
+
if (this._isReadyForSubMesh(subMesh)) {
|
|
458
|
+
return true;
|
|
459
|
+
}
|
|
460
|
+
var engine = scene.getEngine();
|
|
461
|
+
// Textures
|
|
462
|
+
if (defines._areTexturesDirty) {
|
|
463
|
+
defines._needUVs = false;
|
|
464
|
+
if (scene.texturesEnabled) {
|
|
465
|
+
if (this._diffuseTexture && core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialFlags.DiffuseTextureEnabled) {
|
|
466
|
+
if (!this._diffuseTexture.isReady()) {
|
|
467
|
+
return false;
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
defines._needUVs = true;
|
|
471
|
+
defines.DIFFUSE = true;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
// High level
|
|
477
|
+
defines.CELLBASIC = !this.computeHighLevel;
|
|
478
|
+
// Misc.
|
|
479
|
+
core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines);
|
|
480
|
+
// Lights
|
|
481
|
+
defines._needNormals = core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting);
|
|
482
|
+
// Values that need to be evaluated on every frame
|
|
483
|
+
core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false);
|
|
484
|
+
// Attribs
|
|
485
|
+
core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.PrepareDefinesForAttributes(mesh, defines, true, true);
|
|
486
|
+
// Get correct effect
|
|
487
|
+
if (defines.isDirty) {
|
|
488
|
+
defines.markAsProcessed();
|
|
489
|
+
scene.resetCachedMaterial();
|
|
490
|
+
// Fallbacks
|
|
491
|
+
var fallbacks = new core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.EffectFallbacks();
|
|
492
|
+
if (defines.FOG) {
|
|
493
|
+
fallbacks.addFallback(1, "FOG");
|
|
494
|
+
}
|
|
495
|
+
core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights);
|
|
496
|
+
if (defines.NUM_BONE_INFLUENCERS > 0) {
|
|
497
|
+
fallbacks.addCPUSkinningFallback(0, mesh);
|
|
498
|
+
}
|
|
499
|
+
defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
|
|
500
|
+
//Attributes
|
|
501
|
+
var attribs = [core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.PositionKind];
|
|
502
|
+
if (defines.NORMAL) {
|
|
503
|
+
attribs.push(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.NormalKind);
|
|
504
|
+
}
|
|
505
|
+
if (defines.UV1) {
|
|
506
|
+
attribs.push(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.UVKind);
|
|
507
|
+
}
|
|
508
|
+
if (defines.UV2) {
|
|
509
|
+
attribs.push(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.UV2Kind);
|
|
510
|
+
}
|
|
511
|
+
if (defines.VERTEXCOLOR) {
|
|
512
|
+
attribs.push(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.VertexBuffer.ColorKind);
|
|
513
|
+
}
|
|
514
|
+
core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
|
|
515
|
+
core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.PrepareAttributesForInstances(attribs, defines);
|
|
516
|
+
var shaderName = "cell";
|
|
517
|
+
var join = defines.toString();
|
|
518
|
+
var uniforms = [
|
|
519
|
+
"world",
|
|
520
|
+
"view",
|
|
521
|
+
"viewProjection",
|
|
522
|
+
"vEyePosition",
|
|
523
|
+
"vLightsType",
|
|
524
|
+
"vDiffuseColor",
|
|
525
|
+
"vFogInfos",
|
|
526
|
+
"vFogColor",
|
|
527
|
+
"pointSize",
|
|
528
|
+
"vDiffuseInfos",
|
|
529
|
+
"mBones",
|
|
530
|
+
"vClipPlane",
|
|
531
|
+
"vClipPlane2",
|
|
532
|
+
"vClipPlane3",
|
|
533
|
+
"vClipPlane4",
|
|
534
|
+
"vClipPlane5",
|
|
535
|
+
"vClipPlane6",
|
|
536
|
+
"diffuseMatrix",
|
|
537
|
+
];
|
|
538
|
+
var samplers = ["diffuseSampler"];
|
|
539
|
+
var uniformBuffers = new Array();
|
|
540
|
+
core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.PrepareUniformsAndSamplersList({
|
|
541
|
+
uniformsNames: uniforms,
|
|
542
|
+
uniformBuffersNames: uniformBuffers,
|
|
543
|
+
samplers: samplers,
|
|
544
|
+
defines: defines,
|
|
545
|
+
maxSimultaneousLights: this.maxSimultaneousLights,
|
|
546
|
+
});
|
|
547
|
+
subMesh.setEffect(scene.getEngine().createEffect(shaderName, {
|
|
548
|
+
attributes: attribs,
|
|
549
|
+
uniformsNames: uniforms,
|
|
550
|
+
uniformBuffersNames: uniformBuffers,
|
|
551
|
+
samplers: samplers,
|
|
552
|
+
defines: join,
|
|
553
|
+
fallbacks: fallbacks,
|
|
554
|
+
onCompiled: this.onCompiled,
|
|
555
|
+
onError: this.onError,
|
|
556
|
+
indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights - 1 },
|
|
557
|
+
}, engine), defines, this._materialContext);
|
|
558
|
+
}
|
|
559
|
+
if (!subMesh.effect || !subMesh.effect.isReady()) {
|
|
560
|
+
return false;
|
|
561
|
+
}
|
|
562
|
+
defines._renderId = scene.getRenderId();
|
|
563
|
+
subMesh.effect._wasPreviouslyReady = true;
|
|
564
|
+
return true;
|
|
565
|
+
};
|
|
566
|
+
CellMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) {
|
|
567
|
+
var scene = this.getScene();
|
|
568
|
+
var defines = subMesh.materialDefines;
|
|
569
|
+
if (!defines) {
|
|
570
|
+
return;
|
|
571
|
+
}
|
|
572
|
+
var effect = subMesh.effect;
|
|
573
|
+
if (!effect) {
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
this._activeEffect = effect;
|
|
577
|
+
// Matrices
|
|
578
|
+
this.bindOnlyWorldMatrix(world);
|
|
579
|
+
this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix());
|
|
580
|
+
// Bones
|
|
581
|
+
core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.BindBonesParameters(mesh, this._activeEffect);
|
|
582
|
+
if (this._mustRebind(scene, effect)) {
|
|
583
|
+
// Textures
|
|
584
|
+
if (this._diffuseTexture && core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialFlags.DiffuseTextureEnabled) {
|
|
585
|
+
this._activeEffect.setTexture("diffuseSampler", this._diffuseTexture);
|
|
586
|
+
this._activeEffect.setFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);
|
|
587
|
+
this._activeEffect.setMatrix("diffuseMatrix", this._diffuseTexture.getTextureMatrix());
|
|
588
|
+
}
|
|
589
|
+
// Clip plane
|
|
590
|
+
core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.BindClipPlane(this._activeEffect, scene);
|
|
591
|
+
// Point size
|
|
592
|
+
if (this.pointsCloud) {
|
|
593
|
+
this._activeEffect.setFloat("pointSize", this.pointSize);
|
|
594
|
+
}
|
|
595
|
+
scene.bindEyePosition(effect);
|
|
596
|
+
}
|
|
597
|
+
this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);
|
|
598
|
+
// Lights
|
|
599
|
+
if (scene.lightsEnabled && !this.disableLighting) {
|
|
600
|
+
core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.BindLights(scene, mesh, this._activeEffect, defines, this._maxSimultaneousLights);
|
|
601
|
+
}
|
|
602
|
+
// View
|
|
603
|
+
if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.Scene.FOGMODE_NONE) {
|
|
604
|
+
this._activeEffect.setMatrix("view", scene.getViewMatrix());
|
|
605
|
+
}
|
|
606
|
+
// Fog
|
|
607
|
+
core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.MaterialHelper.BindFogParameters(scene, mesh, this._activeEffect);
|
|
608
|
+
this._afterBind(mesh, this._activeEffect);
|
|
609
|
+
};
|
|
610
|
+
CellMaterial.prototype.getAnimatables = function () {
|
|
611
|
+
var results = [];
|
|
612
|
+
if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) {
|
|
613
|
+
results.push(this._diffuseTexture);
|
|
614
|
+
}
|
|
615
|
+
return results;
|
|
616
|
+
};
|
|
617
|
+
CellMaterial.prototype.getActiveTextures = function () {
|
|
618
|
+
var activeTextures = _super.prototype.getActiveTextures.call(this);
|
|
619
|
+
if (this._diffuseTexture) {
|
|
620
|
+
activeTextures.push(this._diffuseTexture);
|
|
621
|
+
}
|
|
622
|
+
return activeTextures;
|
|
623
|
+
};
|
|
624
|
+
CellMaterial.prototype.hasTexture = function (texture) {
|
|
625
|
+
if (_super.prototype.hasTexture.call(this, texture)) {
|
|
626
|
+
return true;
|
|
627
|
+
}
|
|
628
|
+
return this._diffuseTexture === texture;
|
|
629
|
+
};
|
|
630
|
+
CellMaterial.prototype.dispose = function (forceDisposeEffect) {
|
|
631
|
+
if (this._diffuseTexture) {
|
|
632
|
+
this._diffuseTexture.dispose();
|
|
633
|
+
}
|
|
634
|
+
_super.prototype.dispose.call(this, forceDisposeEffect);
|
|
635
|
+
};
|
|
636
|
+
CellMaterial.prototype.getClassName = function () {
|
|
637
|
+
return "CellMaterial";
|
|
638
|
+
};
|
|
639
|
+
CellMaterial.prototype.clone = function (name) {
|
|
640
|
+
var _this = this;
|
|
641
|
+
return core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Clone(function () { return new CellMaterial(name, _this.getScene()); }, this);
|
|
642
|
+
};
|
|
643
|
+
CellMaterial.prototype.serialize = function () {
|
|
644
|
+
var serializationObject = _super.prototype.serialize.call(this);
|
|
645
|
+
serializationObject.customType = "BABYLON.CellMaterial";
|
|
646
|
+
return serializationObject;
|
|
647
|
+
};
|
|
648
|
+
// Statics
|
|
649
|
+
CellMaterial.Parse = function (source, scene, rootUrl) {
|
|
650
|
+
return core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.SerializationHelper.Parse(function () { return new CellMaterial(source.name, scene); }, source, scene, rootUrl);
|
|
651
|
+
};
|
|
652
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
653
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serializeAsTexture)("diffuseTexture")
|
|
654
|
+
], CellMaterial.prototype, "_diffuseTexture", void 0);
|
|
655
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
656
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.expandToProperty)("_markAllSubMeshesAsTexturesDirty")
|
|
657
|
+
], CellMaterial.prototype, "diffuseTexture", void 0);
|
|
658
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
659
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serializeAsColor3)("diffuse")
|
|
660
|
+
], CellMaterial.prototype, "diffuseColor", void 0);
|
|
661
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
662
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serialize)("computeHighLevel")
|
|
663
|
+
], CellMaterial.prototype, "_computeHighLevel", void 0);
|
|
664
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
665
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.expandToProperty)("_markAllSubMeshesAsTexturesDirty")
|
|
666
|
+
], CellMaterial.prototype, "computeHighLevel", void 0);
|
|
667
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
668
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serialize)("disableLighting")
|
|
669
|
+
], CellMaterial.prototype, "_disableLighting", void 0);
|
|
670
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
671
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.expandToProperty)("_markAllSubMeshesAsLightsDirty")
|
|
672
|
+
], CellMaterial.prototype, "disableLighting", void 0);
|
|
673
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
674
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.serialize)("maxSimultaneousLights")
|
|
675
|
+
], CellMaterial.prototype, "_maxSimultaneousLights", void 0);
|
|
676
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
677
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.expandToProperty)("_markAllSubMeshesAsLightsDirty")
|
|
678
|
+
], CellMaterial.prototype, "maxSimultaneousLights", void 0);
|
|
679
|
+
return CellMaterial;
|
|
680
|
+
}(core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.PushMaterial));
|
|
681
|
+
|
|
682
|
+
(0,core_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__.RegisterClass)("BABYLON.CellMaterial", CellMaterial);
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
/***/ }),
|
|
686
|
+
|
|
687
|
+
/***/ "../../../lts/materials/dist/cell/index.js":
|
|
688
|
+
/*!*************************************************!*\
|
|
689
|
+
!*** ../../../lts/materials/dist/cell/index.js ***!
|
|
690
|
+
\*************************************************/
|
|
691
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
692
|
+
|
|
693
|
+
__webpack_require__.r(__webpack_exports__);
|
|
694
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
695
|
+
/* harmony export */ "CellMaterial": () => (/* reexport safe */ _cellMaterial__WEBPACK_IMPORTED_MODULE_0__.CellMaterial)
|
|
696
|
+
/* harmony export */ });
|
|
697
|
+
/* harmony import */ var _cellMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cellMaterial */ "../../../lts/materials/dist/cell/cellMaterial.js");
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
/***/ }),
|
|
702
|
+
|
|
703
|
+
/***/ "../../../lts/materials/dist/legacy/legacy-cell.js":
|
|
704
|
+
/*!*********************************************************!*\
|
|
705
|
+
!*** ../../../lts/materials/dist/legacy/legacy-cell.js ***!
|
|
706
|
+
\*********************************************************/
|
|
707
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
708
|
+
|
|
709
|
+
__webpack_require__.r(__webpack_exports__);
|
|
710
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
711
|
+
/* harmony export */ "CellMaterial": () => (/* reexport safe */ _cell_index__WEBPACK_IMPORTED_MODULE_0__.CellMaterial)
|
|
712
|
+
/* harmony export */ });
|
|
713
|
+
/* harmony import */ var _cell_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cell/index */ "../../../lts/materials/dist/cell/index.js");
|
|
714
|
+
/* eslint-disable import/no-internal-modules */
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* This is the entry point for the UMD module.
|
|
718
|
+
* The entry point for a future ESM package should be index.ts
|
|
719
|
+
*/
|
|
720
|
+
var globalObject = typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : undefined;
|
|
721
|
+
if (typeof globalObject !== "undefined") {
|
|
722
|
+
for (var key in _cell_index__WEBPACK_IMPORTED_MODULE_0__) {
|
|
723
|
+
globalObject.BABYLON[key] = _cell_index__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
/***/ }),
|
|
730
|
+
|
|
731
|
+
/***/ "core/Misc/decorators":
|
|
732
|
+
/*!****************************************************************************************************!*\
|
|
733
|
+
!*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
|
|
734
|
+
\****************************************************************************************************/
|
|
735
|
+
/***/ ((module) => {
|
|
736
|
+
|
|
737
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_core_Misc_decorators__;
|
|
738
|
+
|
|
739
|
+
/***/ })
|
|
740
|
+
|
|
741
|
+
/******/ });
|
|
742
|
+
/************************************************************************/
|
|
743
|
+
/******/ // The module cache
|
|
744
|
+
/******/ var __webpack_module_cache__ = {};
|
|
745
|
+
/******/
|
|
746
|
+
/******/ // The require function
|
|
747
|
+
/******/ function __webpack_require__(moduleId) {
|
|
748
|
+
/******/ // Check if module is in cache
|
|
749
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
750
|
+
/******/ if (cachedModule !== undefined) {
|
|
751
|
+
/******/ return cachedModule.exports;
|
|
752
|
+
/******/ }
|
|
753
|
+
/******/ // Create a new module (and put it into the cache)
|
|
754
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
755
|
+
/******/ // no module.id needed
|
|
756
|
+
/******/ // no module.loaded needed
|
|
757
|
+
/******/ exports: {}
|
|
758
|
+
/******/ };
|
|
759
|
+
/******/
|
|
760
|
+
/******/ // Execute the module function
|
|
761
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
762
|
+
/******/
|
|
763
|
+
/******/ // Return the exports of the module
|
|
764
|
+
/******/ return module.exports;
|
|
765
|
+
/******/ }
|
|
766
|
+
/******/
|
|
767
|
+
/************************************************************************/
|
|
768
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
769
|
+
/******/ (() => {
|
|
770
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
771
|
+
/******/ __webpack_require__.n = (module) => {
|
|
772
|
+
/******/ var getter = module && module.__esModule ?
|
|
773
|
+
/******/ () => (module['default']) :
|
|
774
|
+
/******/ () => (module);
|
|
775
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
776
|
+
/******/ return getter;
|
|
777
|
+
/******/ };
|
|
778
|
+
/******/ })();
|
|
779
|
+
/******/
|
|
780
|
+
/******/ /* webpack/runtime/define property getters */
|
|
781
|
+
/******/ (() => {
|
|
782
|
+
/******/ // define getter functions for harmony exports
|
|
783
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
784
|
+
/******/ for(var key in definition) {
|
|
785
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
786
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
787
|
+
/******/ }
|
|
788
|
+
/******/ }
|
|
789
|
+
/******/ };
|
|
790
|
+
/******/ })();
|
|
791
|
+
/******/
|
|
792
|
+
/******/ /* webpack/runtime/global */
|
|
793
|
+
/******/ (() => {
|
|
794
|
+
/******/ __webpack_require__.g = (function() {
|
|
795
|
+
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
796
|
+
/******/ try {
|
|
797
|
+
/******/ return this || new Function('return this')();
|
|
798
|
+
/******/ } catch (e) {
|
|
799
|
+
/******/ if (typeof window === 'object') return window;
|
|
800
|
+
/******/ }
|
|
801
|
+
/******/ })();
|
|
802
|
+
/******/ })();
|
|
803
|
+
/******/
|
|
804
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
805
|
+
/******/ (() => {
|
|
806
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
807
|
+
/******/ })();
|
|
808
|
+
/******/
|
|
809
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
810
|
+
/******/ (() => {
|
|
811
|
+
/******/ // define __esModule on exports
|
|
812
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
813
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
814
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
815
|
+
/******/ }
|
|
816
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
817
|
+
/******/ };
|
|
818
|
+
/******/ })();
|
|
819
|
+
/******/
|
|
820
|
+
/************************************************************************/
|
|
821
|
+
var __webpack_exports__ = {};
|
|
822
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
823
|
+
(() => {
|
|
824
|
+
/*!*********************!*\
|
|
825
|
+
!*** ./src/cell.ts ***!
|
|
826
|
+
\*********************/
|
|
827
|
+
__webpack_require__.r(__webpack_exports__);
|
|
828
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
829
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
830
|
+
/* harmony export */ "materials": () => (/* reexport module object */ materials_legacy_legacy_cell__WEBPACK_IMPORTED_MODULE_0__)
|
|
831
|
+
/* harmony export */ });
|
|
832
|
+
/* harmony import */ var materials_legacy_legacy_cell__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! materials/legacy/legacy-cell */ "../../../lts/materials/dist/legacy/legacy-cell.js");
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (materials_legacy_legacy_cell__WEBPACK_IMPORTED_MODULE_0__);
|
|
836
|
+
|
|
837
|
+
})();
|
|
838
|
+
|
|
839
|
+
__webpack_exports__ = __webpack_exports__["default"];
|
|
840
|
+
/******/ return __webpack_exports__;
|
|
841
|
+
/******/ })()
|
|
842
|
+
;
|
|
843
|
+
});
|
|
844
|
+
//# sourceMappingURL=babylon.cellMaterial.js.map
|