babylonjs-editor 5.2.4 → 5.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.
- package/.env +1 -0
- package/build/src/index.js +10 -2
- package/declaration/src/dashboard/main.d.ts +2 -0
- package/declaration/src/dashboard/preferences.d.ts +7 -0
- package/declaration/src/editor/dialogs/generate/complete.d.ts +5 -0
- package/declaration/src/editor/dialogs/generate/generate-project.d.ts +24 -0
- package/declaration/src/editor/dialogs/generate/generate.d.ts +10 -0
- package/declaration/src/editor/dialogs/generate/options.d.ts +5 -0
- package/declaration/src/editor/layout/assets-browser/items/ragdoll.d.ts +12 -0
- package/declaration/src/editor/layout/assets-browser.d.ts +1 -0
- package/declaration/src/editor/layout/cinematic/editor.d.ts +3 -1
- package/declaration/src/editor/layout/cinematic/timelines.d.ts +1 -0
- package/declaration/src/editor/layout/cinematic/tools/tracks.d.ts +2 -0
- package/declaration/src/editor/layout/cinematic/tracker.d.ts +1 -0
- package/declaration/src/editor/layout/cinematic/tracks.d.ts +1 -0
- package/declaration/src/editor/layout/graph.d.ts +2 -2
- package/declaration/src/editor/layout/inspector/fields/list.d.ts +2 -1
- package/declaration/src/editor/layout/inspector/fields/texture.d.ts +1 -0
- package/declaration/src/editor/layout/inspector/marketplace/asset.d.ts +40 -0
- package/declaration/src/editor/layout/inspector/particles/node-particle-system-set.d.ts +17 -0
- package/declaration/src/editor/layout/inspector/scene/scene.d.ts +1 -0
- package/declaration/src/editor/layout/inspector/transform.d.ts +1 -0
- package/declaration/src/editor/layout/marketplace/footer.d.ts +11 -0
- package/declaration/src/editor/layout/marketplace/grid.d.ts +9 -0
- package/declaration/src/editor/layout/marketplace/import-progress.d.ts +11 -0
- package/declaration/src/editor/layout/marketplace/item.d.ts +7 -0
- package/declaration/src/editor/layout/marketplace/settings-dialog.d.ts +21 -0
- package/declaration/src/editor/layout/marketplace/sidebar.d.ts +19 -0
- package/declaration/src/editor/layout/marketplace/toolbar.d.ts +17 -0
- package/declaration/src/editor/layout/marketplace.d.ts +36 -0
- package/declaration/src/editor/layout/navmesh/preview.d.ts +7 -0
- package/declaration/src/editor/layout/preview/import/particles.d.ts +3 -2
- package/declaration/src/editor/layout/preview/play.d.ts +0 -1
- package/declaration/src/editor/layout/ragdoll/editor.d.ts +23 -0
- package/declaration/src/editor/layout/ragdoll/empty.d.ts +5 -0
- package/declaration/src/editor/layout/ragdoll/inspector.d.ts +28 -0
- package/declaration/src/editor/layout/ragdoll/preview.d.ts +27 -0
- package/declaration/src/editor/layout/ragdoll/toolbar.d.ts +5 -0
- package/declaration/src/editor/layout/toolbar.d.ts +1 -0
- package/declaration/src/editor/layout.d.ts +12 -0
- package/declaration/src/editor/main.d.ts +8 -0
- package/declaration/src/editor/menu.d.ts +4 -1
- package/declaration/src/editor/nodes/node-particle-system.d.ts +30 -0
- package/declaration/src/editor/rendering/taa.d.ts +11 -0
- package/declaration/src/electron/oauth.d.ts +1 -0
- package/declaration/src/electron/protocol.d.ts +1 -0
- package/declaration/src/export.d.ts +0 -1
- package/declaration/src/index.d.ts +3 -0
- package/declaration/src/project/export/materials.d.ts +7 -0
- package/declaration/src/project/export/particles.d.ts +9 -0
- package/declaration/src/project/load/install.d.ts +8 -0
- package/declaration/src/project/load/plugins/animation-groups.d.ts +4 -0
- package/declaration/src/project/load/plugins/cameras.d.ts +4 -0
- package/declaration/src/project/load/plugins/gui.d.ts +3 -0
- package/declaration/src/project/load/plugins/lights.d.ts +4 -0
- package/declaration/src/project/load/plugins/meshes.d.ts +3 -0
- package/declaration/src/project/load/plugins/morph-targets.d.ts +4 -0
- package/declaration/src/project/load/plugins/node-particle-system-sets.d.ts +4 -0
- package/declaration/src/project/load/plugins/particle-systems.d.ts +4 -0
- package/declaration/src/project/load/plugins/shadow-generators.d.ts +4 -0
- package/declaration/src/project/load/plugins/skeletons.d.ts +4 -0
- package/declaration/src/project/load/plugins/sounds.d.ts +4 -0
- package/declaration/src/project/load/plugins/sprite-managers.d.ts +4 -0
- package/declaration/src/project/load/plugins/sprite-maps.d.ts +4 -0
- package/declaration/src/project/load/plugins/transform-nodes.d.ts +4 -0
- package/declaration/src/project/load/scene.d.ts +11 -1
- package/declaration/src/project/load/texture.d.ts +2 -3
- package/declaration/src/tools/guards/particles.d.ts +6 -0
- package/declaration/src/tools/local-storage.d.ts +9 -0
- package/declaration/src/tools/marketplaces/ambientcg.d.ts +12 -0
- package/declaration/src/tools/marketplaces/polyhaven.d.ts +11 -0
- package/declaration/src/tools/marketplaces/provider.d.ts +37 -0
- package/declaration/src/tools/marketplaces/registrations.d.ts +3 -0
- package/declaration/src/tools/marketplaces/sketchfab/settings.d.ts +8 -0
- package/declaration/src/tools/marketplaces/sketchfab.d.ts +25 -0
- package/declaration/src/tools/marketplaces/types.d.ts +79 -0
- package/declaration/src/tools/material/extract.d.ts +1 -1
- package/declaration/src/tools/material/texture.d.ts +2 -0
- package/declaration/src/tools/node/metadata.d.ts +2 -2
- package/declaration/src/tools/node/parenting.d.ts +11 -0
- package/declaration/src/tools/observables.d.ts +5 -1
- package/declaration/src/tools/particles/augmentations.d.ts +0 -9
- package/declaration/src/tools/particles/extract.d.ts +3 -2
- package/declaration/src/tools/particles/metadata.d.ts +39 -0
- package/declaration/src/tools/particles/particle.d.ts +6 -0
- package/declaration/src/ui/shadcn/ui/alert.d.ts +9 -0
- package/declaration/src/ui/shadcn/ui/field.d.ts +24 -0
- package/package.json +45 -32
package/.env
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
SKETCHFAB_CLIENT_ID=XZVigLIpz1lqWCkAMRWWpZzKIEVaMEIcsBrgQWrD
|
package/build/src/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const os_1 = require("os");
|
|
4
|
+
require("dotenv/config");
|
|
4
5
|
const electron_updater_1 = require("electron-updater");
|
|
5
6
|
const posix_1 = require("path/posix");
|
|
6
7
|
const electron_1 = require("electron");
|
|
@@ -16,6 +17,8 @@ require("./electron/events/editor");
|
|
|
16
17
|
require("./electron/events/window");
|
|
17
18
|
require("./electron/assimp/assimpjs");
|
|
18
19
|
require("./electron/events/export");
|
|
20
|
+
require("./electron/protocol");
|
|
21
|
+
require("./electron/oauth");
|
|
19
22
|
try {
|
|
20
23
|
if (!electron_1.app.isPackaged) {
|
|
21
24
|
process.env.DEBUG ??= "true";
|
|
@@ -77,6 +80,11 @@ electron_1.ipcMain.on("app:quit", () => {
|
|
|
77
80
|
}
|
|
78
81
|
});
|
|
79
82
|
let dashboardWindow = null;
|
|
83
|
+
let menuOptions = { enableExperimentalFeatures: false, openedTabs: [] };
|
|
84
|
+
electron_1.ipcMain.on("editor:setup-menu", (_, options) => {
|
|
85
|
+
menuOptions = options;
|
|
86
|
+
(0, menu_1.setupEditorMenu)(options);
|
|
87
|
+
});
|
|
80
88
|
async function openDashboard() {
|
|
81
89
|
if (!dashboardWindow) {
|
|
82
90
|
(0, menu_2.setupDashboardMenu)();
|
|
@@ -111,10 +119,10 @@ async function openProject(filePath) {
|
|
|
111
119
|
}
|
|
112
120
|
openedProjects.push(filePath);
|
|
113
121
|
notifyWindows("dashboard:opened-projects", openedProjects);
|
|
114
|
-
(0, menu_1.setupEditorMenu)();
|
|
122
|
+
(0, menu_1.setupEditorMenu)(menuOptions);
|
|
115
123
|
const window = await (0, window_2.createEditorWindow)();
|
|
116
124
|
window.setTitle((0, posix_1.basename)((0, posix_1.dirname)(filePath)));
|
|
117
|
-
window.on("focus", () => (0, menu_1.setupEditorMenu)());
|
|
125
|
+
window.on("focus", () => (0, menu_1.setupEditorMenu)(menuOptions));
|
|
118
126
|
window.once("closed", () => {
|
|
119
127
|
openedProjects.splice(openedProjects.indexOf(filePath), 1);
|
|
120
128
|
notifyWindows("dashboard:opened-projects", openedProjects);
|
|
@@ -7,6 +7,7 @@ export interface IDashboardState {
|
|
|
7
7
|
projects: ProjectType[];
|
|
8
8
|
openedProjects: string[];
|
|
9
9
|
createProject: boolean;
|
|
10
|
+
preferencesOpen: boolean;
|
|
10
11
|
closeDashboardOnProjectOpen: boolean;
|
|
11
12
|
}
|
|
12
13
|
export declare class Dashboard extends Component<IDashboardProps, IDashboardState> {
|
|
@@ -14,6 +15,7 @@ export declare class Dashboard extends Component<IDashboardProps, IDashboardStat
|
|
|
14
15
|
render(): ReactNode;
|
|
15
16
|
componentDidMount(): Promise<void>;
|
|
16
17
|
private _checkSystemAvailabilities;
|
|
18
|
+
private _handleKeepDashboardChanged;
|
|
17
19
|
private _handleImportProject;
|
|
18
20
|
private _tryRemoveProjectFromLocalStorage;
|
|
19
21
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface IDashboardPreferencesProps {
|
|
2
|
+
isOpened: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
closeDashboardOnProjectOpen: boolean;
|
|
5
|
+
onKeepDashboardChanged: (checked: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function DashboardPreferences(props: IDashboardPreferencesProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CancellationToken } from "babylonjs-editor-cli";
|
|
2
|
+
export interface IEditorGenerateCompleteComponentProps {
|
|
3
|
+
cancellationToken: CancellationToken | null;
|
|
4
|
+
}
|
|
5
|
+
export declare function EditorGenerateCompleteComponent(props: IEditorGenerateCompleteComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component, ReactNode } from "react";
|
|
2
|
+
import { CancellationToken } from "babylonjs-editor-cli";
|
|
3
|
+
import { Editor } from "../../main";
|
|
4
|
+
export interface IEditorGenerateProjectComponentProps {
|
|
5
|
+
editor: Editor;
|
|
6
|
+
open: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface IEditorGenerateProjectComponentState {
|
|
10
|
+
step: "options" | "generation" | "complete";
|
|
11
|
+
cancellationToken: CancellationToken | null;
|
|
12
|
+
}
|
|
13
|
+
export interface IEditorGenerateOptions {
|
|
14
|
+
optimize: boolean;
|
|
15
|
+
uploadToS3: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare class EditorGenerateProjectComponent extends Component<IEditorGenerateProjectComponentProps, IEditorGenerateProjectComponentState> {
|
|
18
|
+
private _options;
|
|
19
|
+
constructor(props: IEditorGenerateProjectComponentProps);
|
|
20
|
+
render(): ReactNode;
|
|
21
|
+
private _close;
|
|
22
|
+
private _next;
|
|
23
|
+
private _cancel;
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CancellationToken } from "babylonjs-editor-cli";
|
|
2
|
+
import { Editor } from "../../main";
|
|
3
|
+
import { IEditorGenerateOptions } from "./generate-project";
|
|
4
|
+
export interface IEditorGenerateComponentProps {
|
|
5
|
+
editor: Editor;
|
|
6
|
+
options: IEditorGenerateOptions;
|
|
7
|
+
cancellationToken: CancellationToken | null;
|
|
8
|
+
onComplete: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function EditorGenerateComponent(props: IEditorGenerateComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IEditorGenerateOptions } from "./generate-project";
|
|
2
|
+
export interface IEditorGenerateProjectOptionsComponentProps {
|
|
3
|
+
options: IEditorGenerateOptions;
|
|
4
|
+
}
|
|
5
|
+
export declare function EditorGenerateOptionsComponent(props: IEditorGenerateProjectOptionsComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { AssetsBrowserItem } from "./item";
|
|
3
|
+
export declare class AssetBrowserRagdollItem extends AssetsBrowserItem {
|
|
4
|
+
/**
|
|
5
|
+
* @override
|
|
6
|
+
*/
|
|
7
|
+
protected getIcon(): ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* @override
|
|
10
|
+
*/
|
|
11
|
+
protected onDoubleClick(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -87,6 +87,7 @@ export declare class EditorAssetsBrowser extends Component<IEditorAssetsBrowserP
|
|
|
87
87
|
private _handleAddNodeParticleSystem;
|
|
88
88
|
private _handleAddCinematic;
|
|
89
89
|
private _handleAddNavmesh;
|
|
90
|
+
private _handleAddRagdoll;
|
|
90
91
|
private _handleAddFullScreenGUI;
|
|
91
92
|
private _handleAddScript;
|
|
92
93
|
/**
|
|
@@ -13,9 +13,11 @@ export interface ICinematicEditorProps {
|
|
|
13
13
|
cinematic: ICinematic;
|
|
14
14
|
}
|
|
15
15
|
export interface ICinematicEditorState {
|
|
16
|
-
|
|
16
|
+
timelinesScale: number;
|
|
17
|
+
curvesZoom: number;
|
|
17
18
|
currentTime: number;
|
|
18
19
|
editType: "keyframes" | "curves";
|
|
20
|
+
tracksFilter: string;
|
|
19
21
|
hoverTrack: ICinematicTrack | null;
|
|
20
22
|
selectedTrack: ICinematicTrack | null;
|
|
21
23
|
playing: boolean;
|
|
@@ -2,6 +2,7 @@ import { Component, ReactNode } from "react";
|
|
|
2
2
|
export interface ICinematicEditorTrackerProps {
|
|
3
3
|
scale: number;
|
|
4
4
|
currentTime: number;
|
|
5
|
+
translationX?: number;
|
|
5
6
|
}
|
|
6
7
|
export declare class CinematicEditorTracker extends Component<ICinematicEditorTrackerProps> {
|
|
7
8
|
private _forcedCurrentTime;
|
|
@@ -2,6 +2,7 @@ import { Component, ReactNode } from "react";
|
|
|
2
2
|
import { ICinematicTrack } from "babylonjs-editor-tools";
|
|
3
3
|
import { CinematicEditor } from "./editor";
|
|
4
4
|
export interface ICinematicEditorTracksProps {
|
|
5
|
+
tracksFilter: string;
|
|
5
6
|
cinematicEditor: CinematicEditor;
|
|
6
7
|
}
|
|
7
8
|
export interface ICinematicEditorTracksState {
|
|
@@ -60,7 +60,7 @@ export declare class EditorGraph extends Component<IEditorGraphProps, IEditorGra
|
|
|
60
60
|
* Sets the given node selected in the graph. All other selected nodes remain selected.
|
|
61
61
|
* @param node defines the reference to the node to select in the graph.
|
|
62
62
|
*/
|
|
63
|
-
addToSelectedNodes(node: Node): void;
|
|
63
|
+
addToSelectedNodes(node: Node | Sound | IParticleSystem | Sprite): void;
|
|
64
64
|
/**
|
|
65
65
|
* Returns the list of all selected nodes
|
|
66
66
|
*/
|
|
@@ -72,7 +72,7 @@ export declare class EditorGraph extends Component<IEditorGraphProps, IEditorGra
|
|
|
72
72
|
/**
|
|
73
73
|
* Pastes the previously copied nodes.
|
|
74
74
|
*/
|
|
75
|
-
pasteSelectedNodes(parent?: Node): void;
|
|
75
|
+
pasteSelectedNodes(parent?: Node, shift?: boolean): void;
|
|
76
76
|
copySelectedNodeTransform(node: Node): void;
|
|
77
77
|
pasteSelectedNodeTransform(node: Node): void;
|
|
78
78
|
private _handleSearch;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { IEditorInspectorFieldProps } from "./field";
|
|
3
3
|
export interface IEditorInspectorListFieldItem {
|
|
4
|
-
key?: string;
|
|
4
|
+
key?: string | number;
|
|
5
5
|
text: string;
|
|
6
6
|
value: any;
|
|
7
7
|
icon?: ReactNode;
|
|
8
8
|
label?: string;
|
|
9
9
|
}
|
|
10
10
|
export interface IEditorInspectorListFieldProps extends IEditorInspectorFieldProps {
|
|
11
|
+
search?: boolean;
|
|
11
12
|
items: IEditorInspectorListFieldItem[];
|
|
12
13
|
onChange?: (value: any, oldValue: any) => void;
|
|
13
14
|
}
|
|
@@ -30,6 +30,7 @@ export declare class EditorInspectorTextureField extends Component<IEditorInspec
|
|
|
30
30
|
private _getColorGradingTextureInspector;
|
|
31
31
|
private _getTextureInspector;
|
|
32
32
|
private _computeTemporaryPreview;
|
|
33
|
+
private _computeTemporaryPreviewFromDataString;
|
|
33
34
|
private _handleDragOver;
|
|
34
35
|
private _handleDragLeave;
|
|
35
36
|
private _handleDrop;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Component, ReactNode } from "react";
|
|
2
|
+
import { IMarketplaceAsset } from "../../../../tools/marketplaces/types";
|
|
3
|
+
import { MarketplaceProvider } from "../../../../tools/marketplaces/provider";
|
|
4
|
+
import { IEditorInspectorImplementationProps } from "../inspector";
|
|
5
|
+
export declare class MarketplaceAssetInspectorObject {
|
|
6
|
+
readonly asset: IMarketplaceAsset;
|
|
7
|
+
readonly provider: MarketplaceProvider;
|
|
8
|
+
readonly openSettings: () => void;
|
|
9
|
+
readonly isMarketplaceAssetInspectorObject = true;
|
|
10
|
+
constructor(asset: IMarketplaceAsset, provider: MarketplaceProvider, openSettings: () => void);
|
|
11
|
+
}
|
|
12
|
+
interface IEditorMarketplaceAssetInspectorState {
|
|
13
|
+
downloading: boolean;
|
|
14
|
+
detailsLoading: boolean;
|
|
15
|
+
selectedDownloadType?: string;
|
|
16
|
+
selectedDownloadQuality?: string;
|
|
17
|
+
assetPath?: string;
|
|
18
|
+
details?: IMarketplaceAsset;
|
|
19
|
+
}
|
|
20
|
+
export declare class EditorMarketplaceAssetInspector extends Component<IEditorInspectorImplementationProps<MarketplaceAssetInspectorObject>, IEditorMarketplaceAssetInspectorState> {
|
|
21
|
+
/**
|
|
22
|
+
* Returns whether or not the given object is supported by this inspector.
|
|
23
|
+
* @param object defines the object to check.
|
|
24
|
+
* @returns true if the object is supported by this inspector.
|
|
25
|
+
*/
|
|
26
|
+
static IsSupported(object: any): object is MarketplaceAssetInspectorObject;
|
|
27
|
+
constructor(props: IEditorInspectorImplementationProps<MarketplaceAssetInspectorObject>);
|
|
28
|
+
render(): ReactNode;
|
|
29
|
+
componentDidMount(): Promise<void>;
|
|
30
|
+
componentDidUpdate(prevProps: IEditorInspectorImplementationProps<MarketplaceAssetInspectorObject>): void;
|
|
31
|
+
componentWillUnmount(): void;
|
|
32
|
+
private _handleSettingsChanged;
|
|
33
|
+
private _getAssetPath;
|
|
34
|
+
private _openAssetFolder;
|
|
35
|
+
private _shouldShowLoginAction;
|
|
36
|
+
private _loadDetails;
|
|
37
|
+
private _handleImport;
|
|
38
|
+
private _getFirstType;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component, ReactNode } from "react";
|
|
2
|
+
import { NodeParticleSystemSetMesh } from "../../../nodes/node-particle-system";
|
|
3
|
+
import { IEditorInspectorImplementationProps } from "../inspector";
|
|
4
|
+
export interface IEditorNodeParticleSystemSetMeshInspectorState {
|
|
5
|
+
searchingToEdit: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class EditorNodeParticleSystemSetMeshInspector extends Component<IEditorInspectorImplementationProps<NodeParticleSystemSetMesh>, IEditorNodeParticleSystemSetMeshInspectorState> {
|
|
8
|
+
/**
|
|
9
|
+
* Returns whether or not the given object is supported by this inspector.
|
|
10
|
+
* @param object defines the object to check.
|
|
11
|
+
* @returns true if the object is supported by this inspector.
|
|
12
|
+
*/
|
|
13
|
+
static IsSupported(object: unknown): boolean;
|
|
14
|
+
constructor(props: IEditorInspectorImplementationProps<NodeParticleSystemSetMesh>);
|
|
15
|
+
render(): ReactNode;
|
|
16
|
+
private _openNodeParticleSystemSetEditor;
|
|
17
|
+
}
|
|
@@ -17,6 +17,7 @@ export declare class EditorSceneInspector extends Component<IEditorInspectorImpl
|
|
|
17
17
|
render(): ReactNode;
|
|
18
18
|
private _getPhysicsComponent;
|
|
19
19
|
private _getDefaultRenderingPipelineComponent;
|
|
20
|
+
private _getTAARenderingPipelineComponent;
|
|
20
21
|
private _getSSAO2RenderingPipelineComponent;
|
|
21
22
|
private _getMotionBlurPostProcessComponent;
|
|
22
23
|
private _getSSRPipelineComponent;
|
|
@@ -8,6 +8,7 @@ export declare class EditorTransformNodeInspector extends Component<IEditorInspe
|
|
|
8
8
|
* @returns true if the object is supported by this inspector.
|
|
9
9
|
*/
|
|
10
10
|
static IsSupported(object: unknown): boolean;
|
|
11
|
+
constructor(props: IEditorInspectorImplementationProps<AbstractMesh>);
|
|
11
12
|
render(): ReactNode;
|
|
12
13
|
private _gizmoObserver;
|
|
13
14
|
componentDidMount(): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IMarketplaceFooterProps {
|
|
2
|
+
assetsCount: number;
|
|
3
|
+
currentPage: number;
|
|
4
|
+
totalCount?: number;
|
|
5
|
+
loading: boolean;
|
|
6
|
+
hasPrevious: boolean;
|
|
7
|
+
hasNext: boolean;
|
|
8
|
+
onPrevious: () => void;
|
|
9
|
+
onNext: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function MarketplaceFooter(props: IMarketplaceFooterProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IMarketplaceAsset } from "../../../tools/marketplaces/types";
|
|
2
|
+
export interface IMarketplaceGridProps {
|
|
3
|
+
assets: IMarketplaceAsset[];
|
|
4
|
+
loading: boolean;
|
|
5
|
+
query: string;
|
|
6
|
+
selectedAsset: IMarketplaceAsset | null;
|
|
7
|
+
onAssetClick: (asset: IMarketplaceAsset) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function MarketplaceGrid(props: IMarketplaceGridProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Editor } from "../../main";
|
|
2
|
+
import { IMarketplaceAsset } from "../../../tools/marketplaces/types";
|
|
3
|
+
import { MarketplaceProvider } from "../../../tools/marketplaces/provider";
|
|
4
|
+
export interface IImportProgressProps {
|
|
5
|
+
asset: IMarketplaceAsset;
|
|
6
|
+
editor: Editor;
|
|
7
|
+
provider: MarketplaceProvider;
|
|
8
|
+
quality: string;
|
|
9
|
+
type: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const ImportProgress: (props: IImportProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IMarketplaceAsset } from "../../../tools/marketplaces/types";
|
|
2
|
+
export interface IMarketplaceItemProps {
|
|
3
|
+
asset: IMarketplaceAsset;
|
|
4
|
+
isSelected: boolean;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const MarketplaceItem: (props: IMarketplaceItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Component, ReactNode } from "react";
|
|
2
|
+
import { MarketplaceProvider } from "../../../tools/marketplaces/provider";
|
|
3
|
+
export interface IMarketplaceSettingsDialogProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
providers: MarketplaceProvider[];
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}
|
|
8
|
+
export interface IMarketplaceSettingsDialogState {
|
|
9
|
+
downloadPath: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class MarketplaceSettingsDialog extends Component<IMarketplaceSettingsDialogProps, IMarketplaceSettingsDialogState> {
|
|
12
|
+
constructor(props: IMarketplaceSettingsDialogProps);
|
|
13
|
+
componentDidUpdate(prevProps: IMarketplaceSettingsDialogProps): void;
|
|
14
|
+
private _getDownloadPathKey;
|
|
15
|
+
componentDidMount(): void;
|
|
16
|
+
componentWillUnmount(): void;
|
|
17
|
+
private _handleSettingsChanged;
|
|
18
|
+
render(): ReactNode;
|
|
19
|
+
private _handleDownloadPathChange;
|
|
20
|
+
private _handleBrowseDownloadPath;
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IMarketplaceAsset } from "../../../tools/marketplaces/types";
|
|
2
|
+
export interface IMarketplaceSidebarProps {
|
|
3
|
+
asset?: IMarketplaceAsset;
|
|
4
|
+
detailsLoading: boolean;
|
|
5
|
+
selectedQuality?: string;
|
|
6
|
+
selectedType?: string;
|
|
7
|
+
showLoginAction?: boolean;
|
|
8
|
+
loginActionLabel?: string;
|
|
9
|
+
isDownloading: boolean;
|
|
10
|
+
assetPath?: string;
|
|
11
|
+
onQualityChange: (quality: string) => void;
|
|
12
|
+
onTypeChange: (type: string) => void;
|
|
13
|
+
onImport: (type?: string) => void;
|
|
14
|
+
onOpenMarketplaceUrl: (url: string) => void;
|
|
15
|
+
onOpenSettings: () => void;
|
|
16
|
+
onLogin?: () => void;
|
|
17
|
+
openAssetFolder: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function MarketplaceSidebar(props: IMarketplaceSidebarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MarketplaceProvider } from "../../../tools/marketplaces/provider";
|
|
2
|
+
import { IMarketplaceFilterDefinition, IMarketplaceSearchFilters } from "../../../tools/marketplaces/types";
|
|
3
|
+
export interface IMarketplaceToolbarProps {
|
|
4
|
+
query: string;
|
|
5
|
+
filters: IMarketplaceSearchFilters;
|
|
6
|
+
filterDefinitions: IMarketplaceFilterDefinition[];
|
|
7
|
+
loading: boolean;
|
|
8
|
+
providers: MarketplaceProvider[];
|
|
9
|
+
selectedProvider: MarketplaceProvider;
|
|
10
|
+
onQueryChange: (query: string) => void;
|
|
11
|
+
onFiltersChange: (filters: IMarketplaceSearchFilters) => void;
|
|
12
|
+
onResetFilters: () => void;
|
|
13
|
+
onSearch: () => void;
|
|
14
|
+
onProviderChange: (provider: MarketplaceProvider) => void;
|
|
15
|
+
onSettingsClick: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function MarketplaceToolbar(props: IMarketplaceToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Component, ReactNode } from "react";
|
|
2
|
+
import { Editor } from "../main";
|
|
3
|
+
import { MarketplaceProvider } from "../../tools/marketplaces/provider";
|
|
4
|
+
import { IMarketplaceAsset, IMarketplaceSearchFilters } from "../../tools/marketplaces/types";
|
|
5
|
+
export interface IMarketplaceBrowserProps {
|
|
6
|
+
editor: Editor;
|
|
7
|
+
}
|
|
8
|
+
export interface IMarketplaceBrowserState {
|
|
9
|
+
providers: MarketplaceProvider[];
|
|
10
|
+
selectedProvider: MarketplaceProvider;
|
|
11
|
+
query: string;
|
|
12
|
+
filters: IMarketplaceSearchFilters;
|
|
13
|
+
assets: IMarketplaceAsset[];
|
|
14
|
+
loading: boolean;
|
|
15
|
+
totalCount?: number;
|
|
16
|
+
selectedAsset: IMarketplaceAsset | null;
|
|
17
|
+
currentPage: number;
|
|
18
|
+
pageTokenStack: (string | undefined)[];
|
|
19
|
+
nextPageToken?: string;
|
|
20
|
+
settingsOpen: boolean;
|
|
21
|
+
isMaximized: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare class EditorMarketplaceBrowser extends Component<IMarketplaceBrowserProps, IMarketplaceBrowserState> {
|
|
24
|
+
private _searchRequestId;
|
|
25
|
+
constructor(props: IMarketplaceBrowserProps);
|
|
26
|
+
componentDidMount(): Promise<void>;
|
|
27
|
+
componentWillUnmount(): void;
|
|
28
|
+
private _handleSettingsChanged;
|
|
29
|
+
private _handleLayoutChanged;
|
|
30
|
+
render(): ReactNode;
|
|
31
|
+
private _handlePreviousPage;
|
|
32
|
+
private _handleNextPage;
|
|
33
|
+
private _handleAssetClicked;
|
|
34
|
+
private _handleSearch;
|
|
35
|
+
private _getDefaultFilters;
|
|
36
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RecastNavigationJSPluginV2 } from "babylonjs-addons";
|
|
2
|
+
import { Mesh } from "babylonjs";
|
|
3
|
+
export interface INavMeshEditorPreviewProps {
|
|
4
|
+
mesh: Mesh | null;
|
|
5
|
+
plugin: RecastNavigationJSPluginV2;
|
|
6
|
+
}
|
|
7
|
+
export declare function NavMeshEditorPreview(props: INavMeshEditorPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { Scene,
|
|
2
|
-
|
|
1
|
+
import { Scene, AbstractMesh } from "babylonjs";
|
|
2
|
+
import { NodeParticleSystemSetMesh } from "../../../nodes/node-particle-system";
|
|
3
|
+
export declare function loadImportedParticleSystemFile(scene: Scene, targetMesh: AbstractMesh, absolutePath: string): Promise<NodeParticleSystemSetMesh>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component, ReactNode } from "react";
|
|
2
|
+
import { IRagDollConfiguration } from "babylonjs-editor-tools";
|
|
3
|
+
import { Editor } from "../../main";
|
|
4
|
+
import { RagdollEditorPreview } from "./preview";
|
|
5
|
+
import { RagdollEditorInspector } from "./inspector";
|
|
6
|
+
export interface IRagdollEditorProps {
|
|
7
|
+
editor: Editor;
|
|
8
|
+
absolutePath: string;
|
|
9
|
+
configuration: IRagDollConfiguration;
|
|
10
|
+
}
|
|
11
|
+
export interface IIRagdollEditorPropsState {
|
|
12
|
+
loading: boolean;
|
|
13
|
+
assetRelativePath?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class RagdollEditor extends Component<IRagdollEditorProps, IIRagdollEditorPropsState> {
|
|
16
|
+
preview: RagdollEditorPreview;
|
|
17
|
+
inspector: RagdollEditorInspector;
|
|
18
|
+
constructor(props: IRagdollEditorProps);
|
|
19
|
+
render(): ReactNode;
|
|
20
|
+
componentDidMount(): void;
|
|
21
|
+
save(): Promise<void>;
|
|
22
|
+
loadAsset(relativePath: string): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Component, ReactNode } from "react";
|
|
2
|
+
import { Skeleton, Mesh, TransformNode } from "babylonjs";
|
|
3
|
+
import { IRagDollConfiguration, IRagdollRuntimeConfiguration } from "babylonjs-editor-tools";
|
|
4
|
+
import { RagdollEditor } from "./editor";
|
|
5
|
+
export interface IRagdollEditorInspectorProps {
|
|
6
|
+
ragdollEditor: RagdollEditor;
|
|
7
|
+
configuration: IRagDollConfiguration;
|
|
8
|
+
}
|
|
9
|
+
export interface IRagdollEditorInspectorState {
|
|
10
|
+
selectedSkeleton?: Skeleton;
|
|
11
|
+
selectedRootNode?: Mesh | TransformNode;
|
|
12
|
+
isRagdollApplied: boolean;
|
|
13
|
+
selectedConfiguration?: IRagdollRuntimeConfiguration;
|
|
14
|
+
}
|
|
15
|
+
export declare class RagdollEditorInspector extends Component<IRagdollEditorInspectorProps, IRagdollEditorInspectorState> {
|
|
16
|
+
private _selectedSkeleton;
|
|
17
|
+
private _selectedRootNode;
|
|
18
|
+
private _lastRootNodeScaling;
|
|
19
|
+
constructor(props: IRagdollEditorInspectorProps);
|
|
20
|
+
render(): ReactNode;
|
|
21
|
+
private _getRagdollInspector;
|
|
22
|
+
private _handleApplyOrStopRagdollPreview;
|
|
23
|
+
private _getConfigurationListInspector;
|
|
24
|
+
private _handleAddConfiguration;
|
|
25
|
+
private _handleRemoveConfiguration;
|
|
26
|
+
private _getConfigurationInspector;
|
|
27
|
+
private _handleChange;
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Component, ReactNode } from "react";
|
|
2
|
+
import { Engine, Scene, ArcRotateCamera, Ragdoll, GroundMesh, TransformNode } from "babylonjs";
|
|
3
|
+
import { Editor } from "../../main";
|
|
4
|
+
import { RagdollEditor } from "./editor";
|
|
5
|
+
export interface IRagdollEditorPreviewProps {
|
|
6
|
+
editor: Editor;
|
|
7
|
+
ragdollEditor: RagdollEditor;
|
|
8
|
+
}
|
|
9
|
+
export interface IRagdollEditorPreviewState {
|
|
10
|
+
}
|
|
11
|
+
export declare class RagdollEditorPreview extends Component<IRagdollEditorPreviewProps, IRagdollEditorPreviewState> {
|
|
12
|
+
private _canvasRef;
|
|
13
|
+
engine: Engine;
|
|
14
|
+
scene: Scene;
|
|
15
|
+
camera: ArcRotateCamera;
|
|
16
|
+
ground: GroundMesh;
|
|
17
|
+
scalingNode: TransformNode;
|
|
18
|
+
ragdoll: Ragdoll | null;
|
|
19
|
+
private _light;
|
|
20
|
+
private _viewer;
|
|
21
|
+
constructor(props: IRagdollEditorPreviewProps);
|
|
22
|
+
render(): ReactNode;
|
|
23
|
+
componentDidMount(): void;
|
|
24
|
+
componentWillUnmount(): void;
|
|
25
|
+
resetViewer(): void;
|
|
26
|
+
loadFromRelativePath(relativePath: string): Promise<void>;
|
|
27
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, ReactNode } from "react";
|
|
2
|
+
import { Observable } from "babylonjs";
|
|
2
3
|
import { Editor } from "./main";
|
|
3
4
|
import { EditorGraph } from "./layout/graph";
|
|
4
5
|
import { EditorPreview } from "./layout/preview";
|
|
@@ -15,7 +16,9 @@ export interface IEditorLayoutProps {
|
|
|
15
16
|
export interface IEditorLayoutTabOptions {
|
|
16
17
|
id?: string;
|
|
17
18
|
title: string;
|
|
19
|
+
neighborId?: "inspector" | "assets-browser";
|
|
18
20
|
enableClose?: boolean;
|
|
21
|
+
setAsActiveTab?: boolean;
|
|
19
22
|
}
|
|
20
23
|
export declare class EditorLayout extends Component<IEditorLayoutProps> {
|
|
21
24
|
/**
|
|
@@ -42,6 +45,10 @@ export declare class EditorLayout extends Component<IEditorLayoutProps> {
|
|
|
42
45
|
* The animation editor of the editor.
|
|
43
46
|
*/
|
|
44
47
|
animations: EditorAnimation;
|
|
48
|
+
/**
|
|
49
|
+
* Observable for when the layout has changed.
|
|
50
|
+
*/
|
|
51
|
+
onLayoutChanged: Observable<void>;
|
|
45
52
|
private _layoutRef;
|
|
46
53
|
private _model;
|
|
47
54
|
private _components;
|
|
@@ -51,6 +58,11 @@ export declare class EditorLayout extends Component<IEditorLayoutProps> {
|
|
|
51
58
|
componentDidCatch(): void;
|
|
52
59
|
private _layoutFactory;
|
|
53
60
|
private _saveLayout;
|
|
61
|
+
/**
|
|
62
|
+
* Returns whether or not the tab identified by the given id is maximized.
|
|
63
|
+
* @param tabId defines the id of the tab to check.
|
|
64
|
+
*/
|
|
65
|
+
isTabMaximized(tabId: string): boolean;
|
|
54
66
|
/**
|
|
55
67
|
* Makes the tab identified by the given id active.
|
|
56
68
|
* If the tab is hidden, makes it visible and selected.
|
|
@@ -44,6 +44,10 @@ export interface IEditorState {
|
|
|
44
44
|
* Defines wether or not experimental features are enabled.
|
|
45
45
|
*/
|
|
46
46
|
enableExperimentalFeatures: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Defines the list of tabs that are currently opened in the layout.
|
|
49
|
+
*/
|
|
50
|
+
openedTabs: string[];
|
|
47
51
|
/**
|
|
48
52
|
* Defines if the project is being edited.
|
|
49
53
|
*/
|
|
@@ -52,6 +56,10 @@ export interface IEditorState {
|
|
|
52
56
|
* Defines if the preferences are being edited.
|
|
53
57
|
*/
|
|
54
58
|
editPreferences: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Defines if the project generator dialog is opened.
|
|
61
|
+
*/
|
|
62
|
+
generateProject: boolean;
|
|
55
63
|
/**
|
|
56
64
|
* Defines wether or not NodeJS is available.
|
|
57
65
|
*/
|