@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.
Files changed (39) hide show
  1. package/cell/cellMaterial.d.ts +4 -4
  2. package/cell/cellMaterial.js +313 -268
  3. package/cell/cellMaterial.js.map +1 -1
  4. package/fire/fireMaterial.d.ts +3 -3
  5. package/fire/fireMaterial.js +344 -303
  6. package/fire/fireMaterial.js.map +1 -1
  7. package/fur/furMaterial.d.ts +4 -4
  8. package/fur/furMaterial.js +519 -450
  9. package/fur/furMaterial.js.map +1 -1
  10. package/gradient/gradientMaterial.d.ts +2 -2
  11. package/gradient/gradientMaterial.js +286 -246
  12. package/gradient/gradientMaterial.js.map +1 -1
  13. package/grid/gridMaterial.d.ts +1 -1
  14. package/grid/gridMaterial.js +453 -398
  15. package/grid/gridMaterial.js.map +1 -1
  16. package/lava/lavaMaterial.d.ts +4 -4
  17. package/lava/lavaMaterial.js +377 -318
  18. package/lava/lavaMaterial.js.map +1 -1
  19. package/mix/mixMaterial.d.ts +12 -12
  20. package/mix/mixMaterial.js +584 -456
  21. package/mix/mixMaterial.js.map +1 -1
  22. package/normal/normalMaterial.d.ts +3 -3
  23. package/normal/normalMaterial.js +301 -264
  24. package/normal/normalMaterial.js.map +1 -1
  25. package/package.json +2 -2
  26. package/simple/simpleMaterial.d.ts +3 -3
  27. package/simple/simpleMaterial.js +299 -262
  28. package/simple/simpleMaterial.js.map +1 -1
  29. package/sky/skyMaterial.js +380 -344
  30. package/sky/skyMaterial.js.map +1 -1
  31. package/terrain/terrainMaterial.d.ts +9 -9
  32. package/terrain/terrainMaterial.js +490 -395
  33. package/terrain/terrainMaterial.js.map +1 -1
  34. package/triPlanar/triPlanarMaterial.d.ts +8 -8
  35. package/triPlanar/triPlanarMaterial.js +460 -369
  36. package/triPlanar/triPlanarMaterial.js.map +1 -1
  37. package/water/waterMaterial.d.ts +7 -7
  38. package/water/waterMaterial.js +759 -659
  39. package/water/waterMaterial.js.map +1 -1
@@ -1,4 +1,4 @@
1
- import { __decorate } from "@babylonjs/core/tslib.es6.js";
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";
@@ -47,393 +47,484 @@ class TriPlanarMaterialDefines extends MaterialDefines {
47
47
  this.rebuild();
48
48
  }
49
49
  }
