@babylonjs/materials 5.0.0-rc.7 → 5.0.0-rc.9

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 (153) hide show
  1. package/cell/cell.fragment.d.ts +17 -17
  2. package/cell/cell.fragment.js +20 -20
  3. package/cell/cell.vertex.d.ts +18 -18
  4. package/cell/cell.vertex.js +21 -21
  5. package/cell/cellMaterial.d.ts +37 -37
  6. package/cell/cellMaterial.js +304 -304
  7. package/cell/index.d.ts +1 -1
  8. package/cell/index.js +1 -1
  9. package/custom/customMaterial.d.ts +69 -69
  10. package/custom/customMaterial.js +216 -216
  11. package/custom/index.d.ts +2 -2
  12. package/custom/index.js +2 -2
  13. package/custom/pbrCustomMaterial.d.ts +71 -71
  14. package/custom/pbrCustomMaterial.js +241 -241
  15. package/fire/fire.fragment.d.ts +11 -11
  16. package/fire/fire.fragment.js +14 -14
  17. package/fire/fire.vertex.d.ts +15 -15
  18. package/fire/fire.vertex.js +18 -18
  19. package/fire/fireMaterial.d.ts +38 -38
  20. package/fire/fireMaterial.js +342 -342
  21. package/fire/index.d.ts +1 -1
  22. package/fire/index.js +1 -1
  23. package/fur/fur.fragment.d.ts +17 -17
  24. package/fur/fur.fragment.js +20 -20
  25. package/fur/fur.vertex.d.ts +18 -18
  26. package/fur/fur.vertex.js +21 -21
  27. package/fur/furMaterial.d.ts +56 -56
  28. package/fur/furMaterial.js +500 -500
  29. package/fur/index.d.ts +1 -1
  30. package/fur/index.js +1 -1
  31. package/gradient/gradient.fragment.d.ts +17 -17
  32. package/gradient/gradient.fragment.js +20 -20
  33. package/gradient/gradient.vertex.d.ts +18 -18
  34. package/gradient/gradient.vertex.js +21 -21
  35. package/gradient/gradientMaterial.d.ts +37 -37
  36. package/gradient/gradientMaterial.js +275 -275
  37. package/gradient/index.d.ts +1 -1
  38. package/gradient/index.js +1 -1
  39. package/grid/grid.fragment.d.ts +8 -8
  40. package/grid/grid.fragment.js +11 -11
  41. package/grid/grid.vertex.d.ts +9 -9
  42. package/grid/grid.vertex.js +12 -12
  43. package/grid/gridMaterial.d.ts +77 -77
  44. package/grid/gridMaterial.js +276 -276
  45. package/grid/index.d.ts +1 -1
  46. package/grid/index.js +1 -1
  47. package/index.d.ts +15 -15
  48. package/index.js +15 -15
  49. package/lava/index.d.ts +1 -1
  50. package/lava/index.js +1 -1
  51. package/lava/lava.fragment.d.ts +17 -17
  52. package/lava/lava.fragment.js +20 -20
  53. package/lava/lava.vertex.d.ts +18 -18
  54. package/lava/lava.vertex.js +21 -21
  55. package/lava/lavaMaterial.d.ts +45 -45
  56. package/lava/lavaMaterial.js +394 -394
  57. package/legacy/legacy-cell.d.ts +1 -1
  58. package/legacy/legacy-cell.js +12 -12
  59. package/legacy/legacy-custom.d.ts +1 -1
  60. package/legacy/legacy-custom.js +12 -12
  61. package/legacy/legacy-fire.d.ts +1 -1
  62. package/legacy/legacy-fire.js +12 -12
  63. package/legacy/legacy-fur.d.ts +1 -1
  64. package/legacy/legacy-fur.js +12 -12
  65. package/legacy/legacy-gradient.d.ts +1 -1
  66. package/legacy/legacy-gradient.js +12 -12
  67. package/legacy/legacy-grid.d.ts +1 -1
  68. package/legacy/legacy-grid.js +12 -12
  69. package/legacy/legacy-lava.d.ts +1 -1
  70. package/legacy/legacy-lava.js +12 -12
  71. package/legacy/legacy-mix.d.ts +1 -1
  72. package/legacy/legacy-mix.js +12 -12
  73. package/legacy/legacy-normal.d.ts +1 -1
  74. package/legacy/legacy-normal.js +12 -12
  75. package/legacy/legacy-shadowOnly.d.ts +1 -1
  76. package/legacy/legacy-shadowOnly.js +12 -12
  77. package/legacy/legacy-simple.d.ts +1 -1
  78. package/legacy/legacy-simple.js +12 -12
  79. package/legacy/legacy-sky.d.ts +1 -1
  80. package/legacy/legacy-sky.js +12 -12
  81. package/legacy/legacy-terrain.d.ts +1 -1
  82. package/legacy/legacy-terrain.js +12 -12
  83. package/legacy/legacy-triPlanar.d.ts +1 -1
  84. package/legacy/legacy-triPlanar.js +12 -12
  85. package/legacy/legacy-water.d.ts +1 -1
  86. package/legacy/legacy-water.js +12 -12
  87. package/legacy/legacy.d.ts +1 -1
  88. package/legacy/legacy.js +15 -15
  89. package/mix/index.d.ts +1 -1
  90. package/mix/index.js +1 -1
  91. package/mix/mix.fragment.d.ts +17 -17
  92. package/mix/mix.fragment.js +20 -20
  93. package/mix/mix.vertex.d.ts +18 -18
  94. package/mix/mix.vertex.js +21 -21
  95. package/mix/mixMaterial.d.ts +65 -65
  96. package/mix/mixMaterial.js +510 -510
  97. package/normal/index.d.ts +1 -1
  98. package/normal/index.js +1 -1
  99. package/normal/normal.fragment.d.ts +17 -17
  100. package/normal/normal.fragment.js +20 -20
  101. package/normal/normal.vertex.d.ts +18 -18
  102. package/normal/normal.vertex.js +21 -21
  103. package/normal/normalMaterial.d.ts +36 -36
  104. package/normal/normalMaterial.js +336 -336
  105. package/package.json +2 -2
  106. package/shadowOnly/index.d.ts +1 -1
  107. package/shadowOnly/index.js +1 -1
  108. package/shadowOnly/shadowOnly.fragment.d.ts +16 -16
  109. package/shadowOnly/shadowOnly.fragment.js +19 -19
  110. package/shadowOnly/shadowOnly.vertex.d.ts +18 -18
  111. package/shadowOnly/shadowOnly.vertex.js +21 -21
  112. package/shadowOnly/shadowOnlyMaterial.d.ts +30 -30
  113. package/shadowOnly/shadowOnlyMaterial.js +254 -254
  114. package/simple/index.d.ts +1 -1
  115. package/simple/index.js +1 -1
  116. package/simple/simple.fragment.d.ts +17 -17
  117. package/simple/simple.fragment.js +20 -20
  118. package/simple/simple.vertex.d.ts +18 -18
  119. package/simple/simple.vertex.js +21 -21
  120. package/simple/simpleMaterial.d.ts +35 -35
  121. package/simple/simpleMaterial.js +295 -295
  122. package/sky/index.d.ts +1 -1
  123. package/sky/index.js +1 -1
  124. package/sky/sky.fragment.d.ts +10 -10
  125. package/sky/sky.fragment.js +13 -13
  126. package/sky/sky.vertex.d.ts +9 -9
  127. package/sky/sky.vertex.js +12 -12
  128. package/sky/skyMaterial.d.ts +146 -146
  129. package/sky/skyMaterial.js +359 -359
  130. package/terrain/index.d.ts +1 -1
  131. package/terrain/index.js +1 -1
  132. package/terrain/terrain.fragment.d.ts +17 -17
  133. package/terrain/terrain.fragment.js +20 -20
  134. package/terrain/terrain.vertex.d.ts +18 -18
  135. package/terrain/terrain.vertex.js +21 -21
  136. package/terrain/terrainMaterial.d.ts +50 -50
  137. package/terrain/terrainMaterial.js +426 -426
  138. package/triPlanar/index.d.ts +1 -1
  139. package/triPlanar/index.js +1 -1
  140. package/triPlanar/triPlanarMaterial.d.ts +49 -49
  141. package/triPlanar/triPlanarMaterial.js +403 -403
  142. package/triPlanar/triplanar.fragment.d.ts +17 -17
  143. package/triPlanar/triplanar.fragment.js +20 -20
  144. package/triPlanar/triplanar.vertex.d.ts +18 -18
  145. package/triPlanar/triplanar.vertex.js +21 -21
  146. package/water/index.d.ts +1 -1
  147. package/water/index.js +1 -1
  148. package/water/water.fragment.d.ts +19 -19
  149. package/water/water.fragment.js +22 -22
  150. package/water/water.vertex.d.ts +20 -20
  151. package/water/water.vertex.js +23 -23
  152. package/water/waterMaterial.d.ts +135 -135
  153. package/water/waterMaterial.js +736 -736
