babylonjs-editor 4.1.1 → 4.4.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 +618 -287
  2. package/package.json +11 -11
package/index.d.ts CHANGED
@@ -6,7 +6,6 @@
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
@@ -30,7 +29,6 @@ declare module 'babylonjs-editor' {
30
29
  export { MaterialAssets } from "babylonjs-editor/renderer/editor/assets/materials";
31
30
  export { TextureAssets } from "babylonjs-editor/renderer/editor/assets/textures";
32
31
  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
32
  export { AbstractInspector } from "babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector";
35
33
  export { MaterialInspector, IMaterialInspectorState } from "babylonjs-editor/renderer/editor/components/inspectors/materials/material-inspector";
36
34
  export { InspectorColor } from "babylonjs-editor/renderer/editor/gui/inspector/fields/color";
@@ -59,7 +57,6 @@ declare module 'babylonjs-editor' {
59
57
  export { Icon } from "babylonjs-editor/renderer/editor/gui/icon";
60
58
  export { SceneImporterTools, ISceneImporterToolsConfiguration } from "babylonjs-editor/renderer/editor/scene/import-tools";
61
59
  export { Packer, IPackerOptions, PackerStatus } from "babylonjs-editor/renderer/editor/project/packer/packer";
62
- import "./renderer/editor/gui/augmentations/index";
63
60
  }
64
61
 
65
62
  declare module 'babylonjs-editor/renderer/editor/plugins/assets' {
@@ -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";
@@ -615,21 +611,17 @@ declare module 'babylonjs-editor/renderer/editor/editor' {
615
611
  * @hidden
616
612
  */
617
613
  _applyPreferences(): Promise<void>;
614
+ /**
615
+ * @hidden
616
+ */
617
+ _applyPreferencesPlugins(): Promise<void>;
618
618
  }
619
619
  }
620
620
 
621
621
  declare module 'babylonjs-editor/renderer/editor/tools/tools' {
622
- import { Engine, Scene, Node, Nullable, Camera, Mesh, Material } from "babylonjs";
622
+ import { Engine, Scene, Node, Camera, Mesh, Material } from "babylonjs";
623
623
  import { ICommonMetadata, IEditorPreferences, IMaterialMetadata, IMeshMetadata, ITransformNodeMetadata } from "babylonjs-editor/renderer/editor/tools/types";
624
624
  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
625
  /**
634
626
  * Normalizes the given path according to the current platform.
635
627
  * @param path defines the path to normalize according to the current platform.
@@ -689,6 +681,10 @@ declare module 'babylonjs-editor/renderer/editor/tools/tools' {
689
681
  * @param timeMs the time in milliseconds to wait.
690
682
  */
691
683
  static Wait(timeMs: number): Promise<void>;
684
+ /**
685
+ * Waits for the next animation frame.
686
+ */
687
+ static WaitNextAnimationFrame(): Promise<void>;
692
688
  /**
693
689
  * Returns the given array by keeping only distinct values.
694
690
  * @param array the array to filter.
@@ -753,22 +749,6 @@ declare module 'babylonjs-editor/renderer/editor/tools/tools' {
753
749
  * @param onProgress callback called while file is loading (if the server supports this mode).
754
750
  */
755
751
  static LoadFile<T = string | ArrayBuffer>(url: string, useArrayBuffer: boolean, onProgress?: (data: any) => void): Promise<T>;
756
- /**
757
- * Opens the save dialog and returns the selected path.
758
- * @param path optional path where to open the save dialog.
759
- */
760
- static ShowSaveDialog(path?: Nullable<string>): Promise<string>;
761
- /**
762
- * Opens the open-file dialog and returns the selected path.
763
- * @param path the path where to start the dialog.
764
- */
765
- static ShowOpenFileDialog(title: string, path?: Nullable<string>): Promise<string>;
766
- /**
767
- * Opens the save file dialog and returns the selected path.
768
- * @param title the title of the save file dialog.
769
- * @param path optional path where to open the save dialog.
770
- */
771
- static ShowSaveFileDialog(title: Nullable<string>, path?: Nullable<string>): Promise<string>;
772
752
  }
773
753
  }
774
754
 
@@ -1212,6 +1192,12 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/files
1212
1192
  * @param to defines the new absolute path to the file being moved.
1213
1193
  */
1214
1194
  abstract moveFile(from: string, to: string): void | Promise<void>;
1195
+ /**
1196
+ * Returns wheter or not the given file can be renamed.
1197
+ * @param from defines the previous absolute path to the file being renamed.
1198
+ * @param to defines the new absolute path to the file being renamed.
1199
+ */
1200
+ canRename(_from: string, _to: string): Promise<boolean>;
1215
1201
  /**
1216
1202
  * Called on the given file is being remvoed.
1217
1203
  * @param path defines the absolute path to the file that is being removed.
@@ -1275,11 +1261,6 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/files
1275
1261
  * Defines the reference to the assets worker.
1276
1262
  */
1277
1263
  static AssetWorker: IWorkerConfiguration;
1278
- /**
1279
- * Defines the reference to the drag'n'dropped item.
1280
- * @hidden
1281
- */
1282
- static _DragAndDroppedItem: Nullable<AssetsBrowserItemHandler>;
1283
1264
  /**
1284
1265
  * Initialzes the item handler.
1285
1266
  */
@@ -1326,7 +1307,7 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/files
1326
1307
  * @param ev defines the reference to the event object.
1327
1308
  * @param pick defines the picking info generated while dropping in the preview.
1328
1309
  */
1329
- onDropInPreview(_1: React.DragEvent<HTMLElement>, _2: PickingInfo): void;
1310
+ onDropInPreview(_1: DragEvent, _2: PickingInfo): void;
1330
1311
  /**
1331
1312
  * Called on the user drops the asset in a supported inspector field.
1332
1313
  * @param ev defiens the reference to the event object.
@@ -1353,7 +1334,7 @@ declare module 'babylonjs-editor/renderer/editor/assets/materials' {
1353
1334
  import * as React from "react";
1354
1335
  import { Material, PickingInfo, Scene, Node } from "babylonjs";
1355
1336
  import { AbstractAssets, IAssetComponentItem } from "babylonjs-editor/renderer/editor/assets/abstract-assets";
1356
- import "./materials/augmentations";
1337
+ import "../tools/materials/augmentations";
1357
1338
  export class MaterialAssets extends AbstractAssets {
1358
1339
  /**
1359
1340
  * Defines the type of the data transfer data when drag'n'dropping asset.
@@ -1532,13 +1513,12 @@ declare module 'babylonjs-editor/renderer/editor/assets/textures' {
1532
1513
  }
1533
1514
 
1534
1515
  declare module 'babylonjs-editor/renderer/editor/components/inspector' {
1516
+ import { Undefinable } from "babylonjs-editor/shared/types";
1535
1517
  import * as React from "react";
1536
1518
  import { Editor } from "babylonjs-editor/renderer/editor/editor";
1537
1519
  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
- import { Undefinable } from "babylonjs-editor/shared/types";
1540
1520
  export interface IObjectInspector {
1541
- ctor: (new (props: IObjectInspectorProps) => AbstractInspectorLegacy<any> | AbstractInspector<any, any>);
1521
+ ctor: (new (props: IObjectInspectorProps) => AbstractInspector<any, any>);
1542
1522
  ctorNames: string[];
1543
1523
  title: string;
1544
1524
  isSupported?: Undefinable<(obj: any) => boolean>;
@@ -1546,7 +1526,7 @@ declare module 'babylonjs-editor/renderer/editor/components/inspector' {
1546
1526
  * The reference to the inspector.
1547
1527
  * @hidden
1548
1528
  */
