@babylonjs/materials 5.0.0-rc.0 → 5.0.0-rc.11

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 (230) hide show
  1. package/cell/cell.fragment.d.ts +17 -17
  2. package/cell/cell.fragment.js +20 -18
  3. package/cell/cell.fragment.js.map +1 -1
  4. package/cell/cell.vertex.d.ts +18 -18
  5. package/cell/cell.vertex.js +21 -19
  6. package/cell/cell.vertex.js.map +1 -1
  7. package/cell/cellMaterial.d.ts +37 -37
  8. package/cell/cellMaterial.js +304 -290
  9. package/cell/cellMaterial.js.map +1 -1
  10. package/cell/index.d.ts +1 -1
  11. package/cell/index.js +1 -1
  12. package/cell/index.js.map +1 -1
  13. package/custom/customMaterial.d.ts +69 -69
  14. package/custom/customMaterial.js +216 -218
  15. package/custom/customMaterial.js.map +1 -1
  16. package/custom/index.d.ts +2 -2
  17. package/custom/index.js +2 -2
  18. package/custom/index.js.map +1 -1
  19. package/custom/pbrCustomMaterial.d.ts +71 -71
  20. package/custom/pbrCustomMaterial.js +241 -243
  21. package/custom/pbrCustomMaterial.js.map +1 -1
  22. package/fire/fire.fragment.d.ts +11 -11
  23. package/fire/fire.fragment.js +14 -12
  24. package/fire/fire.fragment.js.map +1 -1
  25. package/fire/fire.vertex.d.ts +15 -15
  26. package/fire/fire.vertex.js +18 -16
  27. package/fire/fire.vertex.js.map +1 -1
  28. package/fire/fireMaterial.d.ts +38 -38
  29. package/fire/fireMaterial.js +342 -327
  30. package/fire/fireMaterial.js.map +1 -1
  31. package/fire/index.d.ts +1 -1
  32. package/fire/index.js +1 -1
  33. package/fire/index.js.map +1 -1
  34. package/fur/fur.fragment.d.ts +17 -17
  35. package/fur/fur.fragment.js +20 -18
  36. package/fur/fur.fragment.js.map +1 -1
  37. package/fur/fur.vertex.d.ts +18 -18
  38. package/fur/fur.vertex.js +21 -19
  39. package/fur/fur.vertex.js.map +1 -1
  40. package/fur/furMaterial.d.ts +57 -56
  41. package/fur/furMaterial.js +500 -480
  42. package/fur/furMaterial.js.map +1 -1
  43. package/fur/index.d.ts +1 -1
  44. package/fur/index.js +1 -1
  45. package/fur/index.js.map +1 -1
  46. package/gradient/gradient.fragment.d.ts +17 -17
  47. package/gradient/gradient.fragment.js +20 -18
  48. package/gradient/gradient.fragment.js.map +1 -1
  49. package/gradient/gradient.vertex.d.ts +18 -18
  50. package/gradient/gradient.vertex.js +21 -19
  51. package/gradient/gradient.vertex.js.map +1 -1
  52. package/gradient/gradientMaterial.d.ts +37 -37
  53. package/gradient/gradientMaterial.js +275 -259
  54. package/gradient/gradientMaterial.js.map +1 -1
  55. package/gradient/index.d.ts +1 -1
  56. package/gradient/index.js +1 -1
  57. package/gradient/index.js.map +1 -1
  58. package/grid/grid.fragment.d.ts +8 -8
  59. package/grid/grid.fragment.js +11 -9
  60. package/grid/grid.fragment.js.map +1 -1
  61. package/grid/grid.vertex.d.ts +9 -9
  62. package/grid/grid.vertex.js +12 -10
  63. package/grid/grid.vertex.js.map +1 -1
  64. package/grid/gridMaterial.d.ts +78 -77
  65. package/grid/gridMaterial.js +276 -261
  66. package/grid/gridMaterial.js.map +1 -1
  67. package/grid/index.d.ts +1 -1
  68. package/grid/index.js +1 -1
  69. package/grid/index.js.map +1 -1
  70. package/index.d.ts +15 -15
  71. package/index.js +16 -15
  72. package/index.js.map +1 -1
  73. package/lava/index.d.ts +1 -1
  74. package/lava/index.js +1 -1
  75. package/lava/index.js.map +1 -1
  76. package/lava/lava.fragment.d.ts +17 -17
  77. package/lava/lava.fragment.js +20 -18
  78. package/lava/lava.fragment.js.map +1 -1
  79. package/lava/lava.vertex.d.ts +18 -18
  80. package/lava/lava.vertex.js +21 -19
  81. package/lava/lava.vertex.js.map +1 -1
  82. package/lava/lavaMaterial.d.ts +45 -45
  83. package/lava/lavaMaterial.js +394 -378
  84. package/lava/lavaMaterial.js.map +1 -1
  85. package/legacy/legacy-cell.d.ts +1 -1
  86. package/legacy/legacy-cell.js +13 -12
  87. package/legacy/legacy-cell.js.map +1 -1
  88. package/legacy/legacy-custom.d.ts +1 -1
  89. package/legacy/legacy-custom.js +13 -12
  90. package/legacy/legacy-custom.js.map +1 -1
  91. package/legacy/legacy-fire.d.ts +1 -1
  92. package/legacy/legacy-fire.js +13 -12
  93. package/legacy/legacy-fire.js.map +1 -1
  94. package/legacy/legacy-fur.d.ts +1 -1
  95. package/legacy/legacy-fur.js +13 -12
  96. package/legacy/legacy-fur.js.map +1 -1
  97. package/legacy/legacy-gradient.d.ts +1 -1
  98. package/legacy/legacy-gradient.js +13 -12
  99. package/legacy/legacy-gradient.js.map +1 -1
  100. package/legacy/legacy-grid.d.ts +1 -1
  101. package/legacy/legacy-grid.js +13 -12
  102. package/legacy/legacy-grid.js.map +1 -1
  103. package/legacy/legacy-lava.d.ts +1 -1
  104. package/legacy/legacy-lava.js +13 -12
  105. package/legacy/legacy-lava.js.map +1 -1
  106. package/legacy/legacy-mix.d.ts +1 -1
  107. package/legacy/legacy-mix.js +13 -12
  108. package/legacy/legacy-mix.js.map +1 -1
  109. package/legacy/legacy-normal.d.ts +1 -1
  110. package/legacy/legacy-normal.js +13 -12
  111. package/legacy/legacy-normal.js.map +1 -1
  112. package/legacy/legacy-shadowOnly.d.ts +1 -1
  113. package/legacy/legacy-shadowOnly.js +13 -12
  114. package/legacy/legacy-shadowOnly.js.map +1 -1
  115. package/legacy/legacy-simple.d.ts +1 -1
  116. package/legacy/legacy-simple.js +13 -12
  117. package/legacy/legacy-simple.js.map +1 -1
  118. package/legacy/legacy-sky.d.ts +1 -1
  119. package/legacy/legacy-sky.js +13 -12
  120. package/legacy/legacy-sky.js.map +1 -1
  121. package/legacy/legacy-terrain.d.ts +1 -1
  122. package/legacy/legacy-terrain.js +13 -12
  123. package/legacy/legacy-terrain.js.map +1 -1
  124. package/legacy/legacy-triPlanar.d.ts +1 -1
  125. package/legacy/legacy-triPlanar.js +13 -12
  126. package/legacy/legacy-triPlanar.js.map +1 -1
  127. package/legacy/legacy-water.d.ts +1 -1
  128. package/legacy/legacy-water.js +13 -12
  129. package/legacy/legacy-water.js.map +1 -1
  130. package/legacy/legacy.d.ts +1 -1
  131. package/legacy/legacy.js +16 -15
  132. package/legacy/legacy.js.map +1 -1
  133. package/mix/index.d.ts +1 -1
  134. package/mix/index.js +1 -1
  135. package/mix/index.js.map +1 -1
  136. package/mix/mix.fragment.d.ts +17 -17
  137. package/mix/mix.fragment.js +20 -18
  138. package/mix/mix.fragment.js.map +1 -1
  139. package/mix/mix.vertex.d.ts +18 -18
  140. package/mix/mix.vertex.js +21 -19
  141. package/mix/mix.vertex.js.map +1 -1
  142. package/mix/mixMaterial.d.ts +65 -65
  143. package/mix/mixMaterial.js +510 -483
  144. package/mix/mixMaterial.js.map +1 -1
  145. package/normal/index.d.ts +1 -1
  146. package/normal/index.js +1 -1
  147. package/normal/index.js.map +1 -1
  148. package/normal/normal.fragment.d.ts +17 -17
  149. package/normal/normal.fragment.js +20 -18
  150. package/normal/normal.fragment.js.map +1 -1
  151. package/normal/normal.vertex.d.ts +18 -18
  152. package/normal/normal.vertex.js +21 -19
  153. package/normal/normal.vertex.js.map +1 -1
  154. package/normal/normalMaterial.d.ts +36 -36
  155. package/normal/normalMaterial.js +336 -322
  156. package/normal/normalMaterial.js.map +1 -1
  157. package/package.json +22 -254
  158. package/readme.md +2 -2
  159. package/shadowOnly/index.d.ts +1 -1
  160. package/shadowOnly/index.js +1 -1
  161. package/shadowOnly/index.js.map +1 -1
  162. package/shadowOnly/shadowOnly.fragment.d.ts +16 -16
  163. package/shadowOnly/shadowOnly.fragment.js +19 -17
  164. package/shadowOnly/shadowOnly.fragment.js.map +1 -1
  165. package/shadowOnly/shadowOnly.vertex.d.ts +18 -18
  166. package/shadowOnly/shadowOnly.vertex.js +21 -19
  167. package/shadowOnly/shadowOnly.vertex.js.map +1 -1
  168. package/shadowOnly/shadowOnlyMaterial.d.ts +30 -30
  169. package/shadowOnly/shadowOnlyMaterial.js +254 -240
  170. package/shadowOnly/shadowOnlyMaterial.js.map +1 -1
  171. package/simple/index.d.ts +1 -1
  172. package/simple/index.js +1 -1
  173. package/simple/index.js.map +1 -1
  174. package/simple/simple.fragment.d.ts +17 -17
  175. package/simple/simple.fragment.js +20 -18
  176. package/simple/simple.fragment.js.map +1 -1
  177. package/simple/simple.vertex.d.ts +18 -18
  178. package/simple/simple.vertex.js +21 -19
  179. package/simple/simple.vertex.js.map +1 -1
  180. package/simple/simpleMaterial.d.ts +35 -35
  181. package/simple/simpleMaterial.js +295 -281
  182. package/simple/simpleMaterial.js.map +1 -1
  183. package/sky/index.d.ts +1 -1
  184. package/sky/index.js +1 -1
  185. package/sky/index.js.map +1 -1
  186. package/sky/sky.fragment.d.ts +10 -10
  187. package/sky/sky.fragment.js +13 -11
  188. package/sky/sky.fragment.js.map +1 -1
  189. package/sky/sky.vertex.d.ts +9 -9
  190. package/sky/sky.vertex.js +12 -10
  191. package/sky/sky.vertex.js.map +1 -1
  192. package/sky/skyMaterial.d.ts +147 -147
  193. package/sky/skyMaterial.js +359 -340
  194. package/sky/skyMaterial.js.map +1 -1
  195. package/terrain/index.d.ts +1 -1
  196. package/terrain/index.js +1 -1
  197. package/terrain/index.js.map +1 -1
  198. package/terrain/terrain.fragment.d.ts +17 -17
  199. package/terrain/terrain.fragment.js +20 -18
  200. package/terrain/terrain.fragment.js.map +1 -1
  201. package/terrain/terrain.vertex.d.ts +18 -18
  202. package/terrain/terrain.vertex.js +21 -19
  203. package/terrain/terrain.vertex.js.map +1 -1
  204. package/terrain/terrainMaterial.d.ts +50 -50
  205. package/terrain/terrainMaterial.js +426 -411
  206. package/terrain/terrainMaterial.js.map +1 -1
  207. package/triPlanar/index.d.ts +1 -1
  208. package/triPlanar/index.js +1 -1
  209. package/triPlanar/index.js.map +1 -1
  210. package/triPlanar/triPlanarMaterial.d.ts +49 -49
  211. package/triPlanar/triPlanarMaterial.js +403 -391
  212. package/triPlanar/triPlanarMaterial.js.map +1 -1
  213. package/triPlanar/triplanar.fragment.d.ts +17 -17
  214. package/triPlanar/triplanar.fragment.js +20 -18
  215. package/triPlanar/triplanar.fragment.js.map +1 -1
  216. package/triPlanar/triplanar.vertex.d.ts +18 -18
  217. package/triPlanar/triplanar.vertex.js +21 -19
  218. package/triPlanar/triplanar.vertex.js.map +1 -1
  219. package/water/index.d.ts +1 -1
  220. package/water/index.js +1 -1
  221. package/water/index.js.map +1 -1
  222. package/water/water.fragment.d.ts +19 -19
  223. package/water/water.fragment.js +22 -20
  224. package/water/water.fragment.js.map +1 -1
  225. package/water/water.vertex.d.ts +20 -20
  226. package/water/water.vertex.js +23 -21
  227. package/water/water.vertex.js.map +1 -1
  228. package/water/waterMaterial.d.ts +135 -132
  229. package/water/waterMaterial.js +736 -705
  230. package/water/waterMaterial.js.map +1 -1
