@babylonjs/materials 9.15.0 → 9.16.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/cell/cellMaterial.d.ts +4 -4
- package/cell/cellMaterial.js +313 -268
- package/cell/cellMaterial.js.map +1 -1
- package/fire/fireMaterial.d.ts +3 -3
- package/fire/fireMaterial.js +344 -303
- package/fire/fireMaterial.js.map +1 -1
- package/fur/furMaterial.d.ts +4 -4
- package/fur/furMaterial.js +519 -450
- package/fur/furMaterial.js.map +1 -1
- package/gradient/gradientMaterial.d.ts +2 -2
- package/gradient/gradientMaterial.js +286 -246
- package/gradient/gradientMaterial.js.map +1 -1
- package/grid/gridMaterial.d.ts +1 -1
- package/grid/gridMaterial.js +453 -398
- package/grid/gridMaterial.js.map +1 -1
- package/lava/lavaMaterial.d.ts +4 -4
- package/lava/lavaMaterial.js +377 -318
- package/lava/lavaMaterial.js.map +1 -1
- package/mix/mixMaterial.d.ts +12 -12
- package/mix/mixMaterial.js +584 -456
- package/mix/mixMaterial.js.map +1 -1
- package/normal/normalMaterial.d.ts +3 -3
- package/normal/normalMaterial.js +301 -264
- package/normal/normalMaterial.js.map +1 -1
- package/package.json +2 -2
- package/simple/simpleMaterial.d.ts +3 -3
- package/simple/simpleMaterial.js +299 -262
- package/simple/simpleMaterial.js.map +1 -1
- package/sky/skyMaterial.js +380 -344
- package/sky/skyMaterial.js.map +1 -1
- package/terrain/terrainMaterial.d.ts +9 -9
- package/terrain/terrainMaterial.js +490 -395
- package/terrain/terrainMaterial.js.map +1 -1
- package/triPlanar/triPlanarMaterial.d.ts +8 -8
- package/triPlanar/triPlanarMaterial.js +460 -369
- package/triPlanar/triPlanarMaterial.js.map +1 -1
- package/water/waterMaterial.d.ts +7 -7
- package/water/waterMaterial.js +759 -659
- package/water/waterMaterial.js.map +1 -1
package/mix/mixMaterial.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet, __esDecorate, __runInitializers } from "@babylonjs/core/tslib.es6.js";
|
|
2
2
|
import { serializeAsTexture, serialize, expandToProperty, serializeAsColor3 } from "@babylonjs/core/Misc/decorators.js";
|
|
3
3
|
import { SerializationHelper } from "@babylonjs/core/Misc/decorators.serialization.js";
|
|
4
4
|
import { Color3 } from "@babylonjs/core/Maths/math.color.js";
|
|
@@ -42,485 +42,613 @@ class MixMaterialDefines extends MaterialDefines {
|
|
|
42
42
|
this.rebuild();
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
45
|
+
let MixMaterial = (() => {
|
|
46
|
+
var _a, _MixMaterial_mixTexture1_accessor_storage, _MixMaterial_mixTexture2_accessor_storage, _MixMaterial_diffuseTexture1_accessor_storage, _MixMaterial_diffuseTexture2_accessor_storage, _MixMaterial_diffuseTexture3_accessor_storage, _MixMaterial_diffuseTexture4_accessor_storage, _MixMaterial_diffuseTexture5_accessor_storage, _MixMaterial_diffuseTexture6_accessor_storage, _MixMaterial_diffuseTexture7_accessor_storage, _MixMaterial_diffuseTexture8_accessor_storage, _MixMaterial_disableLighting_accessor_storage, _MixMaterial_maxSimultaneousLights_accessor_storage;
|
|
47
|
+
let _classSuper = PushMaterial;
|
|
48
|
+
let __mixTexture1_decorators;
|
|
49
|
+
let __mixTexture1_initializers = [];
|
|
50
|
+
let __mixTexture1_extraInitializers = [];
|
|
51
|
+
let _mixTexture1_decorators;
|
|
52
|
+
let _mixTexture1_initializers = [];
|
|
53
|
+
let _mixTexture1_extraInitializers = [];
|
|
54
|
+
let __mixTexture2_decorators;
|
|
55
|
+
let __mixTexture2_initializers = [];
|
|
56
|
+
let __mixTexture2_extraInitializers = [];
|
|
57
|
+
let _mixTexture2_decorators;
|
|
58
|
+
let _mixTexture2_initializers = [];
|
|
59
|
+
let _mixTexture2_extraInitializers = [];
|
|
60
|
+
let __diffuseTexture1_decorators;
|
|
61
|
+
let __diffuseTexture1_initializers = [];
|
|
62
|
+
let __diffuseTexture1_extraInitializers = [];
|
|
63
|
+
let _diffuseTexture1_decorators;
|
|
64
|
+
let _diffuseTexture1_initializers = [];
|
|
65
|
+
let _diffuseTexture1_extraInitializers = [];
|
|
66
|
+
let __diffuseTexture2_decorators;
|
|
67
|
+
let __diffuseTexture2_initializers = [];
|
|
68
|
+
let __diffuseTexture2_extraInitializers = [];
|
|
69
|
+
let _diffuseTexture2_decorators;
|
|
70
|
+
let _diffuseTexture2_initializers = [];
|
|
71
|
+
let _diffuseTexture2_extraInitializers = [];
|
|
72
|
+
let __diffuseTexture3_decorators;
|
|
73
|
+
let __diffuseTexture3_initializers = [];
|
|
74
|
+
let __diffuseTexture3_extraInitializers = [];
|
|
75
|
+
let _diffuseTexture3_decorators;
|
|
76
|
+
let _diffuseTexture3_initializers = [];
|
|
77
|
+
let _diffuseTexture3_extraInitializers = [];
|
|
78
|
+
let __diffuseTexture4_decorators;
|
|
79
|
+
let __diffuseTexture4_initializers = [];
|
|
80
|
+
let __diffuseTexture4_extraInitializers = [];
|
|
81
|
+
let _diffuseTexture4_decorators;
|
|
82
|
+
let _diffuseTexture4_initializers = [];
|
|
83
|
+
let _diffuseTexture4_extraInitializers = [];
|
|
84
|
+
let __diffuseTexture5_decorators;
|
|
85
|
+
let __diffuseTexture5_initializers = [];
|
|
86
|
+
let __diffuseTexture5_extraInitializers = [];
|
|
87
|
+
let _diffuseTexture5_decorators;
|
|
88
|
+
let _diffuseTexture5_initializers = [];
|
|
89
|
+
let _diffuseTexture5_extraInitializers = [];
|
|
90
|
+
let __diffuseTexture6_decorators;
|
|
91
|
+
let __diffuseTexture6_initializers = [];
|
|
92
|
+
let __diffuseTexture6_extraInitializers = [];
|
|
93
|
+
let _diffuseTexture6_decorators;
|
|
94
|
+
let _diffuseTexture6_initializers = [];
|
|
95
|
+
let _diffuseTexture6_extraInitializers = [];
|
|
96
|
+
let __diffuseTexture7_decorators;
|
|
97
|
+
let __diffuseTexture7_initializers = [];
|
|
98
|
+
let __diffuseTexture7_extraInitializers = [];
|
|
99
|
+
let _diffuseTexture7_decorators;
|
|
100
|
+
let _diffuseTexture7_initializers = [];
|
|
101
|
+
let _diffuseTexture7_extraInitializers = [];
|
|
102
|
+
let __diffuseTexture8_decorators;
|
|
103
|
+
let __diffuseTexture8_initializers = [];
|
|
104
|
+
let __diffuseTexture8_extraInitializers = [];
|
|
105
|
+
let _diffuseTexture8_decorators;
|
|
106
|
+
let _diffuseTexture8_initializers = [];
|
|
107
|
+
let _diffuseTexture8_extraInitializers = [];
|
|
108
|
+
let _diffuseColor_decorators;
|
|
109
|
+
let _diffuseColor_initializers = [];
|
|
110
|
+
let _diffuseColor_extraInitializers = [];
|
|
111
|
+
let _specularColor_decorators;
|
|
112
|
+
let _specularColor_initializers = [];
|
|
113
|
+
let _specularColor_extraInitializers = [];
|
|
114
|
+
let _specularPower_decorators;
|
|
115
|
+
let _specularPower_initializers = [];
|
|
116
|
+
let _specularPower_extraInitializers = [];
|
|
117
|
+
let __disableLighting_decorators;
|
|
118
|
+
let __disableLighting_initializers = [];
|
|
119
|
+
let __disableLighting_extraInitializers = [];
|
|
120
|
+
let _disableLighting_decorators;
|
|
121
|
+
let _disableLighting_initializers = [];
|
|
122
|
+
let _disableLighting_extraInitializers = [];
|
|
123
|
+
let __maxSimultaneousLights_decorators;
|
|
124
|
+
let __maxSimultaneousLights_initializers = [];
|
|
125
|
+
let __maxSimultaneousLights_extraInitializers = [];
|
|
126
|
+
let _maxSimultaneousLights_decorators;
|
|
127
|
+
let _maxSimultaneousLights_initializers = [];
|
|
128
|
+
let _maxSimultaneousLights_extraInitializers = [];
|
|
129
|
+
return _a = class MixMaterial extends _classSuper {
|
|
130
|
+
get mixTexture1() { return __classPrivateFieldGet(this, _MixMaterial_mixTexture1_accessor_storage, "f"); }
|
|
131
|
+
set mixTexture1(value) { __classPrivateFieldSet(this, _MixMaterial_mixTexture1_accessor_storage, value, "f"); }
|
|
132
|
+
get mixTexture2() { return __classPrivateFieldGet(this, _MixMaterial_mixTexture2_accessor_storage, "f"); }
|
|
133
|
+
set mixTexture2(value) { __classPrivateFieldSet(this, _MixMaterial_mixTexture2_accessor_storage, value, "f"); }
|
|
134
|
+
get diffuseTexture1() { return __classPrivateFieldGet(this, _MixMaterial_diffuseTexture1_accessor_storage, "f"); }
|
|
135
|
+
set diffuseTexture1(value) { __classPrivateFieldSet(this, _MixMaterial_diffuseTexture1_accessor_storage, value, "f"); }
|
|
136
|
+
get diffuseTexture2() { return __classPrivateFieldGet(this, _MixMaterial_diffuseTexture2_accessor_storage, "f"); }
|
|
137
|
+
set diffuseTexture2(value) { __classPrivateFieldSet(this, _MixMaterial_diffuseTexture2_accessor_storage, value, "f"); }
|
|
138
|
+
get diffuseTexture3() { return __classPrivateFieldGet(this, _MixMaterial_diffuseTexture3_accessor_storage, "f"); }
|
|
139
|
+
set diffuseTexture3(value) { __classPrivateFieldSet(this, _MixMaterial_diffuseTexture3_accessor_storage, value, "f"); }
|
|
140
|
+
get diffuseTexture4() { return __classPrivateFieldGet(this, _MixMaterial_diffuseTexture4_accessor_storage, "f"); }
|
|
141
|
+
set diffuseTexture4(value) { __classPrivateFieldSet(this, _MixMaterial_diffuseTexture4_accessor_storage, value, "f"); }
|
|
142
|
+
get diffuseTexture5() { return __classPrivateFieldGet(this, _MixMaterial_diffuseTexture5_accessor_storage, "f"); }
|
|
143
|
+
set diffuseTexture5(value) { __classPrivateFieldSet(this, _MixMaterial_diffuseTexture5_accessor_storage, value, "f"); }
|
|
144
|
+
get diffuseTexture6() { return __classPrivateFieldGet(this, _MixMaterial_diffuseTexture6_accessor_storage, "f"); }
|
|
145
|
+
set diffuseTexture6(value) { __classPrivateFieldSet(this, _MixMaterial_diffuseTexture6_accessor_storage, value, "f"); }
|
|
146
|
+
get diffuseTexture7() { return __classPrivateFieldGet(this, _MixMaterial_diffuseTexture7_accessor_storage, "f"); }
|
|
147
|
+
set diffuseTexture7(value) { __classPrivateFieldSet(this, _MixMaterial_diffuseTexture7_accessor_storage, value, "f"); }
|
|
148
|
+
get diffuseTexture8() { return __classPrivateFieldGet(this, _MixMaterial_diffuseTexture8_accessor_storage, "f"); }
|
|
149
|
+
set diffuseTexture8(value) { __classPrivateFieldSet(this, _MixMaterial_diffuseTexture8_accessor_storage, value, "f"); }
|
|
150
|
+
get disableLighting() { return __classPrivateFieldGet(this, _MixMaterial_disableLighting_accessor_storage, "f"); }
|
|
151
|
+
set disableLighting(value) { __classPrivateFieldSet(this, _MixMaterial_disableLighting_accessor_storage, value, "f"); }
|
|
152
|
+
get maxSimultaneousLights() { return __classPrivateFieldGet(this, _MixMaterial_maxSimultaneousLights_accessor_storage, "f"); }
|
|
153
|
+
set maxSimultaneousLights(value) { __classPrivateFieldSet(this, _MixMaterial_maxSimultaneousLights_accessor_storage, value, "f"); }
|
|
154
|
+
/**
|
|
155
|
+
* Instantiates a Mix Material in the given scene
|
|
156
|
+
* @param name The friendly name of the material
|
|
157
|
+
* @param scene The scene to add the material to
|
|
158
|
+
* @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
|
|
159
|
+
*/
|
|
160
|
+
constructor(name, scene, forceGLSL = false) {
|
|
161
|
+
super(name, scene, undefined, forceGLSL);
|
|
162
|
+
/**
|
|
163
|
+
* Mix textures
|
|
164
|
+
*/
|
|
165
|
+
this._mixTexture1 = __runInitializers(this, __mixTexture1_initializers, void 0);
|
|
166
|
+
_MixMaterial_mixTexture1_accessor_storage.set(this, (__runInitializers(this, __mixTexture1_extraInitializers), __runInitializers(this, _mixTexture1_initializers, void 0)));
|
|
167
|
+
this._mixTexture2 = (__runInitializers(this, _mixTexture1_extraInitializers), __runInitializers(this, __mixTexture2_initializers, void 0));
|
|
168
|
+
_MixMaterial_mixTexture2_accessor_storage.set(this, (__runInitializers(this, __mixTexture2_extraInitializers), __runInitializers(this, _mixTexture2_initializers, void 0)));
|
|
169
|
+
/**
|
|
170
|
+
* Diffuse textures
|
|
171
|
+
*/
|
|
172
|
+
this._diffuseTexture1 = (__runInitializers(this, _mixTexture2_extraInitializers), __runInitializers(this, __diffuseTexture1_initializers, void 0));
|
|
173
|
+
_MixMaterial_diffuseTexture1_accessor_storage.set(this, (__runInitializers(this, __diffuseTexture1_extraInitializers), __runInitializers(this, _diffuseTexture1_initializers, void 0)));
|
|
174
|
+
this._diffuseTexture2 = (__runInitializers(this, _diffuseTexture1_extraInitializers), __runInitializers(this, __diffuseTexture2_initializers, void 0));
|
|
175
|
+
_MixMaterial_diffuseTexture2_accessor_storage.set(this, (__runInitializers(this, __diffuseTexture2_extraInitializers), __runInitializers(this, _diffuseTexture2_initializers, void 0)));
|
|
176
|
+
this._diffuseTexture3 = (__runInitializers(this, _diffuseTexture2_extraInitializers), __runInitializers(this, __diffuseTexture3_initializers, void 0));
|
|
177
|
+
_MixMaterial_diffuseTexture3_accessor_storage.set(this, (__runInitializers(this, __diffuseTexture3_extraInitializers), __runInitializers(this, _diffuseTexture3_initializers, void 0)));
|
|
178
|
+
this._diffuseTexture4 = (__runInitializers(this, _diffuseTexture3_extraInitializers), __runInitializers(this, __diffuseTexture4_initializers, void 0));
|
|
179
|
+
_MixMaterial_diffuseTexture4_accessor_storage.set(this, (__runInitializers(this, __diffuseTexture4_extraInitializers), __runInitializers(this, _diffuseTexture4_initializers, void 0)));
|
|
180
|
+
this._diffuseTexture5 = (__runInitializers(this, _diffuseTexture4_extraInitializers), __runInitializers(this, __diffuseTexture5_initializers, void 0));
|
|
181
|
+
_MixMaterial_diffuseTexture5_accessor_storage.set(this, (__runInitializers(this, __diffuseTexture5_extraInitializers), __runInitializers(this, _diffuseTexture5_initializers, void 0)));
|
|
182
|
+
this._diffuseTexture6 = (__runInitializers(this, _diffuseTexture5_extraInitializers), __runInitializers(this, __diffuseTexture6_initializers, void 0));
|
|
183
|
+
_MixMaterial_diffuseTexture6_accessor_storage.set(this, (__runInitializers(this, __diffuseTexture6_extraInitializers), __runInitializers(this, _diffuseTexture6_initializers, void 0)));
|
|
184
|
+
this._diffuseTexture7 = (__runInitializers(this, _diffuseTexture6_extraInitializers), __runInitializers(this, __diffuseTexture7_initializers, void 0));
|
|
185
|
+
_MixMaterial_diffuseTexture7_accessor_storage.set(this, (__runInitializers(this, __diffuseTexture7_extraInitializers), __runInitializers(this, _diffuseTexture7_initializers, void 0)));
|
|
186
|
+
this._diffuseTexture8 = (__runInitializers(this, _diffuseTexture7_extraInitializers), __runInitializers(this, __diffuseTexture8_initializers, void 0));
|
|
187
|
+
_MixMaterial_diffuseTexture8_accessor_storage.set(this, (__runInitializers(this, __diffuseTexture8_extraInitializers), __runInitializers(this, _diffuseTexture8_initializers, void 0)));
|
|
188
|
+
/**
|
|
189
|
+
* Uniforms
|
|
190
|
+
*/
|
|
191
|
+
this.diffuseColor = (__runInitializers(this, _diffuseTexture8_extraInitializers), __runInitializers(this, _diffuseColor_initializers, new Color3(1, 1, 1)));
|
|
192
|
+
this.specularColor = (__runInitializers(this, _diffuseColor_extraInitializers), __runInitializers(this, _specularColor_initializers, new Color3(0, 0, 0)));
|
|
193
|
+
this.specularPower = (__runInitializers(this, _specularColor_extraInitializers), __runInitializers(this, _specularPower_initializers, 64));
|
|
194
|
+
this._disableLighting = (__runInitializers(this, _specularPower_extraInitializers), __runInitializers(this, __disableLighting_initializers, false));
|
|
195
|
+
_MixMaterial_disableLighting_accessor_storage.set(this, (__runInitializers(this, __disableLighting_extraInitializers), __runInitializers(this, _disableLighting_initializers, void 0)));
|
|
196
|
+
this._maxSimultaneousLights = (__runInitializers(this, _disableLighting_extraInitializers), __runInitializers(this, __maxSimultaneousLights_initializers, 4));
|
|
197
|
+
_MixMaterial_maxSimultaneousLights_accessor_storage.set(this, (__runInitializers(this, __maxSimultaneousLights_extraInitializers), __runInitializers(this, _maxSimultaneousLights_initializers, void 0)));
|
|
198
|
+
this._shadersLoaded = (__runInitializers(this, _maxSimultaneousLights_extraInitializers), false);
|
|
199
|
+
}
|
|
200
|
+
needAlphaBlending() {
|
|
201
|
+
return this.alpha < 1.0;
|
|
79
202
|
}
|
|
80
|
-
|
|
81
|
-
if (!subMesh.materialDefines) {
|
|
82
|
-
subMesh.materialDefines = new MixMaterialDefines();
|
|
83
|
-
}
|
|
84
|
-
const defines = subMesh.materialDefines;
|
|
85
|
-
const scene = this.getScene();
|
|
86
|
-
if (this._isReadyForSubMesh(subMesh)) {
|
|
87
|
-
return true;
|
|
88
|
-
}
|
|
89
|
-
const engine = scene.getEngine();
|
|
90
|
-
// Textures
|
|
91
|
-
if (scene.texturesEnabled) {
|
|
92
|
-
if (!this._mixTexture1 || !this._mixTexture1.isReady()) {
|
|
203
|
+
needAlphaTesting() {
|
|
93
204
|
return false;
|
|
94
205
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (
|
|
102
|
-
|
|
206
|
+
getAlphaTestTexture() {
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
// Methods
|
|
210
|
+
isReadyForSubMesh(mesh, subMesh, useInstances) {
|
|
211
|
+
const drawWrapper = subMesh._drawWrapper;
|
|
212
|
+
if (this.isFrozen) {
|
|
213
|
+
if (drawWrapper.effect && drawWrapper._wasPreviouslyReady && drawWrapper._wasPreviouslyUsingInstances === useInstances) {
|
|
214
|
+
return true;
|
|
215
|
+
}
|
|
103
216
|
}
|
|
104
|
-
if (!
|
|
105
|
-
|
|
217
|
+
if (!subMesh.materialDefines) {
|
|
218
|
+
subMesh.materialDefines = new MixMaterialDefines();
|
|
106
219
|
}
|
|
107
|
-
|
|
108
|
-
|
|
220
|
+
const defines = subMesh.materialDefines;
|
|
221
|
+
const scene = this.getScene();
|
|
222
|
+
if (this._isReadyForSubMesh(subMesh)) {
|
|
223
|
+
return true;
|
|
109
224
|
}
|
|
110
|
-
|
|
111
|
-
|
|
225
|
+
const engine = scene.getEngine();
|
|
226
|
+
// Textures
|
|
227
|
+
if (scene.texturesEnabled) {
|
|
228
|
+
if (!this._mixTexture1 || !this._mixTexture1.isReady()) {
|
|
112
229
|
return false;
|
|
113
230
|
}
|
|
114
|
-
defines.
|
|
115
|
-
if (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
231
|
+
defines._needUVs = true;
|
|
232
|
+
if (MaterialFlags.DiffuseTextureEnabled) {
|
|
233
|
+
if (!this._diffuseTexture1 || !this._diffuseTexture1.isReady()) {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
defines.DIFFUSE = true;
|
|
237
|
+
if (!this._diffuseTexture2 || !this._diffuseTexture2.isReady()) {
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
240
|
+
if (!this._diffuseTexture3 || !this._diffuseTexture3.isReady()) {
|
|
241
|
+
return false;
|
|
242
|
+
}
|
|
243
|
+
if (!this._diffuseTexture4 || !this._diffuseTexture4.isReady()) {
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
if (this._mixTexture2) {
|
|
247
|
+
if (!this._mixTexture2.isReady()) {
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
defines.MIXMAP2 = true;
|
|
251
|
+
if (!this._diffuseTexture5 || !this._diffuseTexture5.isReady()) {
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
if (!this._diffuseTexture6 || !this._diffuseTexture6.isReady()) {
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
if (!this._diffuseTexture7 || !this._diffuseTexture7.isReady()) {
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
if (!this._diffuseTexture8 || !this._diffuseTexture8.isReady()) {
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
120
264
|
}
|
|
121
|
-
|
|
122
|
-
|
|
265
|
+
}
|
|
266
|
+
// Misc.
|
|
267
|
+
PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this.needAlphaTestingForMesh(mesh), defines, undefined, undefined, undefined, this._isVertexOutputInvariant);
|
|
268
|
+
// Lights
|
|
269
|
+
defines._needNormals = PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting);
|
|
270
|
+
// Values that need to be evaluated on every frame
|
|
271
|
+
PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances ? true : false);
|
|
272
|
+
// Attribs
|
|
273
|
+
PrepareDefinesForAttributes(mesh, defines, true, true);
|
|
274
|
+
// Get correct effect
|
|
275
|
+
if (defines.isDirty) {
|
|
276
|
+
defines.markAsProcessed();
|
|
277
|
+
scene.resetCachedMaterial();
|
|
278
|
+
// Fallbacks
|
|
279
|
+
const fallbacks = new EffectFallbacks();
|
|
280
|
+
if (defines.FOG) {
|
|
281
|
+
fallbacks.addFallback(1, "FOG");
|
|
123
282
|
}
|
|
124
|
-
|
|
125
|
-
|
|
283
|
+
HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights);
|
|
284
|
+
if (defines.NUM_BONE_INFLUENCERS > 0) {
|
|
285
|
+
fallbacks.addCPUSkinningFallback(0, mesh);
|
|
126
286
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
// Lights
|
|
133
|
-
defines._needNormals = PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting);
|
|
134
|
-
// Values that need to be evaluated on every frame
|
|
135
|
-
PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances ? true : false);
|
|
136
|
-
// Attribs
|
|
137
|
-
PrepareDefinesForAttributes(mesh, defines, true, true);
|
|
138
|
-
// Get correct effect
|
|
139
|
-
if (defines.isDirty) {
|
|
140
|
-
defines.markAsProcessed();
|
|
141
|
-
scene.resetCachedMaterial();
|
|
142
|
-
// Fallbacks
|
|
143
|
-
const fallbacks = new EffectFallbacks();
|
|
144
|
-
if (defines.FOG) {
|
|
145
|
-
fallbacks.addFallback(1, "FOG");
|
|
146
|
-
}
|
|
147
|
-
HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights);
|
|
148
|
-
if (defines.NUM_BONE_INFLUENCERS > 0) {
|
|
149
|
-
fallbacks.addCPUSkinningFallback(0, mesh);
|
|
150
|
-
}
|
|
151
|
-
defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
|
|
152
|
-
//Attributes
|
|
153
|
-
const attribs = [VertexBuffer.PositionKind];
|
|
154
|
-
if (defines.NORMAL) {
|
|
155
|
-
attribs.push(VertexBuffer.NormalKind);
|
|
156
|
-
}
|
|
157
|
-
if (defines.UV1) {
|
|
158
|
-
attribs.push(VertexBuffer.UVKind);
|
|
159
|
-
}
|
|
160
|
-
if (defines.UV2) {
|
|
161
|
-
attribs.push(VertexBuffer.UV2Kind);
|
|
162
|
-
}
|
|
163
|
-
if (defines.VERTEXCOLOR) {
|
|
164
|
-
attribs.push(VertexBuffer.ColorKind);
|
|
165
|
-
}
|
|
166
|
-
PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
|
|
167
|
-
PrepareAttributesForInstances(attribs, defines);
|
|
168
|
-
// Legacy browser patch
|
|
169
|
-
const shaderName = "mix";
|
|
170
|
-
const join = defines.toString();
|
|
171
|
-
const uniforms = [
|
|
172
|
-
"world",
|
|
173
|
-
"view",
|
|
174
|
-
"viewProjection",
|
|
175
|
-
"vEyePosition",
|
|
176
|
-
"vLightsType",
|
|
177
|
-
"vDiffuseColor",
|
|
178
|
-
"vSpecularColor",
|
|
179
|
-
"vFogInfos",
|
|
180
|
-
"vFogColor",
|
|
181
|
-
"pointSize",
|
|
182
|
-
"vTextureInfos",
|
|
183
|
-
"mBones",
|
|
184
|
-
"textureMatrix",
|
|
185
|
-
"logarithmicDepthConstant",
|
|
186
|
-
"diffuse1Infos",
|
|
187
|
-
"diffuse2Infos",
|
|
188
|
-
"diffuse3Infos",
|
|
189
|
-
"diffuse4Infos",
|
|
190
|
-
"diffuse5Infos",
|
|
191
|
-
"diffuse6Infos",
|
|
192
|
-
"diffuse7Infos",
|
|
193
|
-
"diffuse8Infos",
|
|
194
|
-
];
|
|
195
|
-
const samplers = [
|
|
196
|
-
"mixMap1Sampler",
|
|
197
|
-
"mixMap2Sampler",
|
|
198
|
-
"diffuse1Sampler",
|
|
199
|
-
"diffuse2Sampler",
|
|
200
|
-
"diffuse3Sampler",
|
|
201
|
-
"diffuse4Sampler",
|
|
202
|
-
"diffuse5Sampler",
|
|
203
|
-
"diffuse6Sampler",
|
|
204
|
-
"diffuse7Sampler",
|
|
205
|
-
"diffuse8Sampler",
|
|
206
|
-
];
|
|
207
|
-
const uniformBuffers = [];
|
|
208
|
-
AddClipPlaneUniforms(uniforms);
|
|
209
|
-
PrepareUniformsAndSamplersList({
|
|
210
|
-
uniformsNames: uniforms,
|
|
211
|
-
uniformBuffersNames: uniformBuffers,
|
|
212
|
-
samplers: samplers,
|
|
213
|
-
defines: defines,
|
|
214
|
-
maxSimultaneousLights: this.maxSimultaneousLights,
|
|
215
|
-
shaderLanguage: this._shaderLanguage,
|
|
216
|
-
});
|
|
217
|
-
subMesh.setEffect(scene.getEngine().createEffect(shaderName, {
|
|
218
|
-
attributes: attribs,
|
|
219
|
-
uniformsNames: uniforms,
|
|
220
|
-
uniformBuffersNames: uniformBuffers,
|
|
221
|
-
samplers: samplers,
|
|
222
|
-
defines: join,
|
|
223
|
-
fallbacks: fallbacks,
|
|
224
|
-
onCompiled: this.onCompiled,
|
|
225
|
-
onError: this.onError,
|
|
226
|
-
indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights },
|
|
227
|
-
shaderLanguage: this._shaderLanguage,
|
|
228
|
-
extraInitializationsAsync: this._shadersLoaded
|
|
229
|
-
? undefined
|
|
230
|
-
: async () => {
|
|
231
|
-
if (this.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
|
|
232
|
-
await Promise.all([import("./wgsl/mix.vertex.js"), import("./wgsl/mix.fragment.js")]);
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
await Promise.all([import("./mix.vertex.js"), import("./mix.fragment.js")]);
|
|
236
|
-
}
|
|
237
|
-
this._shadersLoaded = true;
|
|
238
|
-
},
|
|
239
|
-
}, engine), defines, this._materialContext);
|
|
240
|
-
}
|
|
241
|
-
if (!subMesh.effect || !subMesh.effect.isReady()) {
|
|
242
|
-
return false;
|
|
243
|
-
}
|
|
244
|
-
defines._renderId = scene.getRenderId();
|
|
245
|
-
drawWrapper._wasPreviouslyReady = true;
|
|
246
|
-
drawWrapper._wasPreviouslyUsingInstances = !!useInstances;
|
|
247
|
-
return true;
|
|
248
|
-
}
|
|
249
|
-
bindForSubMesh(world, mesh, subMesh) {
|
|
250
|
-
const scene = this.getScene();
|
|
251
|
-
const defines = subMesh.materialDefines;
|
|
252
|
-
if (!defines) {
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
const effect = subMesh.effect;
|
|
256
|
-
if (!effect) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
this._activeEffect = effect;
|
|
260
|
-
// Matrices
|
|
261
|
-
this.bindOnlyWorldMatrix(world);
|
|
262
|
-
this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix());
|
|
263
|
-
// Bones
|
|
264
|
-
BindBonesParameters(mesh, this._activeEffect);
|
|
265
|
-
if (this._mustRebind(scene, effect, subMesh)) {
|
|
266
|
-
// Textures
|
|
267
|
-
if (this._mixTexture1) {
|
|
268
|
-
this._activeEffect.setTexture("mixMap1Sampler", this._mixTexture1);
|
|
269
|
-
this._activeEffect.setFloat2("vTextureInfos", this._mixTexture1.coordinatesIndex, this._mixTexture1.level);
|
|
270
|
-
this._activeEffect.setMatrix("textureMatrix", this._mixTexture1.getTextureMatrix());
|
|
271
|
-
if (MaterialFlags.DiffuseTextureEnabled) {
|
|
272
|
-
if (this._diffuseTexture1) {
|
|
273
|
-
this._activeEffect.setTexture("diffuse1Sampler", this._diffuseTexture1);
|
|
274
|
-
this._activeEffect.setFloat2("diffuse1Infos", this._diffuseTexture1.uScale, this._diffuseTexture1.vScale);
|
|
287
|
+
defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
|
|
288
|
+
//Attributes
|
|
289
|
+
const attribs = [VertexBuffer.PositionKind];
|
|
290
|
+
if (defines.NORMAL) {
|
|
291
|
+
attribs.push(VertexBuffer.NormalKind);
|
|
275
292
|
}
|
|
276
|
-
if (
|
|
277
|
-
|
|
278
|
-
this._activeEffect.setFloat2("diffuse2Infos", this._diffuseTexture2.uScale, this._diffuseTexture2.vScale);
|
|
293
|
+
if (defines.UV1) {
|
|
294
|
+
attribs.push(VertexBuffer.UVKind);
|
|
279
295
|
}
|
|
280
|
-
if (
|
|
281
|
-
|
|
282
|
-
this._activeEffect.setFloat2("diffuse3Infos", this._diffuseTexture3.uScale, this._diffuseTexture3.vScale);
|
|
296
|
+
if (defines.UV2) {
|
|
297
|
+
attribs.push(VertexBuffer.UV2Kind);
|
|
283
298
|
}
|
|
284
|
-
if (
|
|
285
|
-
|
|
286
|
-
this._activeEffect.setFloat2("diffuse4Infos", this._diffuseTexture4.uScale, this._diffuseTexture4.vScale);
|
|
299
|
+
if (defines.VERTEXCOLOR) {
|
|
300
|
+
attribs.push(VertexBuffer.ColorKind);
|
|
287
301
|
}
|
|
302
|
+
PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
|
|
303
|
+
PrepareAttributesForInstances(attribs, defines);
|
|
304
|
+
// Legacy browser patch
|
|
305
|
+
const shaderName = "mix";
|
|
306
|
+
const join = defines.toString();
|
|
307
|
+
const uniforms = [
|
|
308
|
+
"world",
|
|
309
|
+
"view",
|
|
310
|
+
"viewProjection",
|
|
311
|
+
"vEyePosition",
|
|
312
|
+
"vLightsType",
|
|
313
|
+
"vDiffuseColor",
|
|
314
|
+
"vSpecularColor",
|
|
315
|
+
"vFogInfos",
|
|
316
|
+
"vFogColor",
|
|
317
|
+
"pointSize",
|
|
318
|
+
"vTextureInfos",
|
|
319
|
+
"mBones",
|
|
320
|
+
"textureMatrix",
|
|
321
|
+
"logarithmicDepthConstant",
|
|
322
|
+
"diffuse1Infos",
|
|
323
|
+
"diffuse2Infos",
|
|
324
|
+
"diffuse3Infos",
|
|
325
|
+
"diffuse4Infos",
|
|
326
|
+
"diffuse5Infos",
|
|
327
|
+
"diffuse6Infos",
|
|
328
|
+
"diffuse7Infos",
|
|
329
|
+
"diffuse8Infos",
|
|
330
|
+
];
|
|
331
|
+
const samplers = [
|
|
332
|
+
"mixMap1Sampler",
|
|
333
|
+
"mixMap2Sampler",
|
|
334
|
+
"diffuse1Sampler",
|
|
335
|
+
"diffuse2Sampler",
|
|
336
|
+
"diffuse3Sampler",
|
|
337
|
+
"diffuse4Sampler",
|
|
338
|
+
"diffuse5Sampler",
|
|
339
|
+
"diffuse6Sampler",
|
|
340
|
+
"diffuse7Sampler",
|
|
341
|
+
"diffuse8Sampler",
|
|
342
|
+
];
|
|
343
|
+
const uniformBuffers = [];
|
|
344
|
+
AddClipPlaneUniforms(uniforms);
|
|
345
|
+
PrepareUniformsAndSamplersList({
|
|
346
|
+
uniformsNames: uniforms,
|
|
347
|
+
uniformBuffersNames: uniformBuffers,
|
|
348
|
+
samplers: samplers,
|
|
349
|
+
defines: defines,
|
|
350
|
+
maxSimultaneousLights: this.maxSimultaneousLights,
|
|
351
|
+
shaderLanguage: this._shaderLanguage,
|
|
352
|
+
});
|
|
353
|
+
subMesh.setEffect(scene.getEngine().createEffect(shaderName, {
|
|
354
|
+
attributes: attribs,
|
|
355
|
+
uniformsNames: uniforms,
|
|
356
|
+
uniformBuffersNames: uniformBuffers,
|
|
357
|
+
samplers: samplers,
|
|
358
|
+
defines: join,
|
|
359
|
+
fallbacks: fallbacks,
|
|
360
|
+
onCompiled: this.onCompiled,
|
|
361
|
+
onError: this.onError,
|
|
362
|
+
indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights },
|
|
363
|
+
shaderLanguage: this._shaderLanguage,
|
|
364
|
+
extraInitializationsAsync: this._shadersLoaded
|
|
365
|
+
? undefined
|
|
366
|
+
: async () => {
|
|
367
|
+
if (this.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
|
|
368
|
+
await Promise.all([import("./wgsl/mix.vertex.js"), import("./wgsl/mix.fragment.js")]);
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
await Promise.all([import("./mix.vertex.js"), import("./mix.fragment.js")]);
|
|
372
|
+
}
|
|
373
|
+
this._shadersLoaded = true;
|
|
374
|
+
},
|
|
375
|
+
}, engine), defines, this._materialContext);
|
|
288
376
|
}
|
|
377
|
+
if (!subMesh.effect || !subMesh.effect.isReady()) {
|
|
378
|
+
return false;
|
|
379
|
+
}
|
|
380
|
+
defines._renderId = scene.getRenderId();
|
|
381
|
+
drawWrapper._wasPreviouslyReady = true;
|
|
382
|
+
drawWrapper._wasPreviouslyUsingInstances = !!useInstances;
|
|
383
|
+
return true;
|
|
289
384
|
}
|
|
290
|
-
|
|
291
|
-
this.
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
385
|
+
bindForSubMesh(world, mesh, subMesh) {
|
|
386
|
+
const scene = this.getScene();
|
|
387
|
+
const defines = subMesh.materialDefines;
|
|
388
|
+
if (!defines) {
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
const effect = subMesh.effect;
|
|
392
|
+
if (!effect) {
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
this._activeEffect = effect;
|
|
396
|
+
// Matrices
|
|
397
|
+
this.bindOnlyWorldMatrix(world);
|
|
398
|
+
this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix());
|
|
399
|
+
// Bones
|
|
400
|
+
BindBonesParameters(mesh, this._activeEffect);
|
|
401
|
+
if (this._mustRebind(scene, effect, subMesh)) {
|
|
402
|
+
// Textures
|
|
403
|
+
if (this._mixTexture1) {
|
|
404
|
+
this._activeEffect.setTexture("mixMap1Sampler", this._mixTexture1);
|
|
405
|
+
this._activeEffect.setFloat2("vTextureInfos", this._mixTexture1.coordinatesIndex, this._mixTexture1.level);
|
|
406
|
+
this._activeEffect.setMatrix("textureMatrix", this._mixTexture1.getTextureMatrix());
|
|
407
|
+
if (MaterialFlags.DiffuseTextureEnabled) {
|
|
408
|
+
if (this._diffuseTexture1) {
|
|
409
|
+
this._activeEffect.setTexture("diffuse1Sampler", this._diffuseTexture1);
|
|
410
|
+
this._activeEffect.setFloat2("diffuse1Infos", this._diffuseTexture1.uScale, this._diffuseTexture1.vScale);
|
|
411
|
+
}
|
|
412
|
+
if (this._diffuseTexture2) {
|
|
413
|
+
this._activeEffect.setTexture("diffuse2Sampler", this._diffuseTexture2);
|
|
414
|
+
this._activeEffect.setFloat2("diffuse2Infos", this._diffuseTexture2.uScale, this._diffuseTexture2.vScale);
|
|
415
|
+
}
|
|
416
|
+
if (this._diffuseTexture3) {
|
|
417
|
+
this._activeEffect.setTexture("diffuse3Sampler", this._diffuseTexture3);
|
|
418
|
+
this._activeEffect.setFloat2("diffuse3Infos", this._diffuseTexture3.uScale, this._diffuseTexture3.vScale);
|
|
419
|
+
}
|
|
420
|
+
if (this._diffuseTexture4) {
|
|
421
|
+
this._activeEffect.setTexture("diffuse4Sampler", this._diffuseTexture4);
|
|
422
|
+
this._activeEffect.setFloat2("diffuse4Infos", this._diffuseTexture4.uScale, this._diffuseTexture4.vScale);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
296
425
|
}
|
|
297
|
-
if (this.
|
|
298
|
-
this._activeEffect.setTexture("
|
|
299
|
-
|
|
426
|
+
if (this._mixTexture2) {
|
|
427
|
+
this._activeEffect.setTexture("mixMap2Sampler", this._mixTexture2);
|
|
428
|
+
if (MaterialFlags.DiffuseTextureEnabled) {
|
|
429
|
+
if (this._diffuseTexture5) {
|
|
430
|
+
this._activeEffect.setTexture("diffuse5Sampler", this._diffuseTexture5);
|
|
431
|
+
this._activeEffect.setFloat2("diffuse5Infos", this._diffuseTexture5.uScale, this._diffuseTexture5.vScale);
|
|
432
|
+
}
|
|
433
|
+
if (this._diffuseTexture6) {
|
|
434
|
+
this._activeEffect.setTexture("diffuse6Sampler", this._diffuseTexture6);
|
|
435
|
+
this._activeEffect.setFloat2("diffuse6Infos", this._diffuseTexture6.uScale, this._diffuseTexture6.vScale);
|
|
436
|
+
}
|
|
437
|
+
if (this._diffuseTexture7) {
|
|
438
|
+
this._activeEffect.setTexture("diffuse7Sampler", this._diffuseTexture7);
|
|
439
|
+
this._activeEffect.setFloat2("diffuse7Infos", this._diffuseTexture7.uScale, this._diffuseTexture7.vScale);
|
|
440
|
+
}
|
|
441
|
+
if (this._diffuseTexture8) {
|
|
442
|
+
this._activeEffect.setTexture("diffuse8Sampler", this._diffuseTexture8);
|
|
443
|
+
this._activeEffect.setFloat2("diffuse8Infos", this._diffuseTexture8.uScale, this._diffuseTexture8.vScale);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
300
446
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
447
|
+
// Clip plane
|
|
448
|
+
BindClipPlane(effect, this, scene);
|
|
449
|
+
// Point size
|
|
450
|
+
if (this.pointsCloud) {
|
|
451
|
+
this._activeEffect.setFloat("pointSize", this.pointSize);
|
|
304
452
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
453
|
+
// Log. depth
|
|
454
|
+
if (this._useLogarithmicDepth) {
|
|
455
|
+
BindLogDepth(defines, effect, scene);
|
|
308
456
|
}
|
|
457
|
+
scene.bindEyePosition(effect);
|
|
458
|
+
}
|
|
459
|
+
this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);
|
|
460
|
+
if (defines.SPECULARTERM) {
|
|
461
|
+
this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower);
|
|
309
462
|
}
|
|
463
|
+
if (scene.lightsEnabled && !this.disableLighting) {
|
|
464
|
+
BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights);
|
|
465
|
+
}
|
|
466
|
+
// View
|
|
467
|
+
if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) {
|
|
468
|
+
this._activeEffect.setMatrix("view", scene.getViewMatrix());
|
|
469
|
+
}
|
|
470
|
+
// Fog
|
|
471
|
+
BindFogParameters(scene, mesh, this._activeEffect);
|
|
472
|
+
this._afterBind(mesh, this._activeEffect, subMesh);
|
|
310
473
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
474
|
+
getAnimatables() {
|
|
475
|
+
const results = [];
|
|
476
|
+
if (this._mixTexture1 && this._mixTexture1.animations && this._mixTexture1.animations.length > 0) {
|
|
477
|
+
results.push(this._mixTexture1);
|
|
478
|
+
}
|
|
479
|
+
if (this._mixTexture2 && this._mixTexture2.animations && this._mixTexture2.animations.length > 0) {
|
|
480
|
+
results.push(this._mixTexture2);
|
|
481
|
+
}
|
|
482
|
+
return results;
|
|
316
483
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
484
|
+
getActiveTextures() {
|
|
485
|
+
const activeTextures = super.getActiveTextures();
|
|
486
|
+
// Mix map 1
|
|
487
|
+
if (this._mixTexture1) {
|
|
488
|
+
activeTextures.push(this._mixTexture1);
|
|
489
|
+
}
|
|
490
|
+
if (this._diffuseTexture1) {
|
|
491
|
+
activeTextures.push(this._diffuseTexture1);
|
|
492
|
+
}
|
|
493
|
+
if (this._diffuseTexture2) {
|
|
494
|
+
activeTextures.push(this._diffuseTexture2);
|
|
495
|
+
}
|
|
496
|
+
if (this._diffuseTexture3) {
|
|
497
|
+
activeTextures.push(this._diffuseTexture3);
|
|
498
|
+
}
|
|
499
|
+
if (this._diffuseTexture4) {
|
|
500
|
+
activeTextures.push(this._diffuseTexture4);
|
|
501
|
+
}
|
|
502
|
+
// Mix map 2
|
|
503
|
+
if (this._mixTexture2) {
|
|
504
|
+
activeTextures.push(this._mixTexture2);
|
|
505
|
+
}
|
|
506
|
+
if (this._diffuseTexture5) {
|
|
507
|
+
activeTextures.push(this._diffuseTexture5);
|
|
508
|
+
}
|
|
509
|
+
if (this._diffuseTexture6) {
|
|
510
|
+
activeTextures.push(this._diffuseTexture6);
|
|
511
|
+
}
|
|
512
|
+
if (this._diffuseTexture7) {
|
|
513
|
+
activeTextures.push(this._diffuseTexture7);
|
|
514
|
+
}
|
|
515
|
+
if (this._diffuseTexture8) {
|
|
516
|
+
activeTextures.push(this._diffuseTexture8);
|
|
517
|
+
}
|
|
518
|
+
return activeTextures;
|
|
320
519
|
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
455
|
-
], MixMaterial.prototype, "mixTexture2", void 0);
|
|
456
|
-
__decorate([
|
|
457
|
-
serializeAsTexture("diffuseTexture1")
|
|
458
|
-
], MixMaterial.prototype, "_diffuseTexture1", void 0);
|
|
459
|
-
__decorate([
|
|
460
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
461
|
-
], MixMaterial.prototype, "diffuseTexture1", void 0);
|
|
462
|
-
__decorate([
|
|
463
|
-
serializeAsTexture("diffuseTexture2")
|
|
464
|
-
], MixMaterial.prototype, "_diffuseTexture2", void 0);
|
|
465
|
-
__decorate([
|
|
466
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
467
|
-
], MixMaterial.prototype, "diffuseTexture2", void 0);
|
|
468
|
-
__decorate([
|
|
469
|
-
serializeAsTexture("diffuseTexture3")
|
|
470
|
-
], MixMaterial.prototype, "_diffuseTexture3", void 0);
|
|
471
|
-
__decorate([
|
|
472
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
473
|
-
], MixMaterial.prototype, "diffuseTexture3", void 0);
|
|
474
|
-
__decorate([
|
|
475
|
-
serializeAsTexture("diffuseTexture4")
|
|
476
|
-
], MixMaterial.prototype, "_diffuseTexture4", void 0);
|
|
477
|
-
__decorate([
|
|
478
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
479
|
-
], MixMaterial.prototype, "diffuseTexture4", void 0);
|
|
480
|
-
__decorate([
|
|
481
|
-
serializeAsTexture("diffuseTexture1")
|
|
482
|
-
], MixMaterial.prototype, "_diffuseTexture5", void 0);
|
|
483
|
-
__decorate([
|
|
484
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
485
|
-
], MixMaterial.prototype, "diffuseTexture5", void 0);
|
|
486
|
-
__decorate([
|
|
487
|
-
serializeAsTexture("diffuseTexture2")
|
|
488
|
-
], MixMaterial.prototype, "_diffuseTexture6", void 0);
|
|
489
|
-
__decorate([
|
|
490
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
491
|
-
], MixMaterial.prototype, "diffuseTexture6", void 0);
|
|
492
|
-
__decorate([
|
|
493
|
-
serializeAsTexture("diffuseTexture3")
|
|
494
|
-
], MixMaterial.prototype, "_diffuseTexture7", void 0);
|
|
495
|
-
__decorate([
|
|
496
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
497
|
-
], MixMaterial.prototype, "diffuseTexture7", void 0);
|
|
498
|
-
__decorate([
|
|
499
|
-
serializeAsTexture("diffuseTexture4")
|
|
500
|
-
], MixMaterial.prototype, "_diffuseTexture8", void 0);
|
|
501
|
-
__decorate([
|
|
502
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
503
|
-
], MixMaterial.prototype, "diffuseTexture8", void 0);
|
|
504
|
-
__decorate([
|
|
505
|
-
serializeAsColor3()
|
|
506
|
-
], MixMaterial.prototype, "diffuseColor", void 0);
|
|
507
|
-
__decorate([
|
|
508
|
-
serializeAsColor3()
|
|
509
|
-
], MixMaterial.prototype, "specularColor", void 0);
|
|
510
|
-
__decorate([
|
|
511
|
-
serialize()
|
|
512
|
-
], MixMaterial.prototype, "specularPower", void 0);
|
|
513
|
-
__decorate([
|
|
514
|
-
serialize("disableLighting")
|
|
515
|
-
], MixMaterial.prototype, "_disableLighting", void 0);
|
|
516
|
-
__decorate([
|
|
517
|
-
expandToProperty("_markAllSubMeshesAsLightsDirty")
|
|
518
|
-
], MixMaterial.prototype, "disableLighting", void 0);
|
|
519
|
-
__decorate([
|
|
520
|
-
serialize("maxSimultaneousLights")
|
|
521
|
-
], MixMaterial.prototype, "_maxSimultaneousLights", void 0);
|
|
522
|
-
__decorate([
|
|
523
|
-
expandToProperty("_markAllSubMeshesAsLightsDirty")
|
|
524
|
-
], MixMaterial.prototype, "maxSimultaneousLights", void 0);
|
|
520
|
+
hasTexture(texture) {
|
|
521
|
+
if (super.hasTexture(texture)) {
|
|
522
|
+
return true;
|
|
523
|
+
}
|
|
524
|
+
// Mix map 1
|
|
525
|
+
if (this._mixTexture1 === texture) {
|
|
526
|
+
return true;
|
|
527
|
+
}
|
|
528
|
+
if (this._diffuseTexture1 === texture) {
|
|
529
|
+
return true;
|
|
530
|
+
}
|
|
531
|
+
if (this._diffuseTexture2 === texture) {
|
|
532
|
+
return true;
|
|
533
|
+
}
|
|
534
|
+
if (this._diffuseTexture3 === texture) {
|
|
535
|
+
return true;
|
|
536
|
+
}
|
|
537
|
+
if (this._diffuseTexture4 === texture) {
|
|
538
|
+
return true;
|
|
539
|
+
}
|
|
540
|
+
// Mix map 2
|
|
541
|
+
if (this._mixTexture2 === texture) {
|
|
542
|
+
return true;
|
|
543
|
+
}
|
|
544
|
+
if (this._diffuseTexture5 === texture) {
|
|
545
|
+
return true;
|
|
546
|
+
}
|
|
547
|
+
if (this._diffuseTexture6 === texture) {
|
|
548
|
+
return true;
|
|
549
|
+
}
|
|
550
|
+
if (this._diffuseTexture7 === texture) {
|
|
551
|
+
return true;
|
|
552
|
+
}
|
|
553
|
+
if (this._diffuseTexture8 === texture) {
|
|
554
|
+
return true;
|
|
555
|
+
}
|
|
556
|
+
return false;
|
|
557
|
+
}
|
|
558
|
+
dispose(forceDisposeEffect) {
|
|
559
|
+
if (this._mixTexture1) {
|
|
560
|
+
this._mixTexture1.dispose();
|
|
561
|
+
}
|
|
562
|
+
super.dispose(forceDisposeEffect);
|
|
563
|
+
}
|
|
564
|
+
clone(name) {
|
|
565
|
+
return SerializationHelper.Clone(() => new _a(name, this.getScene()), this);
|
|
566
|
+
}
|
|
567
|
+
serialize() {
|
|
568
|
+
const serializationObject = super.serialize();
|
|
569
|
+
serializationObject.customType = "BABYLON.MixMaterial";
|
|
570
|
+
return serializationObject;
|
|
571
|
+
}
|
|
572
|
+
getClassName() {
|
|
573
|
+
return "MixMaterial";
|
|
574
|
+
}
|
|
575
|
+
// Statics
|
|
576
|
+
static Parse(source, scene, rootUrl) {
|
|
577
|
+
return SerializationHelper.Parse(() => new _a(source.name, scene), source, scene, rootUrl);
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
_MixMaterial_mixTexture1_accessor_storage = new WeakMap(),
|
|
581
|
+
_MixMaterial_mixTexture2_accessor_storage = new WeakMap(),
|
|
582
|
+
_MixMaterial_diffuseTexture1_accessor_storage = new WeakMap(),
|
|
583
|
+
_MixMaterial_diffuseTexture2_accessor_storage = new WeakMap(),
|
|
584
|
+
_MixMaterial_diffuseTexture3_accessor_storage = new WeakMap(),
|
|
585
|
+
_MixMaterial_diffuseTexture4_accessor_storage = new WeakMap(),
|
|
586
|
+
_MixMaterial_diffuseTexture5_accessor_storage = new WeakMap(),
|
|
587
|
+
_MixMaterial_diffuseTexture6_accessor_storage = new WeakMap(),
|
|
588
|
+
_MixMaterial_diffuseTexture7_accessor_storage = new WeakMap(),
|
|
589
|
+
_MixMaterial_diffuseTexture8_accessor_storage = new WeakMap(),
|
|
590
|
+
_MixMaterial_disableLighting_accessor_storage = new WeakMap(),
|
|
591
|
+
_MixMaterial_maxSimultaneousLights_accessor_storage = new WeakMap(),
|
|
592
|
+
(() => {
|
|
593
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
594
|
+
__mixTexture1_decorators = [serializeAsTexture("mixTexture1")];
|
|
595
|
+
_mixTexture1_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
596
|
+
__mixTexture2_decorators = [serializeAsTexture("mixTexture2")];
|
|
597
|
+
_mixTexture2_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
598
|
+
__diffuseTexture1_decorators = [serializeAsTexture("diffuseTexture1")];
|
|
599
|
+
_diffuseTexture1_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
600
|
+
__diffuseTexture2_decorators = [serializeAsTexture("diffuseTexture2")];
|
|
601
|
+
_diffuseTexture2_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
602
|
+
__diffuseTexture3_decorators = [serializeAsTexture("diffuseTexture3")];
|
|
603
|
+
_diffuseTexture3_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
604
|
+
__diffuseTexture4_decorators = [serializeAsTexture("diffuseTexture4")];
|
|
605
|
+
_diffuseTexture4_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
606
|
+
__diffuseTexture5_decorators = [serializeAsTexture("diffuseTexture1")];
|
|
607
|
+
_diffuseTexture5_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
608
|
+
__diffuseTexture6_decorators = [serializeAsTexture("diffuseTexture2")];
|
|
609
|
+
_diffuseTexture6_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
610
|
+
__diffuseTexture7_decorators = [serializeAsTexture("diffuseTexture3")];
|
|
611
|
+
_diffuseTexture7_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
612
|
+
__diffuseTexture8_decorators = [serializeAsTexture("diffuseTexture4")];
|
|
613
|
+
_diffuseTexture8_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
614
|
+
_diffuseColor_decorators = [serializeAsColor3()];
|
|
615
|
+
_specularColor_decorators = [serializeAsColor3()];
|
|
616
|
+
_specularPower_decorators = [serialize()];
|
|
617
|
+
__disableLighting_decorators = [serialize("disableLighting")];
|
|
618
|
+
_disableLighting_decorators = [expandToProperty("_markAllSubMeshesAsLightsDirty")];
|
|
619
|
+
__maxSimultaneousLights_decorators = [serialize("maxSimultaneousLights")];
|
|
620
|
+
_maxSimultaneousLights_decorators = [expandToProperty("_markAllSubMeshesAsLightsDirty")];
|
|
621
|
+
__esDecorate(_a, null, _mixTexture1_decorators, { kind: "accessor", name: "mixTexture1", static: false, private: false, access: { has: obj => "mixTexture1" in obj, get: obj => obj.mixTexture1, set: (obj, value) => { obj.mixTexture1 = value; } }, metadata: _metadata }, _mixTexture1_initializers, _mixTexture1_extraInitializers);
|
|
622
|
+
__esDecorate(_a, null, _mixTexture2_decorators, { kind: "accessor", name: "mixTexture2", static: false, private: false, access: { has: obj => "mixTexture2" in obj, get: obj => obj.mixTexture2, set: (obj, value) => { obj.mixTexture2 = value; } }, metadata: _metadata }, _mixTexture2_initializers, _mixTexture2_extraInitializers);
|
|
623
|
+
__esDecorate(_a, null, _diffuseTexture1_decorators, { kind: "accessor", name: "diffuseTexture1", static: false, private: false, access: { has: obj => "diffuseTexture1" in obj, get: obj => obj.diffuseTexture1, set: (obj, value) => { obj.diffuseTexture1 = value; } }, metadata: _metadata }, _diffuseTexture1_initializers, _diffuseTexture1_extraInitializers);
|
|
624
|
+
__esDecorate(_a, null, _diffuseTexture2_decorators, { kind: "accessor", name: "diffuseTexture2", static: false, private: false, access: { has: obj => "diffuseTexture2" in obj, get: obj => obj.diffuseTexture2, set: (obj, value) => { obj.diffuseTexture2 = value; } }, metadata: _metadata }, _diffuseTexture2_initializers, _diffuseTexture2_extraInitializers);
|
|
625
|
+
__esDecorate(_a, null, _diffuseTexture3_decorators, { kind: "accessor", name: "diffuseTexture3", static: false, private: false, access: { has: obj => "diffuseTexture3" in obj, get: obj => obj.diffuseTexture3, set: (obj, value) => { obj.diffuseTexture3 = value; } }, metadata: _metadata }, _diffuseTexture3_initializers, _diffuseTexture3_extraInitializers);
|
|
626
|
+
__esDecorate(_a, null, _diffuseTexture4_decorators, { kind: "accessor", name: "diffuseTexture4", static: false, private: false, access: { has: obj => "diffuseTexture4" in obj, get: obj => obj.diffuseTexture4, set: (obj, value) => { obj.diffuseTexture4 = value; } }, metadata: _metadata }, _diffuseTexture4_initializers, _diffuseTexture4_extraInitializers);
|
|
627
|
+
__esDecorate(_a, null, _diffuseTexture5_decorators, { kind: "accessor", name: "diffuseTexture5", static: false, private: false, access: { has: obj => "diffuseTexture5" in obj, get: obj => obj.diffuseTexture5, set: (obj, value) => { obj.diffuseTexture5 = value; } }, metadata: _metadata }, _diffuseTexture5_initializers, _diffuseTexture5_extraInitializers);
|
|
628
|
+
__esDecorate(_a, null, _diffuseTexture6_decorators, { kind: "accessor", name: "diffuseTexture6", static: false, private: false, access: { has: obj => "diffuseTexture6" in obj, get: obj => obj.diffuseTexture6, set: (obj, value) => { obj.diffuseTexture6 = value; } }, metadata: _metadata }, _diffuseTexture6_initializers, _diffuseTexture6_extraInitializers);
|
|
629
|
+
__esDecorate(_a, null, _diffuseTexture7_decorators, { kind: "accessor", name: "diffuseTexture7", static: false, private: false, access: { has: obj => "diffuseTexture7" in obj, get: obj => obj.diffuseTexture7, set: (obj, value) => { obj.diffuseTexture7 = value; } }, metadata: _metadata }, _diffuseTexture7_initializers, _diffuseTexture7_extraInitializers);
|
|
630
|
+
__esDecorate(_a, null, _diffuseTexture8_decorators, { kind: "accessor", name: "diffuseTexture8", static: false, private: false, access: { has: obj => "diffuseTexture8" in obj, get: obj => obj.diffuseTexture8, set: (obj, value) => { obj.diffuseTexture8 = value; } }, metadata: _metadata }, _diffuseTexture8_initializers, _diffuseTexture8_extraInitializers);
|
|
631
|
+
__esDecorate(_a, null, _disableLighting_decorators, { kind: "accessor", name: "disableLighting", static: false, private: false, access: { has: obj => "disableLighting" in obj, get: obj => obj.disableLighting, set: (obj, value) => { obj.disableLighting = value; } }, metadata: _metadata }, _disableLighting_initializers, _disableLighting_extraInitializers);
|
|
632
|
+
__esDecorate(_a, null, _maxSimultaneousLights_decorators, { kind: "accessor", name: "maxSimultaneousLights", static: false, private: false, access: { has: obj => "maxSimultaneousLights" in obj, get: obj => obj.maxSimultaneousLights, set: (obj, value) => { obj.maxSimultaneousLights = value; } }, metadata: _metadata }, _maxSimultaneousLights_initializers, _maxSimultaneousLights_extraInitializers);
|
|
633
|
+
__esDecorate(null, null, __mixTexture1_decorators, { kind: "field", name: "_mixTexture1", static: false, private: false, access: { has: obj => "_mixTexture1" in obj, get: obj => obj._mixTexture1, set: (obj, value) => { obj._mixTexture1 = value; } }, metadata: _metadata }, __mixTexture1_initializers, __mixTexture1_extraInitializers);
|
|
634
|
+
__esDecorate(null, null, __mixTexture2_decorators, { kind: "field", name: "_mixTexture2", static: false, private: false, access: { has: obj => "_mixTexture2" in obj, get: obj => obj._mixTexture2, set: (obj, value) => { obj._mixTexture2 = value; } }, metadata: _metadata }, __mixTexture2_initializers, __mixTexture2_extraInitializers);
|
|
635
|
+
__esDecorate(null, null, __diffuseTexture1_decorators, { kind: "field", name: "_diffuseTexture1", static: false, private: false, access: { has: obj => "_diffuseTexture1" in obj, get: obj => obj._diffuseTexture1, set: (obj, value) => { obj._diffuseTexture1 = value; } }, metadata: _metadata }, __diffuseTexture1_initializers, __diffuseTexture1_extraInitializers);
|
|
636
|
+
__esDecorate(null, null, __diffuseTexture2_decorators, { kind: "field", name: "_diffuseTexture2", static: false, private: false, access: { has: obj => "_diffuseTexture2" in obj, get: obj => obj._diffuseTexture2, set: (obj, value) => { obj._diffuseTexture2 = value; } }, metadata: _metadata }, __diffuseTexture2_initializers, __diffuseTexture2_extraInitializers);
|
|
637
|
+
__esDecorate(null, null, __diffuseTexture3_decorators, { kind: "field", name: "_diffuseTexture3", static: false, private: false, access: { has: obj => "_diffuseTexture3" in obj, get: obj => obj._diffuseTexture3, set: (obj, value) => { obj._diffuseTexture3 = value; } }, metadata: _metadata }, __diffuseTexture3_initializers, __diffuseTexture3_extraInitializers);
|
|
638
|
+
__esDecorate(null, null, __diffuseTexture4_decorators, { kind: "field", name: "_diffuseTexture4", static: false, private: false, access: { has: obj => "_diffuseTexture4" in obj, get: obj => obj._diffuseTexture4, set: (obj, value) => { obj._diffuseTexture4 = value; } }, metadata: _metadata }, __diffuseTexture4_initializers, __diffuseTexture4_extraInitializers);
|
|
639
|
+
__esDecorate(null, null, __diffuseTexture5_decorators, { kind: "field", name: "_diffuseTexture5", static: false, private: false, access: { has: obj => "_diffuseTexture5" in obj, get: obj => obj._diffuseTexture5, set: (obj, value) => { obj._diffuseTexture5 = value; } }, metadata: _metadata }, __diffuseTexture5_initializers, __diffuseTexture5_extraInitializers);
|
|
640
|
+
__esDecorate(null, null, __diffuseTexture6_decorators, { kind: "field", name: "_diffuseTexture6", static: false, private: false, access: { has: obj => "_diffuseTexture6" in obj, get: obj => obj._diffuseTexture6, set: (obj, value) => { obj._diffuseTexture6 = value; } }, metadata: _metadata }, __diffuseTexture6_initializers, __diffuseTexture6_extraInitializers);
|
|
641
|
+
__esDecorate(null, null, __diffuseTexture7_decorators, { kind: "field", name: "_diffuseTexture7", static: false, private: false, access: { has: obj => "_diffuseTexture7" in obj, get: obj => obj._diffuseTexture7, set: (obj, value) => { obj._diffuseTexture7 = value; } }, metadata: _metadata }, __diffuseTexture7_initializers, __diffuseTexture7_extraInitializers);
|
|
642
|
+
__esDecorate(null, null, __diffuseTexture8_decorators, { kind: "field", name: "_diffuseTexture8", static: false, private: false, access: { has: obj => "_diffuseTexture8" in obj, get: obj => obj._diffuseTexture8, set: (obj, value) => { obj._diffuseTexture8 = value; } }, metadata: _metadata }, __diffuseTexture8_initializers, __diffuseTexture8_extraInitializers);
|
|
643
|
+
__esDecorate(null, null, _diffuseColor_decorators, { kind: "field", name: "diffuseColor", static: false, private: false, access: { has: obj => "diffuseColor" in obj, get: obj => obj.diffuseColor, set: (obj, value) => { obj.diffuseColor = value; } }, metadata: _metadata }, _diffuseColor_initializers, _diffuseColor_extraInitializers);
|
|
644
|
+
__esDecorate(null, null, _specularColor_decorators, { kind: "field", name: "specularColor", static: false, private: false, access: { has: obj => "specularColor" in obj, get: obj => obj.specularColor, set: (obj, value) => { obj.specularColor = value; } }, metadata: _metadata }, _specularColor_initializers, _specularColor_extraInitializers);
|
|
645
|
+
__esDecorate(null, null, _specularPower_decorators, { kind: "field", name: "specularPower", static: false, private: false, access: { has: obj => "specularPower" in obj, get: obj => obj.specularPower, set: (obj, value) => { obj.specularPower = value; } }, metadata: _metadata }, _specularPower_initializers, _specularPower_extraInitializers);
|
|
646
|
+
__esDecorate(null, null, __disableLighting_decorators, { kind: "field", name: "_disableLighting", static: false, private: false, access: { has: obj => "_disableLighting" in obj, get: obj => obj._disableLighting, set: (obj, value) => { obj._disableLighting = value; } }, metadata: _metadata }, __disableLighting_initializers, __disableLighting_extraInitializers);
|
|
647
|
+
__esDecorate(null, null, __maxSimultaneousLights_decorators, { kind: "field", name: "_maxSimultaneousLights", static: false, private: false, access: { has: obj => "_maxSimultaneousLights" in obj, get: obj => obj._maxSimultaneousLights, set: (obj, value) => { obj._maxSimultaneousLights = value; } }, metadata: _metadata }, __maxSimultaneousLights_initializers, __maxSimultaneousLights_extraInitializers);
|
|
648
|
+
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
649
|
+
})(),
|
|
650
|
+
_a;
|
|
651
|
+
})();
|
|
652
|
+
export { MixMaterial };
|
|
525
653
|
RegisterClass("BABYLON.MixMaterial", MixMaterial);
|
|
526
654
|
//# sourceMappingURL=mixMaterial.js.map
|