babylonjs-addons 9.4.0 → 9.5.0

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.
@@ -2714,6 +2714,7 @@ import { ShaderLanguage } from "babylonjs/Materials/shaderLanguage";
2714
2714
  import "babylonjs-addons/atmosphere/ShadersWGSL/ShadersInclude/atmosphereFunctions";
2715
2715
  import "babylonjs-addons/atmosphere/ShadersWGSL/ShadersInclude/atmosphereUboDeclaration";
2716
2716
  class AtmospherePBRMaterialDefines extends MaterialDefines {
2717
+ USE_CUSTOM_REFLECTION: boolean;
2717
2718
  USE_AERIAL_PERSPECTIVE_LUT: boolean;
2718
2719
  APPLY_AERIAL_PERSPECTIVE_INTENSITY: boolean;
2719
2720
  APPLY_AERIAL_PERSPECTIVE_RADIANCE_BIAS: boolean;
@@ -6103,6 +6104,7 @@ declare namespace ADDONS {
6103
6104
 
6104
6105
 
6105
6106
  class AtmospherePBRMaterialDefines extends BABYLON.MaterialDefines {
6107
+ USE_CUSTOM_REFLECTION: boolean;
6106
6108
  USE_AERIAL_PERSPECTIVE_LUT: boolean;
6107
6109
  APPLY_AERIAL_PERSPECTIVE_INTENSITY: boolean;
6108
6110
  APPLY_AERIAL_PERSPECTIVE_RADIANCE_BIAS: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-addons",
3
- "version": "9.4.0",
3
+ "version": "9.5.0",
4
4
  "main": "babylonjs.addons.min.js",
5
5
  "types": "babylonjs.addons.module.d.ts",
6
6
  "files": [
@@ -8,24 +8,19 @@
8
8
  ],
9
9
  "scripts": {
10
10
  "build": "npm run clean && npm run build:prod && npm run build:declaration",
11
- "build:dev": "webpack --env development",
12
- "build:prod": "webpack --env production",
11
+ "build:dev": "rollup -c rollup.config.umd.mjs",
12
+ "build:prod": "rollup -c rollup.config.umd.mjs --environment ROLLUP_MODE:production",
13
13
  "build:declaration": "build-tools -c pud --config ./config.json",
14
14
  "clean": "rimraf dist && rimraf babylon*.* -g",
15
15
  "test:escheck": "es-check es6 ./babylonjs.addons.js"
16
16
  },
17
17
  "dependencies": {
18
- "babylonjs": "9.4.0"
18
+ "babylonjs": "9.5.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@dev/addons": "1.0.0",
22
22
  "@dev/build-tools": "1.0.0",
23
- "@dev/core": "1.0.0",
24
- "source-map-loader": "^4.0.0",
25
- "ts-loader": "^9.2.6",
26
- "webpack": "^5.103.0",
27
- "webpack-cli": "6.0.1",
28
- "webpack-merge": "^5.8.0"
23
+ "@dev/core": "1.0.0"
29
24
  },
30
25
  "keywords": [
31
26
  "3D",
@@ -0,0 +1,18 @@
1
+ import { commonUMDRollupConfiguration } from "../../rollupUMDHelper.mjs";
2
+ import path from "path";
3
+
4
+ const mode = process.env.ROLLUP_MODE === "production" ? "production" : "development";
5
+
6
+ export default commonUMDRollupConfiguration({
7
+ mode,
8
+ devPackageName: "addons",
9
+ outputPath: path.resolve("."),
10
+ entryPoints: {
11
+ addons: "./src/index.ts",
12
+ },
13
+ alias: {
14
+ addons: path.resolve("../../../dev/addons/src"),
15
+ },
16
+ overrideFilename: (pathData) => `babylonjs.${pathData.chunk.name}${mode === "production" ? ".min" : ""}.js`,
17
+ minToMax: true,
18
+ });
package/src/index.ts CHANGED
@@ -1,4 +1,8 @@
1
- import * as addons from "addons/index";
2
-
3
- export { addons };
4
- export default addons;
1
+ // Export all named symbols directly so ADDONS.HtmlMesh etc. work.
2
+ // With Rollup UMD (unlike webpack's libraryExport:"default"), named exports must be
3
+ // explicitly re-exported for them to appear on the global namespace object.
4
+ //
5
+ // IMPORTANT: Do NOT also `import * as addons; export { addons }` here.
6
+ // When both patterns coexist, terser collapses all individual exports into the
7
+ // namespace object in the minified bundle, leaving ADDONS.X undefined at runtime.
8
+ export * from "addons/index";