50
- export class TriPlanarMaterial extends PushMaterial {
51
- /**
52
- * Instantiates a TriPlanar Material in the given scene
53
- * @param name The friendly name of the material
54
- * @param scene The scene to add the material to
55
- * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
56
- */
57
- constructor(name, scene, forceGLSL = false) {
58
- super(name, scene, undefined, forceGLSL);
59
- this.tileSize = 1;
60
- this.diffuseColor = new Color3(1, 1, 1);
61
- this.specularColor = new Color3(0.2, 0.2, 0.2);
62
- this.specularPower = 64;
63
- this._disableLighting = false;
64
- this._maxSimultaneousLights = 4;
65
- this._shadersLoaded = false;
66
- }
67
- needAlphaBlending() {
68
- return this.alpha < 1.0;
69
- }
70
- needAlphaTesting() {
71
- return false;
72
- }
73
- getAlphaTestTexture() {
74
- return null;
75
- }
76
- // Methods
77
- isReadyForSubMesh(mesh, subMesh, useInstances) {
78
- const drawWrapper = subMesh._drawWrapper;
79
- if (this.isFrozen) {
80
- if (drawWrapper.effect && drawWrapper._wasPreviouslyReady && drawWrapper._wasPreviouslyUsingInstances === useInstances) {
81
- return true;
50
+ let TriPlanarMaterial = (() => {
51
+ var _a, _TriPlanarMaterial_diffuseTextureX_accessor_storage, _TriPlanarMaterial_diffuseTextureY_accessor_storage, _TriPlanarMaterial_diffuseTextureZ_accessor_storage, _TriPlanarMaterial_normalTextureX_accessor_storage, _TriPlanarMaterial_normalTextureY_accessor_storage, _TriPlanarMaterial_normalTextureZ_accessor_storage, _TriPlanarMaterial_disableLighting_accessor_storage, _TriPlanarMaterial_maxSimultaneousLights_accessor_storage;
52
+ let _classSuper = PushMaterial;
53
+ let _mixTexture_decorators;
54
+ let _mixTexture_initializers = [];
55
+ let _mixTexture_extraInitializers = [];
56
+ let __diffuseTextureX_decorators;
57
+ let __diffuseTextureX_initializers = [];
58
+ let __diffuseTextureX_extraInitializers = [];
59
+ let _diffuseTextureX_decorators;
60
+ let _diffuseTextureX_initializers = [];
61
+ let _diffuseTextureX_extraInitializers = [];
62
+ let __diffuseTextureY_decorators;
63
+ let __diffuseTextureY_initializers = [];
64
+ let __diffuseTextureY_extraInitializers = [];
65
+ let _diffuseTextureY_decorators;
66
+ let _diffuseTextureY_initializers = [];
67
+ let _diffuseTextureY_extraInitializers = [];
68
+ let __diffuseTextureZ_decorators;
69
+ let __diffuseTextureZ_initializers = [];
70
+ let __diffuseTextureZ_extraInitializers = [];
71
+ let _diffuseTextureZ_decorators;
72
+ let _diffuseTextureZ_initializers = [];
73
+ let _diffuseTextureZ_extraInitializers = [];
74
+ let __normalTextureX_decorators;
75
+ let __normalTextureX_initializers = [];
76
+ let __normalTextureX_extraInitializers = [];
77
+ let _normalTextureX_decorators;
78
+ let _normalTextureX_initializers = [];
79
+ let _normalTextureX_extraInitializers = [];
80
+ let __normalTextureY_decorators;
81
+ let __normalTextureY_initializers = [];
82
+ let __normalTextureY_extraInitializers = [];
83
+ let _normalTextureY_decorators;
84
+ let _normalTextureY_initializers = [];
85
+ let _normalTextureY_extraInitializers = [];
86
+ let __normalTextureZ_decorators;
87
+ let __normalTextureZ_initializers = [];
88
+ let __normalTextureZ_extraInitializers = [];
89
+ let _normalTextureZ_decorators;
90
+ let _normalTextureZ_initializers = [];
91
+ let _normalTextureZ_extraInitializers = [];
92
+ let _tileSize_decorators;
93
+ let _tileSize_initializers = [];
94
+ let _tileSize_extraInitializers = [];
95
+ let _diffuseColor_decorators;
96
+ let _diffuseColor_initializers = [];
97
+ let _diffuseColor_extraInitializers = [];
98
+ let _specularColor_decorators;
99
+ let _specularColor_initializers = [];
100
+ let _specularColor_extraInitializers = [];
101
+ let _specularPower_decorators;
102
+ let _specularPower_initializers = [];
103
+ let _specularPower_extraInitializers = [];
104
+ let __disableLighting_decorators;
105
+ let __disableLighting_initializers = [];
106
+ let __disableLighting_extraInitializers = [];
107
+ let _disableLighting_decorators;
108
+ let _disableLighting_initializers = [];
109
+ let _disableLighting_extraInitializers = [];
110
+ let __maxSimultaneousLights_decorators;
111
+ let __maxSimultaneousLights_initializers = [];
112
+ let __maxSimultaneousLights_extraInitializers = [];
113
+ let _maxSimultaneousLights_decorators;
114
+ let _maxSimultaneousLights_initializers = [];
115
+ let _maxSimultaneousLights_extraInitializers = [];
116
+ return _a = class TriPlanarMaterial extends _classSuper {
117
+ get diffuseTextureX() { return __classPrivateFieldGet(this, _TriPlanarMaterial_diffuseTextureX_accessor_storage, "f"); }
118
+ set diffuseTextureX(value) { __classPrivateFieldSet(this, _TriPlanarMaterial_diffuseTextureX_accessor_storage, value, "f"); }
119
+ get diffuseTextureY() { return __classPrivateFieldGet(this, _TriPlanarMaterial_diffuseTextureY_accessor_storage, "f"); }
120
+ set diffuseTextureY(value) { __classPrivateFieldSet(this, _TriPlanarMaterial_diffuseTextureY_accessor_storage, value, "f"); }
121
+ get diffuseTextureZ() { return __classPrivateFieldGet(this, _TriPlanarMaterial_diffuseTextureZ_accessor_storage, "f"); }
122
+ set diffuseTextureZ(value) { __classPrivateFieldSet(this, _TriPlanarMaterial_diffuseTextureZ_accessor_storage, value, "f"); }
123
+ get normalTextureX() { return __classPrivateFieldGet(this, _TriPlanarMaterial_normalTextureX_accessor_storage, "f"); }
124
+ set normalTextureX(value) { __classPrivateFieldSet(this, _TriPlanarMaterial_normalTextureX_accessor_storage, value, "f"); }
125
+ get normalTextureY() { return __classPrivateFieldGet(this, _TriPlanarMaterial_normalTextureY_accessor_storage, "f"); }
126
+ set normalTextureY(value) { __classPrivateFieldSet(this, _TriPlanarMaterial_normalTextureY_accessor_storage, value, "f"); }
127
+ get normalTextureZ() { return __classPrivateFieldGet(this, _TriPlanarMaterial_normalTextureZ_accessor_storage, "f"); }
128
+ set normalTextureZ(value) { __classPrivateFieldSet(this, _TriPlanarMaterial_normalTextureZ_accessor_storage, value, "f"); }
129
+ get disableLighting() { return __classPrivateFieldGet(this, _TriPlanarMaterial_disableLighting_accessor_storage, "f"); }
130
+ set disableLighting(value) { __classPrivateFieldSet(this, _TriPlanarMaterial_disableLighting_accessor_storage, value, "f"); }
131
+ get maxSimultaneousLights() { return __classPrivateFieldGet(this, _TriPlanarMaterial_maxSimultaneousLights_accessor_storage, "f"); }
132
+ set maxSimultaneousLights(value) { __classPrivateFieldSet(this, _TriPlanarMaterial_maxSimultaneousLights_accessor_storage, value, "f"); }
133
+ /**
134
+ * Instantiates a TriPlanar Material in the given scene
135
+ * @param name The friendly name of the material
136
+ * @param scene The scene to add the material to
137
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
138
+ */
139
+ constructor(name, scene, forceGLSL = false) {
140
+ super(name, scene, undefined, forceGLSL);
141
+ this.mixTexture = __runInitializers(this, _mixTexture_initializers, void 0);
142
+ this._diffuseTextureX = (__runInitializers(this, _mixTexture_extraInitializers), __runInitializers(this, __diffuseTextureX_initializers, void 0));
143
+ _TriPlanarMaterial_diffuseTextureX_accessor_storage.set(this, (__runInitializers(this, __diffuseTextureX_extraInitializers), __runInitializers(this, _diffuseTextureX_initializers, void 0)));
144
+ this._diffuseTextureY = (__runInitializers(this, _diffuseTextureX_extraInitializers), __runInitializers(this, __diffuseTextureY_initializers, void 0));
145
+ _TriPlanarMaterial_diffuseTextureY_accessor_storage.set(this, (__runInitializers(this, __diffuseTextureY_extraInitializers), __runInitializers(this, _diffuseTextureY_initializers, void 0)));
146
+ this._diffuseTextureZ = (__runInitializers(this, _diffuseTextureY_extraInitializers), __runInitializers(this, __diffuseTextureZ_initializers, void 0));
147
+ _TriPlanarMaterial_diffuseTextureZ_accessor_storage.set(this, (__runInitializers(this, __diffuseTextureZ_extraInitializers), __runInitializers(this, _diffuseTextureZ_initializers, void 0)));
148
+ this._normalTextureX = (__runInitializers(this, _diffuseTextureZ_extraInitializers), __runInitializers(this, __normalTextureX_initializers, void 0));
149
+ _TriPlanarMaterial_normalTextureX_accessor_storage.set(this, (__runInitializers(this, __normalTextureX_extraInitializers), __runInitializers(this, _normalTextureX_initializers, void 0)));
150
+ this._normalTextureY = (__runInitializers(this, _normalTextureX_extraInitializers), __runInitializers(this, __normalTextureY_initializers, void 0));
151
+ _TriPlanarMaterial_normalTextureY_accessor_storage.set(this, (__runInitializers(this, __normalTextureY_extraInitializers), __runInitializers(this, _normalTextureY_initializers, void 0)));
152
+ this._normalTextureZ = (__runInitializers(this, _normalTextureY_extraInitializers), __runInitializers(this, __normalTextureZ_initializers, void 0));
153
+ _TriPlanarMaterial_normalTextureZ_accessor_storage.set(this, (__runInitializers(this, __normalTextureZ_extraInitializers), __runInitializers(this, _normalTextureZ_initializers, void 0)));
154
+ this.tileSize = (__runInitializers(this, _normalTextureZ_extraInitializers), __runInitializers(this, _tileSize_initializers, 1));
155
+ this.diffuseColor = (__runInitializers(this, _tileSize_extraInitializers), __runInitializers(this, _diffuseColor_initializers, new Color3(1, 1, 1)));
156
+ this.specularColor = (__runInitializers(this, _diffuseColor_extraInitializers), __runInitializers(this, _specularColor_initializers, new Color3(0.2, 0.2, 0.2)));
157
+ this.specularPower = (__runInitializers(this, _specularColor_extraInitializers), __runInitializers(this, _specularPower_initializers, 64));
158
+ this._disableLighting = (__runInitializers(this, _specularPower_extraInitializers), __runInitializers(this, __disableLighting_initializers, false));
159
+ _TriPlanarMaterial_disableLighting_accessor_storage.set(this, (__runInitializers(this, __disableLighting_extraInitializers), __runInitializers(this, _disableLighting_initializers, void 0)));
160
+ this._maxSimultaneousLights = (__runInitializers(this, _disableLighting_extraInitializers), __runInitializers(this, __maxSimultaneousLights_initializers, 4));
161
+ _TriPlanarMaterial_maxSimultaneousLights_accessor_storage.set(this, (__runInitializers(this, __maxSimultaneousLights_extraInitializers), __runInitializers(this, _maxSimultaneousLights_initializers, void 0)));
162
+ this._shadersLoaded = (__runInitializers(this, _maxSimultaneousLights_extraInitializers), false);
82
163
  }
83
- }
84
- if (!subMesh.materialDefines) {
85
- subMesh.materialDefines = new TriPlanarMaterialDefines();
86
- }
87
- const defines = subMesh.materialDefines;
88
- const scene = this.getScene();
89
- if (this._isReadyForSubMesh(subMesh)) {
90
- return true;
91
- }
92
- const engine = scene.getEngine();
93
- // Textures
94
- if (defines._areTexturesDirty) {
95
- if (scene.texturesEnabled) {
96
- if (MaterialFlags.DiffuseTextureEnabled) {
97
- const textures = [this.diffuseTextureX, this.diffuseTextureY, this.diffuseTextureZ];
98
- const textureDefines = ["DIFFUSEX", "DIFFUSEY", "DIFFUSEZ"];
99
- for (let i = 0; i < textures.length; i++) {
100
- if (textures[i]) {
101
- if (!textures[i].isReady()) {
102
- return false;
103
- }
104
- else {
105
- defines[textureDefines[i]] = true;
106
- }
107
- }
164
+ needAlphaBlending() {
165
+ return this.alpha < 1.0;
166
+ }
167
+ needAlphaTesting() {
168
+ return false;
169
+ }
170
+ getAlphaTestTexture() {
171
+ return null;
172
+ }
173
+ // Methods
174
+ isReadyForSubMesh(mesh, subMesh, useInstances) {
175
+ const drawWrapper = subMesh._drawWrapper;
176
+ if (this.isFrozen) {
177
+ if (drawWrapper.effect && drawWrapper._wasPreviouslyReady && drawWrapper._wasPreviouslyUsingInstances === useInstances) {
178
+ return true;
108
179
  }
109
180
  }
110
- if (MaterialFlags.BumpTextureEnabled) {
111
- const textures = [this.normalTextureX, this.normalTextureY, this.normalTextureZ];
112
- const textureDefines = ["BUMPX", "BUMPY", "BUMPZ"];
113
- for (let i = 0; i < textures.length; i++) {
114
- if (textures[i]) {
115
- if (!textures[i].isReady()) {
116
- return false;
181
+ if (!subMesh.materialDefines) {
182
+ subMesh.materialDefines = new TriPlanarMaterialDefines();
183
+ }
184
+ const defines = subMesh.materialDefines;
185
+ const scene = this.getScene();
186
+ if (this._isReadyForSubMesh(subMesh)) {
187
+ return true;
188
+ }
189
+ const engine = scene.getEngine();
190
+ // Textures
191
+ if (defines._areTexturesDirty) {
192
+ if (scene.texturesEnabled) {
193
+ if (MaterialFlags.DiffuseTextureEnabled) {
194
+ const textures = [this.diffuseTextureX, this.diffuseTextureY, this.diffuseTextureZ];
195
+ const textureDefines = ["DIFFUSEX", "DIFFUSEY", "DIFFUSEZ"];
196
+ for (let i = 0; i < textures.length; i++) {
197
+ if (textures[i]) {
198
+ if (!textures[i].isReady()) {
199
+ return false;
200
+ }
201
+ else {
202
+ defines[textureDefines[i]] = true;
203
+ }
204
+ }
117
205
  }
118
- else {
119
- defines[textureDefines[i]] = true;
206
+ }
207
+ if (MaterialFlags.BumpTextureEnabled) {
208
+ const textures = [this.normalTextureX, this.normalTextureY, this.normalTextureZ];
209
+ const textureDefines = ["BUMPX", "BUMPY", "BUMPZ"];
210
+ for (let i = 0; i < textures.length; i++) {
211
+ if (textures[i]) {
212
+ if (!textures[i].isReady()) {
213
+ return false;
214
+ }
215
+ else {
216
+ defines[textureDefines[i]] = true;
217
+ }
218
+ }
120
219
  }
121
220
  }
122
221
  }
123
222
  }
124
- }
125
- }
126
- // Misc.
127
- PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this.needAlphaTestingForMesh(mesh), defines, undefined, undefined, undefined, this._isVertexOutputInvariant);
128
- // Lights
129
- defines._needNormals = PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting);
130
- // Values that need to be evaluated on every frame
131
- PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances ? true : false);
132
- // Attribs
133
- PrepareDefinesForAttributes(mesh, defines, true, true);
134
- // Get correct effect
135
- if (defines.isDirty) {
136
- defines.markAsProcessed();
137
- scene.resetCachedMaterial();
138
- // Fallbacks
139
- const fallbacks = new EffectFallbacks();
140
- if (defines.FOG) {
141
- fallbacks.addFallback(1, "FOG");
142
- }
143
- HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights);
144
- if (defines.NUM_BONE_INFLUENCERS > 0) {
145
- fallbacks.addCPUSkinningFallback(0, mesh);
146
- }
147
- defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
148
- //Attributes
149
- const attribs = [VertexBuffer.PositionKind];
150
- if (defines.NORMAL) {
151
- attribs.push(VertexBuffer.NormalKind);
152
- }
153
- if (defines.VERTEXCOLOR) {
154
- attribs.push(VertexBuffer.ColorKind);
155
- }
156
- PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
157
- PrepareAttributesForInstances(attribs, defines);
158
- // Legacy browser patch
159
- const shaderName = "triplanar";
160
- const join = defines.toString();
161
- const uniforms = [
162
- "world",
163
- "view",
164
- "viewProjection",
165
- "vEyePosition",
166
- "vLightsType",
167
- "vDiffuseColor",
168
- "vSpecularColor",
169
- "vFogInfos",
170
- "vFogColor",
171
- "pointSize",
172
- "mBones",
173
- "tileSize",
174
- ];
175
- const samplers = [
176
- "diffuseSamplerX",
177
- "diffuseSamplerY",
178
- "diffuseSamplerZ",
179
- "normalSamplerX",
180
- "normalSamplerY",
181
- "normalSamplerZ",
182
- "logarithmicDepthConstant",
183
- "areaLightsLTC1Sampler",
184
- "areaLightsLTC2Sampler",
185
- ];
186
- const uniformBuffers = [];
187
- AddClipPlaneUniforms(uniforms);
188
- PrepareUniformsAndSamplersList({
189
- uniformsNames: uniforms,
190
- uniformBuffersNames: uniformBuffers,
191
- samplers: samplers,
192
- defines: defines,
193
- maxSimultaneousLights: this.maxSimultaneousLights,
194
- shaderLanguage: this._shaderLanguage,
195
- });
196
- subMesh.setEffect(scene.getEngine().createEffect(shaderName, {
197
- attributes: attribs,
198
- uniformsNames: uniforms,
199
- uniformBuffersNames: uniformBuffers,
200
- samplers: samplers,
201
- defines: join,
202
- fallbacks: fallbacks,
203
- onCompiled: this.onCompiled,
204
- onError: this.onError,
205
- indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights },
206
- shaderLanguage: this._shaderLanguage,
207
- extraInitializationsAsync: this._shadersLoaded
208
- ? undefined
209
- : async () => {
210
- if (this.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
211
- await Promise.all([import("./wgsl/triplanar.vertex.js"), import("./wgsl/triplanar.fragment.js")]);
212
- }
213
- else {
214
- await Promise.all([import("./triplanar.vertex.js"), import("./triplanar.fragment.js")]);
223
+ // Misc.
224
+ PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this.needAlphaTestingForMesh(mesh), defines, undefined, undefined, undefined, this._isVertexOutputInvariant);
225
+ // Lights
226
+ defines._needNormals = PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting);
227
+ // Values that need to be evaluated on every frame
228
+ PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances ? true : false);
229
+ // Attribs
230
+ PrepareDefinesForAttributes(mesh, defines, true, true);
231
+ // Get correct effect
232
+ if (defines.isDirty) {
233
+ defines.markAsProcessed();
234
+ scene.resetCachedMaterial();
235
+ // Fallbacks
236
+ const fallbacks = new EffectFallbacks();
237
+ if (defines.FOG) {
238
+ fallbacks.addFallback(1, "FOG");
239
+ }
240
+ HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights);
241
+ if (defines.NUM_BONE_INFLUENCERS > 0) {
242
+ fallbacks.addCPUSkinningFallback(0, mesh);
243
+ }
244
+ defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
245
+ //Attributes
246
+ const attribs = [VertexBuffer.PositionKind];
247
+ if (defines.NORMAL) {
248
+ attribs.push(VertexBuffer.NormalKind);
249
+ }
250
+ if (defines.VERTEXCOLOR) {
251
+ attribs.push(VertexBuffer.ColorKind);
252
+ }
253
+ PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
254
+ PrepareAttributesForInstances(attribs, defines);
255
+ // Legacy browser patch
256
+ const shaderName = "triplanar";
257
+ const join = defines.toString();
258
+ const uniforms = [
259
+ "world",
260
+ "view",
261
+ "viewProjection",
262
+ "vEyePosition",
263
+ "vLightsType",
264
+ "vDiffuseColor",
265
+ "vSpecularColor",
266
+ "vFogInfos",
267
+ "vFogColor",
268
+ "pointSize",
269
+ "mBones",
270
+ "tileSize",
271
+ ];
272
+ const samplers = [
273
+ "diffuseSamplerX",
274
+ "diffuseSamplerY",
275
+ "diffuseSamplerZ",
276
+ "normalSamplerX",
277
+ "normalSamplerY",
278
+ "normalSamplerZ",
279
+ "logarithmicDepthConstant",
280
+ "areaLightsLTC1Sampler",
281
+ "areaLightsLTC2Sampler",
282
+ ];
283
+ const uniformBuffers = [];
284
+ AddClipPlaneUniforms(uniforms);
285
+ PrepareUniformsAndSamplersList({
286
+ uniformsNames: uniforms,
287
+ uniformBuffersNames: uniformBuffers,
288
+ samplers: samplers,
289
+ defines: defines,
290
+ maxSimultaneousLights: this.maxSimultaneousLights,
291
+ shaderLanguage: this._shaderLanguage,
292
+ });
293
+ subMesh.setEffect(scene.getEngine().createEffect(shaderName, {
294
+ attributes: attribs,
295
+ uniformsNames: uniforms,
296
+ uniformBuffersNames: uniformBuffers,
297
+ samplers: samplers,
298
+ defines: join,
299
+ fallbacks: fallbacks,
300
+ onCompiled: this.onCompiled,
301
+ onError: this.onError,
302
+ indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights },
303
+ shaderLanguage: this._shaderLanguage,
304
+ extraInitializationsAsync: this._shadersLoaded
305
+ ? undefined
306
+ : async () => {
307
+ if (this.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
308
+ await Promise.all([import("./wgsl/triplanar.vertex.js"), import("./wgsl/triplanar.fragment.js")]);
309
+ }
310
+ else {
311
+ await Promise.all([import("./triplanar.vertex.js"), import("./triplanar.fragment.js")]);
312
+ }
313
+ this._shadersLoaded = true;
314
+ },
315
+ }, engine), defines, this._materialContext);
316
+ }
317
+ // Check if Area Lights have LTC texture.
318
+ if (defines["AREALIGHTUSED"]) {
319
+ for (let index = 0; index < mesh.lightSources.length; index++) {
320
+ if (!mesh.lightSources[index]._isReady()) {
321
+ return false;
215
322
  }
216
- this._shadersLoaded = true;
217
- },
218
- }, engine), defines, this._materialContext);
219
- }
220
- // Check if Area Lights have LTC texture.
221
- if (defines["AREALIGHTUSED"]) {
222
- for (let index = 0; index < mesh.lightSources.length; index++) {
223
- if (!mesh.lightSources[index]._isReady()) {
323
+ }
324
+ }
325
+ if (!subMesh.effect || !subMesh.effect.isReady()) {
224
326
  return false;
225
327
  }
328
+ defines._renderId = scene.getRenderId();
329
+ drawWrapper._wasPreviouslyReady = true;
330
+ drawWrapper._wasPreviouslyUsingInstances = !!useInstances;
331
+ return true;
226
332
  }
227
- }
228
- if (!subMesh.effect || !subMesh.effect.isReady()) {
229
- return false;
230
- }
231
- defines._renderId = scene.getRenderId();
232
- drawWrapper._wasPreviouslyReady = true;
233
- drawWrapper._wasPreviouslyUsingInstances = !!useInstances;
234
- return true;
235
- }
236
- bindForSubMesh(world, mesh, subMesh) {
237
- const scene = this.getScene();
238
- const defines = subMesh.materialDefines;
239
- if (!defines) {
240
- return;
241
- }
242
- const effect = subMesh.effect;
243
- if (!effect) {
244
- return;
245
- }
246
- this._activeEffect = effect;
247
- // Matrices
248
- this.bindOnlyWorldMatrix(world);
249
- this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix());
250
- // Bones
251
- BindBonesParameters(mesh, this._activeEffect);
252
- this._activeEffect.setFloat("tileSize", this.tileSize);
253
- if (this._mustRebind(scene, effect, subMesh)) {
254
- // Textures
255
- if (this.diffuseTextureX) {
256
- this._activeEffect.setTexture("diffuseSamplerX", this.diffuseTextureX);
333
+ bindForSubMesh(world, mesh, subMesh) {
334
+ const scene = this.getScene();
335
+ const defines = subMesh.materialDefines;
336
+ if (!defines) {
337
+ return;
338
+ }
339
+ const effect = subMesh.effect;
340
+ if (!effect) {
341
+ return;
342
+ }
343
+ this._activeEffect = effect;
344
+ // Matrices
345
+ this.bindOnlyWorldMatrix(world);
346
+ this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix());
347
+ // Bones
348
+ BindBonesParameters(mesh, this._activeEffect);
349
+ this._activeEffect.setFloat("tileSize", this.tileSize);
350
+ if (this._mustRebind(scene, effect, subMesh)) {
351
+ // Textures
352
+ if (this.diffuseTextureX) {
353
+ this._activeEffect.setTexture("diffuseSamplerX", this.diffuseTextureX);
354
+ }
355
+ if (this.diffuseTextureY) {
356
+ this._activeEffect.setTexture("diffuseSamplerY", this.diffuseTextureY);
357
+ }
358
+ if (this.diffuseTextureZ) {
359
+ this._activeEffect.setTexture("diffuseSamplerZ", this.diffuseTextureZ);
360
+ }
361
+ if (this.normalTextureX) {
362
+ this._activeEffect.setTexture("normalSamplerX", this.normalTextureX);
363
+ }
364
+ if (this.normalTextureY) {
365
+ this._activeEffect.setTexture("normalSamplerY", this.normalTextureY);
366
+ }
367
+ if (this.normalTextureZ) {
368
+ this._activeEffect.setTexture("normalSamplerZ", this.normalTextureZ);
369
+ }
370
+ // Clip plane
371
+ BindClipPlane(effect, this, scene);
372
+ // Point size
373
+ if (this.pointsCloud) {
374
+ this._activeEffect.setFloat("pointSize", this.pointSize);
375
+ }
376
+ // Log. depth
377
+ if (this._useLogarithmicDepth) {
378
+ BindLogDepth(defines, effect, scene);
379
+ }
380
+ scene.bindEyePosition(effect);
381
+ }
382
+ this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);
383
+ if (defines.SPECULARTERM) {
384
+ this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower);
385
+ }
386
+ if (scene.lightsEnabled && !this.disableLighting) {
387
+ BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights);
388
+ }
389
+ // View
390
+ if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) {
391
+ this._activeEffect.setMatrix("view", scene.getViewMatrix());
392
+ }
393
+ // Fog
394
+ BindFogParameters(scene, mesh, this._activeEffect);
395
+ this._afterBind(mesh, this._activeEffect, subMesh);
257
396
  }
258
- if (this.diffuseTextureY) {
259
- this._activeEffect.setTexture("diffuseSamplerY", this.diffuseTextureY);
397
+ getAnimatables() {
398
+ const results = [];
399
+ if (this.mixTexture && this.mixTexture.animations && this.mixTexture.animations.length > 0) {
400
+ results.push(this.mixTexture);
401
+ }
402
+ return results;
260
403
  }
261
- if (this.diffuseTextureZ) {
262
- this._activeEffect.setTexture("diffuseSamplerZ", this.diffuseTextureZ);
404
+ getActiveTextures() {
405
+ const activeTextures = super.getActiveTextures();
406
+ if (this._diffuseTextureX) {
407
+ activeTextures.push(this._diffuseTextureX);
408
+ }
409
+ if (this._diffuseTextureY) {
410
+ activeTextures.push(this._diffuseTextureY);
411
+ }
412
+ if (this._diffuseTextureZ) {
413
+ activeTextures.push(this._diffuseTextureZ);
414
+ }
415
+ if (this._normalTextureX) {
416
+ activeTextures.push(this._normalTextureX);
417
+ }
418
+ if (this._normalTextureY) {
419
+ activeTextures.push(this._normalTextureY);
420
+ }
421
+ if (this._normalTextureZ) {
422
+ activeTextures.push(this._normalTextureZ);
423
+ }
424
+ return activeTextures;
425
+ }
426
+ hasTexture(texture) {
427
+ if (super.hasTexture(texture)) {
428
+ return true;
429
+ }
430
+ if (this._diffuseTextureX === texture) {
431
+ return true;
432
+ }
433
+ if (this._diffuseTextureY === texture) {
434
+ return true;
435
+ }
436
+ if (this._diffuseTextureZ === texture) {
437
+ return true;
438
+ }
439
+ if (this._normalTextureX === texture) {
440
+ return true;
441
+ }
442
+ if (this._normalTextureY === texture) {
443
+ return true;
444
+ }
445
+ if (this._normalTextureZ === texture) {
446
+ return true;
447
+ }
448
+ return false;
263
449
  }
264
- if (this.normalTextureX) {
265
- this._activeEffect.setTexture("normalSamplerX", this.normalTextureX);
450
+ dispose(forceDisposeEffect) {
451
+ if (this.mixTexture) {
452
+ this.mixTexture.dispose();
453
+ }
454
+ super.dispose(forceDisposeEffect);
266
455
  }
267
- if (this.normalTextureY) {
268
- this._activeEffect.setTexture("normalSamplerY", this.normalTextureY);
456
+ clone(name) {
457
+ return SerializationHelper.Clone(() => new _a(name, this.getScene()), this);
269
458
  }
270
- if (this.normalTextureZ) {
271
- this._activeEffect.setTexture("normalSamplerZ", this.normalTextureZ);
459
+ serialize() {
460
+ const serializationObject = super.serialize();
461
+ serializationObject.customType = "BABYLON.TriPlanarMaterial";
462
+ return serializationObject;
272
463
  }
273
- // Clip plane
274
- BindClipPlane(effect, this, scene);
275
- // Point size
276
- if (this.pointsCloud) {
277
- this._activeEffect.setFloat("pointSize", this.pointSize);
464
+ getClassName() {
465
+ return "TriPlanarMaterial";
278
466
  }
279
- // Log. depth
280
- if (this._useLogarithmicDepth) {
281
- BindLogDepth(defines, effect, scene);
467
+ // Statics
468
+ static Parse(source, scene, rootUrl) {
469
+ return SerializationHelper.Parse(() => new _a(source.name, scene), source, scene, rootUrl);
282
470
  }
283
- scene.bindEyePosition(effect);
284
- }
285
- this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);
286
- if (defines.SPECULARTERM) {
287
- this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower);
288
- }
289
- if (scene.lightsEnabled && !this.disableLighting) {
290
- BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights);
291
- }
292
- // View
293
- if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) {
294
- this._activeEffect.setMatrix("view", scene.getViewMatrix());
295
- }
296
- // Fog
297
- BindFogParameters(scene, mesh, this._activeEffect);
298
- this._afterBind(mesh, this._activeEffect, subMesh);
299
- }
300
- getAnimatables() {
301
- const results = [];
302
- if (this.mixTexture && this.mixTexture.animations && this.mixTexture.animations.length > 0) {
303
- results.push(this.mixTexture);
304
- }
305
- return results;
306
- }
307
- getActiveTextures() {
308
- const activeTextures = super.getActiveTextures();
309
- if (this._diffuseTextureX) {
310
- activeTextures.push(this._diffuseTextureX);
311
- }
312
- if (this._diffuseTextureY) {
313
- activeTextures.push(this._diffuseTextureY);
314
- }
315
- if (this._diffuseTextureZ) {
316
- activeTextures.push(this._diffuseTextureZ);
317
- }
318
- if (this._normalTextureX) {
319
- activeTextures.push(this._normalTextureX);
320
- }
321
- if (this._normalTextureY) {
322
- activeTextures.push(this._normalTextureY);
323
- }
324
- if (this._normalTextureZ) {
325
- activeTextures.push(this._normalTextureZ);
326
- }
327
- return activeTextures;
328
- }
329
- hasTexture(texture) {
330
- if (super.hasTexture(texture)) {
331
- return true;
332
- }
333
- if (this._diffuseTextureX === texture) {
334
- return true;
335
- }
336
- if (this._diffuseTextureY === texture) {
337
- return true;
338
- }
339
- if (this._diffuseTextureZ === texture) {
340
- return true;
341
- }
342
- if (this._normalTextureX === texture) {
343
- return true;
344
- }
345
- if (this._normalTextureY === texture) {
346
- return true;
347
- }
348
- if (this._normalTextureZ === texture) {
349
- return true;
350
- }
351
- return false;
352
- }
353
- dispose(forceDisposeEffect) {
354
- if (this.mixTexture) {
355
- this.mixTexture.dispose();
356
- }
357
- super.dispose(forceDisposeEffect);
358
- }
359
- clone(name) {
360
- return SerializationHelper.Clone(() => new TriPlanarMaterial(name, this.getScene()), this);
361
- }
362
- serialize() {
363
- const serializationObject = super.serialize();
364
- serializationObject.customType = "BABYLON.TriPlanarMaterial";
365
- return serializationObject;
366
- }
367
- getClassName() {
368
- return "TriPlanarMaterial";
369
- }
370
- // Statics
371
- static Parse(source, scene, rootUrl) {
372
- return SerializationHelper.Parse(() => new TriPlanarMaterial(source.name, scene), source, scene, rootUrl);
373
- }
374
- }
375
- __decorate([
376
- serializeAsTexture()
377
- ], TriPlanarMaterial.prototype, "mixTexture", void 0);
378
- __decorate([
379
- serializeAsTexture("diffuseTextureX")
380
- ], TriPlanarMaterial.prototype, "_diffuseTextureX", void 0);
381
- __decorate([
382
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
383
- ], TriPlanarMaterial.prototype, "diffuseTextureX", void 0);
384
- __decorate([
385
- serializeAsTexture("diffuseTexturY")
386
- ], TriPlanarMaterial.prototype, "_diffuseTextureY", void 0);
387
- __decorate([
388
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
389
- ], TriPlanarMaterial.prototype, "diffuseTextureY", void 0);
390
- __decorate([
391
- serializeAsTexture("diffuseTextureZ")
392
- ], TriPlanarMaterial.prototype, "_diffuseTextureZ", void 0);
393
- __decorate([
394
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
395
- ], TriPlanarMaterial.prototype, "diffuseTextureZ", void 0);
396
- __decorate([
397
- serializeAsTexture("normalTextureX")
398
- ], TriPlanarMaterial.prototype, "_normalTextureX", void 0);
399
- __decorate([
400
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
401
- ], TriPlanarMaterial.prototype, "normalTextureX", void 0);
402
- __decorate([
403
- serializeAsTexture("normalTextureY")
404
- ], TriPlanarMaterial.prototype, "_normalTextureY", void 0);
405
- __decorate([
406
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
407
- ], TriPlanarMaterial.prototype, "normalTextureY", void 0);
408
- __decorate([
409
- serializeAsTexture("normalTextureZ")
410
- ], TriPlanarMaterial.prototype, "_normalTextureZ", void 0);
411
- __decorate([
412
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
413
- ], TriPlanarMaterial.prototype, "normalTextureZ", void 0);
414
- __decorate([
415
- serialize()
416
- ], TriPlanarMaterial.prototype, "tileSize", void 0);
417
- __decorate([
418
- serializeAsColor3()
419
- ], TriPlanarMaterial.prototype, "diffuseColor", void 0);
420
- __decorate([
421
- serializeAsColor3()
422
- ], TriPlanarMaterial.prototype, "specularColor", void 0);
423
- __decorate([
424
- serialize()
425
- ], TriPlanarMaterial.prototype, "specularPower", void 0);
426
- __decorate([
427
- serialize("disableLighting")
428
- ], TriPlanarMaterial.prototype, "_disableLighting", void 0);
429
- __decorate([
430
- expandToProperty("_markAllSubMeshesAsLightsDirty")
431
- ], TriPlanarMaterial.prototype, "disableLighting", void 0);
432
- __decorate([
433
- serialize("maxSimultaneousLights")
434
- ], TriPlanarMaterial.prototype, "_maxSimultaneousLights", void 0);
435
- __decorate([
436
- expandToProperty("_markAllSubMeshesAsLightsDirty")
437
- ], TriPlanarMaterial.prototype, "maxSimultaneousLights", void 0);
471
+ },
472
+ _TriPlanarMaterial_diffuseTextureX_accessor_storage = new WeakMap(),
473
+ _TriPlanarMaterial_diffuseTextureY_accessor_storage = new WeakMap(),
474
+ _TriPlanarMaterial_diffuseTextureZ_accessor_storage = new WeakMap(),
475
+ _TriPlanarMaterial_normalTextureX_accessor_storage = new WeakMap(),
476
+ _TriPlanarMaterial_normalTextureY_accessor_storage = new WeakMap(),
477
+ _TriPlanarMaterial_normalTextureZ_accessor_storage = new WeakMap(),
478
+ _TriPlanarMaterial_disableLighting_accessor_storage = new WeakMap(),
479
+ _TriPlanarMaterial_maxSimultaneousLights_accessor_storage = new WeakMap(),
480
+ (() => {
481
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
482
+ _mixTexture_decorators = [serializeAsTexture()];
483
+ __diffuseTextureX_decorators = [serializeAsTexture("diffuseTextureX")];
484
+ _diffuseTextureX_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
485
+ __diffuseTextureY_decorators = [serializeAsTexture("diffuseTexturY")];
486
+ _diffuseTextureY_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
487
+ __diffuseTextureZ_decorators = [serializeAsTexture("diffuseTextureZ")];
488
+ _diffuseTextureZ_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
489
+ __normalTextureX_decorators = [serializeAsTexture("normalTextureX")];
490
+ _normalTextureX_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
491
+ __normalTextureY_decorators = [serializeAsTexture("normalTextureY")];
492
+ _normalTextureY_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
493
+ __normalTextureZ_decorators = [serializeAsTexture("normalTextureZ")];
494
+ _normalTextureZ_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
495
+ _tileSize_decorators = [serialize()];
496
+ _diffuseColor_decorators = [serializeAsColor3()];
497
+ _specularColor_decorators = [serializeAsColor3()];
498
+ _specularPower_decorators = [serialize()];
499
+ __disableLighting_decorators = [serialize("disableLighting")];
500
+ _disableLighting_decorators = [expandToProperty("_markAllSubMeshesAsLightsDirty")];
501
+ __maxSimultaneousLights_decorators = [serialize("maxSimultaneousLights")];
502
+ _maxSimultaneousLights_decorators = [expandToProperty("_markAllSubMeshesAsLightsDirty")];
503
+ __esDecorate(_a, null, _diffuseTextureX_decorators, { kind: "accessor", name: "diffuseTextureX", static: false, private: false, access: { has: obj => "diffuseTextureX" in obj, get: obj => obj.diffuseTextureX, set: (obj, value) => { obj.diffuseTextureX = value; } }, metadata: _metadata }, _diffuseTextureX_initializers, _diffuseTextureX_extraInitializers);
504
+ __esDecorate(_a, null, _diffuseTextureY_decorators, { kind: "accessor", name: "diffuseTextureY", static: false, private: false, access: { has: obj => "diffuseTextureY" in obj, get: obj => obj.diffuseTextureY, set: (obj, value) => { obj.diffuseTextureY = value; } }, metadata: _metadata }, _diffuseTextureY_initializers, _diffuseTextureY_extraInitializers);
505
+ __esDecorate(_a, null, _diffuseTextureZ_decorators, { kind: "accessor", name: "diffuseTextureZ", static: false, private: false, access: { has: obj => "diffuseTextureZ" in obj, get: obj => obj.diffuseTextureZ, set: (obj, value) => { obj.diffuseTextureZ = value; } }, metadata: _metadata }, _diffuseTextureZ_initializers, _diffuseTextureZ_extraInitializers);
506
+ __esDecorate(_a, null, _normalTextureX_decorators, { kind: "accessor", name: "normalTextureX", static: false, private: false, access: { has: obj => "normalTextureX" in obj, get: obj => obj.normalTextureX, set: (obj, value) => { obj.normalTextureX = value; } }, metadata: _metadata }, _normalTextureX_initializers, _normalTextureX_extraInitializers);
507
+ __esDecorate(_a, null, _normalTextureY_decorators, { kind: "accessor", name: "normalTextureY", static: false, private: false, access: { has: obj => "normalTextureY" in obj, get: obj => obj.normalTextureY, set: (obj, value) => { obj.normalTextureY = value; } }, metadata: _metadata }, _normalTextureY_initializers, _normalTextureY_extraInitializers);
508
+ __esDecorate(_a, null, _normalTextureZ_decorators, { kind: "accessor", name: "normalTextureZ", static: false, private: false, access: { has: obj => "normalTextureZ" in obj, get: obj => obj.normalTextureZ, set: (obj, value) => { obj.normalTextureZ = value; } }, metadata: _metadata }, _normalTextureZ_initializers, _normalTextureZ_extraInitializers);
509
+ __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);
510
+ __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);
511
+ __esDecorate(null, null, _mixTexture_decorators, { kind: "field", name: "mixTexture", static: false, private: false, access: { has: obj => "mixTexture" in obj, get: obj => obj.mixTexture, set: (obj, value) => { obj.mixTexture = value; } }, metadata: _metadata }, _mixTexture_initializers, _mixTexture_extraInitializers);
512
+ __esDecorate(null, null, __diffuseTextureX_decorators, { kind: "field", name: "_diffuseTextureX", static: false, private: false, access: { has: obj => "_diffuseTextureX" in obj, get: obj => obj._diffuseTextureX, set: (obj, value) => { obj._diffuseTextureX = value; } }, metadata: _metadata }, __diffuseTextureX_initializers, __diffuseTextureX_extraInitializers);
513
+ __esDecorate(null, null, __diffuseTextureY_decorators, { kind: "field", name: "_diffuseTextureY", static: false, private: false, access: { has: obj => "_diffuseTextureY" in obj, get: obj => obj._diffuseTextureY, set: (obj, value) => { obj._diffuseTextureY = value; } }, metadata: _metadata }, __diffuseTextureY_initializers, __diffuseTextureY_extraInitializers);
514
+ __esDecorate(null, null, __diffuseTextureZ_decorators, { kind: "field", name: "_diffuseTextureZ", static: false, private: false, access: { has: obj => "_diffuseTextureZ" in obj, get: obj => obj._diffuseTextureZ, set: (obj, value) => { obj._diffuseTextureZ = value; } }, metadata: _metadata }, __diffuseTextureZ_initializers, __diffuseTextureZ_extraInitializers);
515
+ __esDecorate(null, null, __normalTextureX_decorators, { kind: "field", name: "_normalTextureX", static: false, private: false, access: { has: obj => "_normalTextureX" in obj, get: obj => obj._normalTextureX, set: (obj, value) => { obj._normalTextureX = value; } }, metadata: _metadata }, __normalTextureX_initializers, __normalTextureX_extraInitializers);
516
+ __esDecorate(null, null, __normalTextureY_decorators, { kind: "field", name: "_normalTextureY", static: false, private: false, access: { has: obj => "_normalTextureY" in obj, get: obj => obj._normalTextureY, set: (obj, value) => { obj._normalTextureY = value; } }, metadata: _metadata }, __normalTextureY_initializers, __normalTextureY_extraInitializers);
517
+ __esDecorate(null, null, __normalTextureZ_decorators, { kind: "field", name: "_normalTextureZ", static: false, private: false, access: { has: obj => "_normalTextureZ" in obj, get: obj => obj._normalTextureZ, set: (obj, value) => { obj._normalTextureZ = value; } }, metadata: _metadata }, __normalTextureZ_initializers, __normalTextureZ_extraInitializers);
518
+ __esDecorate(null, null, _tileSize_decorators, { kind: "field", name: "tileSize", static: false, private: false, access: { has: obj => "tileSize" in obj, get: obj => obj.tileSize, set: (obj, value) => { obj.tileSize = value; } }, metadata: _metadata }, _tileSize_initializers, _tileSize_extraInitializers);
519
+ __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);
520
+ __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);
521
+ __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);
522
+ __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);
523
+ __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);
524
+ if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
525
+ })(),
526
+ _a;
527
+ })();
528
+ export { TriPlanarMaterial };
438
529
  RegisterClass("BABYLON.TriPlanarMaterial", TriPlanarMaterial);
439
530
  //# sourceMappingURL=triPlanarMaterial.js.map