babylonjs-editor 5.4.1-alpha.3 → 5.4.1-alpha.5
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/declaration/src/editor/layout/graph/context-menu.d.ts +0 -1
- package/declaration/src/editor/layout/graph/update-resources.d.ts +38 -0
- package/declaration/src/editor/layout/inspector/material/components/detail.d.ts +11 -0
- package/declaration/src/editor/layout/preview.d.ts +3 -0
- package/declaration/src/loader/assimpjs.d.ts +2 -1
- package/declaration/src/tools/dialog.d.ts +1 -0
- package/package.json +16 -16
- package/declaration/src/ui/scene-asset-browser.d.ts +0 -88
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Component, ReactNode } from "react";
|
|
2
|
+
import { Node, Mesh, AnimationGroup, TransformNode } from "babylonjs";
|
|
3
|
+
import { Editor } from "../../main";
|
|
4
|
+
export declare function showUpdateResourcesFromAsset(editor: Editor, node: Node): Promise<void>;
|
|
5
|
+
export interface IUpdateResourcesMeshItem {
|
|
6
|
+
object: Mesh;
|
|
7
|
+
update: boolean;
|
|
8
|
+
matchedResource: Mesh | null;
|
|
9
|
+
}
|
|
10
|
+
export interface IUpdateResourcesAnimationGroupItem {
|
|
11
|
+
update: boolean;
|
|
12
|
+
object: AnimationGroup;
|
|
13
|
+
rootNode: TransformNode | null;
|
|
14
|
+
matchedRootNode: TransformNode | null;
|
|
15
|
+
}
|
|
16
|
+
export interface IUpdateResourcesFromAssetProps {
|
|
17
|
+
editor: Editor;
|
|
18
|
+
object: Node;
|
|
19
|
+
filename: string;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
}
|
|
22
|
+
export interface IUpdateResourcesFromAssetState {
|
|
23
|
+
loading: boolean;
|
|
24
|
+
objectMeshes: Mesh[];
|
|
25
|
+
objectTransformNodes: TransformNode[];
|
|
26
|
+
assetMeshes: IUpdateResourcesMeshItem[];
|
|
27
|
+
assetAnimationGroups: IUpdateResourcesAnimationGroupItem[];
|
|
28
|
+
}
|
|
29
|
+
export declare class UpdateResourcesFromAsset extends Component<IUpdateResourcesFromAssetProps, IUpdateResourcesFromAssetState> {
|
|
30
|
+
private _container;
|
|
31
|
+
constructor(props: IUpdateResourcesFromAssetProps);
|
|
32
|
+
render(): ReactNode;
|
|
33
|
+
componentDidMount(): Promise<void>;
|
|
34
|
+
componentWillUnmount(): void;
|
|
35
|
+
private _update;
|
|
36
|
+
private _getMeshesGridComponent;
|
|
37
|
+
private _getAnimationGroupsGridComponent;
|
|
38
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Component, ReactNode } from "react";
|
|
2
|
+
import { PBRMaterial, StandardMaterial } from "babylonjs";
|
|
3
|
+
export interface IEditorDetailMapInspectorProps {
|
|
4
|
+
material: StandardMaterial | PBRMaterial;
|
|
5
|
+
}
|
|
6
|
+
export interface IEditorDetailMapInspectorState {
|
|
7
|
+
}
|
|
8
|
+
export declare class EditorDetailMapInspector extends Component<IEditorDetailMapInspectorProps, IEditorDetailMapInspectorState> {
|
|
9
|
+
constructor(props: IEditorDetailMapInspectorProps);
|
|
10
|
+
render(): ReactNode;
|
|
11
|
+
}
|
|
@@ -85,6 +85,7 @@ export declare class EditorPreview extends Component<IEditorPreviewProps, IEdito
|
|
|
85
85
|
clusteredLightContainer: ClusteredLightContainer;
|
|
86
86
|
private _renderScene;
|
|
87
87
|
private _mouseDownPosition;
|
|
88
|
+
private _lastPickedDecal;
|
|
88
89
|
private _objectUnderPointer;
|
|
89
90
|
private _workingCanvas;
|
|
90
91
|
private _mainView;
|
|
@@ -132,6 +133,8 @@ export declare class EditorPreview extends Component<IEditorPreviewProps, IEdito
|
|
|
132
133
|
private _handleMouseDown;
|
|
133
134
|
private _handleDoubleClick;
|
|
134
135
|
private _handleMouseUp;
|
|
136
|
+
private _decalMeshPredicate;
|
|
137
|
+
private _meshPredicate;
|
|
135
138
|
private _getPickingInfo;
|
|
136
139
|
private _resetPointerContextInfo;
|
|
137
140
|
private _highlightCurrentMeshUnderPointer;
|
|
@@ -2,9 +2,10 @@ import { ISceneLoaderPluginAsync, ISceneLoaderPluginExtensions, ISceneLoaderProg
|
|
|
2
2
|
import { IAssimpJSRootData } from "./types";
|
|
3
3
|
export declare class AssimpJSLoader implements ISceneLoaderPluginAsync {
|
|
4
4
|
private _useWorker;
|
|
5
|
+
private _writeTextures;
|
|
5
6
|
name: string;
|
|
6
7
|
extensions: ISceneLoaderPluginExtensions;
|
|
7
|
-
constructor(_useWorker: boolean);
|
|
8
|
+
constructor(_useWorker: boolean, _writeTextures: boolean);
|
|
8
9
|
/**
|
|
9
10
|
* Import meshes into a scene.
|
|
10
11
|
* @param meshesNames An array of mesh names, a single mesh name, or empty string for all meshes that filter what meshes are imported
|
|
@@ -2,6 +2,7 @@ import { FileFilter } from "electron";
|
|
|
2
2
|
export type OpenFileDialogOptions = {
|
|
3
3
|
title?: string;
|
|
4
4
|
filters?: FileFilter[];
|
|
5
|
+
defaultPath?: string;
|
|
5
6
|
};
|
|
6
7
|
export declare function openSingleFileDialog(options?: OpenFileDialogOptions): string;
|
|
7
8
|
export declare function openMultipleFilesDialog(options?: OpenFileDialogOptions): string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-editor",
|
|
3
|
-
"version": "5.4.1-alpha.
|
|
3
|
+
"version": "5.4.1-alpha.5",
|
|
4
4
|
"description": "Babylon.js Editor is a Web Application helping artists to work with Babylon.js",
|
|
5
5
|
"productName": "Babylon.js Editor",
|
|
6
6
|
"main": "build/src/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/react-dom": "18.2.18",
|
|
32
32
|
"@vitest/coverage-v8": "4.0.17",
|
|
33
33
|
"concurrently": "9.2.0",
|
|
34
|
-
"electron": "39.8.
|
|
34
|
+
"electron": "39.8.5",
|
|
35
35
|
"electron-builder": "26.0.12",
|
|
36
36
|
"electron-reloader": "1.2.3",
|
|
37
37
|
"postcss-import": "16.1.0",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"vitest": "4.0.17"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@babylonjs/addons": "9.
|
|
44
|
-
"@babylonjs/core": "9.
|
|
45
|
-
"@babylonjs/havok": "1.3.
|
|
43
|
+
"@babylonjs/addons": "9.2.1",
|
|
44
|
+
"@babylonjs/core": "9.2.1",
|
|
45
|
+
"@babylonjs/havok": "1.3.12",
|
|
46
46
|
"@blueprintjs/core": "^5.10.0",
|
|
47
47
|
"@blueprintjs/select": "^5.1.2",
|
|
48
48
|
"@emotion/react": "^11.13.3",
|
|
@@ -74,19 +74,19 @@
|
|
|
74
74
|
"@xterm/addon-fit": "0.11.0",
|
|
75
75
|
"@xterm/xterm": "6.1.0-beta.22",
|
|
76
76
|
"assimpjs": "0.0.10",
|
|
77
|
-
"axios": "1.
|
|
78
|
-
"babylonjs": "9.
|
|
79
|
-
"babylonjs-addons": "9.
|
|
77
|
+
"axios": "1.15.0",
|
|
78
|
+
"babylonjs": "9.2.1",
|
|
79
|
+
"babylonjs-addons": "9.2.1",
|
|
80
80
|
"babylonjs-editor-cli": "latest",
|
|
81
81
|
"babylonjs-editor-tools": "latest",
|
|
82
|
-
"babylonjs-gui": "9.
|
|
83
|
-
"babylonjs-gui-editor": "9.
|
|
84
|
-
"babylonjs-loaders": "9.
|
|
85
|
-
"babylonjs-materials": "9.
|
|
86
|
-
"babylonjs-node-editor": "9.
|
|
87
|
-
"babylonjs-node-particle-editor": "9.
|
|
88
|
-
"babylonjs-post-process": "9.
|
|
89
|
-
"babylonjs-procedural-textures": "9.
|
|
82
|
+
"babylonjs-gui": "9.2.1",
|
|
83
|
+
"babylonjs-gui-editor": "9.2.1",
|
|
84
|
+
"babylonjs-loaders": "9.2.1",
|
|
85
|
+
"babylonjs-materials": "9.2.1",
|
|
86
|
+
"babylonjs-node-editor": "9.2.1",
|
|
87
|
+
"babylonjs-node-particle-editor": "9.2.1",
|
|
88
|
+
"babylonjs-post-process": "9.2.1",
|
|
89
|
+
"babylonjs-procedural-textures": "9.2.1",
|
|
90
90
|
"chokidar": "^4.0.3",
|
|
91
91
|
"class-variance-authority": "^0.7.0",
|
|
92
92
|
"clsx": "^2.1.0",
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { Component, ReactNode } from "react";
|
|
2
|
-
import { AssetContainer, Mesh, Skeleton, AnimationGroup } from "babylonjs";
|
|
3
|
-
import { Editor } from "../editor/main";
|
|
4
|
-
export declare enum SceneAssetBrowserDialogMode {
|
|
5
|
-
Meshes = 1,
|
|
6
|
-
Skeletons = 2,
|
|
7
|
-
Materials = 4,
|
|
8
|
-
Lights = 8,
|
|
9
|
-
AnimationGroups = 16
|
|
10
|
-
}
|
|
11
|
-
export type AssetsBrowserDialogOptions = {
|
|
12
|
-
/**
|
|
13
|
-
* Defines wether or not multi selection is enabled.
|
|
14
|
-
*/
|
|
15
|
-
multiSelect: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Defines the filter to apply to the scene asset browser dialog to only show specific elements.
|
|
18
|
-
*/
|
|
19
|
-
filter: SceneAssetBrowserDialogMode;
|
|
20
|
-
};
|
|
21
|
-
export type AssetsBrowserDialogResult = {
|
|
22
|
-
container: AssetContainer;
|
|
23
|
-
selectedMeshes: Mesh[];
|
|
24
|
-
selectedSkeletons: Skeleton[];
|
|
25
|
-
selectedAnimationGroups: AnimationGroup[];
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Shows the file open dialog to select a scene file (.babylon, .gltf, etc.) and then opens the dialog
|
|
29
|
-
* used to browse the scene file and select elements to import.
|
|
30
|
-
* @param editor defines the reference to the editor.
|
|
31
|
-
* @param options defines the options of the assets browser dialog.
|
|
32
|
-
*/
|
|
33
|
-
export declare function showAssetBrowserDialog(editor: Editor, options: AssetsBrowserDialogOptions): Promise<AssetsBrowserDialogResult>;
|
|
34
|
-
export interface ISceneAssetBrowserDialogProps {
|
|
35
|
-
/**
|
|
36
|
-
* Defines the reference to the editor.
|
|
37
|
-
*/
|
|
38
|
-
editor: Editor;
|
|
39
|
-
/**
|
|
40
|
-
* Defines the absolute path to the scene file to load and pick items in.
|
|
41
|
-
*/
|
|
42
|
-
filename: string;
|
|
43
|
-
/**
|
|
44
|
-
* Defines wether or not multi-select is enabled.
|
|
45
|
-
*/
|
|
46
|
-
multiSelect: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Defines the filter to apply to the scene asset browser dialog to only show specific elements.
|
|
49
|
-
*/
|
|
50
|
-
filter: SceneAssetBrowserDialogMode;
|
|
51
|
-
/**
|
|
52
|
-
* Defines the callback called on the user wants to close the dialog.
|
|
53
|
-
*/
|
|
54
|
-
onClose: () => void;
|
|
55
|
-
/**
|
|
56
|
-
* Defines the callback called on the user wants to import some assets.
|
|
57
|
-
*/
|
|
58
|
-
onSelectedAssets: (result: AssetsBrowserDialogResult) => void;
|
|
59
|
-
}
|
|
60
|
-
export interface ISceneAssetBrowserDialogState {
|
|
61
|
-
/**
|
|
62
|
-
* Defines wether or not the scene file is being loaded.
|
|
63
|
-
*/
|
|
64
|
-
loading: boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Defines the list of all selected meshes.
|
|
67
|
-
*/
|
|
68
|
-
selectedMeshes: Mesh[];
|
|
69
|
-
/**
|
|
70
|
-
* Defines the list of all selected skeletons.
|
|
71
|
-
*/
|
|
72
|
-
selectedSkeletons: Skeleton[];
|
|
73
|
-
/**
|
|
74
|
-
* Defines the list of all selected animation groups.
|
|
75
|
-
*/
|
|
76
|
-
selectedAnimationGroups: AnimationGroup[];
|
|
77
|
-
}
|
|
78
|
-
export declare class SceneAssetBrowserDialog extends Component<ISceneAssetBrowserDialogProps, ISceneAssetBrowserDialogState> {
|
|
79
|
-
private _container;
|
|
80
|
-
constructor(props: ISceneAssetBrowserDialogProps);
|
|
81
|
-
render(): ReactNode;
|
|
82
|
-
componentDidMount(): Promise<unknown>;
|
|
83
|
-
private _handleImport;
|
|
84
|
-
private _getAnimationGroupsToImport;
|
|
85
|
-
private _handleSelectedAsset;
|
|
86
|
-
private _getMeshesGridComponent;
|
|
87
|
-
private _getSkeletonsGridComponent;
|
|
88
|
-
}
|