babylonjs-editor 5.5.1-alpha.2 → 5.5.1-alpha.3

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.
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fs_extra_1 = require("fs-extra");
3
4
  const os_1 = require("os");
4
5
  const electron_updater_1 = require("electron-updater");
5
6
  const posix_1 = require("path/posix");
@@ -138,7 +139,10 @@ async function openProject(filePath) {
138
139
  openedProjects.push(filePath);
139
140
  notifyWindows("dashboard:opened-projects", openedProjects);
140
141
  (0, menu_1.setupEditorMenu)(menuOptions);
141
- const window = await (0, window_2.createEditorWindow)();
142
+ const projectConfiguration = await (0, fs_extra_1.readJSON)(filePath, {
143
+ encoding: "utf-8",
144
+ });
145
+ const window = await (0, window_2.createEditorWindow)(projectConfiguration.isWebGPU ?? false);
142
146
  window.setTitle((0, posix_1.basename)((0, posix_1.dirname)(filePath)));
143
147
  window.on("focus", () => (0, menu_1.setupEditorMenu)(menuOptions));
144
148
  window.once("closed", () => {
@@ -1,10 +1,7 @@
1
- import { Camera } from "babylonjs";
2
1
  import { Editor } from "../main";
3
2
  import { VolumetricLightingRenderingPipeline } from "babylonjs-editor-tools";
4
- /**
5
- * Defines the configuration of the volumetric lighting rendering pipeline per camera.
6
- */
7
- export declare const volumetricLightingRenderingPipelineCameraConfigurations: Map<Camera, any>;
3
+ export declare function getVolumetricLightingRenderingPipelineConfiguration(): any;
4
+ export declare function setVolumetricLightingRenderingPipelineConfiguration(config: any): void;
8
5
  export declare function getVolumetricLightingRenderingPipeline(): VolumetricLightingRenderingPipeline | null;
9
6
  /**
10
7
  * Returns wether or not the volumetric lighting rendering pipeline is supported by the engine used by the editor.
@@ -7,7 +7,7 @@ export declare const editorWindows: BrowserWindow[];
7
7
  * Creates a new window that takes up the entire screen.
8
8
  * @returns The newly created window.
9
9
  */
10
- export declare function createEditorWindow(): Promise<BrowserWindow>;
10
+ export declare function createEditorWindow(isWebGPU: boolean): Promise<BrowserWindow>;
11
11
  /**
12
12
  * Opens a new custom window that will require the given index.js file and will instantiate the content of it using the given options.
13
13
  * @param indexPath defines the path to the index.js file to require for the window (entry point). The path is relative to the app path.
@@ -33,8 +33,8 @@ export * from "./tools/light/shadows";
33
33
  export * from "./tools/node/metadata";
34
34
  export * from "./tools/material/material";
35
35
  export * from "./tools/material/extract";
36
+ export * from "./tools/material/material";
36
37
  export * from "./tools/mesh/collision";
37
- export * from "./tools/scene/materials";
38
38
  export * from "./tools/guards/material";
39
39
  export * from "./tools/guards/math";
40
40
  export * from "./tools/guards/nodes";
@@ -44,6 +44,10 @@ export interface IEditorProject {
44
44
  * Gizmo snap preferences (translate / rotate / scale).
45
45
  */
46
46
  gizmoSnap?: IGizmoSnapPreferences;
47
+ /**
48
+ * Defines wether or not the project is using WebGPU in order to start the editor in WebGPU mode.
49
+ */
50
+ isWebGPU?: boolean;
47
51
  }
48
52
  export interface IEditorProjectPlugin {
49
53
  /**
@@ -1,9 +1,15 @@
1
- import { Material, NodeMaterial } from "babylonjs";
1
+ import { Material, NodeMaterial, Scene } from "babylonjs";
2
2
  /**
3
3
  * Configures the given material to receive up to 32 lights simultaneously.
4
4
  * @param material defines the reference to the material to configure.
5
5
  */
6
6
  export declare function configureSimultaneousLightsForMaterial(material: Material): void;
7
+ /**
8
+ * Force compile all materials of the given scene.
9
+ * This is useful to ensure that all materials are compiled and ready to use to avoid lag in the editor.
10
+ * @param scene The scene to force compile all materials
11
+ */
12
+ export declare function forceCompileAllSceneMaterials(scene: Scene): Promise<void[]>;
7
13
  /**
8
14
  * Normalizes the unique IDs of the nodes in the given Node Material based on the provided material data.
9
15
  * This allows to get ids not modified after reloading the material to be git-compliant.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-editor",
3
- "version": "5.5.1-alpha.2",
3
+ "version": "5.5.1-alpha.3",
4
4
  "description": "Babylon.js Editor is a Web Application helping artists to work with Babylon.js",
5
5
  "productName": "Babylon.js Editor",
6
6
  "main": "build/src/index.js",
@@ -41,10 +41,10 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@adobe/spz": "0.2.2",
44
- "@babylonjs/addons": "9.12.1",
45
- "@babylonjs/core": "9.12.1",
46
- "@babylonjs/havok": "1.3.12",
47
- "@babylonjs/ktx2decoder": "9.12.1",
44
+ "@babylonjs/addons": "9.27.1",
45
+ "@babylonjs/core": "9.27.1",
46
+ "@babylonjs/havok": "1.3.14",
47
+ "@babylonjs/ktx2decoder": "9.27.1",
48
48
  "@blueprintjs/core": "^5.10.0",
49
49
  "@blueprintjs/select": "^5.1.2",
50
50
  "@emotion/react": "^11.13.3",
@@ -78,19 +78,19 @@
78
78
  "@xterm/xterm": "6.1.0-beta.22",
79
79
  "assimpjs": "0.0.10",
80
80
  "axios": "1.18.0",
81
- "babylonjs": "9.12.1",
82
- "babylonjs-addons": "9.12.1",
81
+ "babylonjs": "9.27.1",
82
+ "babylonjs-addons": "9.27.1",
83
83
  "babylonjs-editor-cli": "latest",
84
84
  "babylonjs-editor-tools": "latest",
85
- "babylonjs-gui": "9.12.1",
86
- "babylonjs-gui-editor": "9.12.1",
87
- "babylonjs-ktx2decoder": "9.12.1",
88
- "babylonjs-loaders": "9.12.1",
89
- "babylonjs-materials": "9.12.1",
90
- "babylonjs-node-editor": "9.12.1",
91
- "babylonjs-node-particle-editor": "9.12.1",
92
- "babylonjs-post-process": "9.12.1",
93
- "babylonjs-procedural-textures": "9.12.1",
85
+ "babylonjs-gui": "9.27.1",
86
+ "babylonjs-gui-editor": "9.27.1",
87
+ "babylonjs-ktx2decoder": "9.27.1",
88
+ "babylonjs-loaders": "9.27.1",
89
+ "babylonjs-materials": "9.27.1",
90
+ "babylonjs-node-editor": "9.27.1",
91
+ "babylonjs-node-particle-editor": "9.27.1",
92
+ "babylonjs-post-process": "9.27.1",
93
+ "babylonjs-procedural-textures": "9.27.1",
94
94
  "chokidar": "^4.0.3",
95
95
  "class-variance-authority": "^0.7.0",
96
96
  "clsx": "^2.1.0",
@@ -1,7 +0,0 @@
1
- import { Scene } from "babylonjs";
2
- /**
3
- * Force compile all materials of the given scene.
4
- * This is useful to ensure that all materials are compiled and ready to use to avoid lag in the editor.
5
- * @param scene The scene to force compile all materials
6
- */
7
- export declare function forceCompileAllSceneMaterials(scene: Scene): Promise<void[]>;