1549
- _ref?: Undefinable<AbstractInspectorLegacy<any>>;
1529
+ _ref?: Undefinable<AbstractInspector<any, any>>;
1550
1530
  /**
1551
1531
  * @hidden
1552
1532
  */
@@ -1621,10 +1601,6 @@ declare module 'babylonjs-editor/renderer/editor/components/inspector' {
1621
1601
  * Refreshes the inspector.
1622
1602
  */
1623
1603
  refresh(): void;
1624
- /**
1625
- * Refreshes the current display of the current inspector.
1626
- */
1627
- refreshDisplay(): void;
1628
1604
  /**
1629
1605
  * Resizes the inspector.
1630
1606
  */
@@ -1632,150 +1608,6 @@ declare module 'babylonjs-editor/renderer/editor/components/inspector' {
1632
1608
  }
1633
1609
  }
1634
1610
 
1635
- declare module 'babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector-legacy' {
1636
- import * as React from "react";
1637
- import { GUI, GUIController } from "dat.gui";
1638
- import { Color3, Color4, BaseTexture, ISize, Material } from "babylonjs";
1639
- import { Nullable, Undefinable } from "babylonjs-editor/shared/types";
1640
- import { Editor } from "babylonjs-editor/renderer/editor/editor";
1641
- import { SuggestController } from "babylonjs-editor/renderer/editor/gui/augmentations/suggest";
1642
- import { AbstractAssets } from "babylonjs-editor/renderer/editor/assets/abstract-assets";
1643
- import { IAssetsProps } from "babylonjs-editor/renderer/editor/components/assets";
1644
- import { IObjectInspectorProps } from "babylonjs-editor/renderer/editor/components/inspector";
1645
- export abstract class AbstractInspectorLegacy<T> extends React.Component<IObjectInspectorProps> {
1646
- /**
1647
- * Defines the GUI reference.
1648
- */
1649
- tool: Nullable<GUI>;
1650
- /**
1651
- * Defines wether or not undo/redo should be handled by the inspector.
1652
- */
1653
- handleUndoRedo: boolean;
1654
- /**
1655
- * The editor reference.
1656
- */
1657
- protected editor: Editor;
1658
- /**
1659
- * The selected object reference.
1660
- */
1661
- protected selectedObject: T;
1662
- /**
1663
- * Defines the Id of the tool.
1664
- */
1665
- protected _id: string;
1666
- /**
1667
- * Defines the div of the tool.
1668
- */
1669
- protected _div: Nullable<HTMLDivElement>;
1670
- /**
1671
- * Constructor.
1672
- * @param props the component's props.
1673
- */
1674
- constructor(props: IObjectInspectorProps);
1675
- /**
1676
- * Renders the component.
1677
- */
1678
- render(): React.ReactNode;
1679
- /**
1680
- * Called on the component did mount.
1681
- */
1682
- abstract onUpdate(): void;
1683
- /**
1684
- * Called on a controller changes.
1685
- * @param folder the folder containing the modified controller.
1686
- * @param controller the controller that has been modified.
1687
- */
1688
- onControllerChange(_?: GUI, __?: GUIController): void;
1689
- /**
1690
- * Called on a controller finished changes.
1691
- * @param folder the folder containing the modified controller.
1692
- * @param controller the controller that has been modified.
1693
- */
1694
- onControllerFinishChange(_?: GUI, __?: GUIController): void;
1695
- /**
1696
- * Gets wether or not the component is mounted.
1697
- */
1698
- protected get isMounted(): boolean;
1699
- /**
1700
- * Called on the component did moubnt.
1701
- */
1702
- componentDidMount(): void;
1703
- /**
1704
- * Called on the component will unmount.
1705
- */
1706
- componentWillUnmount(): void;
1707
- /**
1708
- * Refreshes the inspector tool.
1709
- */
1710
- refresh(): void;
1711
- /**
1712
- * Refreshes the edition tool.
1713
- */
1714
- refreshDisplay(): void;
1715
- /**
1716
- * Clears the given folder.
1717
- */
1718
- clearFolder(folder: GUI): void;
1719
- /**
1720
- * Clears the whole tool.
1721
- */
1722
- clear(): void;
1723
- /**
1724
- * Resizes the edition tool.
1725
- * @param size defines the size of the panel.
1726
- */
1727
- resize(size?: ISize): void;
1728
- /**
1729
- * Returns the reference to the texture identified by the given editor name.
1730
- * @param editorName the name of the texture to find.
1731
- */
1732
- protected getTexture(editorName: string): Nullable<BaseTexture>;
1733
- /**
1734
- * Returns the reference to the material identified by the given editor name.
1735
- * @param name defines the name of the material to find.
1736
- */
1737
- protected getMaterial(name: string): Nullable<Material>;
1738
- /**
1739
- * Adds a new texture field to the inspector.
1740
- * @param parent the parent folder where to add the texture field.
1741
- * @param object the object to modify.
1742
- * @param property the property to modify in the given object.
1743
- * @param onChange optional callback called on the texture changed.
1744
- */
1745
- protected addTextureList(parent: GUI | undefined, object: any, property: string, onChange?: (texture: Nullable<BaseTexture>) => void): SuggestController;
1746
- /**
1747
- * Adds a new texture field to the inspector.
1748
- * @param parent the parent folder where to add the texture field.
1749
- * @param object the object to modify.
1750
- * @param property the property to modify in the given object.
1751
- * @param onChange optional callback called on the texture changed.
1752
- */
1753
- protected addMaterialList(parent: GUI | undefined, object: any, property: string, onChange?: (material: Nullable<Material>) => void): SuggestController;
1754
- /**
1755
- * Adds a color folder to edit RGB(A)
1756
- * @param parent the parent folder where to add the color folder.
1757
- * @param name the name of the color folder.
1758
- * @param object the base object to modify.
1759
- * @param property the path to the color property.
1760
- * @param onChange optional callback called on the color changed.
1761
- */
1762
- protected addColor(parent: GUI, name: string, object: any, property: string, onChange?: (color: Color3 | Color4) => void): GUI;
1763
- /**
1764
- * Adds a new suggest contoller containg the list of all the civen componet's assets.
1765
- * @param parent defines the parent folder where to add the assets list.
1766
- * @param componentCtor defines the reference to the constructor of the assets component to get its items.
1767
- * @param baseValue defines the base value of the suggest controller to display.
1768
- * @param object defines the reference to the object to modify.
1769
- * @param property defines the path to the property to modify.
1770
- */
1771
- protected addAssetsList(parent: GUI, componentCtor: (new (props: IAssetsProps) => AbstractAssets), baseValue: Undefinable<string>, object: any, property: string): SuggestController;
1772
- /**
1773
- * Called on the tool is mounted to handle onChange & onFinishChange
1774
- */
1775
- protected _handleChanged(root?: GUI): void;
1776
- }
1777
- }
1778
-
1779
1611
  declare module 'babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector' {
1780
1612
  import { Nullable } from "babylonjs-editor/shared/types";
1781
1613
  import * as React from "react";
@@ -1797,6 +1629,10 @@ declare module 'babylonjs-editor/renderer/editor/components/inspectors/abstract-
1797
1629
  * Defines the reference to the edited root object (node, sound, etc.).
1798
1630
  */
1799
1631
  protected selectedObject: T;
1632
+ /**
1633
+ * @hidden
1634
+ */
1635
+ protected readonly _inspectorName: string;
1800
1636
  /**
1801
1637
  * Constructor.
1802
1638
  * @param props the component's props.
@@ -2056,6 +1892,10 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/fields/number' {
2056
1892
  * Defines wether or not the label should be hidden.
2057
1893
  */
2058
1894
  noLabel?: boolean;
1895
+ /**
1896
+ * Defines the default value of the field in case the editor property doesn't exist.
1897
+ */
1898
+ defaultValue?: number;
2059
1899
  /**
2060
1900
  * Defines wether or not automatic undo/redo should be skipped.
2061
1901
  */
@@ -2420,7 +2260,10 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/fields/vector3' {
2420
2260
  }
