babylonjs-editor 5.4.0 → 5.4.1-alpha.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.
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const os_1 = require("os");
4
- require("dotenv/config");
5
4
  const electron_updater_1 = require("electron-updater");
6
5
  const posix_1 = require("path/posix");
7
6
  const electron_1 = require("electron");
7
+ require("dotenv/config");
8
8
  const process_1 = require("./tools/process");
9
9
  const menu_1 = require("./editor/menu");
10
10
  const menu_2 = require("./dashboard/menu");
@@ -23,6 +23,7 @@ try {
23
23
  if (!electron_1.app.isPackaged) {
24
24
  process.env.DEBUG ??= "true";
25
25
  }
26
+ process.env.SKETCHFAB_CLIENT_ID ??= "XZVigLIpz1lqWCkAMRWWpZzKIEVaMEIcsBrgQWrD";
26
27
  if (process.env.DEBUG) {
27
28
  require("electron-reloader")(module);
28
29
  }
@@ -1,5 +1,6 @@
1
1
  import { IEditorInspectorFieldProps } from "./field";
2
2
  export interface IEditorInspectorSwitchFieldProps extends IEditorInspectorFieldProps {
3
+ disabled?: boolean;
3
4
  onChange?: (value: boolean) => void;
4
5
  }
5
6
  export declare function EditorInspectorSwitchField(props: IEditorInspectorSwitchFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { Component, PropsWithChildren, ReactNode } from "react";
2
- import { CubeTexture, Scene, Texture, ColorGradingTexture } from "babylonjs";
2
+ import { CubeTexture, Scene, Texture, ColorGradingTexture, HDRCubeTexture } from "babylonjs";
3
3
  export interface IEditorInspectorTextureFieldProps extends PropsWithChildren {
4
4
  title: string;
5
5
  property: string;
@@ -12,7 +12,7 @@ export interface IEditorInspectorTextureFieldProps extends PropsWithChildren {
12
12
  hideInvert?: boolean;
13
13
  noPopover?: boolean;
14
14
  scene?: Scene;
15
- onChange?: (texture: Texture | CubeTexture | ColorGradingTexture | null) => void;
15
+ onChange?: (texture: Texture | CubeTexture | ColorGradingTexture | HDRCubeTexture | null) => void;
16
16
  }
17
17
  export interface IEditorInspectorTextureFieldState {
18
18
  dragOver: boolean;
@@ -0,0 +1,7 @@
1
+ import { Light } from "babylonjs";
2
+ import { Editor } from "../../../../main";
3
+ export interface IEditorLightClusterInspectorProps {
4
+ light: Light;
5
+ editor: Editor;
6
+ }
7
+ export declare function EditorLightClusterInspector(props: IEditorLightClusterInspectorProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { Light } from "babylonjs";
2
+ export interface IEditorLightPBRInspectorProps {
3
+ object: Light;
4
+ }
5
+ export declare function EditorLightPBRInspector(props: IEditorLightPBRInspectorProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,11 @@
1
1
  import { Component, PropsWithChildren, ReactNode } from "react";
2
2
  import { IShadowGenerator, IShadowLight } from "babylonjs";
3
- import { IEditorInspectorListFieldItem } from "../fields/list";
3
+ import { Editor } from "../../../../main";
4
+ import { IEditorInspectorListFieldItem } from "../../fields/list";
4
5
  export interface IEditorLightShadowsInspectorProps extends PropsWithChildren {
6
+ editor: Editor;
5
7
  light: IShadowLight;
8
+ onShadowGeneratorChanged: () => void;
6
9
  }
7
10
  export interface IEditorLightShadowsInspectorState {
8
11
  generator: IShadowGenerator | null;
@@ -1,6 +1,8 @@
1
1
  import { Component, ReactNode } from "react";
2
2
  import { Material, MultiMaterial } from "babylonjs";
3
+ import { Editor } from "../../../main";
3
4
  export interface IEditorPBRMaterialInspectorProps {
5
+ editor: Editor;
4
6
  material: MultiMaterial;
5
7
  }
6
8
  export interface IEditorMultiMaterialInspectorState {
@@ -4,7 +4,11 @@ export interface IEditorPBRMaterialInspectorProps {
4
4
  mesh?: AbstractMesh;
5
5
  material: PBRMaterial;
6
6
  }
7
- export declare class EditorPBRMaterialInspector extends Component<IEditorPBRMaterialInspectorProps> {
7
+ export interface IEditorPBRMaterialInspectorState {
8
+ subSurfaceEnabled: boolean;
9
+ }
10
+ export declare class EditorPBRMaterialInspector extends Component<IEditorPBRMaterialInspectorProps, IEditorPBRMaterialInspectorState> {
8
11
  constructor(props: IEditorPBRMaterialInspectorProps);
9
12
  render(): ReactNode;
13
+ private _handleSubSurfaceEnabledChange;
10
14
  }
@@ -1,5 +1,7 @@
1
1
  import { IMarketplaceAsset } from "../../../tools/marketplaces/types";
2
+ import { Editor } from "../../main";
2
3
  export interface IMarketplaceSidebarProps {
4
+ editor: Editor;
3
5
  asset?: IMarketplaceAsset;
4
6
  detailsLoading: boolean;
5
7
  selectedQuality?: string;
@@ -31,6 +31,7 @@ export declare class EditorMarketplaceBrowser extends Component<IMarketplaceBrow
31
31
  private _handlePreviousPage;
32
32
  private _handleNextPage;
33
33
  private _handleAssetClicked;
34
+ setSearchQuery(query: string): void;
34
35
  private _handleSearch;
35
36
  private _getDefaultFilters;
36
37
  }
@@ -1,9 +1,10 @@
1
- import { CubeTexture, ISceneLoaderAsyncResult, Material, Node, Scene, Texture, ColorGradingTexture, Sprite, IParticleSystem } from "babylonjs";
1
+ import { CubeTexture, ISceneLoaderAsyncResult, Material, Node, Scene, Texture, ColorGradingTexture, Sprite, IParticleSystem, HDRCubeTexture } from "babylonjs";
2
2
  export declare function tryConvertSceneFile(absolutePath: string, progress?: (percent: number) => void): Promise<string>;
3
3
  export declare function loadImportedSceneFile(scene: Scene, absolutePath: string): Promise<ISceneLoaderAsyncResult | null>;
4
4
  export declare function configureImportedNodeIds(node: Node | Sprite | IParticleSystem): void;
5
5
  export declare function configureImportedMaterial(material: Material): void;
6
- export declare function configureImportedTexture<T extends Texture | CubeTexture | ColorGradingTexture>(texture: T, noCheckInvertY?: boolean): T;
7
- export declare function configureEmbeddedTexture(texture: Texture, absolutePath: string): Promise<unknown>;
6
+ export declare function configureImportedTexture<T extends Texture | CubeTexture | ColorGradingTexture | HDRCubeTexture>(texture: T, noCheckInvertY?: boolean): T;
7
+ export declare function configureEmbeddedTexture(texture: Texture, absolutePath: string): Promise<boolean | void>;
8
+ export declare function cleanTexture(texture: Texture, filename: string): void;
8
9
  export declare function loadImportedMaterial(scene: Scene, absolutePath: string): Promise<Material | null>;
9
10
  export declare function cleanImportedGltf(result: ISceneLoaderAsyncResult): void;
@@ -1,5 +1,5 @@
1
1
  import { Component, ReactNode } from "react";
2
- import { AbstractEngine, Camera, ISceneLoaderAsyncResult, Scene } from "babylonjs";
2
+ import { AbstractEngine, Camera, ISceneLoaderAsyncResult, Scene, PickingInfo, SelectionOutlineLayer, ClusteredLightContainer } from "babylonjs";
3
3
  import { Editor } from "../main";
4
4
  import { EditorCamera } from "../nodes/camera";
5
5
  import { EditorPreviewGizmo } from "./preview/gizmo";
@@ -71,6 +71,18 @@ export declare class EditorPreview extends Component<IEditorPreviewProps, IEdito
71
71
  * Defines the reference to the canvas drawn in the preview.
72
72
  */
73
73
  canvas: HTMLCanvasElement | null;
74
+ /**
75
+ * Defines the reference to the last picking info processed in the preview.
76
+ */
77
+ lastPickingInfo: PickingInfo | null;
78
+ /**
79
+ * Defines the reference to the selection outline layer used to highlight a mesh when, for example, the pointer is over it.
80
+ */
81
+ selectionOutlineLayer: SelectionOutlineLayer;
82
+ /**
83
+ * Defines the reference to the clustered lighting container.
84
+ */
85
+ clusteredLightContainer: ClusteredLightContainer;
74
86
  private _renderScene;
75
87
  private _mouseDownPosition;
76
88
  private _objectUnderPointer;
@@ -7,6 +7,7 @@ import { EditorConsole } from "./layout/console";
7
7
  import { EditorInspector } from "./layout/inspector";
8
8
  import { EditorAnimation } from "./layout/animation";
9
9
  import { EditorAssetsBrowser } from "./layout/assets-browser";
10
+ import { EditorMarketplaceBrowser } from "./layout/marketplace";
10
11
  export interface IEditorLayoutProps {
11
12
  /**
12
13
  * The editor reference.
@@ -45,6 +46,10 @@ export declare class EditorLayout extends Component<IEditorLayoutProps> {
45
46
  * The animation editor of the editor.
46
47
  */
47
48
  animations: EditorAnimation;
49
+ /**
50
+ * The marketplace browser of the editor.
51
+ */
52
+ marketplace: EditorMarketplaceBrowser | null;
48
53
  /**
49
54
  * Observable for when the layout has changed.
50
55
  */
@@ -1,4 +1,4 @@
1
1
  export declare function setupEditorMenu(options: {
2
2
  enableExperimentalFeatures: boolean;
3
- openedTabs: string[];
3
+ openedTabs?: string[];
4
4
  }): void;
@@ -0,0 +1,2 @@
1
+ import { ClusteredLightContainer } from "babylonjs";
2
+ export declare function configureClusteredLights(data: any, clusteredLightContainer: ClusteredLightContainer): void;
@@ -1,4 +1,4 @@
1
- import { Bone, Camera, GroundMesh, Light, Mesh, Node, PointLight, TransformNode, DirectionalLight, InstancedMesh, FreeCamera, ArcRotateCamera, SpotLight, HemisphericLight, Skeleton } from "babylonjs";
1
+ import { Bone, Camera, GroundMesh, Light, Mesh, Node, PointLight, TransformNode, DirectionalLight, InstancedMesh, FreeCamera, ArcRotateCamera, SpotLight, HemisphericLight, Skeleton, ClusteredLightContainer } from "babylonjs";
2
2
  import { EditorCamera } from "../../editor/nodes/camera";
3
3
  import { CollisionMesh } from "../../editor/nodes/collision";
4
4
  /**
@@ -96,6 +96,11 @@ export declare function isHemisphericLight(object: any): object is HemisphericLi
96
96
  * @param object defines the reference to the object to test its class name.
97
97
  */
98
98
  export declare function isLight(object: any): object is Light;
99
+ /**
100
+ * Returns wether or not the given object is a ClusteredLightContainer.
101
+ * @param object defines the reference to the object to test its class name.
102
+ */
103
+ export declare function isClusteredLightContainer(object: any): object is ClusteredLightContainer;
99
104
  /**
100
105
  * Returns wether or not the given object is a Node.
101
106
  * @param object defines the reference to the object to test its class name.
@@ -1,5 +1,5 @@
1
1
  import { AdvancedDynamicTexture } from "babylonjs-gui";
2
- import { CubeTexture, Texture, ColorGradingTexture } from "babylonjs";
2
+ import { CubeTexture, Texture, ColorGradingTexture, HDRCubeTexture } from "babylonjs";
3
3
  /**
4
4
  * Returns wether or not the given object is a Texture.
5
5
  * @param object defines the reference to the object to test its class name.
@@ -10,6 +10,11 @@ export declare function isTexture(object: any): object is Texture;
10
10
  * @param object defines the reference to the object to test its class name.
11
11
  */
12
12
  export declare function isCubeTexture(object: any): object is CubeTexture;
13
+ /**
14
+ * Returns wether or not the given object is a HDRCubeTexture.
15
+ * @param object defines the reference to the object to test its class name.
16
+ */
17
+ export declare function isHDRCubeTexture(object: any): object is HDRCubeTexture;
13
18
  /**
14
19
  * Returns wether or not the given object is a AdvancedDynamicTexture.
15
20
  * @param object defines the reference to the object to test its class name.
@@ -0,0 +1,3 @@
1
+ import { Light } from "babylonjs";
2
+ import { Editor } from "../../editor/main";
3
+ export declare function isClusteredLight(light: Light, editor: Editor): boolean;
@@ -1,8 +1,8 @@
1
1
  import { ISketchfabSettings } from "../sketchfab";
2
2
  interface ISketchfabProviderSettingsProps {
3
- onSettingChanged: (key: string, value: string) => void;
4
3
  settings: ISketchfabSettings;
5
4
  handleOAuthLogin: () => void;
5
+ onSettingChanged: (key: string, value: string) => void;
6
6
  }
7
- export declare const SketchfabProviderSettings: ({ onSettingChanged, handleOAuthLogin, settings }: ISketchfabProviderSettingsProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare function SketchfabProviderSettings(props: ISketchfabProviderSettingsProps): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -19,7 +19,5 @@ export declare class SketchfabProvider extends MarketplaceProvider {
19
19
  protected getFilesToDownload(asset: IMarketplaceAsset, selectedQuality: string, selectedType: string): IFileToDownload[];
20
20
  isAuthenticated(): boolean;
21
21
  login(): void;
22
- private _handleOAuthLogin;
23
22
  private _createOAuthState;
24
- private _resolveOAuthCallbackUrl;
25
23
  }
@@ -12,6 +12,10 @@ export declare class NodePtyInstance {
12
12
  * The id of the node-pty instance.
13
13
  */
14
14
  readonly id: string;
15
+ /**
16
+ * An observable that is triggered when the pty process is killed.
17
+ */
18
+ onKillObservable: Observable<void>;
15
19
  /**
16
20
  * An observable that is triggered when data is received from the pty.
17
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-editor",
3
- "version": "5.4.0",
3
+ "version": "5.4.1-alpha.0",
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",
@@ -109,6 +109,7 @@
109
109
  "motion": "12.23.24",
110
110
  "next-themes": "^0.3.0",
111
111
  "node-pty": "1.2.0-beta.12",
112
+ "node-stream-zip": "1.15.0",
112
113
  "pngjs": "7.0.0",
113
114
  "react": "18.2.0",
114
115
  "react-awesome-reveal": "4.2.14",
@@ -119,6 +120,7 @@
119
120
  "react-selectable": "^2.1.1",
120
121
  "sharp": "0.34.3",
121
122
  "sonner": "^1.4.41",
123
+ "strip-ansi": "7.2.0",
122
124
  "tailwind-merge": "^2.2.1",
123
125
  "tailwindcss-animate": "^1.0.7",
124
126
  "usehooks-ts": "^3.1.0",