babylonjs-editor 4.3.0 → 4.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.
Files changed (2) hide show
  1. package/index.d.ts +446 -381
  2. package/package.json +10 -10
package/index.d.ts CHANGED
@@ -6,11 +6,9 @@
6
6
  // ../../babylonjs
7
7
  // ../../directory-tree
8
8
  // ../../adm-zip
9
- // ../../dat.gui
10
9
  // ../../@blueprintjs/select
11
10
  // renderer/editor/graph/node.d.ts
12
11
  // ../../xterm
13
- // ../../rc-tree/lib/interface
14
12
  // ../../node-pty
15
13
 
16
14
  declare module 'babylonjs-editor' {
@@ -30,7 +28,6 @@ declare module 'babylonjs-editor' {
30
28
  export { MaterialAssets } from "babylonjs-editor/renderer/editor/assets/materials";
31
29
  export { TextureAssets } from "babylonjs-editor/renderer/editor/assets/textures";
32
30
  export { Inspector, IInspectorProps, IInspectorState, IObjectInspector, IObjectInspectorProps } from "babylonjs-editor/renderer/editor/components/inspector";
33
- export { AbstractInspectorLegacy } from "babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector-legacy";
34
31
  export { AbstractInspector } from "babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector";
35
32
  export { MaterialInspector, IMaterialInspectorState } from "babylonjs-editor/renderer/editor/components/inspectors/materials/material-inspector";
36
33
  export { InspectorColor } from "babylonjs-editor/renderer/editor/gui/inspector/fields/color";
@@ -59,7 +56,6 @@ declare module 'babylonjs-editor' {
59
56
  export { Icon } from "babylonjs-editor/renderer/editor/gui/icon";
60
57
  export { SceneImporterTools, ISceneImporterToolsConfiguration } from "babylonjs-editor/renderer/editor/scene/import-tools";
61
58
  export { Packer, IPackerOptions, PackerStatus } from "babylonjs-editor/renderer/editor/project/packer/packer";
62
- import "./renderer/editor/gui/augmentations/index";
63
59
  }
64
60
 
65
61
  declare module 'babylonjs-editor/renderer/editor/plugins/assets' {
@@ -246,11 +242,12 @@ declare module 'babylonjs-editor/renderer/editor/editor' {
246
242
  import { IStringDictionary, Nullable, Undefinable } from "babylonjs-editor/shared/types";
247
243
  import { Toaster, Intent, IconName, MaybeElement } from "@blueprintjs/core";
248
244
  import { Layout, Rect } from "flexlayout-react";
249
- import { Engine, Scene, Observable, ISize, Node, BaseTexture, Material, SubMesh, IParticleSystem, Sound, KeyboardInfo, Skeleton } from "babylonjs";
245
+ import { Engine, Scene, Observable, ISize, Node, BaseTexture, Material, SubMesh, IParticleSystem, Sound, KeyboardInfo, Skeleton, ReflectionProbe } from "babylonjs";
250
246
  import { IObjectModified, IEditorPreferences, EditorPlayMode } from "babylonjs-editor/renderer/editor/tools/types";
251
247
  import { AbstractEditorPlugin } from "babylonjs-editor/renderer/editor/tools/plugin";
252
248
  import { SceneUtils } from "babylonjs-editor/renderer/editor/scene/utils";
253
249
  import { IPlugin } from "babylonjs-editor/renderer/editor/plugins/plugin";
250
+ import "./scene/register";
254
251
  import "./painting/material-mixer/material";
255
252
  import { Inspector } from "babylonjs-editor/renderer/editor/components/inspector";
256
253
  import { Graph } from "babylonjs-editor/renderer/editor/components/graph";
@@ -260,7 +257,6 @@ declare module 'babylonjs-editor/renderer/editor/editor' {
260
257
  import { MainToolbar } from "babylonjs-editor/renderer/editor/components/main-toolbar";
261
258
  import { ToolsToolbar } from "babylonjs-editor/renderer/editor/components/tools-toolbar";
262
259
  import { Console } from "babylonjs-editor/renderer/editor/components/console";
263
- import "./gui/augmentations/index";
264
260
  import "./components/inspectors/scene/scene-inspector";
265
261
  import "./components/inspectors/scene/rendering-inspector";
266
262
  import "./components/inspectors/scene/animation-groups-inspector";
@@ -280,19 +276,23 @@ declare module 'babylonjs-editor/renderer/editor/editor' {
280
276
  import "./components/inspectors/cameras/camera-inspector";
281
277
  import "./components/inspectors/cameras/free-camera-inspector";
282
278
  import "./components/inspectors/cameras/arc-rotate-camera-inspector";
279
+ import "./components/inspectors/cameras/target-camera-inspector";
283
280
  import "./components/inspectors/materials/standard-inspector";
284
281
  import "./components/inspectors/materials/pbr-inspector";
282
+ import "./components/inspectors/materials/pbr-metallic-rougness-inspector";
285
283
  import "./components/inspectors/materials/sky-inspector";
286
284
  import "./components/inspectors/materials/node-inspector";
287
285
  import "./components/inspectors/materials/cell-inspector";
288
286
  import "./components/inspectors/materials/fire-inspector";
289
287
  import "./components/inspectors/materials/lava-inspector";
290
288
  import "./components/inspectors/materials/water-inspector";
289
+ import "./components/inspectors/materials/gradient-inspector";
291
290
  import "./components/inspectors/materials/tri-planar-inspector";
292
291
  import "./components/inspectors/textures/texture-inspector";
293
292
  import "./components/inspectors/particle-systems/particle-system-inspector";
294
293
  import "./components/inspectors/particle-systems/particle-system-gradients-inspector";
295
294
  import "./components/inspectors/sound/sound-inspector";
295
+ import "./components/inspectors/textures/reflection-probe-inspector";
296
296
  export interface ILayoutTabNodeConfiguration {
297
297
  /**
298
298
  * Defines the name of the layout tab node.
@@ -392,6 +392,10 @@ declare module 'babylonjs-editor/renderer/editor/editor' {
392
392
  * Notifies observers that a particle system has been selected in the editor (preview or graph).
393
393
  */
394
394
  selectedParticleSystemObservable: Observable<IParticleSystem>;
395
+ /**
396
+ * Notifies observers that a reflection probe has been selected in the editor (preview or graph).
397
+ */
398
+ selectedReflectionProbeObservable: Observable<ReflectionProbe>;
395
399
  /**
396
400
  * Notifies observers that a texture has been selected in the editor (assets).
397
401
  */
@@ -615,21 +619,17 @@ declare module 'babylonjs-editor/renderer/editor/editor' {
615
619
  * @hidden
616
620
  */
617
621
  _applyPreferences(): Promise<void>;
622
+ /**
623
+ * @hidden
624
+ */
625
+ _applyPreferencesPlugins(): Promise<void>;
618
626
  }
619
627
  }
620
628
 
621
629
  declare module 'babylonjs-editor/renderer/editor/tools/tools' {
622
- import { Engine, Scene, Node, Nullable, Camera, Mesh, Material } from "babylonjs";
630
+ import { Engine, Scene, Node, Camera, Mesh, Material } from "babylonjs";
623
631
  import { ICommonMetadata, IEditorPreferences, IMaterialMetadata, IMeshMetadata, ITransformNodeMetadata } from "babylonjs-editor/renderer/editor/tools/types";
624
632
  export class Tools {
625
- /**
626
- * Initializes the tools.
627
- */
628
- static Init(): Promise<void>;
629
- /**
630
- * Returns the current root path of the app.
631
- */
632
- static GetAppPath(): string;
633
633
  /**
634
634
  * Normalizes the given path according to the current platform.
635
635
  * @param path defines the path to normalize according to the current platform.
@@ -757,22 +757,6 @@ declare module 'babylonjs-editor/renderer/editor/tools/tools' {
757
757
  * @param onProgress callback called while file is loading (if the server supports this mode).
758
758
  */
759
759
  static LoadFile<T = string | ArrayBuffer>(url: string, useArrayBuffer: boolean, onProgress?: (data: any) => void): Promise<T>;
760
- /**
761
- * Opens the save dialog and returns the selected path.
762
- * @param path optional path where to open the save dialog.
763
- */
764
- static ShowSaveDialog(path?: Nullable<string>): Promise<string>;
765
- /**
766
- * Opens the open-file dialog and returns the selected path.
767
- * @param path the path where to start the dialog.
768
- */
769
- static ShowOpenFileDialog(title: string, path?: Nullable<string>): Promise<string>;
770
- /**
771
- * Opens the save file dialog and returns the selected path.
772
- * @param title the title of the save file dialog.
773
- * @param path optional path where to open the save dialog.
774
- */
775
- static ShowSaveFileDialog(title: Nullable<string>, path?: Nullable<string>): Promise<string>;
776
760
  }
777
761
  }
778
762
 
@@ -839,6 +823,12 @@ declare module 'babylonjs-editor/renderer/editor/tools/fs' {
839
823
  * @param directoryPath defines the absolute path to the directory to remove.
840
824
  */
841
825
  static RemoveDirectory(directoryPath: string): Promise<void>;
826
+ /**
827
+ * Waits until the given file (absolute path) exists.
828
+ * @param filePath defines the absolute path to the file to test until it exists.
829
+ * @param timeout defines the optional timeout to resolve the promise @default 10000
830
+ */
831
+ static WaitUntilFileExists(filePath: string, timeout?: number): Promise<void>;
842
832
  }
843
833
  }
844
834
 
@@ -1216,6 +1206,12 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/files
1216
1206
  * @param to defines the new absolute path to the file being moved.
1217
1207
  */
1218
1208
  abstract moveFile(from: string, to: string): void | Promise<void>;
1209
+ /**
1210
+ * Returns wheter or not the given file can be renamed.
1211
+ * @param from defines the previous absolute path to the file being renamed.
1212
+ * @param to defines the new absolute path to the file being renamed.
1213
+ */
1214
+ canRename(_from: string, _to: string): Promise<boolean>;
1219
1215
  /**
1220
1216
  * Called on the given file is being remvoed.
1221
1217
  * @param path defines the absolute path to the file that is being removed.
@@ -1300,6 +1296,10 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/files
1300
1296
  * Computes the image to render as a preview.
1301
1297
  */
1302
1298
  abstract computePreview(): React.ReactNode | Promise<React.ReactNode>;
1299
+ /**
1300
+ * Refreshes the preview thumbnail of the asset.
1301
+ */
1302
+ _handleRefreshPreview(): Promise<void>;
1303
1303
  /**
1304
1304
  * Called on the user clicks on the asset.
1305
1305
  * @param ev defines the reference to the event object.
@@ -1325,7 +1325,7 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/files
1325
1325
  * @param ev defines the reference to the event object.
1326
1326
  * @param pick defines the picking info generated while dropping in the preview.
1327
1327
  */
1328
- onDropInPreview(_1: React.DragEvent<HTMLElement>, _2: PickingInfo): void;
1328
+ onDropInPreview(_1: DragEvent, _2: PickingInfo): void;
1329
1329
  /**
1330
1330
  * Called on the user drops the asset in a supported inspector field.
1331
1331
  * @param ev defiens the reference to the event object.
@@ -1352,7 +1352,7 @@ declare module 'babylonjs-editor/renderer/editor/assets/materials' {
1352
1352
  import * as React from "react";
1353
1353
  import { Material, PickingInfo, Scene, Node } from "babylonjs";
1354
1354
  import { AbstractAssets, IAssetComponentItem } from "babylonjs-editor/renderer/editor/assets/abstract-assets";
1355
- import "./materials/augmentations";
1355
+ import "../tools/materials/augmentations";
1356
1356
  export class MaterialAssets extends AbstractAssets {
1357
1357
  /**
1358
1358
  * Defines the type of the data transfer data when drag'n'dropping asset.
@@ -1535,9 +1535,8 @@ declare module 'babylonjs-editor/renderer/editor/components/inspector' {
1535
1535
  import * as React from "react";
1536
1536
  import { Editor } from "babylonjs-editor/renderer/editor/editor";
1537
1537
  import { AbstractInspector } from "babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector";
1538
- import { AbstractInspectorLegacy } from "babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector-legacy";
1539
1538
  export interface IObjectInspector {
1540
- ctor: (new (props: IObjectInspectorProps) => AbstractInspectorLegacy<any> | AbstractInspector<any, any>);
1539
+ ctor: (new (props: IObjectInspectorProps) => AbstractInspector<any, any>);
1541
1540
  ctorNames: string[];
1542
1541
  title: string;
1543
1542
  isSupported?: Undefinable<(obj: any) => boolean>;
@@ -1545,7 +1544,7 @@ declare module 'babylonjs-editor/renderer/editor/components/inspector' {
1545
1544
  * The reference to the inspector.
1546
1545
  * @hidden
1547
1546
  */
1548
- _ref?: Undefinable<AbstractInspectorLegacy<any>>;
1547
+ _ref?: Undefinable<AbstractInspector<any, any>>;
1549
1548
  /**
1550
1549
  * @hidden
1551
1550
  */
@@ -1611,6 +1610,11 @@ declare module 'babylonjs-editor/renderer/editor/components/inspector' {
1611
1610
  * @param callback defines the callback called on the update is done.
1612
1611
  */
1613
1612
  forceUpdate(callback?: (() => void) | undefined): void;
1613
+ /**
1614
+ * Catches exceptions generated in descendant components.
1615
+ * Unhandled exceptions will cause the entire component tree to unmount.
1616
+ */
1617
+ componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
1614
1618
  /**
1615
1619
  * Sets the selected object in the scene or graph to be edited.
1616
1620
  * @param object the selected object reference used by the inspector to be modified.
@@ -1620,10 +1624,6 @@ declare module 'babylonjs-editor/renderer/editor/components/inspector' {
1620
1624
  * Refreshes the inspector.
1621
1625
  */
1622
1626
  refresh(): void;
1623
- /**
1624
- * Refreshes the current display of the current inspector.
1625
- */
1626
- refreshDisplay(): void;
1627
1627
  /**
1628
1628
  * Resizes the inspector.
1629
1629
  */
@@ -1631,154 +1631,10 @@ declare module 'babylonjs-editor/renderer/editor/components/inspector' {
1631
1631
  }
1632
1632
  }
1633
1633
 
1634
- declare module 'babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector-legacy' {
1635
- import * as React from "react";
1636
- import { GUI, GUIController } from "dat.gui";
1637
- import { Color3, Color4, BaseTexture, ISize, Material } from "babylonjs";
1638
- import { Nullable, Undefinable } from "babylonjs-editor/shared/types";
1639
- import { Editor } from "babylonjs-editor/renderer/editor/editor";
1640
- import { SuggestController } from "babylonjs-editor/renderer/editor/gui/augmentations/suggest";
1641
- import { AbstractAssets } from "babylonjs-editor/renderer/editor/assets/abstract-assets";
1642
- import { IAssetsProps } from "babylonjs-editor/renderer/editor/components/assets";
1643
- import { IObjectInspectorProps } from "babylonjs-editor/renderer/editor/components/inspector";
1644
- export abstract class AbstractInspectorLegacy<T> extends React.Component<IObjectInspectorProps> {
1645
- /**
1646
- * Defines the GUI reference.
1647
- */
1648
- tool: Nullable<GUI>;
1649
- /**
1650
- * Defines wether or not undo/redo should be handled by the inspector.
1651
- */
1652
- handleUndoRedo: boolean;
1653
- /**
1654
- * The editor reference.
1655
- */
1656
- protected editor: Editor;
1657
- /**
1658
- * The selected object reference.
1659
- */
1660
- protected selectedObject: T;
1661
- /**
1662
- * Defines the Id of the tool.
1663
- */
1664
- protected _id: string;
1665
- /**
1666
- * Defines the div of the tool.
1667
- */
1668
- protected _div: Nullable<HTMLDivElement>;
1669
- /**
1670
- * Constructor.
1671
- * @param props the component's props.
1672
- */
1673
- constructor(props: IObjectInspectorProps);
1674
- /**
1675
- * Renders the component.
1676
- */
1677
- render(): React.ReactNode;
1678
- /**
1679
- * Called on the component did mount.
1680
- */
1681
- abstract onUpdate(): void;
1682
- /**
1683
- * Called on a controller changes.
1684
- * @param folder the folder containing the modified controller.
1685
- * @param controller the controller that has been modified.
1686
- */
1687
- onControllerChange(_?: GUI, __?: GUIController): void;
1688
- /**
1689
- * Called on a controller finished changes.
1690
- * @param folder the folder containing the modified controller.
1691
- * @param controller the controller that has been modified.
1692
- */
1693
- onControllerFinishChange(_?: GUI, __?: GUIController): void;
1694
- /**
1695
- * Gets wether or not the component is mounted.
1696
- */
1697
- protected get isMounted(): boolean;
1698
- /**
1699
- * Called on the component did moubnt.
1700
- */
1701
- componentDidMount(): void;
1702
- /**
1703
- * Called on the component will unmount.
1704
- */
1705
- componentWillUnmount(): void;
1706
- /**
1707
- * Refreshes the inspector tool.
1708
- */
1709
- refresh(): void;
1710
- /**
1711
- * Refreshes the edition tool.
1712
- */
1713
- refreshDisplay(): void;
1714
- /**
1715
- * Clears the given folder.
1716
- */
1717
- clearFolder(folder: GUI): void;
1718
- /**
1719
- * Clears the whole tool.
1720
- */
1721
- clear(): void;
1722
- /**
1723
- * Resizes the edition tool.
1724
- * @param size defines the size of the panel.
1725
- */
1726
- resize(size?: ISize): void;
1727
- /**
1728
- * Returns the reference to the texture identified by the given editor name.
1729
- * @param editorName the name of the texture to find.
1730
- */
1731
- protected getTexture(editorName: string): Nullable<BaseTexture>;
1732
- /**
1733
- * Returns the reference to the material identified by the given editor name.
1734
- * @param name defines the name of the material to find.
1735
- */
1736
- protected getMaterial(name: string): Nullable<Material>;
1737
- /**
1738
- * Adds a new texture field to the inspector.
1739
- * @param parent the parent folder where to add the texture field.
1740
- * @param object the object to modify.
1741
- * @param property the property to modify in the given object.
1742
- * @param onChange optional callback called on the texture changed.
1743
- */
1744
- protected addTextureList(parent: GUI | undefined, object: any, property: string, onChange?: (texture: Nullable<BaseTexture>) => void): SuggestController;
1745
- /**
1746
- * Adds a new texture field to the inspector.
1747
- * @param parent the parent folder where to add the texture field.
1748
- * @param object the object to modify.
1749
- * @param property the property to modify in the given object.
1750
- * @param onChange optional callback called on the texture changed.
1751
- */
1752
- protected addMaterialList(parent: GUI | undefined, object: any, property: string, onChange?: (material: Nullable<Material>) => void): SuggestController;
1753
- /**
1754
- * Adds a color folder to edit RGB(A)
1755
- * @param parent the parent folder where to add the color folder.
1756
- * @param name the name of the color folder.
1757
- * @param object the base object to modify.
1758
- * @param property the path to the color property.
1759
- * @param onChange optional callback called on the color changed.
1760
- */
1761
- protected addColor(parent: GUI, name: string, object: any, property: string, onChange?: (color: Color3 | Color4) => void): GUI;
1762
- /**
1763
- * Adds a new suggest contoller containg the list of all the civen componet's assets.
1764
- * @param parent defines the parent folder where to add the assets list.
1765
- * @param componentCtor defines the reference to the constructor of the assets component to get its items.
1766
- * @param baseValue defines the base value of the suggest controller to display.
1767
- * @param object defines the reference to the object to modify.
1768
- * @param property defines the path to the property to modify.
1769
- */
1770
- protected addAssetsList(parent: GUI, componentCtor: (new (props: IAssetsProps) => AbstractAssets), baseValue: Undefinable<string>, object: any, property: string): SuggestController;
1771
- /**
1772
- * Called on the tool is mounted to handle onChange & onFinishChange
1773
- */
1774
- protected _handleChanged(root?: GUI): void;
1775
- }
1776
- }
1777
-
1778
1634
  declare module 'babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector' {
1779
1635
  import { Nullable } from "babylonjs-editor/shared/types";
1780
1636
  import * as React from "react";
1781
- import { Texture, Material, ISize } from "babylonjs";
1637
+ import { Texture, Material, ISize, BaseTexture } from "babylonjs";
1782
1638
  import { IObjectInspectorProps } from "babylonjs-editor/renderer/editor/components/inspector";
1783
1639
  import { IInspectorListItem } from "babylonjs-editor/renderer/editor/gui/inspector/fields/list";
1784
1640
  import { IInspectorNotifierUndoRedo } from "babylonjs-editor/renderer/editor/gui/inspector/utils";
@@ -1842,11 +1698,15 @@ declare module 'babylonjs-editor/renderer/editor/components/inspectors/abstract-
1842
1698
  /**
1843
1699
  * Returns the list of available textures in the assets to be drawn.
1844
1700
  */
1845
- getTexturesList(): IInspectorListItem<Nullable<Texture>>[];
1701
+ getTexturesList(predicate?: (t: BaseTexture) => unknown): IInspectorListItem<Nullable<Texture>>[];
1846
1702
  /**
1847
1703
  * Returns the list of available materials in the assets to be drawn.
1848
1704
  */
1849
1705
  getMaterialsList(): IInspectorListItem<Nullable<Material>>[];
1706
+ /**
1707
+ * Gets all nodes in the current scene, or returns an empty array if no scene.
1708
+ */
1709
+ getSceneNodes(allowedType?: "TransformNode" | "Mesh" | "Light" | "Camera" | "AbstractMesh"): IInspectorListItem<string>[];
1850
1710
  }
1851
1711
  }
1852
1712
 
@@ -2059,6 +1919,10 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/fields/number' {
2059
1919
  * Defines wether or not the label should be hidden.
2060
1920
  */
2061
1921
  noLabel?: boolean;
1922
+ /**
1923
+ * Defines the default value of the field in case the editor property doesn't exist.
1924
+ */
1925
+ defaultValue?: number;
2062
1926
  /**
2063
1927
  * Defines wether or not automatic undo/redo should be skipped.
2064
1928
  */
@@ -3004,6 +2868,7 @@ declare module 'babylonjs-editor/renderer/editor/project/files' {
3004
2868
  declare module 'babylonjs-editor/renderer/editor/project/typings' {
3005
2869
  import { Undefinable, IStringDictionary } from "babylonjs-editor/shared/types";
3006
2870
  import { KTXToolsType } from "babylonjs-editor/renderer/editor/tools/ktx";
2871
+ import { IRegisteredPlugin } from "babylonjs-editor/renderer/editor/tools/types";
3007
2872
  /**
3008
2873
  * Defines the type the possible values of the physics engine type string
3009
2874
  * store in the workspace JSON file.
@@ -3085,6 +2950,24 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
3085
2950
  */
3086
2951
  keyPath?: string;
3087
2952
  };
2953
+ /**
2954
+ * Defines the options of the custom webserver.
2955
+ */
2956
+ customWebServer?: {
2957
+ /**
2958
+ * Defines the Url of the custom webserver where to start the game.
2959
+ */
2960
+ url: string;
2961
+ };
2962
+ /**
2963
+ * Defines the options of the Basis compression tool.
2964
+ */
2965
+ basisCompressedTextures?: {
2966
+ /**
2967
+ * Defines wether or not Basis compressed texture is enabled using KTX Software.
2968
+ */
2969
+ enabled?: boolean;
2970
+ };
3088
2971
  /**
3089
2972
  * Defines the options of the KTX2 compression tool.
3090
2973
  */
@@ -3094,9 +2977,16 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
3094
2977
  */
3095
2978
  enabled?: boolean;
3096
2979
  /**
3097
- * Defines the path to the PVRTexToolCLI program executed to
2980
+ * Defines the path to the PVRTexToolCLI program executed to generate all compressed textures files.
3098
2981
  */
3099
- pvrTexToolCliPath?: string;
2982
+ pvrTexToolCliPath?: string | Record<string, string>;
2983
+ /**
2984
+ * Defines the path to the NVidia Texture Tools program executed to generate DXT and ASTC files.
2985
+ */
2986
+ nvidiaTextureTools?: {
2987
+ enabled?: boolean;
2988
+ cliPath?: string;
2989
+ };
3100
2990
  /**
3101
2991
  * Defines wether or not the Editor automatically generates compressed textures
3102
2992
  * to be used in the Editor's preview scene.
@@ -3119,6 +3009,10 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
3119
3009
  * Defines the options of the PVRTC format.
3120
3010
  */
3121
3011
  pvrtcOptions?: {
3012
+ /**
3013
+ * Defines wether or not PVRTC is enabled.
3014
+ */
3015
+ enabled?: boolean;
3122
3016
  /**
3123
3017
  * Defines the quality of the PVRTC generated textures.
3124
3018
  */
@@ -3151,6 +3045,10 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
3151
3045
  quality: "etcfast" | "etcnormal" | "etcslow";
3152
3046
  };
3153
3047
  };
3048
+ /**
3049
+ * Defines the list of all registered plugins for the workspace.
3050
+ */
3051
+ plugins?: Undefinable<IRegisteredPlugin[]>;
3154
3052
  }
3155
3053
  export interface IProject {
3156
3054
  /**
@@ -3236,6 +3134,10 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
3236
3134
  * Defines the list of all scene's morph target managers.
3237
3135
  */
3238
3136
  morphTargetManagers?: string[];
3137
+ /**
3138
+ * Defines the list of all reflection probes.
3139
+ */
3140
+ reflectionProbes?: string[];
3239
3141
  /**
3240
3142
  * Saves the scene's settings.
3241
3143
  */
@@ -3612,9 +3514,23 @@ declare module 'babylonjs-editor/renderer/editor/project/scene-exporter' {
3612
3514
  generateAllCompressedTextureFormats?: boolean;
3613
3515
  }
3614
3516
  export class SceneExporter {
3517
+ /**
3518
+ * Defines the list of all textures file types that are copy-able for the
3519
+ * final assets output folder.
3520
+ */
3615
3521
  static readonly CopyAbleImageTypes: string[];
3616
3522
  /**
3617
- * Defines the list of all files types that are copy-able for the
3523
+ * Defines the list of all video file types that are copy-able for the
3524
+ * final assets output folder.
3525
+ */
3526
+ static readonly CopyAbleVideoTypes: string[];
3527
+ /**
3528
+ * Defines the list of all 3d assets file types that are copy-able for the
3529
+ * final assets output folder.
3530
+ */
3531
+ static readonly CopyAble3dAssetTypes: string[];
3532
+ /**
3533
+ * Defines the list of all file types that are copy-able for the
3618
3534
  * final assets output folder.
3619
3535
  */
3620
3536
  static readonly CopyAbleAssetsTypes: string[];
@@ -4505,66 +4421,40 @@ declare module 'babylonjs-editor/renderer/editor/scene/utils' {
4505
4421
 
4506
4422
  declare module 'babylonjs-editor/renderer/editor/components/graph' {
4507
4423
  import * as React from "react";
4508
- import { DataNode } from "rc-tree/lib/interface";
4509
- import { Nullable, Undefinable } from "babylonjs-editor/shared/types";
4510
- import { Node, Scene, IParticleSystem, Sound } from "babylonjs";
4424
+ import { TreeNodeInfo } from "@blueprintjs/core";
4511
4425
  import { Editor } from "babylonjs-editor/renderer/editor/editor";
4426
+ export interface _IDragAndDroppedItem {
4427
+ nodeId: string;
4428
+ onDropInInspector: (ev: React.DragEvent<HTMLElement>, object: any, property: string) => Promise<void>;
4429
+ }
4512
4430
  export interface IGraphProps {
4513
4431
  /**
4514
- * Defines the editor reference.
4432
+ * Defines the reference to the editor.
4515
4433
  */
4516
4434
  editor: Editor;
4517
- /**
4518
- * Defines the reference to the scene to traverse.
4519
- */
4520
- scene?: Undefinable<Scene>;
4521
4435
  }
4522
4436
  export interface IGraphState {
4523
4437
  /**
4524
- * Defines the list of all nodes to be draws in the editor.
4525
- */
4526
- nodes: DataNode[];
4527
- /**
4528
- * Defines the list of all expanded nodes.
4529
- */
4530
- expandedNodeIds?: Undefinable<string[]>;
4531
- /**
4532
- * Defines the list of all selected nodes.
4533
- */
4534
- selectedNodeIds?: Undefinable<string[]>;
4535
- /**
4536
- * Defines the current filter to search nodes.
4438
+ * Defines the current string of the filter box.
4537
4439
  */
4538
4440
  filter: string;
4539
4441
  /**
4540
- * Defines the panel's width.
4442
+ * Defines the list of all nodes drawn in the graph.
4541
4443
  */
4542
- width?: number;
4444
+ nodes: TreeNodeInfo<any>[];
4543
4445
  /**
4544
- * Defines wether or not the graphs options should be drawn.
4446
+ * Defines the list of all selected nodes in the graph.
4545
4447
  */
4546
- showOptions: boolean;
4547
- /**
4548
- * Defines wether or not the instances should be shown in the graph.
4549
- */
4550
- showInstances: boolean;
4551
- /**
4552
- * Defines wether or not the lights should be shown in the graph.
4553
- */
4554
- showLights: boolean;
4555
- }
4556
- export interface _IDragAndDroppedItem {
4557
- nodeId: string;
4558
- onDropInInspector: (ev: React.DragEvent<HTMLElement>, object: any, property: string) => Promise<void>;
4448
+ selectedNodes: TreeNodeInfo<any>[];
4559
4449
  }
4560
4450
  export class Graph extends React.Component<IGraphProps, IGraphState> {
4561
4451
  /**
4562
- * Defines the last selected node in the graph.
4452
+ * Defines the reference to the last selected object.
4563
4453
  */
4564
- lastSelectedObject: Nullable<Node | IParticleSystem | Sound>;
4454
+ lastSelectedObject: any;
4565
4455
  /**
4566
4456
  * Constructor.
4567
- * @param props the component's props.
4457
+ * @param props defines the component's props.
4568
4458
  */
4569
4459
  constructor(props: IGraphProps);
4570
4460
  /**
@@ -4572,68 +4462,33 @@ declare module 'babylonjs-editor/renderer/editor/components/graph' {
4572
4462
  */
4573
4463
  render(): React.ReactNode;
4574
4464
  /**
4575
- * Resizes the panel
4576
- */
4577
- resize(): void;
4578
- /**
4579
- * Refreshes the graph.
4580
- * @param done called on the refresh process finished.
4581
- */
4582
- refresh(done?: Undefinable<() => void>): void;
4583
- /**
4584
- * Clears the graph.
4585
- */
4586
- clear(): void;
4587
- /**
4588
- * Selecs the given node in the graph.
4589
- * @param node the node to select in the graph.
4590
- * @param appendToSelected defines wether or not the selected node should be appended to the currently selected nodes.
4465
+ * Removes the given object from the scene graph.
4466
+ * @param node defines the reference to the object to remove.
4591
4467
  */
4592
- setSelected(node: Node | IParticleSystem | Sound, appendToSelected?: boolean): void;
4468
+ removeObject(node: any): void;
4593
4469
  /**
4594
- * Refreshes the graph and selects the given node. Mainly used by assets.
4595
- * @param node the node to select in the graph.
4470
+ * Resizes the component.
4596
4471
  */
4597
- refreshAndSelect(node: Node): void;
4598
- /**
4599
- * Returns the list of all selected nodes (node, particle system, sound).
4600
- */
4601
- getAllSelected(): (Node | IParticleSystem | Sound)[];
4602
- /**
4603
- * Clones the given node.
4604
- * @param node the node to clone.
4605
- */
4606
- cloneObject(node: Node | IParticleSystem): Nullable<Node | IParticleSystem>;
4472
+ resize(): void;
4607
4473
  /**
4608
- * Removes the given node.
4609
- * @param node the node to remove.
4474
+ * Called on the user clicks on a node.
4610
4475
  */
4611
- removeObject(node: Node | IParticleSystem | Sound): void;
4476
+ _handleNodeClick(node: TreeNodeInfo<any>, event: React.MouseEvent<HTMLElement, MouseEvent>): void;
4612
4477
  /**
4613
- * Removes the given node.
4614
- * @param node the node to remove.
4615
- * @hidden
4478
+ * Refreshes the entire graph.
4479
+ * @param done defines the reference to the callback called on the graph has been updated.
4616
4480
  */
4617
- _removeObject(node: Node | IParticleSystem | Sound): {
4618
- redo: () => void;
4619
- undo: () => void;
4620
- };
4481
+ refresh(done?: () => void): void;
4621
4482
  /**
4622
- * Removes the given node from the graph and destroys its data.
4623
- * @hidden
4483
+ * Updates the current graph state without parsing the scene nodes.
4624
4484
  */
4625
- _handleRemoveObject(): void;
4485
+ update(): void;
4626
4486
  /**
4627
- * Clones all selected nodes.
4628
- * @hidden
4487
+ * Sets the given object selected in the graph.
4488
+ * @param object defines the reference to the object to set selected in the graph.
4489
+ * @param appendToSelected defines wether or not the object should be added to the currently selected node(s) in the graph.
4629
4490
  */
4630
- _handleCloneObject(): void;
4631
- /**
4632
- * Returns the node in the stage identified by the given id.
4633
- * @param id the id of the node to find.
4634
- * @hidden
4635
- */
4636
- _getNodeById(id: string): Undefinable<Node | IParticleSystem | Sound>;
4491
+ setSelected(object: any, appendToSelected?: boolean): void;
4637
4492
  }
4638
4493
  }
4639
4494
 
@@ -4641,6 +4496,8 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser' {
4641
4496
  import { IStringDictionary, Nullable } from "babylonjs-editor/shared/types";
4642
4497
  import * as React from "react";
4643
4498
  import { Editor } from "babylonjs-editor/renderer/editor/editor";
4499
+ import { AssetsBrowserTree } from "babylonjs-editor/renderer/editor/components/assets-browser/tree";
4500
+ import { AssetsBrowserFiles } from "babylonjs-editor/renderer/editor/components/assets-browser/files";
4644
4501
  export interface IAssetsBrowserProps {
4645
4502
  /**
4646
4503
  * Defines the reference to the editor.
@@ -4672,6 +4529,14 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser' {
4672
4529
  * Defines the reference to the dictionary that stores all the moved assets.
4673
4530
  */
4674
4531
  movedAssetsDictionary: IStringDictionary<string>;
4532
+ /**
4533
+ * @hidden
4534
+ */
4535
+ _tree: Nullable<AssetsBrowserTree>;
4536
+ /**
4537
+ * @hidden
4538
+ */
4539
+ _files: Nullable<AssetsBrowserFiles>;
4675
4540
  /**
4676
4541
  * Constructor.
4677
4542
  * @param props defines the component's props.
@@ -4754,7 +4619,7 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser' {
4754
4619
  declare module 'babylonjs-editor/renderer/editor/components/preview' {
4755
4620
  import { Nullable } from "babylonjs-editor/shared/types";
4756
4621
  import * as React from "react";
4757
- import { Node, IParticleSystem, AbstractMesh, Sound, Observable } from "babylonjs";
4622
+ import { Node, IParticleSystem, AbstractMesh, Sound, Observable, ReflectionProbe } from "babylonjs";
4758
4623
  import { Editor } from "babylonjs-editor/renderer/editor/editor";
4759
4624
  import { ScenePicker } from "babylonjs-editor/renderer/editor/scene/picker";
4760
4625
  import { SceneGizmo, GizmoType } from "babylonjs-editor/renderer/editor/scene/gizmo";
@@ -4918,7 +4783,7 @@ declare module 'babylonjs-editor/renderer/editor/components/preview' {
4918
4783
  * @param node defines the reference to the node to focus.
4919
4784
  * @param mode defines the focus mode (animate target, position, etc.).
4920
4785
  */
4921
- focusNode(node: Node | IParticleSystem | Sound, mode: PreviewFocusMode): void;
4786
+ focusNode(node: Node | IParticleSystem | Sound | ReflectionProbe, mode: PreviewFocusMode): void;
4922
4787
  /**
4923
4788
  * Copies the currently selected node.
4924
4789
  */
@@ -4937,6 +4802,7 @@ declare module 'babylonjs-editor/renderer/editor/components/preview' {
4937
4802
  declare module 'babylonjs-editor/renderer/editor/components/main-toolbar' {
4938
4803
  import { Undefinable } from "babylonjs-editor/shared/types";
4939
4804
  import * as React from "react";
4805
+ import { Node } from "babylonjs";
4940
4806
  import { Editor } from "babylonjs-editor/renderer/editor/editor";
4941
4807
  import { IPluginToolbar } from "babylonjs-editor/renderer/editor/plugins/toolbar";
4942
4808
  export interface IToolbarProps {
@@ -4969,6 +4835,18 @@ declare module 'babylonjs-editor/renderer/editor/components/main-toolbar' {
4969
4835
  * Renders the component.
4970
4836
  */
4971
4837
  render(): React.ReactNode;
4838
+ /**
4839
+ * Returns the list of all items of the "Add" menu.
4840
+ */
4841
+ getAddMenuItems(parent?: Node): React.ReactNode;
4842
+ /**
4843
+ * Returns the list of all items of the "Add Mesh" menu.
4844
+ */
4845
+ getAddMeshMenuItem(parent?: Node): React.ReactNode;
4846
+ /**
4847
+ * Called on the component did mount.
4848
+ */
4849
+ componentDidMount(): void;
4972
4850
  }
4973
4851
  }
4974
4852
 
@@ -5156,98 +5034,6 @@ declare module 'babylonjs-editor/renderer/editor/workers/workers' {
5156
5034
  }
5157
5035
  }
5158
5036
 
5159
- declare module 'babylonjs-editor/renderer/editor/gui/augmentations/suggest' {
5160
- import { Undefinable } from "babylonjs-editor/shared/types";
5161
- import * as React from "react";
5162
- import * as dat from "dat.gui";
5163
- export interface _IListSuggestProps {
5164
- controller: SuggestController;
5165
- }
5166
- export interface _IListSuggestState {
5167
- list: string[];
5168
- value: string;
5169
- }
5170
- export class _ListSuggest extends React.Component<_IListSuggestProps, _IListSuggestState> {
5171
- /**
5172
- * Constructor.
5173
- * @param props the component's props.
5174
- */
5175
- constructor(props: _IListSuggestProps);
5176
- /**
5177
- * Renders the component.
5178
- */
5179
- render(): React.ReactNode;
5180
- }
5181
- /**
5182
- * Suggest conroller.
5183
- */
5184
- export class SuggestController extends dat.controllers.Controller {
5185
- /**
5186
- * @hidden
5187
- */
5188
- object: any;
5189
- /**
5190
- * @hidden
5191
- */
5192
- property: string;
5193
- /**
5194
- * @hidden
5195
- */
5196
- list: string[];
5197
- /**
5198
- * @hidden
5199
- */
5200
- __onChange: (r: string) => void;
5201
- /**
5202
- * @hidden
5203
- */
5204
- __onFinishChange: (r: string) => void;
5205
- /**
5206
- * @hidden
5207
- */
5208
- __renderer: Undefinable<{
5209
- onShowLabel?: (item: string) => string;
5210
- onShowIcon?: (item: string) => JSX.Element;
5211
- onShowTooltip?: (item: string) => JSX.Element | undefined;
5212
- onUpdate?: () => string[] | Promise<string[]>;
5213
- }>;
5214
- /**
5215
- * Constructor.
5216
- * @param object the object to modify.
5217
- * @param property the property of the object tu get and set changes.
5218
- * @param list the list of suggestions.
5219
- * @param onShowLabel optional callback called when rendering a suggestion item.
5220
- */
5221
- constructor(object: any, property: string, list?: string[], renderer?: {
5222
- onShowLabel?: (item: string) => string;
5223
- onShowIcon?: (item: string) => JSX.Element;
5224
- onUpdate?: () => string[];
5225
- tooltip?: JSX.Element;
5226
- });
5227
- /**
5228
- * Registers the onChange callback.
5229
- */
5230
- onChange(callback: (r: string) => void): SuggestController;
5231
- /**
5232
- * Registers the onFinishChange callback.
5233
- */
5234
- onFinishChange(callback: (r: string) => void): SuggestController;
5235
- /**
5236
- * Updates the current display of the controller.
5237
- */
5238
- updateDisplay(): SuggestController;
5239
- /**
5240
- * Sets a new name for the field.
5241
- * @param name the new name of the field.
5242
- */
5243
- name(name: string): SuggestController;
5244
- /**
5245
- * Disposes the component.
5246
- */
5247
- dispose(): void;
5248
- }
5249
- }
5250
-
5251
5037
  declare module 'babylonjs-editor/renderer/editor/gui/inspector/utils' {
5252
5038
  import { IStringDictionary, Nullable } from "babylonjs-editor/shared/types";
5253
5039
  import { AbstractInspector } from "babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector";
@@ -5388,7 +5174,7 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/utils' {
5388
5174
 
5389
5175
  declare module 'babylonjs-editor/renderer/sandbox/main' {
5390
5176
  import { Nullable } from "babylonjs-editor/shared/types";
5391
- import { Vector2, Vector3, Vector4, Color3, Color4 } from "babylonjs";
5177
+ import { Vector2, Vector3, Vector4, Color3, Color4, Quaternion } from "babylonjs";
5392
5178
  export interface IExportedInspectorValueOptions {
5393
5179
  /**
5394
5180
  * Defines the section of the inspector.
@@ -5406,6 +5192,10 @@ declare module 'babylonjs-editor/renderer/sandbox/main' {
5406
5192
  * In case of numbers, defines the step applied in the editor.
5407
5193
  */
5408
5194
  step?: number;
5195
+ /**
5196
+ * In case of node, restricts the type of node that can be assigned
5197
+ */
5198
+ allowedNodeType?: "TransformNode" | "Mesh" | "Light" | "Camera";
5409
5199
  }
5410
5200
  export interface IExportedInspectorValue {
5411
5201
  /**
@@ -5419,11 +5209,11 @@ declare module 'babylonjs-editor/renderer/sandbox/main' {
5419
5209
  /**
5420
5210
  * Defines the default value of the decorated property.
5421
5211
  */
5422
- defaultValue: number | string | boolean | Vector2 | Vector3 | Vector4 | Color3 | Color4;
5212
+ defaultValue: number | string | boolean | Vector2 | Vector3 | Vector4 | Color3 | Color4 | Quaternion;
5423
5213
  /**
5424
5214
  * Defines the type of the decorated property.
5425
5215
  */
5426
- type: "number" | "string" | "boolean" | "KeyMap" | "Vector2" | "Vector3" | "Vector4" | "Color3" | "Color4" | "Texture";
5216
+ type: "number" | "string" | "boolean" | "KeyMap" | "Vector2" | "Vector3" | "Vector4" | "Color3" | "Color4" | "Texture" | "Quaternion" | "Node";
5427
5217
  /**
5428
5218
  * Defines the optional options available for the exported value.
5429
5219
  */
@@ -5523,6 +5313,10 @@ declare module 'babylonjs-editor/renderer/editor/tools/ktx' {
5523
5313
  * Returns the list of all support Ktx formats.
5524
5314
  */
5525
5315
  static GetAllKtxFormats(): KTXToolsType[];
5316
+ /**
5317
+ * Returns the path to the CLI according to the current platform.
5318
+ */
5319
+ static GetCliPath(): Nullable<string>;
5526
5320
  /**
5527
5321
  * Returns the of the given texture path by applying the ktx extension to it.
5528
5322
  * @param texturePath defines the path to the texture to gets its Ktx name.
@@ -5673,9 +5467,10 @@ declare module 'babylonjs-editor/renderer/editor/tools/process' {
5673
5467
  * Executes the given command and returns the reference to the newly created editor process object.
5674
5468
  * @param command defines the command to execute in the terminal process.
5675
5469
  * @param readonly defines wether or not the terminal process is in read-only.
5470
+ * @param cwd defines the absolute path to the working directory where to process will be executed.
5676
5471
  * @returns the newly created editor process object that contains the terminal, process, etc.
5677
5472
  */
5678
- static ExecuteCommand(command: string, readonly?: boolean): Nullable<IEditorProcess>;
5473
+ static ExecuteCommand(command: string, readonly?: boolean, cwd?: string): Nullable<IEditorProcess>;
5679
5474
  /**
5680
5475
  * Kills and removes the editor process identified by the given id if exists.
5681
5476
  * @param id defines the id of the editor process to remove if exists.
@@ -5694,6 +5489,162 @@ declare module 'babylonjs-editor/renderer/editor/tools/process' {
5694
5489
  }
5695
5490
  }
5696
5491
 
5492
+ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/tree' {
5493
+ import * as React from "react";
5494
+ import { ITreeNode } from "@blueprintjs/core";
5495
+ import { Editor } from "babylonjs-editor/renderer/editor/editor";
5496
+ export interface IAssetsBrowserFavorite {
5497
+ /**
5498
+ * Defines the id of the favorite.
5499
+ */
5500
+ id: string;
5501
+ /**
5502
+ * Defines the name of the favorite.
5503
+ */
5504
+ name: string;
5505
+ }
5506
+ export interface IAssetsBrowserTreeProps {
5507
+ /**
5508
+ * Defines the reference to the editor.
5509
+ */
5510
+ editor: Editor;
5511
+ /**
5512
+ * Defines the callback called on a directory has been clicked in the tree.
5513
+ */
5514
+ onDirectorySelected: (path: string) => void;
5515
+ /**
5516
+ * Defines the callback called on a favorite has been clicked in the tree.
5517
+ */
5518
+ onFavoriteSelected: (favorite: IAssetsBrowserFavorite) => void;
5519
+ }
5520
+ export interface IAssetsBrowserTreeState {
5521
+ /**
5522
+ * Defines the list of all available nodes in the tree.
5523
+ */
5524
+ nodes: ITreeNode<string>[];
5525
+ }
5526
+ export class AssetsBrowserTree extends React.Component<IAssetsBrowserTreeProps, IAssetsBrowserTreeState> {
5527
+ /**
5528
+ * Defines the id of the node for favorites "Textures".
5529
+ */
5530
+ static readonly TexturesFavorite: IAssetsBrowserFavorite;
5531
+ /**
5532
+ * Defines the id of the node for favorites "Materials".
5533
+ */
5534
+ static readonly MaterialsFavorite: IAssetsBrowserFavorite;
5535
+ /**
5536
+ * Constructor.
5537
+ * @param props defines the component's props.
5538
+ */
5539
+ constructor(props: IAssetsBrowserTreeProps);
5540
+ /**
5541
+ * Renders the component.
5542
+ */
5543
+ render(): React.ReactNode;
5544
+ /**
5545
+ * Sets the new absolute path to the directory to read and draw its items.
5546
+ * @param directoryPath defines the absolute path to the directory to show in the view.
5547
+ */
5548
+ setDirectory(directoryPath: string): Promise<void>;
5549
+ /**
5550
+ * Refreshes the current tree.
5551
+ */
5552
+ refresh(): void;
5553
+ }
5554
+ }
5555
+
5556
+ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/files' {
5557
+ import * as React from "react";
5558
+ import { Editor } from "babylonjs-editor/renderer/editor/editor";
5559
+ import { IAssetsBrowserFavorite } from "babylonjs-editor/renderer/editor/components/assets-browser/tree";
5560
+ import { AssetsBrowserItem } from "babylonjs-editor/renderer/editor/components/assets-browser/files/item";
5561
+ export interface IAssetsBrowserFilesProps {
5562
+ /**
5563
+ * Defines the reference to the editor.
5564
+ */
5565
+ editor: Editor;
5566
+ /**
5567
+ * Defines the callback called on a directory has been clicked in the tree.
5568
+ */
5569
+ onDirectorySelected: (path: string) => void;
5570
+ }
5571
+ export interface IAssetsBrowserFilesState {
5572
+ /**
5573
+ * Defines the current stack of opened folders.
5574
+ */
5575
+ pathStack: string[];
5576
+ /**
5577
+ * Defines the absolute path to the working directory.
5578
+ */
5579
+ currentDirectory: string;
5580
+ /**
5581
+ * Defines the current filter.
5582
+ */
5583
+ filter: string;
5584
+ /**
5585
+ * Defines the current size value for the items.
5586
+ */
5587
+ itemsSize: number;
5588
+ /**
5589
+ * Defines the list of all items drawn in the view.
5590
+ */
5591
+ items: React.ReactNode[];
5592
+ }
5593
+ export class AssetsBrowserFiles extends React.Component<IAssetsBrowserFilesProps, IAssetsBrowserFilesState> {
5594
+ /**
5595
+ * Defines the list of all selected items.
5596
+ */
5597
+ selectedItems: string[];
5598
+ /**
5599
+ * @hidden
5600
+ */
5601
+ _items: AssetsBrowserItem[];
5602
+ /**
5603
+ * Initializes the files component.
5604
+ * @param editor defines the reference to the editor.
5605
+ */
5606
+ static Init(editor: Editor): Promise<void>;
5607
+ /**
5608
+ * Constructor.
5609
+ * @param props defines the component's props.
5610
+ */
5611
+ constructor(props: IAssetsBrowserFilesProps);
5612
+ /**
5613
+ * Renders the component.
5614
+ */
5615
+ render(): React.ReactNode;
5616
+ /**
5617
+ * Returns the list of all items drawn in the "Add..." menu.
5618
+ */
5619
+ getAddMenuItems(): React.ReactNode;
5620
+ /**
5621
+ * Sets the new favorite to read and draw its items.
5622
+ * @param favorite defines the id of the favorite to show in the view.
5623
+ */
5624
+ setFavorite(favorite: IAssetsBrowserFavorite): Promise<void>;
5625
+ /**
5626
+ * Sets the new absolute path to the directory to read and draw its items.
5627
+ * @param directoryPath defines the absolute path to the directory to show in the view.
5628
+ */
5629
+ setDirectory(directoryPath: string): Promise<void>;
5630
+ /**
5631
+ * Refreshes the current list of files.
5632
+ */
5633
+ refresh(): Promise<void>;
5634
+ /**
5635
+ * Refreshes the preview thmbnail of the asset located at the given relative path.
5636
+ * @param relativePath defines the relative path to the asset.
5637
+ */
5638
+ refreshItemPreview(relativePath: string): Promise<void>;
5639
+ /**
5640
+ * Calls the given function in all the selected items (if exists).
5641
+ * @param methodName defines the name of the function to call.
5642
+ * @hidden
5643
+ */
5644
+ _callSelectedItemsMethod(methodName: string, ...parameters: any[]): Promise<void>;
5645
+ }
5646
+ }
5647
+
5697
5648
  declare module 'babylonjs-editor/renderer/editor/scene/picker' {
5698
5649
  import { Nullable } from "babylonjs-editor/shared/types";
5699
5650
  import { Observable, Node, SubMesh } from "babylonjs";
@@ -5734,7 +5685,7 @@ declare module 'babylonjs-editor/renderer/editor/scene/picker' {
5734
5685
  }
5735
5686
 
5736
5687
  declare module 'babylonjs-editor/renderer/editor/scene/gizmo' {
5737
- import { UtilityLayerRenderer, Node, IParticleSystem, Sound } from "babylonjs";
5688
+ import { UtilityLayerRenderer, Node, IParticleSystem, Sound, ReflectionProbe } from "babylonjs";
5738
5689
  import { Nullable } from "babylonjs-editor/shared/types";
5739
5690
  import { Editor } from "babylonjs-editor/renderer/editor/editor";
5740
5691
  export enum GizmoType {
@@ -5769,7 +5720,7 @@ declare module 'babylonjs-editor/renderer/editor/scene/gizmo' {
5769
5720
  * Sets the given node attached to the current gizmos if exists.
5770
5721
  * @param node the node to attach to current gizmos if exists.
5771
5722
  */
5772
- setAttachedNode(node: Nullable<Node | IParticleSystem | Sound>): void;
5723
+ setAttachedNode(node: Nullable<Node | IParticleSystem | Sound | ReflectionProbe>): void;
5773
5724
  }
5774
5725
  }
5775
5726
 
@@ -5864,7 +5815,7 @@ declare module 'babylonjs-editor/renderer/editor/components/console/log' {
5864
5815
  * Sets the new body of the log.
5865
5816
  * @param body defines the reference to the custom body.
5866
5817
  */
5867
- setBody(body: React.ReactNode): void;
5818
+ setBody(body: React.ReactNode): Promise<void>;
5868
5819
  }
5869
5820
  }
5870
5821
 
@@ -5946,6 +5897,120 @@ declare module 'babylonjs-editor/renderer/editor/cinematic/base' {
5946
5897
  }
5947
5898
  }
5948
5899
 
5900
+ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/files/item' {
5901
+ import { IStringDictionary, Nullable } from "babylonjs-editor/shared/types";
5902
+ import * as React from "react";
5903
+ import { Editor } from "babylonjs-editor/renderer/editor/editor";
5904
+ import { AssetsBrowserItemHandler, IItemHandler } from "babylonjs-editor/renderer/editor/components/assets-browser/files/item-handler";
5905
+ import { AssetsBrowserMoveHandler } from "babylonjs-editor/renderer/editor/components/assets-browser/files/move/move-handler";
5906
+ export interface IAssetsBrowserItemProps {
5907
+ /**
5908
+ * Defines the reference to the editor.
5909
+ */
5910
+ editor: Editor;
5911
+ /**
5912
+ * Defines the title of the item.
5913
+ */
5914
+ title: string;
5915
+ /**
5916
+ * Defines the relative path to the item.
5917
+ */
5918
+ relativePath: string;
5919
+ /**
5920
+ * Defines the absolute path to the item.
5921
+ */
5922
+ absolutePath: string;
5923
+ /**
5924
+ * Defines the type of the item (directory or file).
5925
+ */
5926
+ type: "file" | "directory";
5927
+ /**
5928
+ * Defines the size of the item.
5929
+ */
5930
+ size?: number;
5931
+ /**
5932
+ * Defines the callback called each time the item is clicked.
5933
+ */
5934
+ onClick: (item: AssetsBrowserItem, ev: React.MouseEvent<HTMLDivElement>) => void;
5935
+ /**
5936
+ * Callback called on the user double clicks an item.
5937
+ */
5938
+ onDoubleClick: () => void;
5939
+ /**
5940
+ * Defines the callback called on the item is starts being dragged.
5941
+ */
5942
+ onDragStart: (item: AssetsBrowserItem, ev: React.DragEvent<HTMLDivElement>) => void;
5943
+ }
5944
+ export interface IAssetsBrowserItemState {
5945
+ /**
5946
+ * Defines the color applied on the title.
5947
+ */
5948
+ titleColor: string;
5949
+ /**
5950
+ * Defines wether or not the item is selected.
5951
+ */
5952
+ isSelected: boolean;
5953
+ /**
5954
+ * Defines wether or not the file is being renamed.
5955
+ */
5956
+ isRenaming: boolean;
5957
+ /**
5958
+ * Defines the reference to the item handler.
5959
+ */
5960
+ itemHandler: Nullable<React.ReactNode>;
5961
+ /**
5962
+ * Defines the size of the item.
5963
+ */
5964
+ size: number;
5965
+ }
5966
+ export class AssetsBrowserItem extends React.Component<IAssetsBrowserItemProps, IAssetsBrowserItemState> {
5967
+ /**
5968
+ * @hidden
5969
+ */
5970
+ static _ItemHandlers: IStringDictionary<IItemHandler>;
5971
+ /**
5972
+ * @hidden
5973
+ */
5974
+ static _ItemMoveHandlers: AssetsBrowserMoveHandler[];
5975
+ /**
5976
+ * Registers the given item handler.
5977
+ * @param itemHandler defines the reference to the configuration of the item handler.
5978
+ */
5979
+ static RegisterItemHandler(itemHandler: IItemHandler): void;
5980
+ /**
5981
+ * Registers the given item move handler.
5982
+ * @param itemMoveHandler defines the reference to the item move handler.
5983
+ */
5984
+ static RegisterItemMoveHandler(itemMoveHandler: AssetsBrowserMoveHandler): void;
5985
+ /**
5986
+ * Initializes the item renderer.
5987
+ */
5988
+ static Init(editor: Editor): void;
5989
+ /**
5990
+ * @hidden
5991
+ */
5992
+ _itemHandlerRef: Nullable<AssetsBrowserItemHandler>;
5993
+ /**
5994
+ * Constructor.
5995
+ * @param props defines the component's props.
5996
+ */
5997
+ constructor(props: IAssetsBrowserItemProps);
5998
+ /**
5999
+ * Renders the component.
6000
+ */
6001
+ render(): React.ReactNode;
6002
+ /**
6003
+ * Called on the component did mount.
6004
+ */
6005
+ componentDidMount(): void;
6006
+ /**
6007
+ * Sets wether or not the item is selected.
6008
+ * @param isSelected defines wether or not the item is selected.
6009
+ */
6010
+ setSelected(isSelected: boolean): void;
6011
+ }
6012
+ }
6013
+
5949
6014
  declare module 'babylonjs-editor/renderer/editor/scene/icons' {
5950
6015
  import { UtilityLayerRenderer, Observable } from "babylonjs";
5951
6016
  import { Editor } from "babylonjs-editor/renderer/editor/editor";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-editor",
3
- "version": "4.3.0",
3
+ "version": "4.5.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
  "typings": "index.d.ts",
@@ -22,15 +22,15 @@
22
22
  "@types/react": "16.9.19",
23
23
  "@types/react-dom": "16.9.5",
24
24
  "typescript": "4.6.3",
25
- "babylonjs": "5.9.0",
26
- "babylonjs-gui": "5.9.0",
27
- "babylonjs-inspector": "5.9.0",
28
- "babylonjs-loaders": "5.9.0",
29
- "babylonjs-materials": "5.9.0",
30
- "babylonjs-node-editor": "5.9.0",
31
- "babylonjs-post-process": "5.9.0",
32
- "babylonjs-procedural-textures": "5.9.0",
33
- "babylonjs-serializers": "5.9.0",
25
+ "babylonjs": "5.19.0",
26
+ "babylonjs-gui": "5.19.0",
27
+ "babylonjs-inspector": "5.19.0",
28
+ "babylonjs-loaders": "5.19.0",
29
+ "babylonjs-materials": "5.19.0",
30
+ "babylonjs-node-editor": "5.19.0",
31
+ "babylonjs-post-process": "5.19.0",
32
+ "babylonjs-procedural-textures": "5.19.0",
33
+ "babylonjs-serializers": "5.19.0",
34
34
  "@blueprintjs/core": "3.28.1",
35
35
  "@blueprintjs/select": "3.13.2",
36
36
  "react": "16.12.0",