2421
2261
 
2422
2262
  declare module 'babylonjs-editor/renderer/editor/gui/inspector/notifier' {
2263
+ import { Nullable } from "babylonjs-editor/shared/types";
2423
2264
  import * as React from "react";
2265
+ import { _IDragAndDroppedItem } from "babylonjs-editor/renderer/editor/components/graph";
2266
+ import { AssetsBrowserItemHandler } from "babylonjs-editor/renderer/editor/components/assets-browser/files/item-handler";
2424
2267
  export interface IInspectorNotifierChangeOptions {
2425
2268
  /**
2426
2269
  * Defines the caller that notifies the change. This is typically used to don't listen themselves.
@@ -2450,6 +2293,8 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/notifier' {
2450
2293
  * @param caller defines the reference to the original caller.
2451
2294
  */
2452
2295
  static Unregister(caller: any): void;
2296
+ static _DragAndDroppedGraphItem: Nullable<_IDragAndDroppedItem>;
2297
+ static _DragAndDroppedAssetItem: Nullable<AssetsBrowserItemHandler>;
2453
2298
  /**
2454
2299
  * Called on the user drops the asset in a supported inspector field.
2455
2300
  * @param ev defiens the reference to the event object.
@@ -2463,6 +2308,24 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/notifier' {
2463
2308
  declare module 'babylonjs-editor/renderer/editor/gui/inspector/fields/color-picker' {
2464
2309
  import * as React from "react";
2465
2310
  import { Color3, Color4 } from "babylonjs";
2311
+ export interface IColor4Like {
2312
+ /**
2313
+ * Defines the red component (between 0 and 1, default is 0)
2314
+ */
2315
+ r: number;
2316
+ /**
2317
+ * Defines the green component (between 0 and 1, default is 0)
2318
+ */
2319
+ g: number;
2320
+ /**
2321
+ * Defines the blue component (between 0 and 1, default is 0)
2322
+ */
2323
+ b: number;
2324
+ /**
2325
+ * Defines the alpha component (between 0 and 1, default is 1)
2326
+ */
2327
+ a: number;
2328
+ }
2466
2329
  export interface IInspectorColorPickerProps {
2467
2330
  /**
2468
2331
  * Defines the reference to the object to modify.
@@ -2566,7 +2429,7 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/fields/list' {
2566
2429
  /**
2567
2430
  * Defines the label of the field.
2568
2431
  */
2569
- label: string;
2432
+ label: string | JSX.Element;
2570
2433
  /**
2571
2434
  * Defines the list of items drawn in the suggest.
2572
2435
  */
@@ -2579,6 +2442,10 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/fields/list' {
2579
2442
  * Defines the optional list of all available drag'n'droppable types.
2580
2443
  */
2581
2444
  dndHandledTypes?: string[];
2445
+ /**
2446
+ * Defines the optional color to apply on the border left.
2447
+ */
2448
+ borderLeftColor?: string;
2582
2449
  /**
2583
2450
  * Defines the optional callback called on the value changes.
2584
2451
  * @param value defines the new value of the object's property.
@@ -2974,11 +2841,17 @@ declare module 'babylonjs-editor/renderer/editor/project/files' {
2974
2841
  declare module 'babylonjs-editor/renderer/editor/project/typings' {
2975
2842
  import { Undefinable, IStringDictionary } from "babylonjs-editor/shared/types";
2976
2843
  import { KTXToolsType } from "babylonjs-editor/renderer/editor/tools/ktx";
2844
+ import { IRegisteredPlugin } from "babylonjs-editor/renderer/editor/tools/types";
2977
2845
  /**
2978
2846
  * Defines the type the possible values of the physics engine type string
2979
2847
  * store in the workspace JSON file.
2980
2848
  */
2981
2849
  export type PhysicsEngineType = "cannon" | "oimo" | "ammo";
2850
+ /**
2851
+ * Defines the values of available package managers than can be used by
2852
+ * the editor for each workspace. The default value is "npm".
2853
+ */
2854
+ export type PackageManagerType = "npm" | "yarn";
2982
2855
  export interface IWorkSpace {
2983
2856
  /**
2984
2857
  * Defines the version of the Editor that handled the project.
@@ -3016,6 +2889,17 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
3016
2889
  * Defines the dictionary that contains the preferences of external plugins in the editor.
3017
2890
  */
3018
2891
  pluginsPreferences?: Undefinable<IStringDictionary<any>>;
2892
+ /**
2893
+ * Defines the package manager used by the project.
2894
+ * Can be npm or yarn.
2895
+ */
2896
+ packageManager: PackageManagerType;
2897
+ /**
2898
+ * Defines the custom directory where to generate the output scenes. By default,
2899
+ * the value is the working directory of the workspace.
2900
+ * @default "./"
2901
+ */
2902
+ outputSceneDirectory: string;
3019
2903
  /**
3020
2904
  * Defines wether or not the project should be played in an isolated iFrame in the preview
3021
2905
  * panel when the user clicks the "play button". This is typically useful to avoid conflicts between
@@ -3039,6 +2923,15 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
3039
2923
  */
3040
2924
  keyPath?: string;
3041
2925
  };
2926
+ /**
2927
+ * Defines the options of the custom webserver.
2928
+ */
2929
+ customWebServer?: {
2930
+ /**
2931
+ * Defines the Url of the custom webserver where to start the game.
2932
+ */
2933
+ url: string;
2934
+ };
3042
2935
  /**
3043
2936
  * Defines the options of the KTX2 compression tool.
3044
2937
  */
@@ -3105,12 +2998,20 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
3105
2998
  quality: "etcfast" | "etcnormal" | "etcslow";
3106
2999
  };
3107
3000
  };