@@ -1,13 +1,13 @@
1
- // Do not edit.
2
- import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
3
- import "@babylonjs/core/Shaders/ShadersInclude/instancesDeclaration.js";
4
- import "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
5
- import "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
6
- import "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
7
- var name = "gridVertexShader";
8
- var shader = "precision highp float;\nattribute vec3 position;\nattribute vec3 normal;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#include<instancesDeclaration>\nuniform mat4 projection;\nuniform mat4 view;\nvarying vec3 vPosition;\nvarying vec3 vNormal;\n#include<fogVertexDeclaration>\n#ifdef OPACITY\nvarying vec2 vOpacityUV;\nuniform mat4 opacityMatrix;\nuniform vec2 vOpacityInfos;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\nvec4 worldPos=finalWorld*vec4(position,1.0);\n#include<fogVertex>\nvec4 cameraSpacePosition=view*worldPos;\ngl_Position=projection*cameraSpacePosition;\n#ifdef OPACITY\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\nif (vOpacityInfos.x==0.)\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\n}\n#endif \nvPosition=position;\nvNormal=normal;\n#define CUSTOM_VERTEX_MAIN_END\n}";
9
- // Sideeffect
10
- ShaderStore.ShadersStore[name] = shader;
11
- /** @hidden */
12
- export var gridVertexShader = { name: name, shader: shader };
1
+ // Do not edit.
2
+ import { ShaderStore } from "@babylonjs/core/Engines/shaderStore.js";
3
+ import "@babylonjs/core/Shaders/ShadersInclude/instancesDeclaration.js";
4
+ import "@babylonjs/core/Shaders/ShadersInclude/fogVertexDeclaration.js";
5
+ import "@babylonjs/core/Shaders/ShadersInclude/instancesVertex.js";
6
+ import "@babylonjs/core/Shaders/ShadersInclude/fogVertex.js";
7
+ var name = "gridVertexShader";
8
+ var shader = "precision highp float;\nattribute vec3 position;\nattribute vec3 normal;\n#ifdef UV1\nattribute vec2 uv;\n#endif\n#ifdef UV2\nattribute vec2 uv2;\n#endif\n#include<instancesDeclaration>\nuniform mat4 projection;\nuniform mat4 view;\nvarying vec3 vPosition;\nvarying vec3 vNormal;\n#include<fogVertexDeclaration>\n#ifdef OPACITY\nvarying vec2 vOpacityUV;\nuniform mat4 opacityMatrix;\nuniform vec2 vOpacityInfos;\n#endif\n#define CUSTOM_VERTEX_DEFINITIONS\nvoid main(void) {\n#define CUSTOM_VERTEX_MAIN_BEGIN\n#include<instancesVertex>\nvec4 worldPos=finalWorld*vec4(position,1.0);\n#include<fogVertex>\nvec4 cameraSpacePosition=view*worldPos;\ngl_Position=projection*cameraSpacePosition;\n#ifdef OPACITY\n#ifndef UV1\nvec2 uv=vec2(0.,0.);\n#endif\n#ifndef UV2\nvec2 uv2=vec2(0.,0.);\n#endif\nif (vOpacityInfos.x==0.)\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv,1.0,0.0));\n}\nelse\n{\nvOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0));\n}\n#endif \nvPosition=position;\nvNormal=normal;\n#define CUSTOM_VERTEX_MAIN_END\n}";
9
+ // Sideeffect
10
+ ShaderStore.ShadersStore[name] = shader;
11
+ /** @hidden */
12
+ export var gridVertexShader = { name: name, shader: shader };
13
13
  //# sourceMappingURL=grid.vertex.js.map
