@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
  /* eslint-disable @typescript-eslint/naming-convention */
3
3
  import { serializeAsTexture, serialize, expandToProperty, serializeAsColor3, serializeAsVector3 } from "@babylonjs/core/Misc/decorators.js";
4
4
  import { SerializationHelper } from "@babylonjs/core/Misc/decorators.serialization.js";
@@ -44,416 +44,471 @@ class GridMaterialDefines extends MaterialDefines {
44
44
  * The grid materials allows you to wrap any shape with a grid.
45
45
  * Colors are customizable.
46
46
  */
47
- export class GridMaterial extends PushMaterial {
48
- /**
49
- * Color of grid lines when the camera is below the surface.
50
- * When set, lineColor acts as the above-surface color.
51
- */
52
- get belowLineColor() {
53
- return this._belowLineColor;
54
- }
55
- set belowLineColor(value) {
56
- if (this._belowLineColor === value) {
57
- return;
58
- }
59
- this._belowLineColor = value;
60
- this._markAllSubMeshesAsMiscDirty();
61
- }
62
- /**
63
- * When true, only grid lines are visible — non-grid pixels are discarded.
64
- * Puts the material in the alpha-blend queue and enables a depth pre-pass so grid lines
65
- * correctly occlude translucent objects (e.g. Gaussian splats). Set mesh.alphaIndex to a
66
- * value lower than other transparent objects so the depth pre-pass fires first.
67
- */
68
- get linesOnly() {
69
- return this._linesOnly;
70
- }
71
- set linesOnly(value) {
72
- if (this._linesOnly === value) {
73
- return;
74
- }
75
- this._linesOnly = value;
76
- this.needDepthPrePass = value;
77
- this._markAllSubMeshesAsMiscDirty();
78
- }
79
- /**
80
- * constructor
81
- * @param name The name given to the material in order to identify it afterwards.
82
- * @param scene The scene the material is used in.
83
- * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
84
- */
85
- constructor(name, scene, forceGLSL = false) {
86
- super(name, scene, undefined, forceGLSL);
87
- /**
88
- * Main color of the grid (e.g. between lines)
89
- */
90
- this.mainColor = Color3.Black();
91
- /**
92
- * Color of the grid lines.
93
- */
94
- this.lineColor = Color3.Teal();
95
- /**
96
- * The scale of the grid compared to unit.
97
- */
98
- this.gridRatio = 1.0;
99
- /**
100
- * Allows setting an offset for the grid lines.
101
- */
102
- this.gridOffset = Vector3.Zero();
103
- /**
104
- * The frequency of thicker lines.
105
- */
106
- this.majorUnitFrequency = 10;
107
- /**
108
- * The visibility of minor units in the grid.
109
- */
110
- this.minorUnitVisibility = 0.33;
111
- /**
112
- * Overall mesh opacity. In linesOnly mode this also scales the maximum line alpha.
113
- */
114
- this.opacity = 1.0;
115
- /**
116
- * Whether to antialias the grid
117
- */
118
- this.antialias = true;
119
- this._belowLineColor = null;
120
- /**
121
- * Enable multi-scale logarithmic grid LOD. Number of octaves is controlled by gridOctaves.
122
- */
123
- this.useMultiScale = false;
124
- /**
125
- * World-unit spacing of the finest octave. Default 0.001.
126
- */
127
- this.minGridSpacing = 0.001;
128
- /**
129
- * Number of logarithmic octaves rendered (1–8). Default 4.
130
- */
131
- this.gridOctaves = 4;
132
- /**
133
- * Enable camera-distance-aware horizon (grazing-angle) fade.
134
- */
135
- this.useHorizonFade = false;
136
- /**
137
- * Render an ultra-fine crosshair at the world origin.
138
- */
139
- this.useOriginMarker = false;
140
- this._linesOnly = false;
141
- /**
142
- * Scales grid line width. Values \> 1 produce thicker lines. Default 1.0.
143
- */
144
- this.gridThicknessModifier = 1.0;
145
- /**
146
- * Determine RBG output is premultiplied by alpha value.
147
- */
148
- this.preMultiplyAlpha = false;
149
- /**
150
- * Determines if the max line value will be used instead of the sum wherever grid lines intersect.
151
- */
152
- this.useMaxLine = false;
153
- this._gridControl = new Vector4(this.gridRatio, this.majorUnitFrequency, this.minorUnitVisibility, this.opacity);
154
- this._viewportSize = new Vector2();
155
- this._shadersLoaded = false;
156
- }
157
- /**
158
- * @returns whether or not the grid requires alpha blending.
159
- */
160
- needAlphaBlending() {
161
- return this.linesOnly || this.opacity < 1.0 || (this._opacityTexture && this._opacityTexture.isReady());
162
- }
163
- needAlphaBlendingForMesh(mesh) {
164
- return mesh.visibility < 1.0 || this.needAlphaBlending();
165
- }
166
- isReadyForSubMesh(mesh, subMesh, useInstances) {
167
- const drawWrapper = subMesh._drawWrapper;
168
- if (this.isFrozen) {
169
- if (drawWrapper.effect && drawWrapper._wasPreviouslyReady && drawWrapper._wasPreviouslyUsingInstances === useInstances) {
170
- return true;
47
+ let GridMaterial = (() => {
48
+ var _a, _GridMaterial_opacityTexture_accessor_storage;
49
+ let _classSuper = PushMaterial;
50
+ let _instanceExtraInitializers = [];
51
+ let _mainColor_decorators;
52
+ let _mainColor_initializers = [];
53
+ let _mainColor_extraInitializers = [];
54
+ let _lineColor_decorators;
55
+ let _lineColor_initializers = [];
56
+ let _lineColor_extraInitializers = [];
57
+ let _gridRatio_decorators;
58
+ let _gridRatio_initializers = [];
59
+ let _gridRatio_extraInitializers = [];
60
+ let _gridOffset_decorators;
61
+ let _gridOffset_initializers = [];
62
+ let _gridOffset_extraInitializers = [];
63
+ let _majorUnitFrequency_decorators;
64
+ let _majorUnitFrequency_initializers = [];
65
+ let _majorUnitFrequency_extraInitializers = [];
66
+ let _minorUnitVisibility_decorators;
67
+ let _minorUnitVisibility_initializers = [];
68
+ let _minorUnitVisibility_extraInitializers = [];
69
+ let _opacity_decorators;
70
+ let _opacity_initializers = [];
71
+ let _opacity_extraInitializers = [];
72
+ let _antialias_decorators;
73
+ let _antialias_initializers = [];
74
+ let _antialias_extraInitializers = [];
75
+ let _get_belowLineColor_decorators;
76
+ let _useMultiScale_decorators;
77
+ let _useMultiScale_initializers = [];
78
+ let _useMultiScale_extraInitializers = [];
79
+ let _minGridSpacing_decorators;
80
+ let _minGridSpacing_initializers = [];
81
+ let _minGridSpacing_extraInitializers = [];
82
+ let _gridOctaves_decorators;
83
+ let _gridOctaves_initializers = [];
84
+ let _gridOctaves_extraInitializers = [];
85
+ let _useHorizonFade_decorators;
86
+ let _useHorizonFade_initializers = [];
87
+ let _useHorizonFade_extraInitializers = [];
88
+ let _useOriginMarker_decorators;
89
+ let _useOriginMarker_initializers = [];
90
+ let _useOriginMarker_extraInitializers = [];
91
+ let _get_linesOnly_decorators;
92
+ let _gridThicknessModifier_decorators;
93
+ let _gridThicknessModifier_initializers = [];
94
+ let _gridThicknessModifier_extraInitializers = [];
95
+ let _preMultiplyAlpha_decorators;
96
+ let _preMultiplyAlpha_initializers = [];
97
+ let _preMultiplyAlpha_extraInitializers = [];
98
+ let _useMaxLine_decorators;
99
+ let _useMaxLine_initializers = [];
100
+ let _useMaxLine_extraInitializers = [];
101
+ let __opacityTexture_decorators;
102
+ let __opacityTexture_initializers = [];
103
+ let __opacityTexture_extraInitializers = [];
104
+ let _opacityTexture_decorators;
105
+ let _opacityTexture_initializers = [];
106
+ let _opacityTexture_extraInitializers = [];
107
+ return _a = class GridMaterial extends _classSuper {
108
+ /**
109
+ * Color of grid lines when the camera is below the surface.
110
+ * When set, lineColor acts as the above-surface color.
111
+ */
112
+ get belowLineColor() {
113
+ return this._belowLineColor;
171
114
  }
172
- }
173
- if (!subMesh.materialDefines) {
174
- subMesh.materialDefines = new GridMaterialDefines();
175
- }
176
- const defines = subMesh.materialDefines;
177
- const scene = this.getScene();
178
- if (this._isReadyForSubMesh(subMesh)) {
179
- return true;
180
- }
181
- if (defines.LINES_ONLY !== this.linesOnly) {
182
- defines.LINES_ONLY = this.linesOnly;
183
- defines.markAsUnprocessed();
184
- }
185
- if (defines.PREMULTIPLYALPHA != this.preMultiplyAlpha) {
186
- defines.PREMULTIPLYALPHA = !defines.PREMULTIPLYALPHA;
187
- defines.markAsUnprocessed();
188
- }
189
- if (defines.MAX_LINE !== this.useMaxLine) {
190
- defines.MAX_LINE = !defines.MAX_LINE;
191
- defines.markAsUnprocessed();
192
- }
193
- if (defines.ANTIALIAS !== this.antialias) {
194
- defines.ANTIALIAS = this.antialias;
195
- defines.markAsUnprocessed();
196
- }
197
- if (defines.MULTI_SCALE !== this.useMultiScale) {
198
- defines.MULTI_SCALE = this.useMultiScale;
199
- defines.markAsUnprocessed();
200
- }
201
- if (defines.HORIZON_FADE !== this.useHorizonFade) {
202
- defines.HORIZON_FADE = this.useHorizonFade;
203
- defines.markAsUnprocessed();
204
- }
205
- const wantsBelowColor = this._belowLineColor !== null;
206
- if (defines.BELOW_LINE_COLOR !== wantsBelowColor) {
207
- defines.BELOW_LINE_COLOR = wantsBelowColor;
208
- defines.markAsUnprocessed();
209
- }
210
- if (defines.ORIGIN_MARKER !== this.useOriginMarker) {
211
- defines.ORIGIN_MARKER = this.useOriginMarker;
212
- defines.markAsUnprocessed();
213
- }
214
- // Textures
215
- if (defines._areTexturesDirty) {
216
- defines._needUVs = false;
217
- if (scene.texturesEnabled) {
218
- if (this._opacityTexture && MaterialFlags.OpacityTextureEnabled) {
219
- if (!this._opacityTexture.isReady()) {
220
- return false;
221
- }
222
- else {
223
- defines._needUVs = true;
224
- defines.OPACITY = true;
225
- }
115
+ set belowLineColor(value) {
116
+ if (this._belowLineColor === value) {
117
+ return;
226
118
  }
119
+ this._belowLineColor = value;
120
+ this._markAllSubMeshesAsMiscDirty();
227
121
  }
228
- }
229
- PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, false, this.fogEnabled, false, defines, undefined, undefined, undefined, this._isVertexOutputInvariant);
230
- // Values that need to be evaluated on every frame
231
- PrepareDefinesForFrameBoundValues(scene, scene.getEngine(), this, defines, !!useInstances);
232
- // Get correct effect
233
- if (defines.isDirty) {
234
- defines.markAsProcessed();
235
- scene.resetCachedMaterial();
236
- // Attributes
237
- PrepareDefinesForAttributes(mesh, defines, false, false);
238
- const attribs = [VertexBuffer.PositionKind, VertexBuffer.NormalKind];
239
- if (defines.UV1) {
240
- attribs.push(VertexBuffer.UVKind);
122
+ /**
123
+ * When true, only grid lines are visible non-grid pixels are discarded.
124
+ * Puts the material in the alpha-blend queue and enables a depth pre-pass so grid lines
125
+ * correctly occlude translucent objects (e.g. Gaussian splats). Set mesh.alphaIndex to a
126
+ * value lower than other transparent objects so the depth pre-pass fires first.
127
+ */
128
+ get linesOnly() {
129
+ return this._linesOnly;
241
130
  }
242
- if (defines.UV2) {
243
- attribs.push(VertexBuffer.UV2Kind);
131
+ set linesOnly(value) {
132
+ if (this._linesOnly === value) {
133
+ return;
134
+ }
135
+ this._linesOnly = value;
136
+ this.needDepthPrePass = value;
137
+ this._markAllSubMeshesAsMiscDirty();
244
138
  }
245
- defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
246
- PrepareAttributesForInstances(attribs, defines);
247
- const uniforms = [
248
- "projection",
249
- "mainColor",
250
- "lineColor",
251
- "gridControl",
252
- "gridOffset",
253
- "vFogInfos",
254
- "vFogColor",
255
- "world",
256
- "view",
257
- "opacityMatrix",
258
- "vOpacityInfos",
259
- "visibility",
260
- "logarithmicDepthConstant",
261
- "gridThicknessModifier",
262
- ];
263
- if (defines.MULTI_SCALE) {
264
- uniforms.push("minGridSpacing", "gridOctaves");
139
+ /**
140
+ * Texture to define opacity of the grid
141
+ */
142
+ get opacityTexture() { return __classPrivateFieldGet(this, _GridMaterial_opacityTexture_accessor_storage, "f"); }
143
+ set opacityTexture(value) { __classPrivateFieldSet(this, _GridMaterial_opacityTexture_accessor_storage, value, "f"); }
144
+ /**
145
+ * constructor
146
+ * @param name The name given to the material in order to identify it afterwards.
147
+ * @param scene The scene the material is used in.
148
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
149
+ */
150
+ constructor(name, scene, forceGLSL = false) {
151
+ super(name, scene, undefined, forceGLSL);
152
+ /**
153
+ * Main color of the grid (e.g. between lines)
154
+ */
155
+ this.mainColor = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _mainColor_initializers, Color3.Black()));
156
+ /**
157
+ * Color of the grid lines.
158
+ */
159
+ this.lineColor = (__runInitializers(this, _mainColor_extraInitializers), __runInitializers(this, _lineColor_initializers, Color3.Teal()));
160
+ /**
161
+ * The scale of the grid compared to unit.
162
+ */
163
+ this.gridRatio = (__runInitializers(this, _lineColor_extraInitializers), __runInitializers(this, _gridRatio_initializers, 1.0));
164
+ /**
165
+ * Allows setting an offset for the grid lines.
166
+ */
167
+ this.gridOffset = (__runInitializers(this, _gridRatio_extraInitializers), __runInitializers(this, _gridOffset_initializers, Vector3.Zero()));
168
+ /**
169
+ * The frequency of thicker lines.
170
+ */
171
+ this.majorUnitFrequency = (__runInitializers(this, _gridOffset_extraInitializers), __runInitializers(this, _majorUnitFrequency_initializers, 10));
172
+ /**
173
+ * The visibility of minor units in the grid.
174
+ */
175
+ this.minorUnitVisibility = (__runInitializers(this, _majorUnitFrequency_extraInitializers), __runInitializers(this, _minorUnitVisibility_initializers, 0.33));
176
+ /**
177
+ * Overall mesh opacity. In linesOnly mode this also scales the maximum line alpha.
178
+ */
179
+ this.opacity = (__runInitializers(this, _minorUnitVisibility_extraInitializers), __runInitializers(this, _opacity_initializers, 1.0));
180
+ /**
181
+ * Whether to antialias the grid
182
+ */
183
+ this.antialias = (__runInitializers(this, _opacity_extraInitializers), __runInitializers(this, _antialias_initializers, true));
184
+ this._belowLineColor = (__runInitializers(this, _antialias_extraInitializers), null);
185
+ /**
186
+ * Enable multi-scale logarithmic grid LOD. Number of octaves is controlled by gridOctaves.
187
+ */
188
+ this.useMultiScale = __runInitializers(this, _useMultiScale_initializers, false);
189
+ /**
190
+ * World-unit spacing of the finest octave. Default 0.001.
191
+ */
192
+ this.minGridSpacing = (__runInitializers(this, _useMultiScale_extraInitializers), __runInitializers(this, _minGridSpacing_initializers, 0.001));
193
+ /**
194
+ * Number of logarithmic octaves rendered (1–8). Default 4.
195
+ */
196
+ this.gridOctaves = (__runInitializers(this, _minGridSpacing_extraInitializers), __runInitializers(this, _gridOctaves_initializers, 4));
197
+ /**
198
+ * Enable camera-distance-aware horizon (grazing-angle) fade.
199
+ */
200
+ this.useHorizonFade = (__runInitializers(this, _gridOctaves_extraInitializers), __runInitializers(this, _useHorizonFade_initializers, false));
201
+ /**
202
+ * Render an ultra-fine crosshair at the world origin.
203
+ */
204
+ this.useOriginMarker = (__runInitializers(this, _useHorizonFade_extraInitializers), __runInitializers(this, _useOriginMarker_initializers, false));
205
+ this._linesOnly = (__runInitializers(this, _useOriginMarker_extraInitializers), false);
206
+ /**
207
+ * Scales grid line width. Values \> 1 produce thicker lines. Default 1.0.
208
+ */
209
+ this.gridThicknessModifier = __runInitializers(this, _gridThicknessModifier_initializers, 1.0);
210
+ /**
211
+ * Determine RBG output is premultiplied by alpha value.
212
+ */
213
+ this.preMultiplyAlpha = (__runInitializers(this, _gridThicknessModifier_extraInitializers), __runInitializers(this, _preMultiplyAlpha_initializers, false));
214
+ /**
215
+ * Determines if the max line value will be used instead of the sum wherever grid lines intersect.
216
+ */
217
+ this.useMaxLine = (__runInitializers(this, _preMultiplyAlpha_extraInitializers), __runInitializers(this, _useMaxLine_initializers, false));
218
+ this._opacityTexture = (__runInitializers(this, _useMaxLine_extraInitializers), __runInitializers(this, __opacityTexture_initializers, void 0));
219
+ _GridMaterial_opacityTexture_accessor_storage.set(this, (__runInitializers(this, __opacityTexture_extraInitializers), __runInitializers(this, _opacityTexture_initializers, void 0)));
220
+ this._gridControl = (__runInitializers(this, _opacityTexture_extraInitializers), new Vector4(this.gridRatio, this.majorUnitFrequency, this.minorUnitVisibility, this.opacity));
221
+ this._viewportSize = new Vector2();
222
+ this._shadersLoaded = false;
265
223
  }
266
- if (defines.HORIZON_FADE || defines.BELOW_LINE_COLOR || defines.ORIGIN_MARKER) {
267
- uniforms.push("cameraPosition", "viewportSize");
224
+ /**
225
+ * @returns whether or not the grid requires alpha blending.
226
+ */
227
+ needAlphaBlending() {
228
+ return this.linesOnly || this.opacity < 1.0 || (this._opacityTexture && this._opacityTexture.isReady());
268
229
  }
269
- if (defines.BELOW_LINE_COLOR) {
270
- uniforms.push("belowLineColor");
230
+ needAlphaBlendingForMesh(mesh) {
231
+ return mesh.visibility < 1.0 || this.needAlphaBlending();
271
232
  }
272
- // Defines
273
- const join = defines.toString();
274
- AddClipPlaneUniforms(uniforms);
275
- subMesh.setEffect(scene.getEngine().createEffect("grid", {
276
- attributes: attribs,
277
- uniformsNames: uniforms,
278
- uniformBuffersNames: ["Scene"],
279
- samplers: ["opacitySampler"],
280
- defines: join,
281
- fallbacks: null,
282
- onCompiled: this.onCompiled,
283
- onError: this.onError,
284
- shaderLanguage: this._shaderLanguage,
285
- extraInitializationsAsync: this._shadersLoaded
286
- ? undefined
287
- : async () => {
288
- if (this.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
289
- await Promise.all([import("./wgsl/grid.vertex.js"), import("./wgsl/grid.fragment.js")]);
290
- }
291
- else {
292
- await Promise.all([import("./grid.vertex.js"), import("./grid.fragment.js")]);
233
+ isReadyForSubMesh(mesh, subMesh, useInstances) {
234
+ const drawWrapper = subMesh._drawWrapper;
235
+ if (this.isFrozen) {
236
+ if (drawWrapper.effect && drawWrapper._wasPreviouslyReady && drawWrapper._wasPreviouslyUsingInstances === useInstances) {
237
+ return true;
238
+ }
239
+ }
240
+ if (!subMesh.materialDefines) {
241
+ subMesh.materialDefines = new GridMaterialDefines();
242
+ }
243
+ const defines = subMesh.materialDefines;
244
+ const scene = this.getScene();
245
+ if (this._isReadyForSubMesh(subMesh)) {
246
+ return true;
247
+ }
248
+ if (defines.LINES_ONLY !== this.linesOnly) {
249
+ defines.LINES_ONLY = this.linesOnly;
250
+ defines.markAsUnprocessed();
251
+ }
252
+ if (defines.PREMULTIPLYALPHA != this.preMultiplyAlpha) {
253
+ defines.PREMULTIPLYALPHA = !defines.PREMULTIPLYALPHA;
254
+ defines.markAsUnprocessed();
255
+ }
256
+ if (defines.MAX_LINE !== this.useMaxLine) {
257
+ defines.MAX_LINE = !defines.MAX_LINE;
258
+ defines.markAsUnprocessed();
259
+ }
260
+ if (defines.ANTIALIAS !== this.antialias) {
261
+ defines.ANTIALIAS = this.antialias;
262
+ defines.markAsUnprocessed();
263
+ }
264
+ if (defines.MULTI_SCALE !== this.useMultiScale) {
265
+ defines.MULTI_SCALE = this.useMultiScale;
266
+ defines.markAsUnprocessed();
267
+ }
268
+ if (defines.HORIZON_FADE !== this.useHorizonFade) {
269
+ defines.HORIZON_FADE = this.useHorizonFade;
270
+ defines.markAsUnprocessed();
271
+ }
272
+ const wantsBelowColor = this._belowLineColor !== null;
273
+ if (defines.BELOW_LINE_COLOR !== wantsBelowColor) {
274
+ defines.BELOW_LINE_COLOR = wantsBelowColor;
275
+ defines.markAsUnprocessed();
276
+ }
277
+ if (defines.ORIGIN_MARKER !== this.useOriginMarker) {
278
+ defines.ORIGIN_MARKER = this.useOriginMarker;
279
+ defines.markAsUnprocessed();
280
+ }
281
+ // Textures
282
+ if (defines._areTexturesDirty) {
283
+ defines._needUVs = false;
284
+ if (scene.texturesEnabled) {
285
+ if (this._opacityTexture && MaterialFlags.OpacityTextureEnabled) {
286
+ if (!this._opacityTexture.isReady()) {
287
+ return false;
288
+ }
289
+ else {
290
+ defines._needUVs = true;
291
+ defines.OPACITY = true;
292
+ }
293
293
  }
294
- this._shadersLoaded = true;
295
- },
296
- }, scene.getEngine()), defines, this._materialContext);
297
- }
298
- if (!subMesh.effect || !subMesh.effect.isReady()) {
299
- return false;
300
- }
301
- defines._renderId = scene.getRenderId();
302
- drawWrapper._wasPreviouslyReady = true;
303
- drawWrapper._wasPreviouslyUsingInstances = !!useInstances;
304
- return true;
305
- }
306
- bindForSubMesh(world, mesh, subMesh) {
307
- const scene = this.getScene();
308
- const defines = subMesh.materialDefines;
309
- if (!defines) {
310
- return;
311
- }
312
- const effect = subMesh.effect;
313
- if (!effect) {
314
- return;
315
- }
316
- this._activeEffect = effect;
317
- this._activeEffect.setFloat("visibility", mesh.visibility);
318
- // Matrices
319
- if (!defines.INSTANCES || defines.THIN_INSTANCE) {
320
- this.bindOnlyWorldMatrix(world);
321
- }
322
- this.bindView(effect);
323
- this.bindViewProjection(effect);
324
- // Uniforms
325
- if (this._mustRebind(scene, effect, subMesh)) {
326
- this._activeEffect.setColor3("mainColor", this.mainColor);
327
- this._activeEffect.setColor3("lineColor", this.lineColor);
328
- this._activeEffect.setVector3("gridOffset", this.gridOffset);
329
- this._gridControl.x = this.gridRatio;
330
- this._gridControl.y = Math.round(this.majorUnitFrequency);
331
- this._gridControl.z = this.minorUnitVisibility;
332
- this._gridControl.w = this.opacity;
333
- this._activeEffect.setVector4("gridControl", this._gridControl);
334
- this._activeEffect.setFloat("gridThicknessModifier", this.gridThicknessModifier);
335
- if (defines.BELOW_LINE_COLOR && this._belowLineColor) {
336
- this._activeEffect.setColor3("belowLineColor", this._belowLineColor);
294
+ }
295
+ }
296
+ PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, false, this.fogEnabled, false, defines, undefined, undefined, undefined, this._isVertexOutputInvariant);
297
+ // Values that need to be evaluated on every frame
298
+ PrepareDefinesForFrameBoundValues(scene, scene.getEngine(), this, defines, !!useInstances);
299
+ // Get correct effect
300
+ if (defines.isDirty) {
301
+ defines.markAsProcessed();
302
+ scene.resetCachedMaterial();
303
+ // Attributes
304
+ PrepareDefinesForAttributes(mesh, defines, false, false);
305
+ const attribs = [VertexBuffer.PositionKind, VertexBuffer.NormalKind];
306
+ if (defines.UV1) {
307
+ attribs.push(VertexBuffer.UVKind);
308
+ }
309
+ if (defines.UV2) {
310
+ attribs.push(VertexBuffer.UV2Kind);
311
+ }
312
+ defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
313
+ PrepareAttributesForInstances(attribs, defines);
314
+ const uniforms = [
315
+ "projection",
316
+ "mainColor",
317
+ "lineColor",
318
+ "gridControl",
319
+ "gridOffset",
320
+ "vFogInfos",
321
+ "vFogColor",
322
+ "world",
323
+ "view",
324
+ "opacityMatrix",
325
+ "vOpacityInfos",
326
+ "visibility",
327
+ "logarithmicDepthConstant",
328
+ "gridThicknessModifier",
329
+ ];
330
+ if (defines.MULTI_SCALE) {
331
+ uniforms.push("minGridSpacing", "gridOctaves");
332
+ }
333
+ if (defines.HORIZON_FADE || defines.BELOW_LINE_COLOR || defines.ORIGIN_MARKER) {
334
+ uniforms.push("cameraPosition", "viewportSize");
335
+ }
336
+ if (defines.BELOW_LINE_COLOR) {
337
+ uniforms.push("belowLineColor");
338
+ }
339
+ // Defines
340
+ const join = defines.toString();
341
+ AddClipPlaneUniforms(uniforms);
342
+ subMesh.setEffect(scene.getEngine().createEffect("grid", {
343
+ attributes: attribs,
344
+ uniformsNames: uniforms,
345
+ uniformBuffersNames: ["Scene"],
346
+ samplers: ["opacitySampler"],
347
+ defines: join,
348
+ fallbacks: null,
349
+ onCompiled: this.onCompiled,
350
+ onError: this.onError,
351
+ shaderLanguage: this._shaderLanguage,
352
+ extraInitializationsAsync: this._shadersLoaded
353
+ ? undefined
354
+ : async () => {
355
+ if (this.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
356
+ await Promise.all([import("./wgsl/grid.vertex.js"), import("./wgsl/grid.fragment.js")]);
357
+ }
358
+ else {
359
+ await Promise.all([import("./grid.vertex.js"), import("./grid.fragment.js")]);
360
+ }
361
+ this._shadersLoaded = true;
362
+ },
363
+ }, scene.getEngine()), defines, this._materialContext);
364
+ }
365
+ if (!subMesh.effect || !subMesh.effect.isReady()) {
366
+ return false;
367
+ }
368
+ defines._renderId = scene.getRenderId();
369
+ drawWrapper._wasPreviouslyReady = true;
370
+ drawWrapper._wasPreviouslyUsingInstances = !!useInstances;
371
+ return true;
337
372
  }
338
- if (defines.MULTI_SCALE) {
339
- this._activeEffect.setFloat("minGridSpacing", this.minGridSpacing);
340
- this._activeEffect.setFloat("gridOctaves", Math.max(1, Math.min(8, Math.round(this.gridOctaves))));
373
+ bindForSubMesh(world, mesh, subMesh) {
374
+ const scene = this.getScene();
375
+ const defines = subMesh.materialDefines;
376
+ if (!defines) {
377
+ return;
378
+ }
379
+ const effect = subMesh.effect;
380
+ if (!effect) {
381
+ return;
382
+ }
383
+ this._activeEffect = effect;
384
+ this._activeEffect.setFloat("visibility", mesh.visibility);
385
+ // Matrices
386
+ if (!defines.INSTANCES || defines.THIN_INSTANCE) {
387
+ this.bindOnlyWorldMatrix(world);
388
+ }
389
+ this.bindView(effect);
390
+ this.bindViewProjection(effect);
391
+ // Uniforms
392
+ if (this._mustRebind(scene, effect, subMesh)) {
393
+ this._activeEffect.setColor3("mainColor", this.mainColor);
394
+ this._activeEffect.setColor3("lineColor", this.lineColor);
395
+ this._activeEffect.setVector3("gridOffset", this.gridOffset);
396
+ this._gridControl.x = this.gridRatio;
397
+ this._gridControl.y = Math.round(this.majorUnitFrequency);
398
+ this._gridControl.z = this.minorUnitVisibility;
399
+ this._gridControl.w = this.opacity;
400
+ this._activeEffect.setVector4("gridControl", this._gridControl);
401
+ this._activeEffect.setFloat("gridThicknessModifier", this.gridThicknessModifier);
402
+ if (defines.BELOW_LINE_COLOR && this._belowLineColor) {
403
+ this._activeEffect.setColor3("belowLineColor", this._belowLineColor);
404
+ }
405
+ if (defines.MULTI_SCALE) {
406
+ this._activeEffect.setFloat("minGridSpacing", this.minGridSpacing);
407
+ this._activeEffect.setFloat("gridOctaves", Math.max(1, Math.min(8, Math.round(this.gridOctaves))));
408
+ }
409
+ if (this._opacityTexture && MaterialFlags.OpacityTextureEnabled) {
410
+ this._activeEffect.setTexture("opacitySampler", this._opacityTexture);
411
+ this._activeEffect.setFloat2("vOpacityInfos", this._opacityTexture.coordinatesIndex, this._opacityTexture.level);
412
+ this._activeEffect.setMatrix("opacityMatrix", this._opacityTexture.getTextureMatrix());
413
+ }
414
+ // Clip plane
415
+ BindClipPlane(effect, this, scene);
416
+ // Log. depth
417
+ if (this._useLogarithmicDepth) {
418
+ BindLogDepth(defines, effect, scene);
419
+ }
420
+ }
421
+ // Fog
422
+ BindFogParameters(scene, mesh, this._activeEffect);
423
+ // Camera uniforms — must be updated every frame
424
+ if (defines.HORIZON_FADE || defines.BELOW_LINE_COLOR || defines.ORIGIN_MARKER) {
425
+ const cam = scene.activeCamera;
426
+ if (cam) {
427
+ this._activeEffect.setVector3("cameraPosition", cam.globalPosition);
428
+ const engine = scene.getEngine();
429
+ this._viewportSize.x = engine.getRenderWidth();
430
+ this._viewportSize.y = engine.getRenderHeight();
431
+ this._activeEffect.setVector2("viewportSize", this._viewportSize);
432
+ }
433
+ }
434
+ this._afterBind(mesh, this._activeEffect, subMesh);
341
435
  }
342
- if (this._opacityTexture && MaterialFlags.OpacityTextureEnabled) {
343
- this._activeEffect.setTexture("opacitySampler", this._opacityTexture);
344
- this._activeEffect.setFloat2("vOpacityInfos", this._opacityTexture.coordinatesIndex, this._opacityTexture.level);
345
- this._activeEffect.setMatrix("opacityMatrix", this._opacityTexture.getTextureMatrix());
436
+ /**
437
+ * Dispose the material and its associated resources.
438
+ * @param forceDisposeEffect will also dispose the used effect when true
439
+ */
440
+ dispose(forceDisposeEffect) {
441
+ super.dispose(forceDisposeEffect);
346
442
  }
347
- // Clip plane
348
- BindClipPlane(effect, this, scene);
349
- // Log. depth
350
- if (this._useLogarithmicDepth) {
351
- BindLogDepth(defines, effect, scene);
443
+ clone(name) {
444
+ return SerializationHelper.Clone(() => new _a(name, this.getScene()), this);
352
445
  }
353
- }
354
- // Fog
355
- BindFogParameters(scene, mesh, this._activeEffect);
356
- // Camera uniforms — must be updated every frame
357
- if (defines.HORIZON_FADE || defines.BELOW_LINE_COLOR || defines.ORIGIN_MARKER) {
358
- const cam = scene.activeCamera;
359
- if (cam) {
360
- this._activeEffect.setVector3("cameraPosition", cam.globalPosition);
361
- const engine = scene.getEngine();
362
- this._viewportSize.x = engine.getRenderWidth();
363
- this._viewportSize.y = engine.getRenderHeight();
364
- this._activeEffect.setVector2("viewportSize", this._viewportSize);
446
+ serialize() {
447
+ const serializationObject = super.serialize();
448
+ serializationObject.customType = "BABYLON.GridMaterial";
449
+ return serializationObject;
365
450
  }
366
- }
367
- this._afterBind(mesh, this._activeEffect, subMesh);
368
- }
369
- /**
370
- * Dispose the material and its associated resources.
371
- * @param forceDisposeEffect will also dispose the used effect when true
372
- */
373
- dispose(forceDisposeEffect) {
374
- super.dispose(forceDisposeEffect);
375
- }
376
- clone(name) {
377
- return SerializationHelper.Clone(() => new GridMaterial(name, this.getScene()), this);
378
- }
379
- serialize() {
380
- const serializationObject = super.serialize();
381
- serializationObject.customType = "BABYLON.GridMaterial";
382
- return serializationObject;
383
- }
384
- getClassName() {
385
- return "GridMaterial";
386
- }
387
- /**
388
- * Parse a JSON input to create back a grid material.
389
- * @param source the JSON data to parse
390
- * @param scene defines the hosting scene
391
- * @param rootUrl defines the root URL to use to load textures and relative dependencies
392
- * @returns a new grid material
393
- */
394
- static Parse(source, scene, rootUrl) {
395
- return SerializationHelper.Parse(() => new GridMaterial(source.name, scene), source, scene, rootUrl);
396
- }
397
- }
398
- __decorate([
399
- serializeAsColor3()
400
- ], GridMaterial.prototype, "mainColor", void 0);
401
- __decorate([
402
- serializeAsColor3()
403
- ], GridMaterial.prototype, "lineColor", void 0);
404
- __decorate([
405
- serialize()
406
- ], GridMaterial.prototype, "gridRatio", void 0);
407
- __decorate([
408
- serializeAsVector3()
409
- ], GridMaterial.prototype, "gridOffset", void 0);
410
- __decorate([
411
- serialize()
412
- ], GridMaterial.prototype, "majorUnitFrequency", void 0);
413
- __decorate([
414
- serialize()
415
- ], GridMaterial.prototype, "minorUnitVisibility", void 0);
416
- __decorate([
417
- serialize()
418
- ], GridMaterial.prototype, "opacity", void 0);
419
- __decorate([
420
- serialize()
421
- ], GridMaterial.prototype, "antialias", void 0);
422
- __decorate([
423
- serializeAsColor3()
424
- ], GridMaterial.prototype, "belowLineColor", null);
425
- __decorate([
426
- serialize()
427
- ], GridMaterial.prototype, "useMultiScale", void 0);
428
- __decorate([
429
- serialize()
430
- ], GridMaterial.prototype, "minGridSpacing", void 0);
431
- __decorate([
432
- serialize()
433
- ], GridMaterial.prototype, "gridOctaves", void 0);
434
- __decorate([
435
- serialize()
436
- ], GridMaterial.prototype, "useHorizonFade", void 0);
437
- __decorate([
438
- serialize()
439
- ], GridMaterial.prototype, "useOriginMarker", void 0);
440
- __decorate([
441
- serialize()
442
- ], GridMaterial.prototype, "linesOnly", null);
443
- __decorate([
444
- serialize()
445
- ], GridMaterial.prototype, "gridThicknessModifier", void 0);
446
- __decorate([
447
- serialize()
448
- ], GridMaterial.prototype, "preMultiplyAlpha", void 0);
449
- __decorate([
450
- serialize()
451
- ], GridMaterial.prototype, "useMaxLine", void 0);
452
- __decorate([
453
- serializeAsTexture("opacityTexture")
454
- ], GridMaterial.prototype, "_opacityTexture", void 0);
455
- __decorate([
456
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
457
- ], GridMaterial.prototype, "opacityTexture", void 0);
451
+ getClassName() {
452
+ return "GridMaterial";
453
+ }
454
+ /**
455
+ * Parse a JSON input to create back a grid material.
456
+ * @param source the JSON data to parse
457
+ * @param scene defines the hosting scene
458
+ * @param rootUrl defines the root URL to use to load textures and relative dependencies
459
+ * @returns a new grid material
460
+ */
461
+ static Parse(source, scene, rootUrl) {
462
+ return SerializationHelper.Parse(() => new _a(source.name, scene), source, scene, rootUrl);
463
+ }
464
+ },
465
+ _GridMaterial_opacityTexture_accessor_storage = new WeakMap(),
466
+ (() => {
467
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
468
+ _mainColor_decorators = [serializeAsColor3()];
469
+ _lineColor_decorators = [serializeAsColor3()];
470
+ _gridRatio_decorators = [serialize()];
471
+ _gridOffset_decorators = [serializeAsVector3()];
472
+ _majorUnitFrequency_decorators = [serialize()];
473
+ _minorUnitVisibility_decorators = [serialize()];
474
+ _opacity_decorators = [serialize()];
475
+ _antialias_decorators = [serialize()];
476
+ _get_belowLineColor_decorators = [serializeAsColor3()];
477
+ _useMultiScale_decorators = [serialize()];
478
+ _minGridSpacing_decorators = [serialize()];
479
+ _gridOctaves_decorators = [serialize()];
480
+ _useHorizonFade_decorators = [serialize()];
481
+ _useOriginMarker_decorators = [serialize()];
482
+ _get_linesOnly_decorators = [serialize()];
483
+ _gridThicknessModifier_decorators = [serialize()];
484
+ _preMultiplyAlpha_decorators = [serialize()];
485
+ _useMaxLine_decorators = [serialize()];
486
+ __opacityTexture_decorators = [serializeAsTexture("opacityTexture")];
487
+ _opacityTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
488
+ __esDecorate(_a, null, _get_belowLineColor_decorators, { kind: "getter", name: "belowLineColor", static: false, private: false, access: { has: obj => "belowLineColor" in obj, get: obj => obj.belowLineColor }, metadata: _metadata }, null, _instanceExtraInitializers);
489
+ __esDecorate(_a, null, _get_linesOnly_decorators, { kind: "getter", name: "linesOnly", static: false, private: false, access: { has: obj => "linesOnly" in obj, get: obj => obj.linesOnly }, metadata: _metadata }, null, _instanceExtraInitializers);
490
+ __esDecorate(_a, null, _opacityTexture_decorators, { kind: "accessor", name: "opacityTexture", static: false, private: false, access: { has: obj => "opacityTexture" in obj, get: obj => obj.opacityTexture, set: (obj, value) => { obj.opacityTexture = value; } }, metadata: _metadata }, _opacityTexture_initializers, _opacityTexture_extraInitializers);
491
+ __esDecorate(null, null, _mainColor_decorators, { kind: "field", name: "mainColor", static: false, private: false, access: { has: obj => "mainColor" in obj, get: obj => obj.mainColor, set: (obj, value) => { obj.mainColor = value; } }, metadata: _metadata }, _mainColor_initializers, _mainColor_extraInitializers);
492
+ __esDecorate(null, null, _lineColor_decorators, { kind: "field", name: "lineColor", static: false, private: false, access: { has: obj => "lineColor" in obj, get: obj => obj.lineColor, set: (obj, value) => { obj.lineColor = value; } }, metadata: _metadata }, _lineColor_initializers, _lineColor_extraInitializers);
493
+ __esDecorate(null, null, _gridRatio_decorators, { kind: "field", name: "gridRatio", static: false, private: false, access: { has: obj => "gridRatio" in obj, get: obj => obj.gridRatio, set: (obj, value) => { obj.gridRatio = value; } }, metadata: _metadata }, _gridRatio_initializers, _gridRatio_extraInitializers);
494
+ __esDecorate(null, null, _gridOffset_decorators, { kind: "field", name: "gridOffset", static: false, private: false, access: { has: obj => "gridOffset" in obj, get: obj => obj.gridOffset, set: (obj, value) => { obj.gridOffset = value; } }, metadata: _metadata }, _gridOffset_initializers, _gridOffset_extraInitializers);
495
+ __esDecorate(null, null, _majorUnitFrequency_decorators, { kind: "field", name: "majorUnitFrequency", static: false, private: false, access: { has: obj => "majorUnitFrequency" in obj, get: obj => obj.majorUnitFrequency, set: (obj, value) => { obj.majorUnitFrequency = value; } }, metadata: _metadata }, _majorUnitFrequency_initializers, _majorUnitFrequency_extraInitializers);
496
+ __esDecorate(null, null, _minorUnitVisibility_decorators, { kind: "field", name: "minorUnitVisibility", static: false, private: false, access: { has: obj => "minorUnitVisibility" in obj, get: obj => obj.minorUnitVisibility, set: (obj, value) => { obj.minorUnitVisibility = value; } }, metadata: _metadata }, _minorUnitVisibility_initializers, _minorUnitVisibility_extraInitializers);
497
+ __esDecorate(null, null, _opacity_decorators, { kind: "field", name: "opacity", static: false, private: false, access: { has: obj => "opacity" in obj, get: obj => obj.opacity, set: (obj, value) => { obj.opacity = value; } }, metadata: _metadata }, _opacity_initializers, _opacity_extraInitializers);
498
+ __esDecorate(null, null, _antialias_decorators, { kind: "field", name: "antialias", static: false, private: false, access: { has: obj => "antialias" in obj, get: obj => obj.antialias, set: (obj, value) => { obj.antialias = value; } }, metadata: _metadata }, _antialias_initializers, _antialias_extraInitializers);
499
+ __esDecorate(null, null, _useMultiScale_decorators, { kind: "field", name: "useMultiScale", static: false, private: false, access: { has: obj => "useMultiScale" in obj, get: obj => obj.useMultiScale, set: (obj, value) => { obj.useMultiScale = value; } }, metadata: _metadata }, _useMultiScale_initializers, _useMultiScale_extraInitializers);
500
+ __esDecorate(null, null, _minGridSpacing_decorators, { kind: "field", name: "minGridSpacing", static: false, private: false, access: { has: obj => "minGridSpacing" in obj, get: obj => obj.minGridSpacing, set: (obj, value) => { obj.minGridSpacing = value; } }, metadata: _metadata }, _minGridSpacing_initializers, _minGridSpacing_extraInitializers);
501
+ __esDecorate(null, null, _gridOctaves_decorators, { kind: "field", name: "gridOctaves", static: false, private: false, access: { has: obj => "gridOctaves" in obj, get: obj => obj.gridOctaves, set: (obj, value) => { obj.gridOctaves = value; } }, metadata: _metadata }, _gridOctaves_initializers, _gridOctaves_extraInitializers);
502
+ __esDecorate(null, null, _useHorizonFade_decorators, { kind: "field", name: "useHorizonFade", static: false, private: false, access: { has: obj => "useHorizonFade" in obj, get: obj => obj.useHorizonFade, set: (obj, value) => { obj.useHorizonFade = value; } }, metadata: _metadata }, _useHorizonFade_initializers, _useHorizonFade_extraInitializers);
503
+ __esDecorate(null, null, _useOriginMarker_decorators, { kind: "field", name: "useOriginMarker", static: false, private: false, access: { has: obj => "useOriginMarker" in obj, get: obj => obj.useOriginMarker, set: (obj, value) => { obj.useOriginMarker = value; } }, metadata: _metadata }, _useOriginMarker_initializers, _useOriginMarker_extraInitializers);
504
+ __esDecorate(null, null, _gridThicknessModifier_decorators, { kind: "field", name: "gridThicknessModifier", static: false, private: false, access: { has: obj => "gridThicknessModifier" in obj, get: obj => obj.gridThicknessModifier, set: (obj, value) => { obj.gridThicknessModifier = value; } }, metadata: _metadata }, _gridThicknessModifier_initializers, _gridThicknessModifier_extraInitializers);
505
+ __esDecorate(null, null, _preMultiplyAlpha_decorators, { kind: "field", name: "preMultiplyAlpha", static: false, private: false, access: { has: obj => "preMultiplyAlpha" in obj, get: obj => obj.preMultiplyAlpha, set: (obj, value) => { obj.preMultiplyAlpha = value; } }, metadata: _metadata }, _preMultiplyAlpha_initializers, _preMultiplyAlpha_extraInitializers);
506
+ __esDecorate(null, null, _useMaxLine_decorators, { kind: "field", name: "useMaxLine", static: false, private: false, access: { has: obj => "useMaxLine" in obj, get: obj => obj.useMaxLine, set: (obj, value) => { obj.useMaxLine = value; } }, metadata: _metadata }, _useMaxLine_initializers, _useMaxLine_extraInitializers);
507
+ __esDecorate(null, null, __opacityTexture_decorators, { kind: "field", name: "_opacityTexture", static: false, private: false, access: { has: obj => "_opacityTexture" in obj, get: obj => obj._opacityTexture, set: (obj, value) => { obj._opacityTexture = value; } }, metadata: _metadata }, __opacityTexture_initializers, __opacityTexture_extraInitializers);
508
+ if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
509
+ })(),
510
+ _a;
511
+ })();
512
+ export { GridMaterial };
458
513
  RegisterClass("BABYLON.GridMaterial", GridMaterial);
459
514
  //# sourceMappingURL=gridMaterial.js.map