3001
+ /**
3002
+ * Defines the list of all registered plugins for the workspace.
3003
+ */
3004
+ plugins?: Undefinable<IRegisteredPlugin[]>;
3108
3005
  }
3109
3006
  export interface IProject {
3110
3007
  /**
3111
3008
  * Defines the list of the files associated to the project.
3112
3009
  */
3113
3010
  filesList?: string[];
3011
+ /**
3012
+ * Defines the list of scene's animation groups.
3013
+ */
3014
+ animationGroups: string[];
3114
3015
  /**
3115
3016
  * Defines the list of scene's cameras.
3116
3017
  */
@@ -3207,6 +3108,10 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
3207
3108
  */
3208
3109
  graphs: Undefinable<string[]>;
3209
3110
  };
3111
+ /**
3112
+ * Defines the list of all project's cinematics.
3113
+ */
3114
+ cinematics: string[];
3210
3115
  /**
3211
3116
  * Defines some useful datas
3212
3117
  */
@@ -3343,6 +3248,7 @@ declare module 'babylonjs-editor/renderer/editor/project/project-exporter' {
3343
3248
 
3344
3249
  declare module 'babylonjs-editor/renderer/editor/project/project' {
3345
3250
  import { Nullable } from "babylonjs-editor/shared/types";
3251
+ import { Cinematic } from "babylonjs-editor/renderer/editor/cinematic/cinematic";
3346
3252
  import { IProject } from "babylonjs-editor/renderer/editor/project/typings";
3347
3253
  export class Project {
3348
3254
  /**
@@ -3357,6 +3263,10 @@ declare module 'babylonjs-editor/renderer/editor/project/project' {
3357
3263
  * Defines the current project datas.
3358
3264
  */
3359
3265
  static Project: Nullable<IProject>;
3266
+ /**
3267
+ * Defines the list of all available cinematics for the project.
3268
+ */
3269
+ static Cinematics: Cinematic[];
3360
3270
  /**
3361
3271
  * Returns the project path set when opened the editor from the OS file system.
3362
3272
  */
@@ -3423,6 +3333,10 @@ declare module 'babylonjs-editor/renderer/editor/project/workspace' {
3423
3333
  * @param projectPath the absolute path of the saved project.
3424
3334
  */
3425
3335
  static WriteWorkspaceFile(projectPath: string): Promise<void>;
3336
+ /**
3337
+ * Returns the relative path to the directory where the output scene should be written.
3338
+ */
3339
+ static get OutputSceneDirectory(): string;
3426
3340
  /**
3427
3341
  * Refreshes the list of available projects in the workspace.
3428
3342
  */
@@ -3504,6 +3418,18 @@ declare module 'babylonjs-editor/renderer/editor/project/workspace' {
3504
3418
  * @param editor defines the editor reference.
3505
3419
  */
3506
3420
  static RestartTypeScriptWatcher(editor: Editor): Nullable<IEditorProcess>;
3421
+ /**
3422
+ * Returns wether or not the major Babylon.JS version of the project matches with the one of the editor.
3423
+ * Checked at initialization time of the Editor.
3424
+ * @param version defines the version of Babylon.JS being used by the editor.
3425
+ */
3426
+ static MatchesEditorBabylonJSMajorVersion(version: string): Promise<boolean>;
3427
+ /**
3428
+ * Configures the package.json file of the project to match the Babylon.JS version used in the editor.
3429
+ * Checked at initialization time of the Editor.
3430
+ * @param version defines the version of Babylon.JS being used by the editor.
3431
+ */
3432
+ static MatchBabylonJSEditorVersion(version: string): Promise<void>;
3507
3433
  /**
3508
3434
  * Kills all the existing programs.
3509
3435
  */
@@ -3526,6 +3452,10 @@ declare module 'babylonjs-editor/renderer/editor/project/scene-exporter' {
3526
3452
  * Defines wether or not files are forced to be re-generated.
3527
3453
  */
3528
3454
  forceRegenerateFiles?: boolean;
3455
+ /**
3456
+ * Defines wether or not all compressed textures should be regenerated.
3457
+ */
3458
+ forceRegenerateCompressedTextures?: boolean;
3529
3459
  /**
3530
3460
  * Defines wether or not all compressed texture formats should be generated.
3531
3461
  * Typically used when exporting final scene version.
@@ -3533,9 +3463,23 @@ declare module 'babylonjs-editor/renderer/editor/project/scene-exporter' {
3533
3463
  generateAllCompressedTextureFormats?: boolean;
3534
3464
  }
3535
3465
  export class SceneExporter {
3466
+ /**
3467
+ * Defines the list of all textures file types that are copy-able for the
3468
+ * final assets output folder.
3469
+ */
3536
3470
  static readonly CopyAbleImageTypes: string[];
3537
3471
  /**
3538
- * Defines the list of all files types that are copy-able for the
3472
+ * Defines the list of all video file types that are copy-able for the
3473
+ * final assets output folder.
3474
+ */
3475
+ static readonly CopyAbleVideoTypes: string[];
3476
+ /**
3477
+ * Defines the list of all 3d assets file types that are copy-able for the
3478
+ * final assets output folder.
3479
+ */
3480
+ static readonly CopyAble3dAssetTypes: string[];
3481
+ /**
3482
+ * Defines the list of all file types that are copy-able for the
3539
3483
  * final assets output folder.
3540
3484
  */
3541
3485
  static readonly CopyAbleAssetsTypes: string[];
@@ -3767,11 +3711,11 @@ declare module 'babylonjs-editor/renderer/editor/gui/confirm' {
3767
3711
  /**
3768
3712
  * The title of the dialog.
3769
3713
  */
3770
- title: string;
3714
+ title: React.ReactNode;
3771
3715
  /**
3772
3716
  * The message of the dialog.
3773
3717
  */
3774
- message: string;
3718
+ message: React.ReactNode;
3775
3719
  /**
3776
3720
  * The icon to show on top-left of the dialog.
3777
3721
  */
@@ -3792,7 +3736,7 @@ declare module 'babylonjs-editor/renderer/editor/gui/confirm' {
3792
3736
  * @param message the message of the dialog.
3793
3737
  * @param icon the icon of the dialog to show on top-left.
3794
3738
  */
3795
- static Show(title: string, message: string, icon?: Undefinable<IconName | JSX.Element>): Promise<boolean>;
3739
+ static Show(title: React.ReactNode, message: React.ReactNode, icon?: Undefinable<IconName | JSX.Element>): Promise<boolean>;
3796
3740
  /**
3797
3741
  * Renders the component.
3798
3742
  */
@@ -4474,6 +4418,10 @@ declare module 'babylonjs-editor/renderer/editor/components/graph' {
4474
4418
  */
4475
4419
  showLights: boolean;
4476
4420
  }
4421
+ export interface _IDragAndDroppedItem {
4422
+ nodeId: string;
4423
+ onDropInInspector: (ev: React.DragEvent<HTMLElement>, object: any, property: string) => Promise<void>;
4424
+ }
4477
4425
  export class Graph extends React.Component<IGraphProps, IGraphState> {
4478
4426
  /**
4479
4427
  * Defines the last selected node in the graph.
@@ -4558,6 +4506,8 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser' {
4558
4506
  import { IStringDictionary, Nullable } from "babylonjs-editor/shared/types";
4559
4507
  import * as React from "react";
4560
4508
  import { Editor } from "babylonjs-editor/renderer/editor/editor";
4509
+ import { AssetsBrowserTree } from "babylonjs-editor/renderer/editor/components/assets-browser/tree";
4510
+ import { AssetsBrowserFiles } from "babylonjs-editor/renderer/editor/components/assets-browser/files";
4561
4511
  export interface IAssetsBrowserProps {
4562
4512
  /**
4563
4513
  * Defines the reference to the editor.
@@ -4589,6 +4539,14 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser' {
4589
4539
  * Defines the reference to the dictionary that stores all the moved assets.
4590
4540
  */
4591
4541
  movedAssetsDictionary: IStringDictionary<string>;
4542
+ /**
4543
+ * @hidden
4544
+ */
4545
+ _tree: Nullable<AssetsBrowserTree>;
4546
+ /**
4547
+ * @hidden
4548
+ */
4549
+ _files: Nullable<AssetsBrowserFiles>;
4592
4550
  /**
4593
4551
  * Constructor.
4594
4552
  * @param props defines the component's props.
@@ -5069,99 +5027,7 @@ declare module 'babylonjs-editor/renderer/editor/workers/workers' {
5069
5027
  * @param parameters defines the parameters to send to the function called in the worker.
5070
5028
  * @returns the result of the function computed in the worker's context.
5071
5029
  */
5072
- static ExecuteFunction<TClass, TFunction extends FunctionPropertyNames<TClass>>(config: IWorkerConfiguration, fnName: TFunction, ...parameters: Parameters<TClass[TFunction]>): Promise<Awaitable<ReturnType<TClass[TFunction]>>>;
5073
- }
5074
- }
5075
-
5076
- declare module 'babylonjs-editor/renderer/editor/gui/augmentations/suggest' {
5077
- import { Undefinable } from "babylonjs-editor/shared/types";
5078
- import * as React from "react";
5079
- import * as dat from "dat.gui";
5080
- export interface _IListSuggestProps {
5081
- controller: SuggestController;
5082
- }
5083
- export interface _IListSuggestState {
5084
- list: string[];
5085
- value: string;
5086
- }
5087
- export class _ListSuggest extends React.Component<_IListSuggestProps, _IListSuggestState> {
5088
- /**
5089
- * Constructor.
5090
- * @param props the component's props.
5091
- */
5092
- constructor(props: _IListSuggestProps);
5093
- /**
5094
- * Renders the component.
5095
- */
5096
- render(): React.ReactNode;
5097
- }
5098
- /**
5099
- * Suggest conroller.
5100
- */
5101
- export class SuggestController extends dat.controllers.Controller {
5102
- /**
5103
- * @hidden
5104
- */
5105
- object: any;
5106
- /**
5107
- * @hidden
5108
- */
5109
- property: string;
5110
- /**
5111
- * @hidden
5112
- */
5113
- list: string[];
5114
- /**
5115
- * @hidden
5116
- */
5117
- __onChange: (r: string) => void;
5118
- /**
5119
- * @hidden
5120
- */
5121
- __onFinishChange: (r: string) => void;
5122
- /**
5123
- * @hidden
5124
- */
5125
- __renderer: Undefinable<{
5126
- onShowLabel?: (item: string) => string;
5127
- onShowIcon?: (item: string) => JSX.Element;
5128
- onShowTooltip?: (item: string) => JSX.Element | undefined;
5129
- onUpdate?: () => string[] | Promise<string[]>;
5130
- }>;
5131
- /**
5132
- * Constructor.
5133
- * @param object the object to modify.
5134
- * @param property the property of the object tu get and set changes.
5135
- * @param list the list of suggestions.
5136
- * @param onShowLabel optional callback called when rendering a suggestion item.
5137
- */
5138
- constructor(object: any, property: string, list?: string[], renderer?: {
5139
- onShowLabel?: (item: string) => string;
5140
- onShowIcon?: (item: string) => JSX.Element;
5141
- onUpdate?: () => string[];
5142
- tooltip?: JSX.Element;
5143
- });
5144
- /**
5145
- * Registers the onChange callback.
5146
- */
5147
- onChange(callback: (r: string) => void): SuggestController;
5148
- /**
5149
- * Registers the onFinishChange callback.
5150
- */
5151
- onFinishChange(callback: (r: string) => void): SuggestController;
5152
- /**
5153
- * Updates the current display of the controller.
5154
- */
5155
- updateDisplay(): SuggestController;
5156
- /**
5157
- * Sets a new name for the field.
5158
- * @param name the new name of the field.
5159
- */
5160
- name(name: string): SuggestController;
5161
- /**
5162
- * Disposes the component.
5163
- */
5164
- dispose(): void;
5030
+ static ExecuteFunction<TClass extends Record<any, any>, TFunction extends FunctionPropertyNames<TClass>>(config: IWorkerConfiguration, fnName: TFunction, ...parameters: Parameters<TClass[TFunction]>): Promise<Awaitable<ReturnType<TClass[TFunction]>>>;
5165
5031
  }
5166
5032
  }
5167
5033
 
@@ -5457,6 +5323,59 @@ declare module 'babylonjs-editor/renderer/editor/tools/ktx' {
5457
5323
  }
5458
5324
  }
5459
5325
 
5326
+ declare module 'babylonjs-editor/renderer/editor/cinematic/cinematic' {
5327
+ import { Nullable } from "babylonjs-editor/shared/types";
5328
+ import { AnimationGroup, Scene } from "babylonjs";
5329
+ import { ICinematic, ICinematicCamera, ICinematicTrack } from "babylonjs-editor/renderer/editor/cinematic/base";
5330
+ export class Cinematic implements ICinematic {
5331
+ /**
5332
+ * @hidden
5333
+ */
5334
+ _animationGroup: Nullable<AnimationGroup>;
5335
+ /**
5336
+ * Plays the cinematic.
5337
+ */
5338
+ play(scene: Scene, from?: number): void;
5339
+ /**
5340
+ * Stops the cinematic.
5341
+ */
5342
+ stop(): void;
5343
+ /**
5344
+ * Generates the animation group and returns its reference.
5345
+ */
5346
+ generateAnimationGroup(scene: Scene): AnimationGroup;
5347
+ /**
5348
+ * Serializes the cinematic.
5349
+ */
5350
+ serialize(): ICinematic;
5351
+ /**
5352
+ * Parses the cinematic according the given parsed data.
5353
+ * @param parsedData defines the reference to object as JSON representation of cinematic.
5354
+ */
5355
+ static Parse(parsedData: ICinematic): Cinematic;
5356
+ /**
5357
+ * Defines the name of the cinematic.
5358
+ */
5359
+ name: string;
5360
+ /**
5361
+ * Defines the number of frames computed per second.
5362
+ */
5363
+ framesPerSecond: number;
5364
+ /**
5365
+ * Defines wether or not the cinematic is embedded in the file scene file output.
5366
+ */
5367
+ embedInSceneFile: boolean;
5368
+ /**
5369
+ * Defines the reference to the camera's configuration for the cinematic.
5370
+ */
5371
+ camera: ICinematicCamera;
5372
+ /**
5373
+ * Defines the list of all cinematic tracks.
5374
+ */
5375
+ tracks: ICinematicTrack[];
5376
+ }
5377
+ }
5378
+
5460
5379
  declare module 'babylonjs-editor/renderer/editor/tools/process' {
5461
5380
  import { IPty } from "node-pty";
5462
5381
  import { Terminal, IDisposable } from "xterm";
@@ -5537,9 +5456,10 @@ declare module 'babylonjs-editor/renderer/editor/tools/process' {
5537
5456
  * Executes the given command and returns the reference to the newly created editor process object.
5538
5457
  * @param command defines the command to execute in the terminal process.
5539
5458
  * @param readonly defines wether or not the terminal process is in read-only.
5459
+ * @param cwd defines the absolute path to the working directory where to process will be executed.
5540
5460
  * @returns the newly created editor process object that contains the terminal, process, etc.
5541
5461
  */
5542
- static ExecuteCommand(command: string, readonly?: boolean): Nullable<IEditorProcess>;
5462
+ static ExecuteCommand(command: string, readonly?: boolean, cwd?: string): Nullable<IEditorProcess>;
5543
5463
  /**
5544
5464
  * Kills and removes the editor process identified by the given id if exists.
5545
5465
  * @param id defines the id of the editor process to remove if exists.
@@ -5558,6 +5478,153 @@ declare module 'babylonjs-editor/renderer/editor/tools/process' {
5558
5478
  }
5559
5479
  }
5560
5480
 
5481
+ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/tree' {
5482
+ import * as React from "react";
5483
+ import { ITreeNode } from "@blueprintjs/core";
5484
+ import { Editor } from "babylonjs-editor/renderer/editor/editor";
5485
+ export interface IAssetsBrowserFavorite {
5486
+ /**
5487
+ * Defines the id of the favorite.
5488
+ */
5489
+ id: string;
5490
+ /**
5491
+ * Defines the name of the favorite.
5492
+ */
5493
+ name: string;
5494
+ }
5495
+ export interface IAssetsBrowserTreeProps {
5496
+ /**
5497
+ * Defines the reference to the editor.
5498
+ */
5499
+ editor: Editor;
5500
+ /**
5501
+ * Defines the callback called on a directory has been clicked in the tree.
5502
+ */
5503
+ onDirectorySelected: (path: string) => void;
5504
+ /**
5505
+ * Defines the callback called on a favorite has been clicked in the tree.
5506
+ */
5507
+ onFavoriteSelected: (favorite: IAssetsBrowserFavorite) => void;
5508
+ }
5509
+ export interface IAssetsBrowserTreeState {
5510
+ /**
5511
+ * Defines the list of all available nodes in the tree.
5512
+ */
5513
+ nodes: ITreeNode<string>[];
5514
+ }
5515
+ export class AssetsBrowserTree extends React.Component<IAssetsBrowserTreeProps, IAssetsBrowserTreeState> {
5516
+ /**
5517
+ * Defines the id of the node for favorites "Textures".
5518
+ */
5519
+ static readonly TexturesFavorite: IAssetsBrowserFavorite;
5520
+ /**
5521
+ * Defines the id of the node for favorites "Materials".
5522
+ */
5523
+ static readonly MaterialsFavorite: IAssetsBrowserFavorite;
5524
+ /**
5525
+ * Constructor.
5526
+ * @param props defines the component's props.
5527
+ */
5528
+ constructor(props: IAssetsBrowserTreeProps);
5529
+ /**
5530
+ * Renders the component.
5531
+ */
5532
+ render(): React.ReactNode;
5533
+ /**
5534
+ * Sets the new absolute path to the directory to read and draw its items.
5535
+ * @param directoryPath defines the absolute path to the directory to show in the view.
5536
+ */
5537
+ setDirectory(directoryPath: string): Promise<void>;
5538
+ /**
5539
+ * Refreshes the current tree.
5540
+ */
5541
+ refresh(): void;
5542
+ }
5543
+ }
5544
+
5545
+ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/files' {
5546
+ import * as React from "react";
5547
+ import { Editor } from "babylonjs-editor/renderer/editor/editor";
5548
+ import { IAssetsBrowserFavorite } from "babylonjs-editor/renderer/editor/components/assets-browser/tree";
5549
+ import { AssetsBrowserItem } from "babylonjs-editor/renderer/editor/components/assets-browser/files/item";
5550
+ export interface IAssetsBrowserFilesProps {
5551
+ /**
5552
+ * Defines the reference to the editor.
5553
+ */
5554
+ editor: Editor;
5555
+ /**
5556
+ * Defines the callback called on a directory has been clicked in the tree.
5557
+ */
5558
+ onDirectorySelected: (path: string) => void;
5559
+ }
5560
+ export interface IAssetsBrowserFilesState {
5561
+ /**
5562
+ * Defines the current stack of opened folders.
5563
+ */
5564
+ pathStack: string[];
5565
+ /**
5566
+ * Defines the absolute path to the working directory.
5567
+ */
5568
+ currentDirectory: string;
5569
+ /**
5570
+ * Defines the current filter.
5571
+ */
5572
+ filter: string;
5573
+ /**
5574
+ * Defines the current size value for the items.
5575
+ */
5576
+ itemsSize: number;
5577
+ /**
5578
+ * Defines the list of all items drawn in the view.
5579
+ */
5580
+ items: React.ReactNode[];
5581
+ }
5582
+ export class AssetsBrowserFiles extends React.Component<IAssetsBrowserFilesProps, IAssetsBrowserFilesState> {
5583
+ /**
5584
+ * Defines the list of all selected items.
5585
+ */
5586
+ selectedItems: string[];
5587
+ /**
5588
+ * @hidden
5589
+ */
5590
+ _items: AssetsBrowserItem[];
5591
+ /**
5592
+ * Initializes the files component.
5593
+ * @param editor defines the reference to the editor.
5594
+ */
5595
+ static Init(editor: Editor): Promise<void>;
5596
+ /**
5597
+ * Constructor.
5598
+ * @param props defines the component's props.
5599
+ */
5600
+ constructor(props: IAssetsBrowserFilesProps);
5601
+ /**
5602
+ * Renders the component.
5603
+ */
5604
+ render(): React.ReactNode;
5605
+ /**
5606
+ * Sets the new favorite to read and draw its items.
5607
+ * @param favorite defines the id of the favorite to show in the view.
5608
+ */
5609
+ setFavorite(favorite: IAssetsBrowserFavorite): Promise<void>;
5610
+ /**
5611
+ * Sets the new absolute path to the directory to read and draw its items.
5612
+ * @param directoryPath defines the absolute path to the directory to show in the view.
5613
+ */
5614
+ setDirectory(directoryPath: string): Promise<void>;
5615
+ /**
5616
+ * Refreshes the current list of files.
5617
+ */
5618
+ refresh(): Promise<void>;
5619
+ /**
5620
+ * Calls the given function in all the selected items (if exists).
5621
+ * @param methodName defines the name of the function to call.
5622
+ * @hidden
5623
+ */
5624
+ _callSelectedItemsMethod(methodName: string, ...parameters: any[]): Promise<void>;
5625
+ }
5626
+ }
5627
+
5561
5628
  declare module 'babylonjs-editor/renderer/editor/scene/picker' {
5562
5629
  import { Nullable } from "babylonjs-editor/shared/types";
5563
5630
  import { Observable, Node, SubMesh } from "babylonjs";
@@ -5732,6 +5799,198 @@ declare module 'babylonjs-editor/renderer/editor/components/console/log' {
5732
5799
  }
5733
5800
  }
5734
5801
 
5802
+ declare module 'babylonjs-editor/renderer/editor/cinematic/base' {
5803
+ import { CinematicTrackType, ICinematicAnimationGroupTrack, ICinematicPropertyGroupTrack, ICinematicPropertyTrack, ICinematicTrackGroup } from "babylonjs-editor/renderer/editor/cinematic/track";
5804
+ export interface ICinematicCamera {
5805
+ /**
5806
+ * Defines the id of the camera used for the cinematic.
5807
+ */
5808
+ cameraId: string;
5809
+ /**
5810
+ * Defines the list of animation keys for camera's fov.
5811
+ */
5812
+ fov: ICinematicTrack;
5813
+ /**
5814
+ * Defines the list of animation keys for camera's position.
5815
+ */
5816
+ position: ICinematicTrack;
5817
+ /**
5818
+ * Defines the list of animation keys for camera's target.
5819
+ */
5820
+ target: ICinematicTrack;
5821
+ /**
5822
+ * Defines the list of animation keys for camera's DOF focus distance.
5823
+ */
5824
+ focusDistance: ICinematicTrack;
5825
+ /**
5826
+ * Defines the list of animation keys for camera's DOF F-Stop.
5827
+ */
5828
+ fStop: ICinematicTrack;
5829
+ /**
5830
+ * Defines the list of animation keys for camera's DOF focal length.
5831
+ */
5832
+ focalLength: ICinematicTrack;
5833
+ }
5834
+ export interface ICinematicTrack {
5835
+ /**
5836
+ * Defines the type of the cinematic track.
5837
+ */
5838
+ type: CinematicTrackType;
5839
+ /**
5840
+ * In case of group, defines the configuration of the group.
5841
+ */
5842
+ group?: ICinematicTrackGroup;
5843
+ /**
5844
+ * In case of property track, defines the configuration of the animated property.
5845
+ */
5846
+ property?: ICinematicPropertyTrack;
5847
+ /**
5848
+ * In case of property group track, defines the configuration of the animated property for multiple nodes.
5849
+ */
5850
+ propertyGroup?: ICinematicPropertyGroupTrack;
5851
+ /**
5852
+ * In case of animation group track, defines the configuration of the animation group.
5853
+ */
5854
+ animationGroup?: ICinematicAnimationGroupTrack;
5855
+ }
5856
+ export interface ICinematic {
5857
+ /**
5858
+ * Defines the name of the cinematic.
5859
+ */
5860
+ name: string;
5861
+ /**
5862
+ * Defines the number of frames computed per second for the cinematic.
5863
+ */
5864
+ framesPerSecond: number;
5865
+ /**
5866
+ * Defines wether or not the cinematic is embedded in the file scene file output.
5867
+ */
5868
+ embedInSceneFile?: boolean;
5869
+ /**
5870
+ * Defines the reference to the camera's configuration for the cinematic.
5871
+ */
5872
+ camera: ICinematicCamera;
5873
+ /**
5874
+ * Defines the list of all cinematic tracks.
5875
+ */
5876
+ tracks: ICinematicTrack[];
5877
+ }
5878
+ }
5879
+
5880
+ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/files/item' {
5881
+ import { IStringDictionary, Nullable } from "babylonjs-editor/shared/types";
5882
+ import * as React from "react";
5883
+ import { Editor } from "babylonjs-editor/renderer/editor/editor";
5884
+ import { AssetsBrowserItemHandler, IItemHandler } from "babylonjs-editor/renderer/editor/components/assets-browser/files/item-handler";
5885
+ import { AssetsBrowserMoveHandler } from "babylonjs-editor/renderer/editor/components/assets-browser/files/move/move-handler";
5886
+ export interface IAssetsBrowserItemProps {
5887
+ /**
5888
+ * Defines the reference to the editor.
5889
+ */
5890
+ editor: Editor;
5891
+ /**
5892
+ * Defines the title of the item.
5893
+ */
5894
+ title: string;
5895
+ /**
5896
+ * Defines the relative path to the item.
5897
+ */
5898
+ relativePath: string;
5899
+ /**
5900
+ * Defines the absolute path to the item.
5901
+ */
5902
+ absolutePath: string;
5903
+ /**
5904
+ * Defines the type of the item (directory or file).
5905
+ */
5906
+ type: "file" | "directory";
5907
+ /**
5908
+ * Defines the size of the item.
5909
+ */
5910
+ size?: number;
5911
+ /**
5912
+ * Defines the callback called each time the item is clicked.
5913
+ */
5914
+ onClick: (item: AssetsBrowserItem, ev: React.MouseEvent<HTMLDivElement>) => void;
5915
+ /**
5916
+ * Callback called on the user double clicks an item.
5917
+ */
5918
+ onDoubleClick: () => void;
5919
+ /**
5920
+ * Defines the callback called on the item is starts being dragged.
5921
+ */
5922
+ onDragStart: (item: AssetsBrowserItem, ev: React.DragEvent<HTMLDivElement>) => void;
5923
+ }
5924
+ export interface IAssetsBrowserItemState {
5925
+ /**
5926
+ * Defines the color applied on the title.
5927
+ */
5928
+ titleColor: string;
5929
+ /**
5930
+ * Defines wether or not the item is selected.
5931
+ */
5932
+ isSelected: boolean;
5933
+ /**
5934
+ * Defines wether or not the file is being renamed.
5935
+ */
5936
+ isRenaming: boolean;
5937
+ /**
5938
+ * Defines the reference to the item handler.
5939
+ */
5940
+ itemHandler: Nullable<React.ReactNode>;
5941
+ /**
5942
+ * Defines the size of the item.
5943
+ */
5944
+ size: number;
5945
+ }
5946
+ export class AssetsBrowserItem extends React.Component<IAssetsBrowserItemProps, IAssetsBrowserItemState> {
5947
+ /**
5948
+ * @hidden
5949
+ */
5950
+ static _ItemHandlers: IStringDictionary<IItemHandler>;
5951
+ /**
5952
+ * @hidden
5953
+ */
5954
+ static _ItemMoveHandlers: AssetsBrowserMoveHandler[];
5955
+ /**
5956
+ * Registers the given item handler.
5957
+ * @param itemHandler defines the reference to the configuration of the item handler.
5958
+ */
5959
+ static RegisterItemHandler(itemHandler: IItemHandler): void;
5960
+ /**
5961
+ * Registers the given item move handler.
5962
+ * @param itemMoveHandler defines the reference to the item move handler.
5963
+ */
5964
+ static RegisterItemMoveHandler(itemMoveHandler: AssetsBrowserMoveHandler): void;
5965
+ /**
5966
+ * Initializes the item renderer.
5967
+ */
5968
+ static Init(editor: Editor): void;
5969
+ /**
5970
+ * @hidden
5971
+ */
5972
+ _itemHandlerRef: Nullable<AssetsBrowserItemHandler>;
5973
+ /**
5974
+ * Constructor.
5975
+ * @param props defines the component's props.
5976
+ */
5977
+ constructor(props: IAssetsBrowserItemProps);
5978
+ /**
5979
+ * Renders the component.
5980
+ */
5981
+ render(): React.ReactNode;
5982
+ /**
5983
+ * Called on the component did mount.
5984
+ */
5985
+ componentDidMount(): void;
5986
+ /**
5987
+ * Sets wether or not the item is selected.
5988
+ * @param isSelected defines wether or not the item is selected.
5989
+ */
5990
+ setSelected(isSelected: boolean): void;
5991
+ }
5992
+ }
5993
+
5735
5994
  declare module 'babylonjs-editor/renderer/editor/scene/icons' {
5736
5995
  import { UtilityLayerRenderer, Observable } from "babylonjs";
5737
5996
  import { Editor } from "babylonjs-editor/renderer/editor/editor";
@@ -5773,3 +6032,75 @@ declare module 'babylonjs-editor/renderer/editor' {
5773
6032
  export default Editor;
5774
6033
  }
5775
6034
 
6035
+ declare module 'babylonjs-editor/renderer/editor/cinematic/track' {
6036
+ import { IAnimationKey } from "babylonjs";
6037
+ import { ICinematicTrack } from "babylonjs-editor/renderer/editor/cinematic/base";
6038
+ export enum CinematicTrackType {
6039
+ Group = "group",
6040
+ Property = "property",
6041
+ PropertyGroup = "propertyGroup",
6042
+ AnimationGroup = "animationGroup"
6043
+ }
6044
+ export interface ICinematicTrackGroup {
6045
+ /**
6046
+ * Defines the name of the group.
6047
+ */
6048
+ name: string;
6049
+ /**
6050
+ * Defines the array of tracks.
6051
+ */
6052
+ tracks: ICinematicTrack[];
6053
+ }
6054
+ export interface ICinematicAnimationGroupSlot {
6055
+ /**
6056
+ * Defines the position of the slot in the timeline expressed in pixels.
6057
+ */
6058
+ position: number;
6059
+ /**
6060
+ * Defines the end frame of the track in the animation group.
6061
+ */
6062
+ end: number;
6063
+ /**
6064
+ * Defines the start frame of the track in the animation group.
6065
+ */
6066
+ start: number;
6067
+ }
6068
+ export interface ICinematicAnimationGroupTrack {
6069
+ /**
6070
+ * Defines the name of the animation group to play.
6071
+ */
6072
+ name: string;
6073
+ /**
6074
+ * Defines the list of all animation group slots.
6075
+ */
6076
+ slots: ICinematicAnimationGroupSlot[];
6077
+ }
6078
+ export interface ICinematicPropertyTrackBase {
6079
+ /**
6080
+ * Define the path of the animated property.
6081
+ */
6082
+ propertyPath: string;
6083
+ /**
6084
+ * Defines the list of all animation keys.
6085
+ */
6086
+ keys: IAnimationKey[];
6087
+ /**
6088
+ * Defines the type of the property being animated (float, vector3, etc.).
6089
+ * @see BABYLON.Animation.XType
6090
+ */
6091
+ animationType: number;
6092
+ }
6093
+ export interface ICinematicPropertyTrack extends ICinematicPropertyTrackBase {
6094
+ /**
6095
+ * Defines the id of the node being animated.
6096
+ */
6097
+ nodeId: string;
6098
+ }
6099
+ export interface ICinematicPropertyGroupTrack extends ICinematicPropertyTrackBase {
6100
+ /**
6101
+ * Defines the list of all nodes being animated.
6102
+ */
6103
+ nodeIds: string[];
6104
+ }
6105
+ }
6106
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-editor",
3
- "version": "4.1.1",
3
+ "version": "4.4.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",
@@ -21,16 +21,16 @@
21
21
  "@types/node": "13.9.0",
22
22
  "@types/react": "16.9.19",
23
23
  "@types/react-dom": "16.9.5",
24
- "typescript": "4.0.5",
25
- "babylonjs": "4.2.1",
26
- "babylonjs-gui": "4.2.1",
27
- "babylonjs-inspector": "4.2.1",
28
- "babylonjs-loaders": "4.2.1",
29
- "babylonjs-materials": "4.2.1",
30
- "babylonjs-node-editor": "4.2.1",
31
- "babylonjs-post-process": "4.2.1",
32
- "babylonjs-procedural-textures": "4.2.1",
33
- "babylonjs-serializers": "4.2.1",
24
+ "typescript": "4.6.3",
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",