@@ -1,77 +1,77 @@
1
- import { Matrix, Vector3 } from "@babylonjs/core/Maths/math.vector.js";
2
- import { Color3 } from "@babylonjs/core/Maths/math.color.js";
3
- import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
4
- import { PushMaterial } from "@babylonjs/core/Materials/pushMaterial.js";
5
- import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
6
- import { SubMesh } from "@babylonjs/core/Meshes/subMesh.js";
7
- import { Mesh } from "@babylonjs/core/Meshes/mesh.js";
8
- import { Scene } from "@babylonjs/core/scene.js";
9
- import "./grid.fragment";
10
- import "./grid.vertex";
11
- /**
12
- * The grid materials allows you to wrap any shape with a grid.
13
- * Colors are customizable.
14
- */
15
- export declare class GridMaterial extends PushMaterial {
16
- /**
17
- * Main color of the grid (e.g. between lines)
18
- */
19
- mainColor: Color3;
20
- /**
21
- * Color of the grid lines.
22
- */
23
- lineColor: Color3;
24
- /**
25
- * The scale of the grid compared to unit.
26
- */
27
- gridRatio: number;
28
- /**
29
- * Allows setting an offset for the grid lines.
30
- */
31
- gridOffset: Vector3;
32
- /**
33
- * The frequency of thicker lines.
34
- */
35
- majorUnitFrequency: number;
36
- /**
37
- * The visibility of minor units in the grid.
38
- */
39
- minorUnitVisibility: number;
40
- /**
41
- * The grid opacity outside of the lines.
42
- */
43
- opacity: number;
44
- /**
45
- * Determine RBG output is premultiplied by alpha value.
46
- */
47
- preMultiplyAlpha: boolean;
48
- /**
49
- * Determines if the max line value will be used instead of the sum wherever grid lines intersect.
50
- */
51
- useMaxLine: boolean;
52
- private _opacityTexture;
53
- opacityTexture: BaseTexture;
54
- private _gridControl;
55
- /**
56
- * constructor
57
- * @param name The name given to the material in order to identify it afterwards.
58
- * @param scene The scene the material is used in.
59
- */
60
- constructor(name: string, scene?: Scene);
61
- /**
62
- * Returns whether or not the grid requires alpha blending.
63
- */
64
- needAlphaBlending(): boolean;
65
- needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
66
- isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
67
- bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
68
- /**
69
- * Dispose the material and its associated resources.
70
- * @param forceDisposeEffect will also dispose the used effect when true
71
- */
72
- dispose(forceDisposeEffect?: boolean): void;
73
- clone(name: string): GridMaterial;
74
- serialize(): any;
75
- getClassName(): string;
76
- static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
77
- }
1
+ import { Matrix, Vector3 } from "@babylonjs/core/Maths/math.vector.js";
2
+ import { Color3 } from "@babylonjs/core/Maths/math.color.js";
3
+ import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture.js";
4
+ import { PushMaterial } from "@babylonjs/core/Materials/pushMaterial.js";
5
+ import { AbstractMesh } from "@babylonjs/core/Meshes/abstractMesh.js";
6
+ import { SubMesh } from "@babylonjs/core/Meshes/subMesh.js";
7
+ import { Mesh } from "@babylonjs/core/Meshes/mesh.js";
8
+ import { Scene } from "@babylonjs/core/scene.js";
9
+ import "./grid.fragment";
10
+ import "./grid.vertex";
11
+ /**
12
+ * The grid materials allows you to wrap any shape with a grid.
13
+ * Colors are customizable.
14
+ */
15
+ export declare class GridMaterial extends PushMaterial {
16
+ /**
17
+ * Main color of the grid (e.g. between lines)
18
+ */
19
+ mainColor: Color3;
20
+ /**
21
+ * Color of the grid lines.
22
+ */
23
+ lineColor: Color3;
24
+ /**
25
+ * The scale of the grid compared to unit.
26
+ */
27
+ gridRatio: number;
28
+ /**
29
+ * Allows setting an offset for the grid lines.
30
+ */
31
+ gridOffset: Vector3;
32
+ /**
33
+ * The frequency of thicker lines.
34
+ */
35
+ majorUnitFrequency: number;
36
+ /**
37
+ * The visibility of minor units in the grid.
38
+ */
39
+ minorUnitVisibility: number;
40
+ /**
41
+ * The grid opacity outside of the lines.
42
+ */
43
+ opacity: number;
44
+ /**
45
+ * Determine RBG output is premultiplied by alpha value.
46
+ */
47
+ preMultiplyAlpha: boolean;
48
+ /**
49
+ * Determines if the max line value will be used instead of the sum wherever grid lines intersect.
50
+ */
51
+ useMaxLine: boolean;
52
+ private _opacityTexture;
53
+ opacityTexture: BaseTexture;
54
+ private _gridControl;
55
+ /**
56
+ * constructor
57
+ * @param name The name given to the material in order to identify it afterwards.
58
+ * @param scene The scene the material is used in.
59
+ */
60
+ constructor(name: string, scene?: Scene);
61
+ /**
62
+ * Returns whether or not the grid requires alpha blending.
63
+ */
64
+ needAlphaBlending(): boolean;
65
+ needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
66
+ isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
67
+ bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
68
+ /**
69
+ * Dispose the material and its associated resources.
70
+ * @param forceDisposeEffect will also dispose the used effect when true
71
+ */
72
+ dispose(forceDisposeEffect?: boolean): void;
73
+ clone(name: string): GridMaterial;
74
+ serialize(): any;
75
+ getClassName(): string;
76
+ static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
77
+ }