babylonjs-editor 4.1.0 → 4.3.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.
- package/index.d.ts +366 -11
- package/package.json +11 -11
package/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ declare module 'babylonjs-editor' {
|
|
|
57
57
|
export { Dialog, IDialogProps } from "babylonjs-editor/renderer/editor/gui/dialog";
|
|
58
58
|
export { Confirm, IConfirmProps } from "babylonjs-editor/renderer/editor/gui/confirm";
|
|
59
59
|
export { Icon } from "babylonjs-editor/renderer/editor/gui/icon";
|
|
60
|
+
export { SceneImporterTools, ISceneImporterToolsConfiguration } from "babylonjs-editor/renderer/editor/scene/import-tools";
|
|
60
61
|
export { Packer, IPackerOptions, PackerStatus } from "babylonjs-editor/renderer/editor/project/packer/packer";
|
|
61
62
|
import "./renderer/editor/gui/augmentations/index";
|
|
62
63
|
}
|
|
@@ -688,6 +689,10 @@ declare module 'babylonjs-editor/renderer/editor/tools/tools' {
|
|
|
688
689
|
* @param timeMs the time in milliseconds to wait.
|
|
689
690
|
*/
|
|
690
691
|
static Wait(timeMs: number): Promise<void>;
|
|
692
|
+
/**
|
|
693
|
+
* Waits for the next animation frame.
|
|
694
|
+
*/
|
|
695
|
+
static WaitNextAnimationFrame(): Promise<void>;
|
|
691
696
|
/**
|
|
692
697
|
* Returns the given array by keeping only distinct values.
|
|
693
698
|
* @param array the array to filter.
|
|
@@ -1274,11 +1279,6 @@ declare module 'babylonjs-editor/renderer/editor/components/assets-browser/files
|
|
|
1274
1279
|
* Defines the reference to the assets worker.
|
|
1275
1280
|
*/
|
|
1276
1281
|
static AssetWorker: IWorkerConfiguration;
|
|
1277
|
-
/**
|
|
1278
|
-
* Defines the reference to the drag'n'dropped item.
|
|
1279
|
-
* @hidden
|
|
1280
|
-
*/
|
|
1281
|
-
static _DragAndDroppedItem: Nullable<AssetsBrowserItemHandler>;
|
|
1282
1282
|
/**
|
|
1283
1283
|
* Initialzes the item handler.
|
|
1284
1284
|
*/
|
|
@@ -1384,6 +1384,18 @@ declare module 'babylonjs-editor/renderer/editor/assets/materials' {
|
|
|
1384
1384
|
* @param event the original mouse event.
|
|
1385
1385
|
*/
|
|
1386
1386
|
onContextMenu(item: IAssetComponentItem, e: React.MouseEvent<HTMLImageElement, MouseEvent>): void;
|
|
1387
|
+
/**
|
|
1388
|
+
* Called on the user starts dragging the item.
|
|
1389
|
+
* @param ev defines the reference to the drag event.
|
|
1390
|
+
*/
|
|
1391
|
+
onDragStart(ev: React.DragEvent<HTMLImageElement>, item: IAssetComponentItem): void;
|
|
1392
|
+
/**
|
|
1393
|
+
* Called on the user drops the asset in a supported inspector field.
|
|
1394
|
+
* @param ev defiens the reference to the event object.
|
|
1395
|
+
* @param object defines the reference to the object being modified in the inspector.
|
|
1396
|
+
* @param property defines the property of the object to assign the asset instance.
|
|
1397
|
+
*/
|
|
1398
|
+
onDropInInspector(ev: React.DragEvent<HTMLElement>, object: any, property: string): Promise<void>;
|
|
1387
1399
|
/**
|
|
1388
1400
|
* Called on the user drops an asset in editor. (typically the preview canvas).
|
|
1389
1401
|
* @param item the item being dropped.
|
|
@@ -1519,11 +1531,11 @@ declare module 'babylonjs-editor/renderer/editor/assets/textures' {
|
|
|
1519
1531
|
}
|
|
1520
1532
|
|
|
1521
1533
|
declare module 'babylonjs-editor/renderer/editor/components/inspector' {
|
|
1534
|
+
import { Undefinable } from "babylonjs-editor/shared/types";
|
|
1522
1535
|
import * as React from "react";
|
|
1523
1536
|
import { Editor } from "babylonjs-editor/renderer/editor/editor";
|
|
1524
1537
|
import { AbstractInspector } from "babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector";
|
|
1525
1538
|
import { AbstractInspectorLegacy } from "babylonjs-editor/renderer/editor/components/inspectors/abstract-inspector-legacy";
|
|
1526
|
-
import { Undefinable } from "babylonjs-editor/shared/types";
|
|
1527
1539
|
export interface IObjectInspector {
|
|
1528
1540
|
ctor: (new (props: IObjectInspectorProps) => AbstractInspectorLegacy<any> | AbstractInspector<any, any>);
|
|
1529
1541
|
ctorNames: string[];
|
|
@@ -1784,6 +1796,10 @@ declare module 'babylonjs-editor/renderer/editor/components/inspectors/abstract-
|
|
|
1784
1796
|
* Defines the reference to the edited root object (node, sound, etc.).
|
|
1785
1797
|
*/
|
|
1786
1798
|
protected selectedObject: T;
|
|
1799
|
+
/**
|
|
1800
|
+
* @hidden
|
|
1801
|
+
*/
|
|
1802
|
+
protected readonly _inspectorName: string;
|
|
1787
1803
|
/**
|
|
1788
1804
|
* Constructor.
|
|
1789
1805
|
* @param props the component's props.
|
|
@@ -2407,7 +2423,10 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/fields/vector3' {
|
|
|
2407
2423
|
}
|
|
2408
2424
|
|
|
2409
2425
|
declare module 'babylonjs-editor/renderer/editor/gui/inspector/notifier' {
|
|
2426
|
+
import { Nullable } from "babylonjs-editor/shared/types";
|
|
2410
2427
|
import * as React from "react";
|
|
2428
|
+
import { _IDragAndDroppedItem } from "babylonjs-editor/renderer/editor/components/graph";
|
|
2429
|
+
import { AssetsBrowserItemHandler } from "babylonjs-editor/renderer/editor/components/assets-browser/files/item-handler";
|
|
2411
2430
|
export interface IInspectorNotifierChangeOptions {
|
|
2412
2431
|
/**
|
|
2413
2432
|
* Defines the caller that notifies the change. This is typically used to don't listen themselves.
|
|
@@ -2437,6 +2456,8 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/notifier' {
|
|
|
2437
2456
|
* @param caller defines the reference to the original caller.
|
|
2438
2457
|
*/
|
|
2439
2458
|
static Unregister(caller: any): void;
|
|
2459
|
+
static _DragAndDroppedGraphItem: Nullable<_IDragAndDroppedItem>;
|
|
2460
|
+
static _DragAndDroppedAssetItem: Nullable<AssetsBrowserItemHandler>;
|
|
2440
2461
|
/**
|
|
2441
2462
|
* Called on the user drops the asset in a supported inspector field.
|
|
2442
2463
|
* @param ev defiens the reference to the event object.
|
|
@@ -2450,6 +2471,24 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/notifier' {
|
|
|
2450
2471
|
declare module 'babylonjs-editor/renderer/editor/gui/inspector/fields/color-picker' {
|
|
2451
2472
|
import * as React from "react";
|
|
2452
2473
|
import { Color3, Color4 } from "babylonjs";
|
|
2474
|
+
export interface IColor4Like {
|
|
2475
|
+
/**
|
|
2476
|
+
* Defines the red component (between 0 and 1, default is 0)
|
|
2477
|
+
*/
|
|
2478
|
+
r: number;
|
|
2479
|
+
/**
|
|
2480
|
+
* Defines the green component (between 0 and 1, default is 0)
|
|
2481
|
+
*/
|
|
2482
|
+
g: number;
|
|
2483
|
+
/**
|
|
2484
|
+
* Defines the blue component (between 0 and 1, default is 0)
|
|
2485
|
+
*/
|
|
2486
|
+
b: number;
|
|
2487
|
+
/**
|
|
2488
|
+
* Defines the alpha component (between 0 and 1, default is 1)
|
|
2489
|
+
*/
|
|
2490
|
+
a: number;
|
|
2491
|
+
}
|
|
2453
2492
|
export interface IInspectorColorPickerProps {
|
|
2454
2493
|
/**
|
|
2455
2494
|
* Defines the reference to the object to modify.
|
|
@@ -2553,7 +2592,7 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/fields/list' {
|
|
|
2553
2592
|
/**
|
|
2554
2593
|
* Defines the label of the field.
|
|
2555
2594
|
*/
|
|
2556
|
-
label: string;
|
|
2595
|
+
label: string | JSX.Element;
|
|
2557
2596
|
/**
|
|
2558
2597
|
* Defines the list of items drawn in the suggest.
|
|
2559
2598
|
*/
|
|
@@ -2566,6 +2605,10 @@ declare module 'babylonjs-editor/renderer/editor/gui/inspector/fields/list' {
|
|
|
2566
2605
|
* Defines the optional list of all available drag'n'droppable types.
|
|
2567
2606
|
*/
|
|
2568
2607
|
dndHandledTypes?: string[];
|
|
2608
|
+
/**
|
|
2609
|
+
* Defines the optional color to apply on the border left.
|
|
2610
|
+
*/
|
|
2611
|
+
borderLeftColor?: string;
|
|
2569
2612
|
/**
|
|
2570
2613
|
* Defines the optional callback called on the value changes.
|
|
2571
2614
|
* @param value defines the new value of the object's property.
|
|
@@ -2966,6 +3009,11 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
|
|
|
2966
3009
|
* store in the workspace JSON file.
|
|
2967
3010
|
*/
|
|
2968
3011
|
export type PhysicsEngineType = "cannon" | "oimo" | "ammo";
|
|
3012
|
+
/**
|
|
3013
|
+
* Defines the values of available package managers than can be used by
|
|
3014
|
+
* the editor for each workspace. The default value is "npm".
|
|
3015
|
+
*/
|
|
3016
|
+
export type PackageManagerType = "npm" | "yarn";
|
|
2969
3017
|
export interface IWorkSpace {
|
|
2970
3018
|
/**
|
|
2971
3019
|
* Defines the version of the Editor that handled the project.
|
|
@@ -3003,6 +3051,17 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
|
|
|
3003
3051
|
* Defines the dictionary that contains the preferences of external plugins in the editor.
|
|
3004
3052
|
*/
|
|
3005
3053
|
pluginsPreferences?: Undefinable<IStringDictionary<any>>;
|
|
3054
|
+
/**
|
|
3055
|
+
* Defines the package manager used by the project.
|
|
3056
|
+
* Can be npm or yarn.
|
|
3057
|
+
*/
|
|
3058
|
+
packageManager: PackageManagerType;
|
|
3059
|
+
/**
|
|
3060
|
+
* Defines the custom directory where to generate the output scenes. By default,
|
|
3061
|
+
* the value is the working directory of the workspace.
|
|
3062
|
+
* @default "./"
|
|
3063
|
+
*/
|
|
3064
|
+
outputSceneDirectory: string;
|
|
3006
3065
|
/**
|
|
3007
3066
|
* Defines wether or not the project should be played in an isolated iFrame in the preview
|
|
3008
3067
|
* panel when the user clicks the "play button". This is typically useful to avoid conflicts between
|
|
@@ -3098,6 +3157,10 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
|
|
|
3098
3157
|
* Defines the list of the files associated to the project.
|
|
3099
3158
|
*/
|
|
3100
3159
|
filesList?: string[];
|
|
3160
|
+
/**
|
|
3161
|
+
* Defines the list of scene's animation groups.
|
|
3162
|
+
*/
|
|
3163
|
+
animationGroups: string[];
|
|
3101
3164
|
/**
|
|
3102
3165
|
* Defines the list of scene's cameras.
|
|
3103
3166
|
*/
|
|
@@ -3194,6 +3257,10 @@ declare module 'babylonjs-editor/renderer/editor/project/typings' {
|
|
|
3194
3257
|
*/
|
|
3195
3258
|
graphs: Undefinable<string[]>;
|
|
3196
3259
|
};
|
|
3260
|
+
/**
|
|
3261
|
+
* Defines the list of all project's cinematics.
|
|
3262
|
+
*/
|
|
3263
|
+
cinematics: string[];
|
|
3197
3264
|
/**
|
|
3198
3265
|
* Defines some useful datas
|
|
3199
3266
|
*/
|
|
@@ -3330,6 +3397,7 @@ declare module 'babylonjs-editor/renderer/editor/project/project-exporter' {
|
|
|
3330
3397
|
|
|
3331
3398
|
declare module 'babylonjs-editor/renderer/editor/project/project' {
|
|
3332
3399
|
import { Nullable } from "babylonjs-editor/shared/types";
|
|
3400
|
+
import { Cinematic } from "babylonjs-editor/renderer/editor/cinematic/cinematic";
|
|
3333
3401
|
import { IProject } from "babylonjs-editor/renderer/editor/project/typings";
|
|
3334
3402
|
export class Project {
|
|
3335
3403
|
/**
|
|
@@ -3344,6 +3412,10 @@ declare module 'babylonjs-editor/renderer/editor/project/project' {
|
|
|
3344
3412
|
* Defines the current project datas.
|
|
3345
3413
|
*/
|
|
3346
3414
|
static Project: Nullable<IProject>;
|
|
3415
|
+
/**
|
|
3416
|
+
* Defines the list of all available cinematics for the project.
|
|
3417
|
+
*/
|
|
3418
|
+
static Cinematics: Cinematic[];
|
|
3347
3419
|
/**
|
|
3348
3420
|
* Returns the project path set when opened the editor from the OS file system.
|
|
3349
3421
|
*/
|
|
@@ -3410,6 +3482,10 @@ declare module 'babylonjs-editor/renderer/editor/project/workspace' {
|
|
|
3410
3482
|
* @param projectPath the absolute path of the saved project.
|
|
3411
3483
|
*/
|
|
3412
3484
|
static WriteWorkspaceFile(projectPath: string): Promise<void>;
|
|
3485
|
+
/**
|
|
3486
|
+
* Returns the relative path to the directory where the output scene should be written.
|
|
3487
|
+
*/
|
|
3488
|
+
static get OutputSceneDirectory(): string;
|
|
3413
3489
|
/**
|
|
3414
3490
|
* Refreshes the list of available projects in the workspace.
|
|
3415
3491
|
*/
|
|
@@ -3491,6 +3567,18 @@ declare module 'babylonjs-editor/renderer/editor/project/workspace' {
|
|
|
3491
3567
|
* @param editor defines the editor reference.
|
|
3492
3568
|
*/
|
|
3493
3569
|
static RestartTypeScriptWatcher(editor: Editor): Nullable<IEditorProcess>;
|
|
3570
|
+
/**
|
|
3571
|
+
* Returns wether or not the major Babylon.JS version of the project matches with the one of the editor.
|
|
3572
|
+
* Checked at initialization time of the Editor.
|
|
3573
|
+
* @param version defines the version of Babylon.JS being used by the editor.
|
|
3574
|
+
*/
|
|
3575
|
+
static MatchesEditorBabylonJSMajorVersion(version: string): Promise<boolean>;
|
|
3576
|
+
/**
|
|
3577
|
+
* Configures the package.json file of the project to match the Babylon.JS version used in the editor.
|
|
3578
|
+
* Checked at initialization time of the Editor.
|
|
3579
|
+
* @param version defines the version of Babylon.JS being used by the editor.
|
|
3580
|
+
*/
|
|
3581
|
+
static MatchBabylonJSEditorVersion(version: string): Promise<void>;
|
|
3494
3582
|
/**
|
|
3495
3583
|
* Kills all the existing programs.
|
|
3496
3584
|
*/
|
|
@@ -3513,6 +3601,10 @@ declare module 'babylonjs-editor/renderer/editor/project/scene-exporter' {
|
|
|
3513
3601
|
* Defines wether or not files are forced to be re-generated.
|
|
3514
3602
|
*/
|
|
3515
3603
|
forceRegenerateFiles?: boolean;
|
|
3604
|
+
/**
|
|
3605
|
+
* Defines wether or not all compressed textures should be regenerated.
|
|
3606
|
+
*/
|
|
3607
|
+
forceRegenerateCompressedTextures?: boolean;
|
|
3516
3608
|
/**
|
|
3517
3609
|
* Defines wether or not all compressed texture formats should be generated.
|
|
3518
3610
|
* Typically used when exporting final scene version.
|
|
@@ -3754,11 +3846,11 @@ declare module 'babylonjs-editor/renderer/editor/gui/confirm' {
|
|
|
3754
3846
|
/**
|
|
3755
3847
|
* The title of the dialog.
|
|
3756
3848
|
*/
|
|
3757
|
-
title:
|
|
3849
|
+
title: React.ReactNode;
|
|
3758
3850
|
/**
|
|
3759
3851
|
* The message of the dialog.
|
|
3760
3852
|
*/
|
|
3761
|
-
message:
|
|
3853
|
+
message: React.ReactNode;
|
|
3762
3854
|
/**
|
|
3763
3855
|
* The icon to show on top-left of the dialog.
|
|
3764
3856
|
*/
|
|
@@ -3779,7 +3871,7 @@ declare module 'babylonjs-editor/renderer/editor/gui/confirm' {
|
|
|
3779
3871
|
* @param message the message of the dialog.
|
|
3780
3872
|
* @param icon the icon of the dialog to show on top-left.
|
|
3781
3873
|
*/
|
|
3782
|
-
static Show(title:
|
|
3874
|
+
static Show(title: React.ReactNode, message: React.ReactNode, icon?: Undefinable<IconName | JSX.Element>): Promise<boolean>;
|
|
3783
3875
|
/**
|
|
3784
3876
|
* Renders the component.
|
|
3785
3877
|
*/
|
|
@@ -3837,6 +3929,62 @@ declare module 'babylonjs-editor/renderer/editor/gui/icon' {
|
|
|
3837
3929
|
}
|
|
3838
3930
|
}
|
|
3839
3931
|
|
|
3932
|
+
declare module 'babylonjs-editor/renderer/editor/scene/import-tools' {
|
|
3933
|
+
import { Nullable } from "babylonjs-editor/shared/types";
|
|
3934
|
+
import { IParticleSystem, ISceneLoaderAsyncResult, Material, Node, Scene, Skeleton, TransformNode } from "babylonjs";
|
|
3935
|
+
import { Editor } from "babylonjs-editor/renderer/editor/editor";
|
|
3936
|
+
export interface ISceneImporterToolsConfiguration {
|
|
3937
|
+
/**
|
|
3938
|
+
* Defines the reference to the editor.
|
|
3939
|
+
*/
|
|
3940
|
+
editor: Editor;
|
|
3941
|
+
/**
|
|
3942
|
+
* Defines wether or not the scene to configure its nodes are coming from a GLTF file.
|
|
3943
|
+
*/
|
|
3944
|
+
isGltf: boolean;
|
|
3945
|
+
/**
|
|
3946
|
+
* Defines the relative path (from workspace) to the scene's file.
|
|
3947
|
+
*/
|
|
3948
|
+
relativePath: string;
|
|
3949
|
+
/**
|
|
3950
|
+
* Defines the absolute path to the scene's file.
|
|
3951
|
+
*/
|
|
3952
|
+
absolutePath: string;
|
|
3953
|
+
/**
|
|
3954
|
+
* Defines the result of the scene loader containing the meshes, skeletons etc.
|
|
3955
|
+
*/
|
|
3956
|
+
result: ISceneLoaderAsyncResult;
|
|
3957
|
+
}
|
|
3958
|
+
export class SceneImporterTools {
|
|
3959
|
+
/**
|
|
3960
|
+
* Configures the given scene loader result contained in the given scene (id, material files etc.).
|
|
3961
|
+
* @param scene defines the reference to the scene containing the elements to configure.
|
|
3962
|
+
* @param configuration defines the configuration containing the information for the elements to configure.
|
|
3963
|
+
*/
|
|
3964
|
+
static Configure(scene: Scene, configuration: ISceneImporterToolsConfiguration): Promise<Node>;
|
|
3965
|
+
/**
|
|
3966
|
+
* Configures the given imported particle systems.
|
|
3967
|
+
*/
|
|
3968
|
+
static ConfigureParticleSystems(particleSystems: IParticleSystem[]): void;
|
|
3969
|
+
/**
|
|
3970
|
+
* Configures the given imported skeletons.
|
|
3971
|
+
*/
|
|
3972
|
+
static ConfigureSkeletons(skeletons: Skeleton[], scene: Scene): void;
|
|
3973
|
+
/**
|
|
3974
|
+
* Configures the given imported transform nodes.
|
|
3975
|
+
*/
|
|
3976
|
+
static ConfigureTransformNodes(transformNodes: TransformNode[], parent: Nullable<TransformNode>): void;
|
|
3977
|
+
/**
|
|
3978
|
+
* Configures the given imported transform nodes.
|
|
3979
|
+
*/
|
|
3980
|
+
static ConfigureMeshes(configuration: ISceneImporterToolsConfiguration, parent: TransformNode): Promise<void>;
|
|
3981
|
+
/**
|
|
3982
|
+
* Configures the given imported material.
|
|
3983
|
+
*/
|
|
3984
|
+
static ConfigureMaterial(material: Material, configuration: ISceneImporterToolsConfiguration, force?: boolean): Promise<Material>;
|
|
3985
|
+
}
|
|
3986
|
+
}
|
|
3987
|
+
|
|
3840
3988
|
declare module 'babylonjs-editor/renderer/editor/project/packer/packer' {
|
|
3841
3989
|
import { DirectoryTree } from "directory-tree";
|
|
3842
3990
|
import { Nullable } from "babylonjs-editor/shared/types";
|
|
@@ -4405,6 +4553,10 @@ declare module 'babylonjs-editor/renderer/editor/components/graph' {
|
|
|
4405
4553
|
*/
|
|
4406
4554
|
showLights: boolean;
|
|
4407
4555
|
}
|
|
4556
|
+
export interface _IDragAndDroppedItem {
|
|
4557
|
+
nodeId: string;
|
|
4558
|
+
onDropInInspector: (ev: React.DragEvent<HTMLElement>, object: any, property: string) => Promise<void>;
|
|
4559
|
+
}
|
|
4408
4560
|
export class Graph extends React.Component<IGraphProps, IGraphState> {
|
|
4409
4561
|
/**
|
|
4410
4562
|
* Defines the last selected node in the graph.
|
|
@@ -5000,7 +5152,7 @@ declare module 'babylonjs-editor/renderer/editor/workers/workers' {
|
|
|
5000
5152
|
* @param parameters defines the parameters to send to the function called in the worker.
|
|
5001
5153
|
* @returns the result of the function computed in the worker's context.
|
|
5002
5154
|
*/
|
|
5003
|
-
static ExecuteFunction<TClass, TFunction extends FunctionPropertyNames<TClass>>(config: IWorkerConfiguration, fnName: TFunction, ...parameters: Parameters<TClass[TFunction]>): Promise<Awaitable<ReturnType<TClass[TFunction]>>>;
|
|
5155
|
+
static ExecuteFunction<TClass extends Record<any, any>, TFunction extends FunctionPropertyNames<TClass>>(config: IWorkerConfiguration, fnName: TFunction, ...parameters: Parameters<TClass[TFunction]>): Promise<Awaitable<ReturnType<TClass[TFunction]>>>;
|
|
5004
5156
|
}
|
|
5005
5157
|
}
|
|
5006
5158
|
|
|
@@ -5388,6 +5540,59 @@ declare module 'babylonjs-editor/renderer/editor/tools/ktx' {
|
|
|
5388
5540
|
}
|
|
5389
5541
|
}
|
|
5390
5542
|
|
|
5543
|
+
declare module 'babylonjs-editor/renderer/editor/cinematic/cinematic' {
|
|
5544
|
+
import { Nullable } from "babylonjs-editor/shared/types";
|
|
5545
|
+
import { AnimationGroup, Scene } from "babylonjs";
|
|
5546
|
+
import { ICinematic, ICinematicCamera, ICinematicTrack } from "babylonjs-editor/renderer/editor/cinematic/base";
|
|
5547
|
+
export class Cinematic implements ICinematic {
|
|
5548
|
+
/**
|
|
5549
|
+
* @hidden
|
|
5550
|
+
*/
|
|
5551
|
+
_animationGroup: Nullable<AnimationGroup>;
|
|
5552
|
+
/**
|
|
5553
|
+
* Plays the cinematic.
|
|
5554
|
+
*/
|
|
5555
|
+
play(scene: Scene, from?: number): void;
|
|
5556
|
+
/**
|
|
5557
|
+
* Stops the cinematic.
|
|
5558
|
+
*/
|
|
5559
|
+
stop(): void;
|
|
5560
|
+
/**
|
|
5561
|
+
* Generates the animation group and returns its reference.
|
|
5562
|
+
*/
|
|
5563
|
+
generateAnimationGroup(scene: Scene): AnimationGroup;
|
|
5564
|
+
/**
|
|
5565
|
+
* Serializes the cinematic.
|
|
5566
|
+
*/
|
|
5567
|
+
serialize(): ICinematic;
|
|
5568
|
+
/**
|
|
5569
|
+
* Parses the cinematic according the given parsed data.
|
|
5570
|
+
* @param parsedData defines the reference to object as JSON representation of cinematic.
|
|
5571
|
+
*/
|
|
5572
|
+
static Parse(parsedData: ICinematic): Cinematic;
|
|
5573
|
+
/**
|
|
5574
|
+
* Defines the name of the cinematic.
|
|
5575
|
+
*/
|
|
5576
|
+
name: string;
|
|
5577
|
+
/**
|
|
5578
|
+
* Defines the number of frames computed per second.
|
|
5579
|
+
*/
|
|
5580
|
+
framesPerSecond: number;
|
|
5581
|
+
/**
|
|
5582
|
+
* Defines wether or not the cinematic is embedded in the file scene file output.
|
|
5583
|
+
*/
|
|
5584
|
+
embedInSceneFile: boolean;
|
|
5585
|
+
/**
|
|
5586
|
+
* Defines the reference to the camera's configuration for the cinematic.
|
|
5587
|
+
*/
|
|
5588
|
+
camera: ICinematicCamera;
|
|
5589
|
+
/**
|
|
5590
|
+
* Defines the list of all cinematic tracks.
|
|
5591
|
+
*/
|
|
5592
|
+
tracks: ICinematicTrack[];
|
|
5593
|
+
}
|
|
5594
|
+
}
|
|
5595
|
+
|
|
5391
5596
|
declare module 'babylonjs-editor/renderer/editor/tools/process' {
|
|
5392
5597
|
import { IPty } from "node-pty";
|
|
5393
5598
|
import { Terminal, IDisposable } from "xterm";
|
|
@@ -5663,6 +5868,84 @@ declare module 'babylonjs-editor/renderer/editor/components/console/log' {
|
|
|
5663
5868
|
}
|
|
5664
5869
|
}
|
|
5665
5870
|
|
|
5871
|
+
declare module 'babylonjs-editor/renderer/editor/cinematic/base' {
|
|
5872
|
+
import { CinematicTrackType, ICinematicAnimationGroupTrack, ICinematicPropertyGroupTrack, ICinematicPropertyTrack, ICinematicTrackGroup } from "babylonjs-editor/renderer/editor/cinematic/track";
|
|
5873
|
+
export interface ICinematicCamera {
|
|
5874
|
+
/**
|
|
5875
|
+
* Defines the id of the camera used for the cinematic.
|
|
5876
|
+
*/
|
|
5877
|
+
cameraId: string;
|
|
5878
|
+
/**
|
|
5879
|
+
* Defines the list of animation keys for camera's fov.
|
|
5880
|
+
*/
|
|
5881
|
+
fov: ICinematicTrack;
|
|
5882
|
+
/**
|
|
5883
|
+
* Defines the list of animation keys for camera's position.
|
|
5884
|
+
*/
|
|
5885
|
+
position: ICinematicTrack;
|
|
5886
|
+
/**
|
|
5887
|
+
* Defines the list of animation keys for camera's target.
|
|
5888
|
+
*/
|
|
5889
|
+
target: ICinematicTrack;
|
|
5890
|
+
/**
|
|
5891
|
+
* Defines the list of animation keys for camera's DOF focus distance.
|
|
5892
|
+
*/
|
|
5893
|
+
focusDistance: ICinematicTrack;
|
|
5894
|
+
/**
|
|
5895
|
+
* Defines the list of animation keys for camera's DOF F-Stop.
|
|
5896
|
+
*/
|
|
5897
|
+
fStop: ICinematicTrack;
|
|
5898
|
+
/**
|
|
5899
|
+
* Defines the list of animation keys for camera's DOF focal length.
|
|
5900
|
+
*/
|
|
5901
|
+
focalLength: ICinematicTrack;
|
|
5902
|
+
}
|
|
5903
|
+
export interface ICinematicTrack {
|
|
5904
|
+
/**
|
|
5905
|
+
* Defines the type of the cinematic track.
|
|
5906
|
+
*/
|
|
5907
|
+
type: CinematicTrackType;
|
|
5908
|
+
/**
|
|
5909
|
+
* In case of group, defines the configuration of the group.
|
|
5910
|
+
*/
|
|
5911
|
+
group?: ICinematicTrackGroup;
|
|
5912
|
+
/**
|
|
5913
|
+
* In case of property track, defines the configuration of the animated property.
|
|
5914
|
+
*/
|
|
5915
|
+
property?: ICinematicPropertyTrack;
|
|
5916
|
+
/**
|
|
5917
|
+
* In case of property group track, defines the configuration of the animated property for multiple nodes.
|
|
5918
|
+
*/
|
|
5919
|
+
propertyGroup?: ICinematicPropertyGroupTrack;
|
|
5920
|
+
/**
|
|
5921
|
+
* In case of animation group track, defines the configuration of the animation group.
|
|
5922
|
+
*/
|
|
5923
|
+
animationGroup?: ICinematicAnimationGroupTrack;
|
|
5924
|
+
}
|
|
5925
|
+
export interface ICinematic {
|
|
5926
|
+
/**
|
|
5927
|
+
* Defines the name of the cinematic.
|
|
5928
|
+
*/
|
|
5929
|
+
name: string;
|
|
5930
|
+
/**
|
|
5931
|
+
* Defines the number of frames computed per second for the cinematic.
|
|
5932
|
+
*/
|
|
5933
|
+
framesPerSecond: number;
|
|
5934
|
+
/**
|
|
5935
|
+
* Defines wether or not the cinematic is embedded in the file scene file output.
|
|
5936
|
+
*/
|
|
5937
|
+
embedInSceneFile?: boolean;
|
|
5938
|
+
/**
|
|
5939
|
+
* Defines the reference to the camera's configuration for the cinematic.
|
|
5940
|
+
*/
|
|
5941
|
+
camera: ICinematicCamera;
|
|
5942
|
+
/**
|
|
5943
|
+
* Defines the list of all cinematic tracks.
|
|
5944
|
+
*/
|
|
5945
|
+
tracks: ICinematicTrack[];
|
|
5946
|
+
}
|
|
5947
|
+
}
|
|
5948
|
+
|
|
5666
5949
|
declare module 'babylonjs-editor/renderer/editor/scene/icons' {
|
|
5667
5950
|
import { UtilityLayerRenderer, Observable } from "babylonjs";
|
|
5668
5951
|
import { Editor } from "babylonjs-editor/renderer/editor/editor";
|
|
@@ -5704,3 +5987,75 @@ declare module 'babylonjs-editor/renderer/editor' {
|
|
|
5704
5987
|
export default Editor;
|
|
5705
5988
|
}
|
|
5706
5989
|
|
|
5990
|
+
declare module 'babylonjs-editor/renderer/editor/cinematic/track' {
|
|
5991
|
+
import { IAnimationKey } from "babylonjs";
|
|
5992
|
+
import { ICinematicTrack } from "babylonjs-editor/renderer/editor/cinematic/base";
|
|
5993
|
+
export enum CinematicTrackType {
|
|
5994
|
+
Group = "group",
|
|
5995
|
+
Property = "property",
|
|
5996
|
+
PropertyGroup = "propertyGroup",
|
|
5997
|
+
AnimationGroup = "animationGroup"
|
|
5998
|
+
}
|
|
5999
|
+
export interface ICinematicTrackGroup {
|
|
6000
|
+
/**
|
|
6001
|
+
* Defines the name of the group.
|
|
6002
|
+
*/
|
|
6003
|
+
name: string;
|
|
6004
|
+
/**
|
|
6005
|
+
* Defines the array of tracks.
|
|
6006
|
+
*/
|
|
6007
|
+
tracks: ICinematicTrack[];
|
|
6008
|
+
}
|
|
6009
|
+
export interface ICinematicAnimationGroupSlot {
|
|
6010
|
+
/**
|
|
6011
|
+
* Defines the position of the slot in the timeline expressed in pixels.
|
|
6012
|
+
*/
|
|
6013
|
+
position: number;
|
|
6014
|
+
/**
|
|
6015
|
+
* Defines the end frame of the track in the animation group.
|
|
6016
|
+
*/
|
|
6017
|
+
end: number;
|
|
6018
|
+
/**
|
|
6019
|
+
* Defines the start frame of the track in the animation group.
|
|
6020
|
+
*/
|
|
6021
|
+
start: number;
|
|
6022
|
+
}
|
|
6023
|
+
export interface ICinematicAnimationGroupTrack {
|
|
6024
|
+
/**
|
|
6025
|
+
* Defines the name of the animation group to play.
|
|
6026
|
+
*/
|
|
6027
|
+
name: string;
|
|
6028
|
+
/**
|
|
6029
|
+
* Defines the list of all animation group slots.
|
|
6030
|
+
*/
|
|
6031
|
+
slots: ICinematicAnimationGroupSlot[];
|
|
6032
|
+
}
|
|
6033
|
+
export interface ICinematicPropertyTrackBase {
|
|
6034
|
+
/**
|
|
6035
|
+
* Define the path of the animated property.
|
|
6036
|
+
*/
|
|
6037
|
+
propertyPath: string;
|
|
6038
|
+
/**
|
|
6039
|
+
* Defines the list of all animation keys.
|
|
6040
|
+
*/
|
|
6041
|
+
keys: IAnimationKey[];
|
|
6042
|
+
/**
|
|
6043
|
+
* Defines the type of the property being animated (float, vector3, etc.).
|
|
6044
|
+
* @see BABYLON.Animation.XType
|
|
6045
|
+
*/
|
|
6046
|
+
animationType: number;
|
|
6047
|
+
}
|
|
6048
|
+
export interface ICinematicPropertyTrack extends ICinematicPropertyTrackBase {
|
|
6049
|
+
/**
|
|
6050
|
+
* Defines the id of the node being animated.
|
|
6051
|
+
*/
|
|
6052
|
+
nodeId: string;
|
|
6053
|
+
}
|
|
6054
|
+
export interface ICinematicPropertyGroupTrack extends ICinematicPropertyTrackBase {
|
|
6055
|
+
/**
|
|
6056
|
+
* Defines the list of all nodes being animated.
|
|
6057
|
+
*/
|
|
6058
|
+
nodeIds: string[];
|
|
6059
|
+
}
|
|
6060
|
+
}
|
|
6061
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-editor",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.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.
|
|
25
|
-
"babylonjs": "
|
|
26
|
-
"babylonjs-gui": "
|
|
27
|
-
"babylonjs-inspector": "
|
|
28
|
-
"babylonjs-loaders": "
|
|
29
|
-
"babylonjs-materials": "
|
|
30
|
-
"babylonjs-node-editor": "
|
|
31
|
-
"babylonjs-post-process": "
|
|
32
|
-
"babylonjs-procedural-textures": "
|
|
33
|
-
"babylonjs-serializers": "
|
|
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",
|
|
34
34
|
"@blueprintjs/core": "3.28.1",
|
|
35
35
|
"@blueprintjs/select": "3.13.2",
|
|
36
36
|
"react": "16.12.0",
|