babylonjs-materials 9.0.0 → 9.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babylon.cellMaterial.js +1 -1
- package/babylon.cellMaterial.min.js +1 -1
- package/babylon.cellMaterial.min.js.map +1 -1
- package/babylon.customMaterial.js +1 -1
- package/babylon.customMaterial.min.js +1 -1
- package/babylon.customMaterial.min.js.map +1 -1
- package/babylon.fireMaterial.js +1 -1
- package/babylon.fireMaterial.min.js +1 -1
- package/babylon.fireMaterial.min.js.map +1 -1
- package/babylon.furMaterial.js +1 -1
- package/babylon.furMaterial.min.js +1 -1
- package/babylon.furMaterial.min.js.map +1 -1
- package/babylon.gradientMaterial.js +1 -1
- package/babylon.gradientMaterial.min.js +1 -1
- package/babylon.gradientMaterial.min.js.map +1 -1
- package/babylon.gridMaterial.js +1 -1
- package/babylon.gridMaterial.min.js +1 -1
- package/babylon.gridMaterial.min.js.map +1 -1
- package/babylon.lavaMaterial.js +1 -1
- package/babylon.lavaMaterial.min.js +1 -1
- package/babylon.lavaMaterial.min.js.map +1 -1
- package/babylon.mixMaterial.js +1 -1
- package/babylon.mixMaterial.min.js +1 -1
- package/babylon.mixMaterial.min.js.map +1 -1
- package/babylon.normalMaterial.js +1 -1
- package/babylon.normalMaterial.min.js +1 -1
- package/babylon.normalMaterial.min.js.map +1 -1
- package/babylon.shadowOnlyMaterial.js +1 -1
- package/babylon.shadowOnlyMaterial.min.js +1 -1
- package/babylon.shadowOnlyMaterial.min.js.map +1 -1
- package/babylon.simpleMaterial.js +1 -1
- package/babylon.simpleMaterial.min.js +1 -1
- package/babylon.simpleMaterial.min.js.map +1 -1
- package/babylon.skyMaterial.js +1 -1
- package/babylon.skyMaterial.min.js +1 -1
- package/babylon.skyMaterial.min.js.map +1 -1
- package/babylon.terrainMaterial.js +1 -1
- package/babylon.terrainMaterial.min.js +1 -1
- package/babylon.terrainMaterial.min.js.map +1 -1
- package/babylon.triPlanarMaterial.js +1 -1
- package/babylon.triPlanarMaterial.min.js +1 -1
- package/babylon.triPlanarMaterial.min.js.map +1 -1
- package/babylon.waterMaterial.js +1 -1
- package/babylon.waterMaterial.min.js +1 -1
- package/babylon.waterMaterial.min.js.map +1 -1
- package/babylonjs.materials.d.ts +31 -31
- package/babylonjs.materials.js +1 -1
- package/babylonjs.materials.min.js +1 -1
- package/babylonjs.materials.min.js.map +1 -1
- package/babylonjs.materials.module.d.ts +98 -101
- package/config.json +1 -1
- package/package.json +3 -3
- package/readme.md +19 -29
- package/src/cell.ts +1 -1
- package/src/custom.ts +1 -1
- package/src/fire.ts +1 -1
- package/src/fur.ts +1 -1
- package/src/gradient.ts +1 -1
- package/src/grid.ts +1 -1
- package/src/index.ts +1 -1
- package/src/lava.ts +1 -1
- package/src/mix.ts +1 -1
- package/src/normal.ts +1 -1
- package/src/shadowOnly.ts +1 -1
- package/src/simple.ts +1 -1
- package/src/sky.ts +1 -1
- package/src/terrain.ts +1 -1
- package/src/triPlanar.ts +1 -1
- package/src/water.ts +1 -1
- package/tsconfig.build.json +4 -3
- package/tsconfig.json +2 -2
- package/webpack.config.js +35 -36
|
@@ -421,8 +421,7 @@ export * from "babylonjs-materials/terrain/terrainMaterial";
|
|
|
421
421
|
}
|
|
422
422
|
declare module "babylonjs-materials/sky/skyMaterial" {
|
|
423
423
|
import { Nullable } from "babylonjs/types";
|
|
424
|
-
import { Matrix } from "babylonjs/Maths/math.vector";
|
|
425
|
-
import { Vector3 } from "babylonjs/Maths/math.vector";
|
|
424
|
+
import { Matrix, Vector3 } from "babylonjs/Maths/math.vector";
|
|
426
425
|
import { IAnimatable } from "babylonjs/Animations/animatable.interface";
|
|
427
426
|
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
428
427
|
import { PushMaterial } from "babylonjs/Materials/pushMaterial";
|
|
@@ -985,6 +984,70 @@ export const mixPixelShader: {
|
|
|
985
984
|
declare module "babylonjs-materials/mix/index" {
|
|
986
985
|
export * from "babylonjs-materials/mix/mixMaterial";
|
|
987
986
|
|
|
987
|
+
}
|
|
988
|
+
declare module "babylonjs-materials/legacy/legacy" {
|
|
989
|
+
export * from "babylonjs-materials/index";
|
|
990
|
+
|
|
991
|
+
}
|
|
992
|
+
declare module "babylonjs-materials/legacy/legacy-water" {
|
|
993
|
+
export * from "babylonjs-materials/water/index";
|
|
994
|
+
|
|
995
|
+
}
|
|
996
|
+
declare module "babylonjs-materials/legacy/legacy-triPlanar" {
|
|
997
|
+
export * from "babylonjs-materials/triPlanar/index";
|
|
998
|
+
|
|
999
|
+
}
|
|
1000
|
+
declare module "babylonjs-materials/legacy/legacy-terrain" {
|
|
1001
|
+
export * from "babylonjs-materials/terrain/index";
|
|
1002
|
+
|
|
1003
|
+
}
|
|
1004
|
+
declare module "babylonjs-materials/legacy/legacy-sky" {
|
|
1005
|
+
export * from "babylonjs-materials/sky/index";
|
|
1006
|
+
|
|
1007
|
+
}
|
|
1008
|
+
declare module "babylonjs-materials/legacy/legacy-simple" {
|
|
1009
|
+
export * from "babylonjs-materials/simple/index";
|
|
1010
|
+
|
|
1011
|
+
}
|
|
1012
|
+
declare module "babylonjs-materials/legacy/legacy-shadowOnly" {
|
|
1013
|
+
export * from "babylonjs-materials/shadowOnly/index";
|
|
1014
|
+
|
|
1015
|
+
}
|
|
1016
|
+
declare module "babylonjs-materials/legacy/legacy-normal" {
|
|
1017
|
+
export * from "babylonjs-materials/normal/index";
|
|
1018
|
+
|
|
1019
|
+
}
|
|
1020
|
+
declare module "babylonjs-materials/legacy/legacy-mix" {
|
|
1021
|
+
export * from "babylonjs-materials/mix/index";
|
|
1022
|
+
|
|
1023
|
+
}
|
|
1024
|
+
declare module "babylonjs-materials/legacy/legacy-lava" {
|
|
1025
|
+
export * from "babylonjs-materials/lava/index";
|
|
1026
|
+
|
|
1027
|
+
}
|
|
1028
|
+
declare module "babylonjs-materials/legacy/legacy-grid" {
|
|
1029
|
+
export * from "babylonjs-materials/grid/index";
|
|
1030
|
+
|
|
1031
|
+
}
|
|
1032
|
+
declare module "babylonjs-materials/legacy/legacy-gradient" {
|
|
1033
|
+
export * from "babylonjs-materials/gradient/index";
|
|
1034
|
+
|
|
1035
|
+
}
|
|
1036
|
+
declare module "babylonjs-materials/legacy/legacy-fur" {
|
|
1037
|
+
export * from "babylonjs-materials/fur/index";
|
|
1038
|
+
|
|
1039
|
+
}
|
|
1040
|
+
declare module "babylonjs-materials/legacy/legacy-fire" {
|
|
1041
|
+
export * from "babylonjs-materials/fire/index";
|
|
1042
|
+
|
|
1043
|
+
}
|
|
1044
|
+
declare module "babylonjs-materials/legacy/legacy-custom" {
|
|
1045
|
+
export * from "babylonjs-materials/custom/index";
|
|
1046
|
+
|
|
1047
|
+
}
|
|
1048
|
+
declare module "babylonjs-materials/legacy/legacy-cell" {
|
|
1049
|
+
export * from "babylonjs-materials/cell/index";
|
|
1050
|
+
|
|
988
1051
|
}
|
|
989
1052
|
declare module "babylonjs-materials/lava/lavaMaterial" {
|
|
990
1053
|
import { Nullable } from "babylonjs/types";
|
|
@@ -1089,8 +1152,7 @@ export * from "babylonjs-materials/grid/gridMaterial";
|
|
|
1089
1152
|
|
|
1090
1153
|
}
|
|
1091
1154
|
declare module "babylonjs-materials/grid/gridMaterial" {
|
|
1092
|
-
import { Matrix } from "babylonjs/Maths/math.vector";
|
|
1093
|
-
import { Vector3 } from "babylonjs/Maths/math.vector";
|
|
1155
|
+
import { Matrix, Vector3 } from "babylonjs/Maths/math.vector";
|
|
1094
1156
|
import { Color3 } from "babylonjs/Maths/math.color";
|
|
1095
1157
|
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
1096
1158
|
import { PushMaterial } from "babylonjs/Materials/pushMaterial";
|
|
@@ -1305,8 +1367,7 @@ export * from "babylonjs-materials/fur/furMaterial";
|
|
|
1305
1367
|
}
|
|
1306
1368
|
declare module "babylonjs-materials/fur/furMaterial" {
|
|
1307
1369
|
import { Nullable } from "babylonjs/types";
|
|
1308
|
-
import { Matrix } from "babylonjs/Maths/math.vector";
|
|
1309
|
-
import { Vector3 } from "babylonjs/Maths/math.vector";
|
|
1370
|
+
import { Matrix, Vector3 } from "babylonjs/Maths/math.vector";
|
|
1310
1371
|
import { Color3 } from "babylonjs/Maths/math.color";
|
|
1311
1372
|
import { IAnimatable } from "babylonjs/Animations/animatable.interface";
|
|
1312
1373
|
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
@@ -2170,70 +2231,6 @@ export const cellPixelShader: {
|
|
|
2170
2231
|
shader: string;
|
|
2171
2232
|
};
|
|
2172
2233
|
|
|
2173
|
-
}
|
|
2174
|
-
declare module "babylonjs-materials/legacy/legacy" {
|
|
2175
|
-
export * from "babylonjs-materials/index";
|
|
2176
|
-
|
|
2177
|
-
}
|
|
2178
|
-
declare module "babylonjs-materials/legacy/legacy-water" {
|
|
2179
|
-
export * from "babylonjs-materials/water/index";
|
|
2180
|
-
|
|
2181
|
-
}
|
|
2182
|
-
declare module "babylonjs-materials/legacy/legacy-triPlanar" {
|
|
2183
|
-
export * from "babylonjs-materials/triPlanar/index";
|
|
2184
|
-
|
|
2185
|
-
}
|
|
2186
|
-
declare module "babylonjs-materials/legacy/legacy-terrain" {
|
|
2187
|
-
export * from "babylonjs-materials/terrain/index";
|
|
2188
|
-
|
|
2189
|
-
}
|
|
2190
|
-
declare module "babylonjs-materials/legacy/legacy-sky" {
|
|
2191
|
-
export * from "babylonjs-materials/sky/index";
|
|
2192
|
-
|
|
2193
|
-
}
|
|
2194
|
-
declare module "babylonjs-materials/legacy/legacy-simple" {
|
|
2195
|
-
export * from "babylonjs-materials/simple/index";
|
|
2196
|
-
|
|
2197
|
-
}
|
|
2198
|
-
declare module "babylonjs-materials/legacy/legacy-shadowOnly" {
|
|
2199
|
-
export * from "babylonjs-materials/shadowOnly/index";
|
|
2200
|
-
|
|
2201
|
-
}
|
|
2202
|
-
declare module "babylonjs-materials/legacy/legacy-normal" {
|
|
2203
|
-
export * from "babylonjs-materials/normal/index";
|
|
2204
|
-
|
|
2205
|
-
}
|
|
2206
|
-
declare module "babylonjs-materials/legacy/legacy-mix" {
|
|
2207
|
-
export * from "babylonjs-materials/mix/index";
|
|
2208
|
-
|
|
2209
|
-
}
|
|
2210
|
-
declare module "babylonjs-materials/legacy/legacy-lava" {
|
|
2211
|
-
export * from "babylonjs-materials/lava/index";
|
|
2212
|
-
|
|
2213
|
-
}
|
|
2214
|
-
declare module "babylonjs-materials/legacy/legacy-grid" {
|
|
2215
|
-
export * from "babylonjs-materials/grid/index";
|
|
2216
|
-
|
|
2217
|
-
}
|
|
2218
|
-
declare module "babylonjs-materials/legacy/legacy-gradient" {
|
|
2219
|
-
export * from "babylonjs-materials/gradient/index";
|
|
2220
|
-
|
|
2221
|
-
}
|
|
2222
|
-
declare module "babylonjs-materials/legacy/legacy-fur" {
|
|
2223
|
-
export * from "babylonjs-materials/fur/index";
|
|
2224
|
-
|
|
2225
|
-
}
|
|
2226
|
-
declare module "babylonjs-materials/legacy/legacy-fire" {
|
|
2227
|
-
export * from "babylonjs-materials/fire/index";
|
|
2228
|
-
|
|
2229
|
-
}
|
|
2230
|
-
declare module "babylonjs-materials/legacy/legacy-custom" {
|
|
2231
|
-
export * from "babylonjs-materials/custom/index";
|
|
2232
|
-
|
|
2233
|
-
}
|
|
2234
|
-
declare module "babylonjs-materials/legacy/legacy-cell" {
|
|
2235
|
-
export * from "babylonjs-materials/cell/index";
|
|
2236
|
-
|
|
2237
2234
|
}
|
|
2238
2235
|
|
|
2239
2236
|
declare module "babylonjs-materials" {
|
|
@@ -2241,7 +2238,7 @@ declare module "babylonjs-materials" {
|
|
|
2241
2238
|
}
|
|
2242
2239
|
|
|
2243
2240
|
|
|
2244
|
-
declare
|
|
2241
|
+
declare namespace BABYLON {
|
|
2245
2242
|
|
|
2246
2243
|
|
|
2247
2244
|
export class WaterMaterial extends PushMaterial {
|
|
@@ -2846,6 +2843,36 @@ declare module BABYLON {
|
|
|
2846
2843
|
|
|
2847
2844
|
|
|
2848
2845
|
|
|
2846
|
+
|
|
2847
|
+
|
|
2848
|
+
|
|
2849
|
+
|
|
2850
|
+
|
|
2851
|
+
|
|
2852
|
+
|
|
2853
|
+
|
|
2854
|
+
|
|
2855
|
+
|
|
2856
|
+
|
|
2857
|
+
|
|
2858
|
+
|
|
2859
|
+
|
|
2860
|
+
|
|
2861
|
+
|
|
2862
|
+
|
|
2863
|
+
|
|
2864
|
+
|
|
2865
|
+
|
|
2866
|
+
|
|
2867
|
+
|
|
2868
|
+
|
|
2869
|
+
|
|
2870
|
+
|
|
2871
|
+
|
|
2872
|
+
|
|
2873
|
+
|
|
2874
|
+
|
|
2875
|
+
|
|
2849
2876
|
export class LavaMaterial extends PushMaterial {
|
|
2850
2877
|
private _diffuseTexture;
|
|
2851
2878
|
diffuseTexture: BaseTexture;
|
|
@@ -3745,36 +3772,6 @@ declare module BABYLON {
|
|
|
3745
3772
|
|
|
3746
3773
|
|
|
3747
3774
|
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
3775
|
}
|
|
3779
3776
|
|
|
3780
3777
|
|
package/config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-materials",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.1",
|
|
4
4
|
"main": "babylonjs.materials.min.js",
|
|
5
5
|
"types": "babylonjs.materials.module.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"test:escheck": "es-check es6 ./babylonjs.materials.js"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"babylonjs": "9.
|
|
18
|
+
"babylonjs": "9.2.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@dev/build-tools": "1.0.0",
|
|
22
22
|
"@dev/core": "1.0.0",
|
|
23
|
-
"@
|
|
23
|
+
"@dev/materials": "^1.0.0",
|
|
24
24
|
"source-map-loader": "^4.0.0",
|
|
25
25
|
"ts-loader": "^9.2.6",
|
|
26
26
|
"webpack": "^5.103.0",
|
package/readme.md
CHANGED
|
@@ -1,53 +1,43 @@
|
|
|
1
|
-
Babylon.js Materials Library
|
|
2
|
-
=====================
|
|
1
|
+
# Babylon.js Materials Library
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
> We recommend using the [ES6 package `@babylonjs/materials`](https://www.npmjs.com/package/@babylonjs/materials) for new projects.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
For usage documentation please visit the [materials library documentation](https://doc.babylonjs.com/toolsAndResources/assetLibraries/materialsLibrary/).
|
|
7
6
|
|
|
8
|
-
##
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
### CDN
|
|
9
10
|
|
|
10
11
|
> ⚠️ WARNING: The CDN should not be used in production environments. The purpose of our CDN is to serve Babylon packages to users learning how to use the platform or running small experiments. Once you've built an application and are ready to share it with the world at large, you should serve all packages from your own CDN.
|
|
11
12
|
|
|
12
13
|
Compiled js files (minified and source) are offered on our public CDN here:
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
- https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.js
|
|
16
|
+
- https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.min.js
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
### NPM
|
|
18
19
|
|
|
19
|
-
To install using npm
|
|
20
|
+
To install using npm:
|
|
20
21
|
|
|
21
|
-
```
|
|
22
|
-
npm install
|
|
22
|
+
```bash
|
|
23
|
+
npm install babylonjs babylonjs-materials
|
|
23
24
|
```
|
|
24
25
|
|
|
25
26
|
If using TypeScript, the typing needs to be added to tsconfig.json:
|
|
26
27
|
|
|
27
|
-
```
|
|
28
|
-
....
|
|
28
|
+
```json
|
|
29
29
|
"types": [
|
|
30
30
|
"babylonjs",
|
|
31
|
-
"babylonjs-materials"
|
|
32
|
-
|
|
33
|
-
],
|
|
34
|
-
....
|
|
31
|
+
"babylonjs-materials"
|
|
32
|
+
]
|
|
35
33
|
```
|
|
36
34
|
|
|
37
35
|
Afterwards it can be imported to the project using:
|
|
38
36
|
|
|
39
|
-
```
|
|
40
|
-
import * as BABYLON from
|
|
41
|
-
import
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
This will extend Babylon's namespace with the materials available:
|
|
37
|
+
```javascript
|
|
38
|
+
import * as BABYLON from "babylonjs";
|
|
39
|
+
import "babylonjs-materials";
|
|
45
40
|
|
|
46
|
-
|
|
47
|
-
// Some awesome code
|
|
48
|
-
let skyMaterial = new BABYLON.SkyMaterial("skyMaterial", scene);
|
|
41
|
+
const skyMaterial = new BABYLON.SkyMaterial("skyMaterial", scene);
|
|
49
42
|
skyMaterial.backFaceCulling = false;
|
|
50
|
-
// Some more awesome code
|
|
51
43
|
```
|
|
52
|
-
|
|
53
|
-
Using webpack to package your project will use the minified js file.
|
package/src/cell.ts
CHANGED
package/src/custom.ts
CHANGED
package/src/fire.ts
CHANGED
package/src/fur.ts
CHANGED
package/src/gradient.ts
CHANGED
package/src/grid.ts
CHANGED
package/src/index.ts
CHANGED
package/src/lava.ts
CHANGED
package/src/mix.ts
CHANGED
package/src/normal.ts
CHANGED
package/src/shadowOnly.ts
CHANGED
package/src/simple.ts
CHANGED
package/src/sky.ts
CHANGED
package/src/terrain.ts
CHANGED
package/src/triPlanar.ts
CHANGED
package/src/water.ts
CHANGED
package/tsconfig.build.json
CHANGED
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
"compilerOptions": {
|
|
5
5
|
"outDir": "./dist",
|
|
6
6
|
"target": "ES5",
|
|
7
|
+
"ignoreDeprecations": "6.0",
|
|
7
8
|
"rootDir": "../../../",
|
|
8
9
|
"declaration": false,
|
|
9
10
|
"importHelpers": true,
|
|
10
11
|
"paths": {
|
|
11
|
-
"core/*": ["dev/core/dist/*"],
|
|
12
|
-
"materials/*": ["dev/materials/dist/*"],
|
|
13
|
-
"@lts/materials/*": ["lts/materials/dist/*"]
|
|
12
|
+
"core/*": ["../../../dev/core/dist/*"],
|
|
13
|
+
"materials/*": ["../../../dev/materials/dist/*"],
|
|
14
|
+
"@lts/materials/*": ["../../../lts/materials/dist/*"]
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
"include": ["./src/**/*", "../../../dev/materials/src/**/*", "../../../lts/materials/src/**/*"]
|
package/tsconfig.json
CHANGED
package/webpack.config.js
CHANGED
|
@@ -1,36 +1,35 @@
|
|
|
1
|
-
const commonConfigGenerator = require("@dev/build-tools").webpackTools.commonUMDWebpackConfiguration;
|
|
2
|
-
const path = require("path");
|
|
3
|
-
module.exports = (env) => {
|
|
4
|
-
const commonConfig = commonConfigGenerator({
|
|
5
|
-
mode: env.production ? "production" : "development",
|
|
6
|
-
devPackageName: "materials",
|
|
7
|
-
outputPath: path.resolve(__dirname),
|
|
8
|
-
entryPoints: {
|
|
9
|
-
materials: "./src/index.ts",
|
|
10
|
-
cell: "./src/cell.ts",
|
|
11
|
-
custom: "./src/custom.ts",
|
|
12
|
-
fire: "./src/fire.ts",
|
|
13
|
-
fur: "./src/fur.ts",
|
|
14
|
-
gradient: "./src/gradient.ts",
|
|
15
|
-
grid: "./src/grid.ts",
|
|
16
|
-
lava: "./src/lava.ts",
|
|
17
|
-
mix: "./src/mix.ts",
|
|
18
|
-
normal: "./src/normal.ts",
|
|
19
|
-
shadowOnly: "./src/shadowOnly.ts",
|
|
20
|
-
simple: "./src/simple.ts",
|
|
21
|
-
sky: "./src/sky.ts",
|
|
22
|
-
terrain: "./src/terrain.ts",
|
|
23
|
-
triPlanar: "./src/triPlanar.ts",
|
|
24
|
-
water: "./src/water.ts",
|
|
25
|
-
},
|
|
26
|
-
alias: {
|
|
27
|
-
materials: path.resolve(__dirname, "../../../dev/materials/src"),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
1
|
+
const commonConfigGenerator = require("@dev/build-tools").webpackTools.commonUMDWebpackConfiguration;
|
|
2
|
+
const path = require("path");
|
|
3
|
+
module.exports = (env) => {
|
|
4
|
+
const commonConfig = commonConfigGenerator({
|
|
5
|
+
mode: env.production ? "production" : "development",
|
|
6
|
+
devPackageName: "materials",
|
|
7
|
+
outputPath: path.resolve(__dirname),
|
|
8
|
+
entryPoints: {
|
|
9
|
+
materials: "./src/index.ts",
|
|
10
|
+
cell: "./src/cell.ts",
|
|
11
|
+
custom: "./src/custom.ts",
|
|
12
|
+
fire: "./src/fire.ts",
|
|
13
|
+
fur: "./src/fur.ts",
|
|
14
|
+
gradient: "./src/gradient.ts",
|
|
15
|
+
grid: "./src/grid.ts",
|
|
16
|
+
lava: "./src/lava.ts",
|
|
17
|
+
mix: "./src/mix.ts",
|
|
18
|
+
normal: "./src/normal.ts",
|
|
19
|
+
shadowOnly: "./src/shadowOnly.ts",
|
|
20
|
+
simple: "./src/simple.ts",
|
|
21
|
+
sky: "./src/sky.ts",
|
|
22
|
+
terrain: "./src/terrain.ts",
|
|
23
|
+
triPlanar: "./src/triPlanar.ts",
|
|
24
|
+
water: "./src/water.ts",
|
|
25
|
+
},
|
|
26
|
+
alias: {
|
|
27
|
+
materials: path.resolve(__dirname, "../../../dev/materials/src"),
|
|
28
|
+
},
|
|
29
|
+
overrideFilename: (pathData) => {
|
|
30
|
+
return pathData.chunk.name === "materials" ? `babylonjs.[name]${env.production ? ".min" : ""}.js` : `babylon.[name]Material${env.production ? ".min" : ""}.js`;
|
|
31
|
+
},
|
|
32
|
+
minToMax: true,
|
|
33
|
+
});
|
|
34
|
+
return commonConfig;
|
|
35
|
+
};
|