babylonjs-materials 6.10.0 → 6.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babylon.cellMaterial.js +78 -78
- package/babylon.cellMaterial.js.map +1 -1
- package/babylon.cellMaterial.min.js.map +1 -1
- package/babylon.customMaterial.js +56 -56
- package/babylon.customMaterial.js.map +1 -1
- package/babylon.customMaterial.min.js.map +1 -1
- package/babylon.fireMaterial.js +76 -76
- package/babylon.fireMaterial.js.map +1 -1
- package/babylon.fireMaterial.min.js.map +1 -1
- package/babylon.furMaterial.js +97 -97
- package/babylon.furMaterial.js.map +1 -1
- package/babylon.furMaterial.min.js.map +1 -1
- package/babylon.gradientMaterial.js +79 -79
- package/babylon.gradientMaterial.js.map +1 -1
- package/babylon.gradientMaterial.min.js.map +1 -1
- package/babylon.gridMaterial.js +71 -71
- package/babylon.gridMaterial.js.map +1 -1
- package/babylon.gridMaterial.min.js.map +1 -1
- package/babylon.lavaMaterial.js +86 -86
- package/babylon.lavaMaterial.js.map +1 -1
- package/babylon.lavaMaterial.min.js.map +1 -1
- package/babylon.mixMaterial.js +118 -118
- package/babylon.mixMaterial.js.map +1 -1
- package/babylon.mixMaterial.min.js.map +1 -1
- package/babylon.normalMaterial.js +95 -95
- package/babylon.normalMaterial.js.map +1 -1
- package/babylon.normalMaterial.min.js.map +1 -1
- package/babylon.shadowOnlyMaterial.js +84 -84
- package/babylon.shadowOnlyMaterial.js.map +1 -1
- package/babylon.shadowOnlyMaterial.min.js.map +1 -1
- package/babylon.simpleMaterial.js +96 -96
- package/babylon.simpleMaterial.js.map +1 -1
- package/babylon.simpleMaterial.min.js.map +1 -1
- package/babylon.skyMaterial.js +94 -94
- package/babylon.skyMaterial.js.map +1 -1
- package/babylon.skyMaterial.min.js.map +1 -1
- package/babylon.terrainMaterial.js +113 -113
- package/babylon.terrainMaterial.js.map +1 -1
- package/babylon.terrainMaterial.min.js.map +1 -1
- package/babylon.triPlanarMaterial.js +109 -109
- package/babylon.triPlanarMaterial.js.map +1 -1
- package/babylon.triPlanarMaterial.min.js.map +1 -1
- package/babylon.waterMaterial.js +158 -144
- package/babylon.waterMaterial.js.map +1 -1
- package/babylon.waterMaterial.min.js +1 -1
- package/babylon.waterMaterial.min.js.map +1 -1
- package/babylonjs.materials.d.ts +31 -30
- package/babylonjs.materials.js +1110 -1096
- package/babylonjs.materials.js.map +1 -1
- package/babylonjs.materials.min.js +1 -1
- package/babylonjs.materials.min.js.map +1 -1
- package/babylonjs.materials.module.d.ts +96 -94
- package/config.json +1 -1
- package/package.json +3 -3
- package/src/cell.ts +1 -1
- package/src/custom.ts +1 -1
- package/src/fire.ts +1 -1
- package/src/fur.ts +1 -1
- package/src/gradient.ts +1 -1
- package/src/grid.ts +1 -1
- package/src/index.ts +1 -1
- package/src/lava.ts +1 -1
- package/src/mix.ts +1 -1
- package/src/normal.ts +1 -1
- package/src/shadowOnly.ts +1 -1
- package/src/simple.ts +1 -1
- package/src/sky.ts +1 -1
- package/src/terrain.ts +1 -1
- package/src/triPlanar.ts +1 -1
- package/src/water.ts +1 -1
- package/tsconfig.build.json +7 -3
- package/tsconfig.json +2 -1
- package/webpack.config.js +4 -0
package/babylon.cellMaterial.js
CHANGED
|
@@ -7,23 +7,23 @@
|
|
|
7
7
|
exports["babylonjs-materials"] = factory(require("babylonjs"));
|
|
8
8
|
else
|
|
9
9
|
root["MATERIALS"] = factory(root["BABYLON"]);
|
|
10
|
-
})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), (
|
|
10
|
+
})((typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : this), (__WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ "use strict";
|
|
13
13
|
/******/ var __webpack_modules__ = ({
|
|
14
14
|
|
|
15
|
-
/***/ "../../../
|
|
16
|
-
|
|
17
|
-
!*** ../../../
|
|
18
|
-
|
|
15
|
+
/***/ "../../../dev/materials/src/cell/cell.fragment.ts":
|
|
16
|
+
/*!********************************************************!*\
|
|
17
|
+
!*** ../../../dev/materials/src/cell/cell.fragment.ts ***!
|
|
18
|
+
\********************************************************/
|
|
19
19
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
20
20
|
|
|
21
21
|
__webpack_require__.r(__webpack_exports__);
|
|
22
22
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23
23
|
/* harmony export */ cellPixelShader: () => (/* binding */ cellPixelShader)
|
|
24
24
|
/* harmony export */ });
|
|
25
|
-
/* harmony import */ var
|
|
26
|
-
/* harmony import */ var
|
|
25
|
+
/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Shaders/ShadersInclude/imageProcessingCompatibility */ "babylonjs/Misc/decorators");
|
|
26
|
+
/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
|
|
27
27
|
// Do not edit.
|
|
28
28
|
|
|
29
29
|
|
|
@@ -41,25 +41,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41
41
|
var name = "cellPixelShader";
|
|
42
42
|
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#if defined(VERTEXALPHA) || defined(INSTANCESCOLOR) && defined(INSTANCES)\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}";
|
|
43
43
|
// Sideeffect
|
|
44
|
-
|
|
44
|
+
babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
|
|
45
45
|
/** @internal */
|
|
46
46
|
var cellPixelShader = { name: name, shader: shader };
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
/***/ }),
|
|
50
50
|
|
|
51
|
-
/***/ "../../../
|
|
52
|
-
|
|
53
|
-
!*** ../../../
|
|
54
|
-
|
|
51
|
+
/***/ "../../../dev/materials/src/cell/cell.vertex.ts":
|
|
52
|
+
/*!******************************************************!*\
|
|
53
|
+
!*** ../../../dev/materials/src/cell/cell.vertex.ts ***!
|
|
54
|
+
\******************************************************/
|
|
55
55
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
56
56
|
|
|
57
57
|
__webpack_require__.r(__webpack_exports__);
|
|
58
58
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
59
59
|
/* harmony export */ cellVertexShader: () => (/* binding */ cellVertexShader)
|
|
60
60
|
/* harmony export */ });
|
|
61
|
-
/* harmony import */ var
|
|
62
|
-
/* harmony import */ var
|
|
61
|
+
/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Shaders/ShadersInclude/vertexColorMixing */ "babylonjs/Misc/decorators");
|
|
62
|
+
/* harmony import */ var babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__);
|
|
63
63
|
// Do not edit.
|
|
64
64
|
|
|
65
65
|
|
|
@@ -79,17 +79,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
79
79
|
var name = "cellVertexShader";
|
|
80
80
|
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#include<vertexColorMixing>\n#if defined(POINTSIZE) && !defined(WEBGPU)\ngl_PointSize=pointSize;\n#endif\n#define CUSTOM_VERTEX_MAIN_END\n}\n";
|
|
81
81
|
// Sideeffect
|
|
82
|
-
|
|
82
|
+
babylonjs_Engines_shaderStore__WEBPACK_IMPORTED_MODULE_0__.ShaderStore.ShadersStore[name] = shader;
|
|
83
83
|
/** @internal */
|
|
84
84
|
var cellVertexShader = { name: name, shader: shader };
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
/***/ }),
|
|
88
88
|
|
|
89
|
-
/***/ "../../../
|
|
90
|
-
|
|
91
|
-
!*** ../../../
|
|
92
|
-
|
|
89
|
+
/***/ "../../../dev/materials/src/cell/cellMaterial.ts":
|
|
90
|
+
/*!*******************************************************!*\
|
|
91
|
+
!*** ../../../dev/materials/src/cell/cellMaterial.ts ***!
|
|
92
|
+
\*******************************************************/
|
|
93
93
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
94
94
|
|
|
95
95
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -97,10 +97,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
97
97
|
/* harmony export */ CellMaterial: () => (/* binding */ CellMaterial)
|
|
98
98
|
/* harmony export */ });
|
|
99
99
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.mjs");
|
|
100
|
-
/* harmony import */ var
|
|
101
|
-
/* harmony import */ var
|
|
102
|
-
/* harmony import */ var _cell_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cell.fragment */ "../../../
|
|
103
|
-
/* harmony import */ var _cell_vertex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cell.vertex */ "../../../
|
|
100
|
+
/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! babylonjs/Materials/clipPlaneMaterialHelper */ "babylonjs/Misc/decorators");
|
|
101
|
+
/* harmony import */ var babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__);
|
|
102
|
+
/* harmony import */ var _cell_fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cell.fragment */ "../../../dev/materials/src/cell/cell.fragment.ts");
|
|
103
|
+
/* harmony import */ var _cell_vertex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cell.vertex */ "../../../dev/materials/src/cell/cell.vertex.ts");
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
|
|
@@ -148,12 +148,12 @@ var CellMaterialDefines = /** @class */ (function (_super) {
|
|
|
148
148
|
return _this;
|
|
149
149
|
}
|
|
150
150
|
return CellMaterialDefines;
|
|
151
|
-
}(
|
|
151
|
+
}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialDefines));
|
|
152
152
|
var CellMaterial = /** @class */ (function (_super) {
|
|
153
153
|
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__extends)(CellMaterial, _super);
|
|
154
154
|
function CellMaterial(name, scene) {
|
|
155
155
|
var _this = _super.call(this, name, scene) || this;
|
|
156
|
-
_this.diffuseColor = new
|
|
156
|
+
_this.diffuseColor = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Color3(1, 1, 1);
|
|
157
157
|
_this._computeHighLevel = false;
|
|
158
158
|
_this._disableLighting = false;
|
|
159
159
|
_this._maxSimultaneousLights = 4;
|
|
@@ -188,7 +188,7 @@ var CellMaterial = /** @class */ (function (_super) {
|
|
|
188
188
|
if (defines._areTexturesDirty) {
|
|
189
189
|
defines._needUVs = false;
|
|
190
190
|
if (scene.texturesEnabled) {
|
|
191
|
-
if (this._diffuseTexture &&
|
|
191
|
+
if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialFlags.DiffuseTextureEnabled) {
|
|
192
192
|
if (!this._diffuseTexture.isReady()) {
|
|
193
193
|
return false;
|
|
194
194
|
}
|
|
@@ -202,43 +202,43 @@ var CellMaterial = /** @class */ (function (_super) {
|
|
|
202
202
|
// High level
|
|
203
203
|
defines.CELLBASIC = !this.computeHighLevel;
|
|
204
204
|
// Misc.
|
|
205
|
-
|
|
205
|
+
babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialHelper.PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines);
|
|
206
206
|
// Lights
|
|
207
|
-
defines._needNormals =
|
|
207
|
+
defines._needNormals = babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialHelper.PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting);
|
|
208
208
|
// Values that need to be evaluated on every frame
|
|
209
|
-
|
|
209
|
+
babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialHelper.PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances ? true : false);
|
|
210
210
|
// Attribs
|
|
211
|
-
|
|
211
|
+
babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialHelper.PrepareDefinesForAttributes(mesh, defines, true, true);
|
|
212
212
|
// Get correct effect
|
|
213
213
|
if (defines.isDirty) {
|
|
214
214
|
defines.markAsProcessed();
|
|
215
215
|
scene.resetCachedMaterial();
|
|
216
216
|
// Fallbacks
|
|
217
|
-
var fallbacks = new
|
|
217
|
+
var fallbacks = new babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.EffectFallbacks();
|
|
218
218
|
if (defines.FOG) {
|
|
219
219
|
fallbacks.addFallback(1, "FOG");
|
|
220
220
|
}
|
|
221
|
-
|
|
221
|
+
babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialHelper.HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights);
|
|
222
222
|
if (defines.NUM_BONE_INFLUENCERS > 0) {
|
|
223
223
|
fallbacks.addCPUSkinningFallback(0, mesh);
|
|
224
224
|
}
|
|
225
225
|
defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
|
|
226
226
|
//Attributes
|
|
227
|
-
var attribs = [
|
|
227
|
+
var attribs = [babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer.PositionKind];
|
|
228
228
|
if (defines.NORMAL) {
|
|
229
|
-
attribs.push(
|
|
229
|
+
attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer.NormalKind);
|
|
230
230
|
}
|
|
231
231
|
if (defines.UV1) {
|
|
232
|
-
attribs.push(
|
|
232
|
+
attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer.UVKind);
|
|
233
233
|
}
|
|
234
234
|
if (defines.UV2) {
|
|
235
|
-
attribs.push(
|
|
235
|
+
attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer.UV2Kind);
|
|
236
236
|
}
|
|
237
237
|
if (defines.VERTEXCOLOR) {
|
|
238
|
-
attribs.push(
|
|
238
|
+
attribs.push(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.VertexBuffer.ColorKind);
|
|
239
239
|
}
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialHelper.PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
|
|
241
|
+
babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialHelper.PrepareAttributesForInstances(attribs, defines);
|
|
242
242
|
var shaderName = "cell";
|
|
243
243
|
var join = defines.toString();
|
|
244
244
|
var uniforms = [
|
|
@@ -257,8 +257,8 @@ var CellMaterial = /** @class */ (function (_super) {
|
|
|
257
257
|
];
|
|
258
258
|
var samplers = ["diffuseSampler"];
|
|
259
259
|
var uniformBuffers = new Array();
|
|
260
|
-
(0,
|
|
261
|
-
|
|
260
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.addClipPlaneUniforms)(uniforms);
|
|
261
|
+
babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialHelper.PrepareUniformsAndSamplersList({
|
|
262
262
|
uniformsNames: uniforms,
|
|
263
263
|
uniformBuffersNames: uniformBuffers,
|
|
264
264
|
samplers: samplers,
|
|
@@ -300,16 +300,16 @@ var CellMaterial = /** @class */ (function (_super) {
|
|
|
300
300
|
this.bindOnlyWorldMatrix(world);
|
|
301
301
|
this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix());
|
|
302
302
|
// Bones
|
|
303
|
-
|
|
303
|
+
babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialHelper.BindBonesParameters(mesh, this._activeEffect);
|
|
304
304
|
if (this._mustRebind(scene, effect)) {
|
|
305
305
|
// Textures
|
|
306
|
-
if (this._diffuseTexture &&
|
|
306
|
+
if (this._diffuseTexture && babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialFlags.DiffuseTextureEnabled) {
|
|
307
307
|
this._activeEffect.setTexture("diffuseSampler", this._diffuseTexture);
|
|
308
308
|
this._activeEffect.setFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);
|
|
309
309
|
this._activeEffect.setMatrix("diffuseMatrix", this._diffuseTexture.getTextureMatrix());
|
|
310
310
|
}
|
|
311
311
|
// Clip plane
|
|
312
|
-
(0,
|
|
312
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.bindClipPlane)(this._activeEffect, this, scene);
|
|
313
313
|
// Point size
|
|
314
314
|
if (this.pointsCloud) {
|
|
315
315
|
this._activeEffect.setFloat("pointSize", this.pointSize);
|
|
@@ -319,14 +319,14 @@ var CellMaterial = /** @class */ (function (_super) {
|
|
|
319
319
|
this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);
|
|
320
320
|
// Lights
|
|
321
321
|
if (scene.lightsEnabled && !this.disableLighting) {
|
|
322
|
-
|
|
322
|
+
babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialHelper.BindLights(scene, mesh, this._activeEffect, defines, this._maxSimultaneousLights);
|
|
323
323
|
}
|
|
324
324
|
// View
|
|
325
|
-
if (scene.fogEnabled && mesh.applyFog && scene.fogMode !==
|
|
325
|
+
if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.Scene.FOGMODE_NONE) {
|
|
326
326
|
this._activeEffect.setMatrix("view", scene.getViewMatrix());
|
|
327
327
|
}
|
|
328
328
|
// Fog
|
|
329
|
-
|
|
329
|
+
babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.MaterialHelper.BindFogParameters(scene, mesh, this._activeEffect);
|
|
330
330
|
this._afterBind(mesh, this._activeEffect);
|
|
331
331
|
};
|
|
332
332
|
CellMaterial.prototype.getAnimatables = function () {
|
|
@@ -360,7 +360,7 @@ var CellMaterial = /** @class */ (function (_super) {
|
|
|
360
360
|
};
|
|
361
361
|
CellMaterial.prototype.clone = function (name) {
|
|
362
362
|
var _this = this;
|
|
363
|
-
return
|
|
363
|
+
return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Clone(function () { return new CellMaterial(name, _this.getScene()); }, this);
|
|
364
364
|
};
|
|
365
365
|
CellMaterial.prototype.serialize = function () {
|
|
366
366
|
var serializationObject = _super.prototype.serialize.call(this);
|
|
@@ -369,69 +369,69 @@ var CellMaterial = /** @class */ (function (_super) {
|
|
|
369
369
|
};
|
|
370
370
|
// Statics
|
|
371
371
|
CellMaterial.Parse = function (source, scene, rootUrl) {
|
|
372
|
-
return
|
|
372
|
+
return babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.SerializationHelper.Parse(function () { return new CellMaterial(source.name, scene); }, source, scene, rootUrl);
|
|
373
373
|
};
|
|
374
374
|
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
|
|
375
|
-
(0,
|
|
375
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsTexture)("diffuseTexture")
|
|
376
376
|
], CellMaterial.prototype, "_diffuseTexture", void 0);
|
|
377
377
|
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
|
|
378
|
-
(0,
|
|
378
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.expandToProperty)("_markAllSubMeshesAsTexturesDirty")
|
|
379
379
|
], CellMaterial.prototype, "diffuseTexture", void 0);
|
|
380
380
|
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
|
|
381
|
-
(0,
|
|
381
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serializeAsColor3)("diffuse")
|
|
382
382
|
], CellMaterial.prototype, "diffuseColor", void 0);
|
|
383
383
|
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
|
|
384
|
-
(0,
|
|
384
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)("computeHighLevel")
|
|
385
385
|
], CellMaterial.prototype, "_computeHighLevel", void 0);
|
|
386
386
|
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
|
|
387
|
-
(0,
|
|
387
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.expandToProperty)("_markAllSubMeshesAsTexturesDirty")
|
|
388
388
|
], CellMaterial.prototype, "computeHighLevel", void 0);
|
|
389
389
|
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
|
|
390
|
-
(0,
|
|
390
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)("disableLighting")
|
|
391
391
|
], CellMaterial.prototype, "_disableLighting", void 0);
|
|
392
392
|
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
|
|
393
|
-
(0,
|
|
393
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.expandToProperty)("_markAllSubMeshesAsLightsDirty")
|
|
394
394
|
], CellMaterial.prototype, "disableLighting", void 0);
|
|
395
395
|
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
|
|
396
|
-
(0,
|
|
396
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.serialize)("maxSimultaneousLights")
|
|
397
397
|
], CellMaterial.prototype, "_maxSimultaneousLights", void 0);
|
|
398
398
|
(0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
|
|
399
|
-
(0,
|
|
399
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.expandToProperty)("_markAllSubMeshesAsLightsDirty")
|
|
400
400
|
], CellMaterial.prototype, "maxSimultaneousLights", void 0);
|
|
401
401
|
return CellMaterial;
|
|
402
|
-
}(
|
|
403
|
-
(0,
|
|
402
|
+
}(babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.PushMaterial));
|
|
403
|
+
(0,babylonjs_Misc_decorators__WEBPACK_IMPORTED_MODULE_0__.RegisterClass)("BABYLON.CellMaterial", CellMaterial);
|
|
404
404
|
|
|
405
405
|
|
|
406
406
|
/***/ }),
|
|
407
407
|
|
|
408
|
-
/***/ "../../../
|
|
409
|
-
|
|
410
|
-
!*** ../../../
|
|
411
|
-
|
|
408
|
+
/***/ "../../../dev/materials/src/cell/index.ts":
|
|
409
|
+
/*!************************************************!*\
|
|
410
|
+
!*** ../../../dev/materials/src/cell/index.ts ***!
|
|
411
|
+
\************************************************/
|
|
412
412
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
413
413
|
|
|
414
414
|
__webpack_require__.r(__webpack_exports__);
|
|
415
415
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
416
416
|
/* harmony export */ CellMaterial: () => (/* reexport safe */ _cellMaterial__WEBPACK_IMPORTED_MODULE_0__.CellMaterial)
|
|
417
417
|
/* harmony export */ });
|
|
418
|
-
/* harmony import */ var _cellMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cellMaterial */ "../../../
|
|
418
|
+
/* harmony import */ var _cellMaterial__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cellMaterial */ "../../../dev/materials/src/cell/cellMaterial.ts");
|
|
419
419
|
|
|
420
420
|
|
|
421
421
|
|
|
422
422
|
/***/ }),
|
|
423
423
|
|
|
424
|
-
/***/ "../../../lts/materials/
|
|
425
|
-
|
|
426
|
-
!*** ../../../lts/materials/
|
|
427
|
-
|
|
424
|
+
/***/ "../../../lts/materials/src/legacy/legacy-cell.ts":
|
|
425
|
+
/*!********************************************************!*\
|
|
426
|
+
!*** ../../../lts/materials/src/legacy/legacy-cell.ts ***!
|
|
427
|
+
\********************************************************/
|
|
428
428
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
429
429
|
|
|
430
430
|
__webpack_require__.r(__webpack_exports__);
|
|
431
431
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
432
|
-
/* harmony export */ CellMaterial: () => (/* reexport safe */
|
|
432
|
+
/* harmony export */ CellMaterial: () => (/* reexport safe */ materials_cell_index__WEBPACK_IMPORTED_MODULE_0__.CellMaterial)
|
|
433
433
|
/* harmony export */ });
|
|
434
|
-
/* harmony import */ var
|
|
434
|
+
/* harmony import */ var materials_cell_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! materials/cell/index */ "../../../dev/materials/src/cell/index.ts");
|
|
435
435
|
/* eslint-disable import/no-internal-modules */
|
|
436
436
|
|
|
437
437
|
/**
|
|
@@ -440,8 +440,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
440
440
|
*/
|
|
441
441
|
var globalObject = typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : undefined;
|
|
442
442
|
if (typeof globalObject !== "undefined") {
|
|
443
|
-
for (var key in
|
|
444
|
-
globalObject.BABYLON[key] =
|
|
443
|
+
for (var key in materials_cell_index__WEBPACK_IMPORTED_MODULE_0__) {
|
|
444
|
+
globalObject.BABYLON[key] = materials_cell_index__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
447
|
|
|
@@ -449,13 +449,13 @@ if (typeof globalObject !== "undefined") {
|
|
|
449
449
|
|
|
450
450
|
/***/ }),
|
|
451
451
|
|
|
452
|
-
/***/ "
|
|
452
|
+
/***/ "babylonjs/Misc/decorators":
|
|
453
453
|
/*!****************************************************************************************************!*\
|
|
454
454
|
!*** external {"root":"BABYLON","commonjs":"babylonjs","commonjs2":"babylonjs","amd":"babylonjs"} ***!
|
|
455
455
|
\****************************************************************************************************/
|
|
456
456
|
/***/ ((module) => {
|
|
457
457
|
|
|
458
|
-
module.exports =
|
|
458
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_babylonjs_Misc_decorators__;
|
|
459
459
|
|
|
460
460
|
/***/ }),
|
|
461
461
|
|
|
@@ -912,12 +912,12 @@ var __webpack_exports__ = {};
|
|
|
912
912
|
__webpack_require__.r(__webpack_exports__);
|
|
913
913
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
914
914
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
915
|
-
/* harmony export */ materials: () => (/* reexport module object */
|
|
915
|
+
/* harmony export */ materials: () => (/* reexport module object */ _lts_materials_legacy_legacy_cell__WEBPACK_IMPORTED_MODULE_0__)
|
|
916
916
|
/* harmony export */ });
|
|
917
|
-
/* harmony import */ var
|
|
917
|
+
/* harmony import */ var _lts_materials_legacy_legacy_cell__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @lts/materials/legacy/legacy-cell */ "../../../lts/materials/src/legacy/legacy-cell.ts");
|
|
918
918
|
|
|
919
919
|
|
|
920
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (
|
|
920
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_lts_materials_legacy_legacy_cell__WEBPACK_IMPORTED_MODULE_0__);
|
|
921
921
|
|
|
922
922
|
})();
|
|
923
923
|
|