@@ -1,392 +1,404 @@
1
- import { __decorate, __extends } from "tslib";
2
- import { serializeAsTexture, serialize, expandToProperty, serializeAsColor3, SerializationHelper } from "@babylonjs/core/Misc/decorators.js";
3
- import { Color3 } from "@babylonjs/core/Maths/math.color.js";
4
- import { MaterialDefines } from "@babylonjs/core/Materials/materialDefines.js";
5
- import { MaterialHelper } from "@babylonjs/core/Materials/materialHelper.js";
6
- import { PushMaterial } from "@babylonjs/core/Materials/pushMaterial.js";
7
- import { MaterialFlags } from "@babylonjs/core/Materials/materialFlags.js";
8
- import { VertexBuffer } from "@babylonjs/core/Buffers/buffer.js";
9
- import { Scene } from "@babylonjs/core/scene.js";
10
- import { RegisterClass } from '@babylonjs/core/Misc/typeStore.js';
11
- import "./triplanar.fragment.js";
12
- import "./triplanar.vertex.js";
13
- import { EffectFallbacks } from '@babylonjs/core/Materials/effectFallbacks.js';
14
- var TriPlanarMaterialDefines = /** @class */ (function (_super) {
15
- __extends(TriPlanarMaterialDefines, _super);
16
- function TriPlanarMaterialDefines() {
17
- var _this = _super.call(this) || this;
18
- _this.DIFFUSEX = false;
19
- _this.DIFFUSEY = false;
20
- _this.DIFFUSEZ = false;
21
- _this.BUMPX = false;
22
- _this.BUMPY = false;
23
- _this.BUMPZ = false;
24
- _this.CLIPPLANE = false;
25
- _this.CLIPPLANE2 = false;
26
- _this.CLIPPLANE3 = false;
27
- _this.CLIPPLANE4 = false;
28
- _this.CLIPPLANE5 = false;
29
- _this.CLIPPLANE6 = false;
30
- _this.ALPHATEST = false;
31
- _this.DEPTHPREPASS = false;
32
- _this.POINTSIZE = false;
33
- _this.FOG = false;
34
- _this.SPECULARTERM = false;
35
- _this.NORMAL = false;
36
- _this.VERTEXCOLOR = false;
37
- _this.VERTEXALPHA = false;
38
- _this.NUM_BONE_INFLUENCERS = 0;
39
- _this.BonesPerMesh = 0;
40
- _this.INSTANCES = false;
41
- _this.INSTANCESCOLOR = false;
42
- _this.IMAGEPROCESSINGPOSTPROCESS = false;
43
- _this.SKIPFINALCOLORCLAMP = false;
44
- _this.rebuild();
45
- return _this;
46
- }
47
- return TriPlanarMaterialDefines;
48
- }(MaterialDefines));
49
- var TriPlanarMaterial = /** @class */ (function (_super) {
50
- __extends(TriPlanarMaterial, _super);
51
- function TriPlanarMaterial(name, scene) {
52
- var _this = _super.call(this, name, scene) || this;
53
- _this.tileSize = 1;
54
- _this.diffuseColor = new Color3(1, 1, 1);
55
- _this.specularColor = new Color3(0.2, 0.2, 0.2);
56
- _this.specularPower = 64;
57
- _this._disableLighting = false;
58
- _this._maxSimultaneousLights = 4;
59
- return _this;
60
- }
61
- TriPlanarMaterial.prototype.needAlphaBlending = function () {
62
- return (this.alpha < 1.0);
63
- };
64
- TriPlanarMaterial.prototype.needAlphaTesting = function () {
65
- return false;
66
- };
67
- TriPlanarMaterial.prototype.getAlphaTestTexture = function () {
68
- return null;
69
- };
70
- // Methods
71
- TriPlanarMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) {
72
- if (this.isFrozen) {
73
- if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {
74
- return true;
75
- }
76
- }
77
- if (!subMesh.materialDefines) {
78
- subMesh.materialDefines = new TriPlanarMaterialDefines();
79
- }
80
- var defines = subMesh.materialDefines;
81
- var scene = this.getScene();
82
- if (this._isReadyForSubMesh(subMesh)) {
83
- return true;
84
- }
85
- var engine = scene.getEngine();
86
- // Textures
87
- if (defines._areTexturesDirty) {
88
- if (scene.texturesEnabled) {
89
- if (MaterialFlags.DiffuseTextureEnabled) {
90
- var textures = [this.diffuseTextureX, this.diffuseTextureY, this.diffuseTextureZ];
91
- var textureDefines = ["DIFFUSEX", "DIFFUSEY", "DIFFUSEZ"];
92
- for (var i = 0; i < textures.length; i++) {
93
- if (textures[i]) {
94
- if (!textures[i].isReady()) {
95
- return false;
96
- }
97
- else {
98
- defines[textureDefines[i]] = true;
99
- }
100
- }
101
- }
102
- }
103
- if (MaterialFlags.BumpTextureEnabled) {
104
- var textures = [this.normalTextureX, this.normalTextureY, this.normalTextureZ];
105
- var textureDefines = ["BUMPX", "BUMPY", "BUMPZ"];
106
- for (var i = 0; i < textures.length; i++) {
107
- if (textures[i]) {
108
- if (!textures[i].isReady()) {
109
- return false;
110
- }
111
- else {
112
- defines[textureDefines[i]] = true;
113
- }
114
- }
115
- }
116
- }
117
- }
118
- }
119
- // Misc.
120
- MaterialHelper.PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines);
121
- // Lights
122
- defines._needNormals = MaterialHelper.PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting);
123
- // Values that need to be evaluated on every frame
124
- MaterialHelper.PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false);
125
- // Attribs
126
- MaterialHelper.PrepareDefinesForAttributes(mesh, defines, true, true);
127
- // Get correct effect
128
- if (defines.isDirty) {
129
- defines.markAsProcessed();
130
- scene.resetCachedMaterial();
131
- // Fallbacks
132
- var fallbacks = new EffectFallbacks();
133
- if (defines.FOG) {
134
- fallbacks.addFallback(1, "FOG");
135
- }
136
- MaterialHelper.HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights);
137
- if (defines.NUM_BONE_INFLUENCERS > 0) {
138
- fallbacks.addCPUSkinningFallback(0, mesh);
139
- }
140
- defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
141
- //Attributes
142
- var attribs = [VertexBuffer.PositionKind];
143
- if (defines.NORMAL) {
144
- attribs.push(VertexBuffer.NormalKind);
145
- }
146
- if (defines.VERTEXCOLOR) {
147
- attribs.push(VertexBuffer.ColorKind);
148
- }
149
- MaterialHelper.PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
150
- MaterialHelper.PrepareAttributesForInstances(attribs, defines);
151
- // Legacy browser patch
152
- var shaderName = "triplanar";
153
- var join = defines.toString();
154
- var uniforms = ["world", "view", "viewProjection", "vEyePosition", "vLightsType", "vDiffuseColor", "vSpecularColor",
155
- "vFogInfos", "vFogColor", "pointSize",
156
- "mBones",
157
- "vClipPlane", "vClipPlane2", "vClipPlane3", "vClipPlane4", "vClipPlane5", "vClipPlane6",
158
- "tileSize"
159
- ];
160
- var samplers = ["diffuseSamplerX", "diffuseSamplerY", "diffuseSamplerZ",
161
- "normalSamplerX", "normalSamplerY", "normalSamplerZ"
162
- ];
163
- var uniformBuffers = new Array();
164
- MaterialHelper.PrepareUniformsAndSamplersList({
165
- uniformsNames: uniforms,
166
- uniformBuffersNames: uniformBuffers,
167
- samplers: samplers,
168
- defines: defines,
169
- maxSimultaneousLights: this.maxSimultaneousLights
170
- });
171
- subMesh.setEffect(scene.getEngine().createEffect(shaderName, {
172
- attributes: attribs,
173
- uniformsNames: uniforms,
174
- uniformBuffersNames: uniformBuffers,
175
- samplers: samplers,
176
- defines: join,
177
- fallbacks: fallbacks,
178
- onCompiled: this.onCompiled,
179
- onError: this.onError,
180
- indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights }
181
- }, engine), defines, this._materialContext);
182
- }
183
- if (!subMesh.effect || !subMesh.effect.isReady()) {
184
- return false;
185
- }
186
- defines._renderId = scene.getRenderId();
187
- subMesh.effect._wasPreviouslyReady = true;
188
- return true;
189
- };
190
- TriPlanarMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) {
191
- var scene = this.getScene();
192
- var defines = subMesh.materialDefines;
193
- if (!defines) {
194
- return;
195
- }
196
- var effect = subMesh.effect;
197
- if (!effect) {
198
- return;
199
- }
200
- this._activeEffect = effect;
201
- // Matrices
202
- this.bindOnlyWorldMatrix(world);
203
- this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix());
204
- // Bones
205
- MaterialHelper.BindBonesParameters(mesh, this._activeEffect);
206
- this._activeEffect.setFloat("tileSize", this.tileSize);
207
- if (scene.getCachedMaterial() !== this) {
208
- // Textures
209
- if (this.diffuseTextureX) {
210
- this._activeEffect.setTexture("diffuseSamplerX", this.diffuseTextureX);
211
- }
212
- if (this.diffuseTextureY) {
213
- this._activeEffect.setTexture("diffuseSamplerY", this.diffuseTextureY);
214
- }
215
- if (this.diffuseTextureZ) {
216
- this._activeEffect.setTexture("diffuseSamplerZ", this.diffuseTextureZ);
217
- }
218
- if (this.normalTextureX) {
219
- this._activeEffect.setTexture("normalSamplerX", this.normalTextureX);
220
- }
221
- if (this.normalTextureY) {
222
- this._activeEffect.setTexture("normalSamplerY", this.normalTextureY);
223
- }
224
- if (this.normalTextureZ) {
225
- this._activeEffect.setTexture("normalSamplerZ", this.normalTextureZ);
226
- }
227
- // Clip plane
228
- MaterialHelper.BindClipPlane(this._activeEffect, scene);
229
- // Point size
230
- if (this.pointsCloud) {
231
- this._activeEffect.setFloat("pointSize", this.pointSize);
232
- }
233
- scene.bindEyePosition(effect);
234
- }
235
- this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);
236
- if (defines.SPECULARTERM) {
237
- this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower);
238
- }
239
- if (scene.lightsEnabled && !this.disableLighting) {
240
- MaterialHelper.BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights);
241
- }
242
- // View
243
- if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) {
244
- this._activeEffect.setMatrix("view", scene.getViewMatrix());
245
- }
246
- // Fog
247
- MaterialHelper.BindFogParameters(scene, mesh, this._activeEffect);
248
- this._afterBind(mesh, this._activeEffect);
249
- };
250
- TriPlanarMaterial.prototype.getAnimatables = function () {
251
- var results = [];
252
- if (this.mixTexture && this.mixTexture.animations && this.mixTexture.animations.length > 0) {
253
- results.push(this.mixTexture);
254
- }
255
- return results;
256
- };
257
- TriPlanarMaterial.prototype.getActiveTextures = function () {
258
- var activeTextures = _super.prototype.getActiveTextures.call(this);
259
- if (this._diffuseTextureX) {
260
- activeTextures.push(this._diffuseTextureX);
261
- }
262
- if (this._diffuseTextureY) {
263
- activeTextures.push(this._diffuseTextureY);
264
- }
265
- if (this._diffuseTextureZ) {
266
- activeTextures.push(this._diffuseTextureZ);
267
- }
268
- if (this._normalTextureX) {
269
- activeTextures.push(this._normalTextureX);
270
- }
271
- if (this._normalTextureY) {
272
- activeTextures.push(this._normalTextureY);
273
- }
274
- if (this._normalTextureZ) {
275
- activeTextures.push(this._normalTextureZ);
276
- }
277
- return activeTextures;
278
- };
279
- TriPlanarMaterial.prototype.hasTexture = function (texture) {
280
- if (_super.prototype.hasTexture.call(this, texture)) {
281
- return true;
282
- }
283
- if (this._diffuseTextureX === texture) {
284
- return true;
285
- }
286
- if (this._diffuseTextureY === texture) {
287
- return true;
288
- }
289
- if (this._diffuseTextureZ === texture) {
290
- return true;
291
- }
292
- if (this._normalTextureX === texture) {
293
- return true;
294
- }
295
- if (this._normalTextureY === texture) {
296
- return true;
297
- }
298
- if (this._normalTextureZ === texture) {
299
- return true;
300
- }
301
- return false;
302
- };
303
- TriPlanarMaterial.prototype.dispose = function (forceDisposeEffect) {
304
- if (this.mixTexture) {
305
- this.mixTexture.dispose();
306
- }
307
- _super.prototype.dispose.call(this, forceDisposeEffect);
308
- };
309
- TriPlanarMaterial.prototype.clone = function (name) {
310
- var _this = this;
311
- return SerializationHelper.Clone(function () { return new TriPlanarMaterial(name, _this.getScene()); }, this);
312
- };
313
- TriPlanarMaterial.prototype.serialize = function () {
314
- var serializationObject = _super.prototype.serialize.call(this);
315
- serializationObject.customType = "BABYLON.TriPlanarMaterial";
316
- return serializationObject;
317
- };
318
- TriPlanarMaterial.prototype.getClassName = function () {
319
- return "TriPlanarMaterial";
320
- };
321
- // Statics
322
- TriPlanarMaterial.Parse = function (source, scene, rootUrl) {
323
- return SerializationHelper.Parse(function () { return new TriPlanarMaterial(source.name, scene); }, source, scene, rootUrl);
324
- };
325
- __decorate([
326
- serializeAsTexture()
327
- ], TriPlanarMaterial.prototype, "mixTexture", void 0);
328
- __decorate([
329
- serializeAsTexture("diffuseTextureX")
330
- ], TriPlanarMaterial.prototype, "_diffuseTextureX", void 0);
331
- __decorate([
332
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
333
- ], TriPlanarMaterial.prototype, "diffuseTextureX", void 0);
334
- __decorate([
335
- serializeAsTexture("diffuseTexturY")
336
- ], TriPlanarMaterial.prototype, "_diffuseTextureY", void 0);
337
- __decorate([
338
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
339
- ], TriPlanarMaterial.prototype, "diffuseTextureY", void 0);
340
- __decorate([
341
- serializeAsTexture("diffuseTextureZ")
342
- ], TriPlanarMaterial.prototype, "_diffuseTextureZ", void 0);
343
- __decorate([
344
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
345
- ], TriPlanarMaterial.prototype, "diffuseTextureZ", void 0);
346
- __decorate([
347
- serializeAsTexture("normalTextureX")
348
- ], TriPlanarMaterial.prototype, "_normalTextureX", void 0);
349
- __decorate([
350
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
351
- ], TriPlanarMaterial.prototype, "normalTextureX", void 0);
352
- __decorate([
353
- serializeAsTexture("normalTextureY")
354
- ], TriPlanarMaterial.prototype, "_normalTextureY", void 0);
355
- __decorate([
356
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
357
- ], TriPlanarMaterial.prototype, "normalTextureY", void 0);
358
- __decorate([
359
- serializeAsTexture("normalTextureZ")
360
- ], TriPlanarMaterial.prototype, "_normalTextureZ", void 0);
361
- __decorate([
362
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
363
- ], TriPlanarMaterial.prototype, "normalTextureZ", void 0);
364
- __decorate([
365
- serialize()
366
- ], TriPlanarMaterial.prototype, "tileSize", void 0);
367
- __decorate([
368
- serializeAsColor3()
369
- ], TriPlanarMaterial.prototype, "diffuseColor", void 0);
370
- __decorate([
371
- serializeAsColor3()
372
- ], TriPlanarMaterial.prototype, "specularColor", void 0);
373
- __decorate([
374
- serialize()
375
- ], TriPlanarMaterial.prototype, "specularPower", void 0);
376
- __decorate([
377
- serialize("disableLighting")
378
- ], TriPlanarMaterial.prototype, "_disableLighting", void 0);
379
- __decorate([
380
- expandToProperty("_markAllSubMeshesAsLightsDirty")
381
- ], TriPlanarMaterial.prototype, "disableLighting", void 0);
382
- __decorate([
383
- serialize("maxSimultaneousLights")
384
- ], TriPlanarMaterial.prototype, "_maxSimultaneousLights", void 0);
385
- __decorate([
386
- expandToProperty("_markAllSubMeshesAsLightsDirty")
387
- ], TriPlanarMaterial.prototype, "maxSimultaneousLights", void 0);
388
- return TriPlanarMaterial;
389
- }(PushMaterial));
390
- export { TriPlanarMaterial };
391
- RegisterClass("BABYLON.TriPlanarMaterial", TriPlanarMaterial);
1
+ import { __decorate, __extends } from "tslib";
2
+ import { serializeAsTexture, serialize, expandToProperty, serializeAsColor3, SerializationHelper } from "@babylonjs/core/Misc/decorators.js";
3
+ import { Color3 } from "@babylonjs/core/Maths/math.color.js";
4
+ import { MaterialDefines } from "@babylonjs/core/Materials/materialDefines.js";
5
+ import { MaterialHelper } from "@babylonjs/core/Materials/materialHelper.js";
6
+ import { PushMaterial } from "@babylonjs/core/Materials/pushMaterial.js";
7
+ import { MaterialFlags } from "@babylonjs/core/Materials/materialFlags.js";
8
+ import { VertexBuffer } from "@babylonjs/core/Buffers/buffer.js";
9
+ import { Scene } from "@babylonjs/core/scene.js";
10
+ import { RegisterClass } from "@babylonjs/core/Misc/typeStore.js";
11
+ import "./triplanar.fragment";
12
+ import "./triplanar.vertex";
13
+ import { EffectFallbacks } from "@babylonjs/core/Materials/effectFallbacks.js";
14
+ var TriPlanarMaterialDefines = /** @class */ (function (_super) {
15
+ __extends(TriPlanarMaterialDefines, _super);
16
+ function TriPlanarMaterialDefines() {
17
+ var _this = _super.call(this) || this;
18
+ _this.DIFFUSEX = false;
19
+ _this.DIFFUSEY = false;
20
+ _this.DIFFUSEZ = false;
21
+ _this.BUMPX = false;
22
+ _this.BUMPY = false;
23
+ _this.BUMPZ = false;
24
+ _this.CLIPPLANE = false;
25
+ _this.CLIPPLANE2 = false;
26
+ _this.CLIPPLANE3 = false;
27
+ _this.CLIPPLANE4 = false;
28
+ _this.CLIPPLANE5 = false;
29
+ _this.CLIPPLANE6 = false;
30
+ _this.ALPHATEST = false;
31
+ _this.DEPTHPREPASS = false;
32
+ _this.POINTSIZE = false;
33
+ _this.FOG = false;
34
+ _this.SPECULARTERM = false;
35
+ _this.NORMAL = false;
36
+ _this.VERTEXCOLOR = false;
37
+ _this.VERTEXALPHA = false;
38
+ _this.NUM_BONE_INFLUENCERS = 0;
39
+ _this.BonesPerMesh = 0;
40
+ _this.INSTANCES = false;
41
+ _this.INSTANCESCOLOR = false;
42
+ _this.IMAGEPROCESSINGPOSTPROCESS = false;
43
+ _this.SKIPFINALCOLORCLAMP = false;
44
+ _this.rebuild();
45
+ return _this;
46
+ }
47
+ return TriPlanarMaterialDefines;
48
+ }(MaterialDefines));
49
+ var TriPlanarMaterial = /** @class */ (function (_super) {
50
+ __extends(TriPlanarMaterial, _super);
51
+ function TriPlanarMaterial(name, scene) {
52
+ var _this = _super.call(this, name, scene) || this;
53
+ _this.tileSize = 1;
54
+ _this.diffuseColor = new Color3(1, 1, 1);
55
+ _this.specularColor = new Color3(0.2, 0.2, 0.2);
56
+ _this.specularPower = 64;
57
+ _this._disableLighting = false;
58
+ _this._maxSimultaneousLights = 4;
59
+ return _this;
60
+ }
61
+ TriPlanarMaterial.prototype.needAlphaBlending = function () {
62
+ return this.alpha < 1.0;
63
+ };
64
+ TriPlanarMaterial.prototype.needAlphaTesting = function () {
65
+ return false;
66
+ };
67
+ TriPlanarMaterial.prototype.getAlphaTestTexture = function () {
68
+ return null;
69
+ };
70
+ // Methods
71
+ TriPlanarMaterial.prototype.isReadyForSubMesh = function (mesh, subMesh, useInstances) {
72
+ if (this.isFrozen) {
73
+ if (subMesh.effect && subMesh.effect._wasPreviouslyReady) {
74
+ return true;
75
+ }
76
+ }
77
+ if (!subMesh.materialDefines) {
78
+ subMesh.materialDefines = new TriPlanarMaterialDefines();
79
+ }
80
+ var defines = subMesh.materialDefines;
81
+ var scene = this.getScene();
82
+ if (this._isReadyForSubMesh(subMesh)) {
83
+ return true;
84
+ }
85
+ var engine = scene.getEngine();
86
+ // Textures
87
+ if (defines._areTexturesDirty) {
88
+ if (scene.texturesEnabled) {
89
+ if (MaterialFlags.DiffuseTextureEnabled) {
90
+ var textures = [this.diffuseTextureX, this.diffuseTextureY, this.diffuseTextureZ];
91
+ var textureDefines = ["DIFFUSEX", "DIFFUSEY", "DIFFUSEZ"];
92
+ for (var i = 0; i < textures.length; i++) {
93
+ if (textures[i]) {
94
+ if (!textures[i].isReady()) {
95
+ return false;
96
+ }
97
+ else {
98
+ defines[textureDefines[i]] = true;
99
+ }
100
+ }
101
+ }
102
+ }
103
+ if (MaterialFlags.BumpTextureEnabled) {
104
+ var textures = [this.normalTextureX, this.normalTextureY, this.normalTextureZ];
105
+ var textureDefines = ["BUMPX", "BUMPY", "BUMPZ"];
106
+ for (var i = 0; i < textures.length; i++) {
107
+ if (textures[i]) {
108
+ if (!textures[i].isReady()) {
109
+ return false;
110
+ }
111
+ else {
112
+ defines[textureDefines[i]] = true;
113
+ }
114
+ }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ // Misc.
120
+ MaterialHelper.PrepareDefinesForMisc(mesh, scene, false, this.pointsCloud, this.fogEnabled, this._shouldTurnAlphaTestOn(mesh), defines);
121
+ // Lights
122
+ defines._needNormals = MaterialHelper.PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights, this._disableLighting);
123
+ // Values that need to be evaluated on every frame
124
+ MaterialHelper.PrepareDefinesForFrameBoundValues(scene, engine, defines, useInstances ? true : false);
125
+ // Attribs
126
+ MaterialHelper.PrepareDefinesForAttributes(mesh, defines, true, true);
127
+ // Get correct effect
128
+ if (defines.isDirty) {
129
+ defines.markAsProcessed();
130
+ scene.resetCachedMaterial();
131
+ // Fallbacks
132
+ var fallbacks = new EffectFallbacks();
133
+ if (defines.FOG) {
134
+ fallbacks.addFallback(1, "FOG");
135
+ }
136
+ MaterialHelper.HandleFallbacksForShadows(defines, fallbacks, this.maxSimultaneousLights);
137
+ if (defines.NUM_BONE_INFLUENCERS > 0) {
138
+ fallbacks.addCPUSkinningFallback(0, mesh);
139
+ }
140
+ defines.IMAGEPROCESSINGPOSTPROCESS = scene.imageProcessingConfiguration.applyByPostProcess;
141
+ //Attributes
142
+ var attribs = [VertexBuffer.PositionKind];
143
+ if (defines.NORMAL) {
144
+ attribs.push(VertexBuffer.NormalKind);
145
+ }
146
+ if (defines.VERTEXCOLOR) {
147
+ attribs.push(VertexBuffer.ColorKind);
148
+ }
149
+ MaterialHelper.PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
150
+ MaterialHelper.PrepareAttributesForInstances(attribs, defines);
151
+ // Legacy browser patch
152
+ var shaderName = "triplanar";
153
+ var join = defines.toString();
154
+ var uniforms = [
155
+ "world",
156
+ "view",
157
+ "viewProjection",
158
+ "vEyePosition",
159
+ "vLightsType",
160
+ "vDiffuseColor",
161
+ "vSpecularColor",
162
+ "vFogInfos",
163
+ "vFogColor",
164
+ "pointSize",
165
+ "mBones",
166
+ "vClipPlane",
167
+ "vClipPlane2",
168
+ "vClipPlane3",
169
+ "vClipPlane4",
170
+ "vClipPlane5",
171
+ "vClipPlane6",
172
+ "tileSize",
173
+ ];
174
+ var samplers = ["diffuseSamplerX", "diffuseSamplerY", "diffuseSamplerZ", "normalSamplerX", "normalSamplerY", "normalSamplerZ"];
175
+ var uniformBuffers = new Array();
176
+ MaterialHelper.PrepareUniformsAndSamplersList({
177
+ uniformsNames: uniforms,
178
+ uniformBuffersNames: uniformBuffers,
179
+ samplers: samplers,
180
+ defines: defines,
181
+ maxSimultaneousLights: this.maxSimultaneousLights,
182
+ });
183
+ subMesh.setEffect(scene.getEngine().createEffect(shaderName, {
184
+ attributes: attribs,
185
+ uniformsNames: uniforms,
186
+ uniformBuffersNames: uniformBuffers,
187
+ samplers: samplers,
188
+ defines: join,
189
+ fallbacks: fallbacks,
190
+ onCompiled: this.onCompiled,
191
+ onError: this.onError,
192
+ indexParameters: { maxSimultaneousLights: this.maxSimultaneousLights },
193
+ }, engine), defines, this._materialContext);
194
+ }
195
+ if (!subMesh.effect || !subMesh.effect.isReady()) {
196
+ return false;
197
+ }
198
+ defines._renderId = scene.getRenderId();
199
+ subMesh.effect._wasPreviouslyReady = true;
200
+ return true;
201
+ };
202
+ TriPlanarMaterial.prototype.bindForSubMesh = function (world, mesh, subMesh) {
203
+ var scene = this.getScene();
204
+ var defines = subMesh.materialDefines;
205
+ if (!defines) {
206
+ return;
207
+ }
208
+ var effect = subMesh.effect;
209
+ if (!effect) {
210
+ return;
211
+ }
212
+ this._activeEffect = effect;
213
+ // Matrices
214
+ this.bindOnlyWorldMatrix(world);
215
+ this._activeEffect.setMatrix("viewProjection", scene.getTransformMatrix());
216
+ // Bones
217
+ MaterialHelper.BindBonesParameters(mesh, this._activeEffect);
218
+ this._activeEffect.setFloat("tileSize", this.tileSize);
219
+ if (scene.getCachedMaterial() !== this) {
220
+ // Textures
221
+ if (this.diffuseTextureX) {
222
+ this._activeEffect.setTexture("diffuseSamplerX", this.diffuseTextureX);
223
+ }
224
+ if (this.diffuseTextureY) {
225
+ this._activeEffect.setTexture("diffuseSamplerY", this.diffuseTextureY);
226
+ }
227
+ if (this.diffuseTextureZ) {
228
+ this._activeEffect.setTexture("diffuseSamplerZ", this.diffuseTextureZ);
229
+ }
230
+ if (this.normalTextureX) {
231
+ this._activeEffect.setTexture("normalSamplerX", this.normalTextureX);
232
+ }
233
+ if (this.normalTextureY) {
234
+ this._activeEffect.setTexture("normalSamplerY", this.normalTextureY);
235
+ }
236
+ if (this.normalTextureZ) {
237
+ this._activeEffect.setTexture("normalSamplerZ", this.normalTextureZ);
238
+ }
239
+ // Clip plane
240
+ MaterialHelper.BindClipPlane(this._activeEffect, scene);
241
+ // Point size
242
+ if (this.pointsCloud) {
243
+ this._activeEffect.setFloat("pointSize", this.pointSize);
244
+ }
245
+ scene.bindEyePosition(effect);
246
+ }
247
+ this._activeEffect.setColor4("vDiffuseColor", this.diffuseColor, this.alpha * mesh.visibility);
248
+ if (defines.SPECULARTERM) {
249
+ this._activeEffect.setColor4("vSpecularColor", this.specularColor, this.specularPower);
250
+ }
251
+ if (scene.lightsEnabled && !this.disableLighting) {
252
+ MaterialHelper.BindLights(scene, mesh, this._activeEffect, defines, this.maxSimultaneousLights);
253
+ }
254
+ // View
255
+ if (scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) {
256
+ this._activeEffect.setMatrix("view", scene.getViewMatrix());
257
+ }
258
+ // Fog
259
+ MaterialHelper.BindFogParameters(scene, mesh, this._activeEffect);
260
+ this._afterBind(mesh, this._activeEffect);
261
+ };
262
+ TriPlanarMaterial.prototype.getAnimatables = function () {
263
+ var results = [];
264
+ if (this.mixTexture && this.mixTexture.animations && this.mixTexture.animations.length > 0) {
265
+ results.push(this.mixTexture);
266
+ }
267
+ return results;
268
+ };
269
+ TriPlanarMaterial.prototype.getActiveTextures = function () {
270
+ var activeTextures = _super.prototype.getActiveTextures.call(this);
271
+ if (this._diffuseTextureX) {
272
+ activeTextures.push(this._diffuseTextureX);
273
+ }
274
+ if (this._diffuseTextureY) {
275
+ activeTextures.push(this._diffuseTextureY);
276
+ }
277
+ if (this._diffuseTextureZ) {
278
+ activeTextures.push(this._diffuseTextureZ);
279
+ }
280
+ if (this._normalTextureX) {
281
+ activeTextures.push(this._normalTextureX);
282
+ }
283
+ if (this._normalTextureY) {
284
+ activeTextures.push(this._normalTextureY);
285
+ }
286
+ if (this._normalTextureZ) {
287
+ activeTextures.push(this._normalTextureZ);
288
+ }
289
+ return activeTextures;
290
+ };
291
+ TriPlanarMaterial.prototype.hasTexture = function (texture) {
292
+ if (_super.prototype.hasTexture.call(this, texture)) {
293
+ return true;
294
+ }
295
+ if (this._diffuseTextureX === texture) {
296
+ return true;
297
+ }
298
+ if (this._diffuseTextureY === texture) {
299
+ return true;
300
+ }
301
+ if (this._diffuseTextureZ === texture) {
302
+ return true;
303
+ }
304
+ if (this._normalTextureX === texture) {
305
+ return true;
306
+ }
307
+ if (this._normalTextureY === texture) {
308
+ return true;
309
+ }
310
+ if (this._normalTextureZ === texture) {
311
+ return true;
312
+ }
313
+ return false;
314
+ };
315
+ TriPlanarMaterial.prototype.dispose = function (forceDisposeEffect) {
316
+ if (this.mixTexture) {
317
+ this.mixTexture.dispose();
318
+ }
319
+ _super.prototype.dispose.call(this, forceDisposeEffect);
320
+ };
321
+ TriPlanarMaterial.prototype.clone = function (name) {
322
+ var _this = this;
323
+ return SerializationHelper.Clone(function () { return new TriPlanarMaterial(name, _this.getScene()); }, this);
324
+ };
325
+ TriPlanarMaterial.prototype.serialize = function () {
326
+ var serializationObject = _super.prototype.serialize.call(this);
327
+ serializationObject.customType = "BABYLON.TriPlanarMaterial";
328
+ return serializationObject;
329
+ };
330
+ TriPlanarMaterial.prototype.getClassName = function () {
331
+ return "TriPlanarMaterial";
332
+ };
333
+ // Statics
334
+ TriPlanarMaterial.Parse = function (source, scene, rootUrl) {
335
+ return SerializationHelper.Parse(function () { return new TriPlanarMaterial(source.name, scene); }, source, scene, rootUrl);
336
+ };
337
+ __decorate([
338
+ serializeAsTexture()
339
+ ], TriPlanarMaterial.prototype, "mixTexture", void 0);
340
+ __decorate([
341
+ serializeAsTexture("diffuseTextureX")
342
+ ], TriPlanarMaterial.prototype, "_diffuseTextureX", void 0);
343
+ __decorate([
344
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
345
+ ], TriPlanarMaterial.prototype, "diffuseTextureX", void 0);
346
+ __decorate([
347
+ serializeAsTexture("diffuseTexturY")
348
+ ], TriPlanarMaterial.prototype, "_diffuseTextureY", void 0);
349
+ __decorate([
350
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
351
+ ], TriPlanarMaterial.prototype, "diffuseTextureY", void 0);
352
+ __decorate([
353
+ serializeAsTexture("diffuseTextureZ")
354
+ ], TriPlanarMaterial.prototype, "_diffuseTextureZ", void 0);
355
+ __decorate([
356
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
357
+ ], TriPlanarMaterial.prototype, "diffuseTextureZ", void 0);
358
+ __decorate([
359
+ serializeAsTexture("normalTextureX")
360
+ ], TriPlanarMaterial.prototype, "_normalTextureX", void 0);
361
+ __decorate([
362
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
363
+ ], TriPlanarMaterial.prototype, "normalTextureX", void 0);
364
+ __decorate([
365
+ serializeAsTexture("normalTextureY")
366
+ ], TriPlanarMaterial.prototype, "_normalTextureY", void 0);
367
+ __decorate([
368
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
369
+ ], TriPlanarMaterial.prototype, "normalTextureY", void 0);
370
+ __decorate([
371
+ serializeAsTexture("normalTextureZ")
372
+ ], TriPlanarMaterial.prototype, "_normalTextureZ", void 0);
373
+ __decorate([
374
+ expandToProperty("_markAllSubMeshesAsTexturesDirty")
375
+ ], TriPlanarMaterial.prototype, "normalTextureZ", void 0);
376
+ __decorate([
377
+ serialize()
378
+ ], TriPlanarMaterial.prototype, "tileSize", void 0);
379
+ __decorate([
380
+ serializeAsColor3()
381
+ ], TriPlanarMaterial.prototype, "diffuseColor", void 0);
382
+ __decorate([
383
+ serializeAsColor3()
384
+ ], TriPlanarMaterial.prototype, "specularColor", void 0);
385
+ __decorate([
386
+ serialize()
387
+ ], TriPlanarMaterial.prototype, "specularPower", void 0);
388
+ __decorate([
389
+ serialize("disableLighting")
390
+ ], TriPlanarMaterial.prototype, "_disableLighting", void 0);
391
+ __decorate([
392
+ expandToProperty("_markAllSubMeshesAsLightsDirty")
393
+ ], TriPlanarMaterial.prototype, "disableLighting", void 0);
394
+ __decorate([
395
+ serialize("maxSimultaneousLights")
396
+ ], TriPlanarMaterial.prototype, "_maxSimultaneousLights", void 0);
397
+ __decorate([
398
+ expandToProperty("_markAllSubMeshesAsLightsDirty")
399
+ ], TriPlanarMaterial.prototype, "maxSimultaneousLights", void 0);
400
+ return TriPlanarMaterial;
401
+ }(PushMaterial));
402
+ export { TriPlanarMaterial };
403
+ RegisterClass("BABYLON.TriPlanarMaterial", TriPlanarMaterial);
392
404
  //# sourceMappingURL=triPlanarMaterial.js.map