@babylonjs/inspector 8.44.0-preview → 8.44.1-preview
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/lib/{captureService-B8vCTKYD.js → captureService-Bo4xI_X9.js} +2 -2
- package/lib/{captureService-B8vCTKYD.js.map → captureService-Bo4xI_X9.js.map} +1 -1
- package/lib/{exportService-D1VDR7BX.js → exportService-DCYVwNJE.js} +2 -2
- package/lib/{exportService-D1VDR7BX.js.map → exportService-DCYVwNJE.js.map} +1 -1
- package/lib/{extensionsListService-DS-uWdsz.js → extensionsListService-BnPM7JOI.js} +2 -4
- package/lib/extensionsListService-BnPM7JOI.js.map +1 -0
- package/lib/{importService-BPzwIgjH.js → importService--DIvq_s3.js} +2 -2
- package/lib/{importService-BPzwIgjH.js.map → importService--DIvq_s3.js.map} +1 -1
- package/lib/{index-2Bq-qBwV.js → index-9CJtnfZ3.js} +132 -140
- package/lib/index-9CJtnfZ3.js.map +1 -0
- package/lib/index.d.ts +4 -7
- package/lib/index.js +1 -1
- package/lib/{quickCreateToolsService-DEdXDqIl.js → quickCreateToolsService-BFr5_q0T.js} +2 -2
- package/lib/{quickCreateToolsService-DEdXDqIl.js.map → quickCreateToolsService-BFr5_q0T.js.map} +1 -1
- package/package.json +1 -1
- package/lib/extensionsListService-DS-uWdsz.js.map +0 -1
- package/lib/index-2Bq-qBwV.js.map +0 -1
|
@@ -82,7 +82,7 @@ import { RenderingManager } from '@babylonjs/core/Rendering/renderingManager.js'
|
|
|
82
82
|
import '@babylonjs/core/Rendering/edgesRenderer.js';
|
|
83
83
|
import '@babylonjs/core/Rendering/outlineRenderer.js';
|
|
84
84
|
import { GaussianSplattingMesh } from '@babylonjs/core/Meshes/GaussianSplatting/gaussianSplattingMesh.js';
|
|
85
|
-
import { FactorGradient,
|
|
85
|
+
import { FactorGradient, Color3Gradient, ColorGradient } from '@babylonjs/core/Misc/gradients.js';
|
|
86
86
|
import { GradientBlockColorStep } from '@babylonjs/core/Materials/Node/Blocks/gradientBlock.js';
|
|
87
87
|
import { Attractor } from '@babylonjs/core/Particles/attractor.js';
|
|
88
88
|
import { CreateSphere } from '@babylonjs/core/Meshes/Builders/sphereBuilder.js';
|
|
@@ -1073,7 +1073,6 @@ const CompactModeContextProvider = (props) => {
|
|
|
1073
1073
|
function AsReadonlyArray(array) {
|
|
1074
1074
|
return array;
|
|
1075
1075
|
}
|
|
1076
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1077
1076
|
const useStyles$q = makeStyles({
|
|
1078
1077
|
rootDiv: {
|
|
1079
1078
|
flex: 1,
|
|
@@ -1229,10 +1228,10 @@ function SetThemeMode(mode) {
|
|
|
1229
1228
|
localStorage.setItem(ThemeModeStorageKey, JSON.stringify(mode));
|
|
1230
1229
|
}
|
|
1231
1230
|
|
|
1232
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
1233
1231
|
// Generated from https://react.fluentui.dev/?path=/docs/theme-theme-designer--docs
|
|
1234
1232
|
// Key color: #3A94FC
|
|
1235
|
-
|
|
1233
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
1234
|
+
const BabylonRamp = {
|
|
1236
1235
|
10: "#020305",
|
|
1237
1236
|
20: "#121721",
|
|
1238
1237
|
30: "#1A263A",
|
|
@@ -1250,11 +1249,12 @@ const babylonRamp = {
|
|
|
1250
1249
|
150: "#AFC9FF",
|
|
1251
1250
|
160: "#C6D8FF",
|
|
1252
1251
|
};
|
|
1252
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
1253
1253
|
const LightTheme = {
|
|
1254
|
-
...createLightTheme(
|
|
1254
|
+
...createLightTheme(BabylonRamp),
|
|
1255
1255
|
};
|
|
1256
1256
|
const DarkTheme = {
|
|
1257
|
-
...createDarkTheme(
|
|
1257
|
+
...createDarkTheme(BabylonRamp),
|
|
1258
1258
|
};
|
|
1259
1259
|
|
|
1260
1260
|
const Theme = (props) => {
|
|
@@ -1266,7 +1266,6 @@ const Theme = (props) => {
|
|
|
1266
1266
|
return (jsx(FluentProvider, { theme: isDarkMode !== invert ? DarkTheme : LightTheme, applyStylesToPortals: applyStylesToPortals, ...rest, children: props.children }));
|
|
1267
1267
|
};
|
|
1268
1268
|
|
|
1269
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1270
1269
|
const useStyles$o = makeStyles({
|
|
1271
1270
|
extensionTeachingPopover: {
|
|
1272
1271
|
maxWidth: "320px",
|
|
@@ -1533,7 +1532,6 @@ function ConstructorFactory(constructor) {
|
|
|
1533
1532
|
return (...args) => new constructor(...args);
|
|
1534
1533
|
}
|
|
1535
1534
|
|
|
1536
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1537
1535
|
const useStyles$n = makeStyles({
|
|
1538
1536
|
placeholderDiv: {
|
|
1539
1537
|
padding: `${tokens.spacingVerticalM} ${tokens.spacingHorizontalM}`,
|
|
@@ -1792,18 +1790,19 @@ function useResizeHandle(params) {
|
|
|
1792
1790
|
|
|
1793
1791
|
const RootComponentServiceIdentity = Symbol("RootComponent");
|
|
1794
1792
|
const ShellServiceIdentity = Symbol("ShellService");
|
|
1795
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1796
1793
|
const useStyles$l = makeStyles({
|
|
1797
1794
|
mainView: {
|
|
1798
1795
|
flex: 1,
|
|
1799
1796
|
display: "flex",
|
|
1800
1797
|
flexDirection: "column",
|
|
1801
1798
|
overflow: "hidden",
|
|
1799
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
1802
1800
|
},
|
|
1803
1801
|
verticallyCentralContent: {
|
|
1804
1802
|
flexGrow: 1,
|
|
1805
1803
|
display: "flex",
|
|
1806
1804
|
overflow: "hidden",
|
|
1805
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
1807
1806
|
},
|
|
1808
1807
|
barDiv: {
|
|
1809
1808
|
display: "flex",
|
|
@@ -1811,6 +1810,7 @@ const useStyles$l = makeStyles({
|
|
|
1811
1810
|
flex: "0 0 auto",
|
|
1812
1811
|
height: "36px",
|
|
1813
1812
|
backgroundColor: tokens.colorNeutralBackground2,
|
|
1813
|
+
pointerEvents: "auto",
|
|
1814
1814
|
},
|
|
1815
1815
|
bar: {
|
|
1816
1816
|
display: "flex",
|
|
@@ -1878,16 +1878,7 @@ const useStyles$l = makeStyles({
|
|
|
1878
1878
|
overflowX: "hidden",
|
|
1879
1879
|
overflowY: "hidden",
|
|
1880
1880
|
zIndex: 1,
|
|
1881
|
-
|
|
1882
|
-
paneContainerOverlay: {
|
|
1883
|
-
position: "absolute",
|
|
1884
|
-
height: "100%",
|
|
1885
|
-
},
|
|
1886
|
-
paneContainerOverlayLeft: {
|
|
1887
|
-
left: 0,
|
|
1888
|
-
},
|
|
1889
|
-
paneContainerOverlayRight: {
|
|
1890
|
-
right: 0,
|
|
1881
|
+
pointerEvents: "auto",
|
|
1891
1882
|
},
|
|
1892
1883
|
paneContent: {
|
|
1893
1884
|
display: "flex",
|
|
@@ -1957,6 +1948,10 @@ const useStyles$l = makeStyles({
|
|
|
1957
1948
|
flexGrow: 1,
|
|
1958
1949
|
display: "flex",
|
|
1959
1950
|
overflow: "hidden",
|
|
1951
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
1952
|
+
"> *": {
|
|
1953
|
+
pointerEvents: "auto",
|
|
1954
|
+
},
|
|
1960
1955
|
},
|
|
1961
1956
|
expandButtonContainer: {
|
|
1962
1957
|
position: "absolute",
|
|
@@ -2016,7 +2011,7 @@ const SidePaneTab = (props) => {
|
|
|
2016
2011
|
// This hook provides a side pane container and the tab list.
|
|
2017
2012
|
// In "compact" mode, the tab list is integrated into the pane itself.
|
|
2018
2013
|
// In "full" mode, the returned tab list is later injected into the toolbar.
|
|
2019
|
-
function usePane(location,
|
|
2014
|
+
function usePane(location, defaultWidth, minWidth, sidePanes, onSelectSidePane, dockOperations, toolbarMode, topBarItems, bottomBarItems) {
|
|
2020
2015
|
const classes = useStyles$l();
|
|
2021
2016
|
const [topSelectedTab, setTopSelectedTab] = useState();
|
|
2022
2017
|
const [bottomSelectedTab, setBottomSelectedTab] = useState();
|
|
@@ -2181,13 +2176,11 @@ function usePane(location, layoutMode, defaultWidth, minWidth, sidePanes, onSele
|
|
|
2181
2176
|
]);
|
|
2182
2177
|
// This deals with docked vs undocked state, where undocked is rendered into a separate window via a portal.
|
|
2183
2178
|
const pane = useMemo(() => {
|
|
2184
|
-
return (jsxs(Fragment, { children: [!isChildWindowOpen && (jsx("div", { ref: paneContainerRef, className:
|
|
2185
|
-
? undefined
|
|
2186
|
-
: mergeClasses(classes.paneContainerOverlay, location === "left" ? classes.paneContainerOverlayLeft : classes.paneContainerOverlayRight)), children: (topPanes.length > 0 || bottomPanes.length > 0) && (jsxs("div", { className: `${classes.pane} ${location === "left" ? classes.paneLeft : classes.paneRight}`, children: [jsx(Collapse, { orientation: "horizontal", visible: !collapsed, children: jsx("div", { ref: paneHorizontalResizeElementRef, className: classes.paneContainer, style: { width: `clamp(${minWidth}px, calc(${defaultWidth}px + var(${paneWidthAdjustCSSVar}, 0px)), 1000px)` }, children: corePane }) }), jsx("div", { ref: paneHorizontalResizeHandleRef, className: `${classes.resizer} ${location === "left" ? classes.resizerLeft : classes.resizerRight}`, style: { pointerEvents: `${collapsed ? "none" : "auto"}` } })] })) })), jsx(ChildWindow, { imperativeRef: childWindow, onOpenChange: (isOpen) => setIsChildWindowOpen(isOpen), children: corePane })] }));
|
|
2179
|
+
return (jsxs(Fragment, { children: [!isChildWindowOpen && (jsx("div", { ref: paneContainerRef, className: classes.paneContainer, children: (topPanes.length > 0 || bottomPanes.length > 0) && (jsxs("div", { className: `${classes.pane} ${location === "left" ? classes.paneLeft : classes.paneRight}`, children: [jsx(Collapse, { orientation: "horizontal", visible: !collapsed, children: jsx("div", { ref: paneHorizontalResizeElementRef, className: classes.paneContainer, style: { width: `clamp(${minWidth}px, calc(${defaultWidth}px + var(${paneWidthAdjustCSSVar}, 0px)), 1000px)` }, children: corePane }) }), jsx("div", { ref: paneHorizontalResizeHandleRef, className: `${classes.resizer} ${location === "left" ? classes.resizerLeft : classes.resizerRight}`, style: { pointerEvents: `${collapsed ? "none" : "auto"}` } })] })) })), jsx(ChildWindow, { imperativeRef: childWindow, onOpenChange: (isOpen) => setIsChildWindowOpen(isOpen), children: corePane })] }));
|
|
2187
2180
|
}, [collapsed, corePane]);
|
|
2188
2181
|
return [topPaneTabList, pane, collapsed, setCollapsed, isChildWindowOpen, setUndocked];
|
|
2189
2182
|
}
|
|
2190
|
-
function MakeShellServiceDefinition({ leftPaneDefaultWidth = 350, leftPaneMinWidth = 350, rightPaneDefaultWidth = 350, rightPaneMinWidth = 350, toolbarMode = "full", sidePaneRemapper = undefined,
|
|
2183
|
+
function MakeShellServiceDefinition({ leftPaneDefaultWidth = 350, leftPaneMinWidth = 350, rightPaneDefaultWidth = 350, rightPaneMinWidth = 350, toolbarMode = "full", sidePaneRemapper = undefined, } = {}) {
|
|
2191
2184
|
return {
|
|
2192
2185
|
friendlyName: "MainView",
|
|
2193
2186
|
produces: [ShellServiceIdentity, RootComponentServiceIdentity],
|
|
@@ -2342,12 +2335,12 @@ function MakeShellServiceDefinition({ leftPaneDefaultWidth = 350, leftPaneMinWid
|
|
|
2342
2335
|
const bottomBarLeftItems = useMemo(() => bottomToolBarItems.filter((entry) => coerceToolBarItemHorizontalLocation(entry) === "left"), [bottomToolBarItems, coerceToolBarItemHorizontalLocation]);
|
|
2343
2336
|
const bottomBarRightItems = useMemo(() => bottomToolBarItems.filter((entry) => coerceToolBarItemHorizontalLocation(entry) === "right"), [bottomToolBarItems, coerceToolBarItemHorizontalLocation]);
|
|
2344
2337
|
const centralContents = useOrderedObservableCollection(centralContentCollection);
|
|
2345
|
-
const [leftPaneTabList, leftPane, leftPaneCollapsed, setLeftPaneCollapsed, leftPaneUndocked, setLeftPaneUndocked] = usePane("left",
|
|
2338
|
+
const [leftPaneTabList, leftPane, leftPaneCollapsed, setLeftPaneCollapsed, leftPaneUndocked, setLeftPaneUndocked] = usePane("left", leftPaneDefaultWidth, leftPaneMinWidth, coercedSidePanes, onSelectSidePane, sidePaneDockOperations, toolbarMode, topBarLeftItems, bottomBarLeftItems);
|
|
2346
2339
|
useEffect(() => {
|
|
2347
2340
|
// Propagate shorter lived React component state out to longer lived service state.
|
|
2348
2341
|
leftSidePaneContainerState.isDocked = !leftPaneUndocked;
|
|
2349
2342
|
}, [leftPaneUndocked]);
|
|
2350
|
-
const [rightPaneTabList, rightPane, rightPaneCollapsed, setRightPaneCollapsed, rightPaneUndocked, setRightPaneUndocked] = usePane("right",
|
|
2343
|
+
const [rightPaneTabList, rightPane, rightPaneCollapsed, setRightPaneCollapsed, rightPaneUndocked, setRightPaneUndocked] = usePane("right", rightPaneDefaultWidth, rightPaneMinWidth, coercedSidePanes, onSelectSidePane, sidePaneDockOperations, toolbarMode, topBarRightItems, bottomBarRightItems);
|
|
2351
2344
|
useEffect(() => {
|
|
2352
2345
|
// Propagate shorter lived React component state out to longer lived service state.
|
|
2353
2346
|
rightSidePaneContainerState.isDocked = !rightPaneUndocked;
|
|
@@ -2368,7 +2361,7 @@ function MakeShellServiceDefinition({ leftPaneDefaultWidth = 350, leftPaneMinWid
|
|
|
2368
2361
|
rightSidePaneContainerState.isDocked = true;
|
|
2369
2362
|
};
|
|
2370
2363
|
}, [setLeftPaneUndocked, setRightPaneUndocked]);
|
|
2371
|
-
return (jsxs("div", { className: classes.mainView, children: [toolbarMode === "full" && (jsx(Fragment, { children: jsxs("div", { className: classes.barDiv, children: [leftPaneTabList, jsx(Toolbar, { location: "top", components: topToolBarItems }), rightPaneTabList] }) })), jsxs("div", { className: classes.verticallyCentralContent, children: [leftPane, jsxs("div", { className: classes.centralContent, children: [centralContents.map((entry) => (jsx(entry.component, {}, entry.key))), toolbarMode === "compact" && (jsxs(Fragment, { children: [jsx(Fade, { visible: leftPaneCollapsed, delay: 50, children: jsx("div", { className: mergeClasses(classes.expandButtonContainer, classes.expandButtonContainerLeft), children: jsx(Tooltip, { content: "Show Side Pane", relationship: "label", children: jsx(Button$1, { className: classes.expandButton, icon: jsx(PanelLeftExpandRegular, {}), onClick: () => setLeftPaneCollapsed(false) }) }) }) }), jsx(Fade, { visible: rightPaneCollapsed, delay: 50, children: jsx("div", { className: mergeClasses(classes.expandButtonContainer, classes.expandButtonContainerRight), children: jsx(Tooltip, { content: "Show Side Pane", relationship: "label", children: jsx(Button$1, { className: classes.expandButton, icon: jsx(PanelRightExpandRegular, {}), onClick: () => setRightPaneCollapsed(false) }) }) }) })] }))] }), rightPane] }), toolbarMode === "full" && (jsx(Fragment, { children: jsx("div", { className: classes.barDiv, children: jsx(Toolbar, { location: "bottom", components: bottomToolBarItems }) }) }))] }));
|
|
2364
|
+
return (jsxs("div", { className: classes.mainView, children: [toolbarMode === "full" && (jsx(Fragment, { children: jsxs("div", { className: classes.barDiv, children: [leftPaneTabList, jsx(Toolbar, { location: "top", components: topToolBarItems }), rightPaneTabList] }) })), jsxs("div", { className: classes.verticallyCentralContent, children: [leftPane, jsxs("div", { className: classes.centralContent, children: [centralContents.map((entry) => (jsx(entry.component, {}, entry.key))), toolbarMode === "compact" && (jsxs(Fragment, { children: [jsx(Fade, { visible: leftPaneCollapsed, delay: 50, duration: 100, unmountOnExit: true, children: jsx("div", { className: mergeClasses(classes.expandButtonContainer, classes.expandButtonContainerLeft), children: jsx(Tooltip, { content: "Show Side Pane", relationship: "label", children: jsx(Button$1, { className: classes.expandButton, icon: jsx(PanelLeftExpandRegular, {}), onClick: () => setLeftPaneCollapsed(false) }) }) }) }), jsx(Fade, { visible: rightPaneCollapsed, delay: 50, duration: 100, unmountOnExit: true, children: jsx("div", { className: mergeClasses(classes.expandButtonContainer, classes.expandButtonContainerRight), children: jsx(Tooltip, { content: "Show Side Pane", relationship: "label", children: jsx(Button$1, { className: classes.expandButton, icon: jsx(PanelRightExpandRegular, {}), onClick: () => setRightPaneCollapsed(false) }) }) }) })] }))] }), rightPane] }), toolbarMode === "full" && (jsx(Fragment, { children: jsx("div", { className: classes.barDiv, children: jsx(Toolbar, { location: "bottom", components: bottomToolBarItems }) }) }))] }));
|
|
2372
2365
|
};
|
|
2373
2366
|
rootComponent.displayName = "Shell Service Root";
|
|
2374
2367
|
return {
|
|
@@ -2645,7 +2638,6 @@ function useCommandContextMenuState(commands) {
|
|
|
2645
2638
|
checkmark: command.icon ? null : undefined, icon: command.icon ? jsx(command.icon, {}) : undefined, name: "toggleCommands", value: command.displayName, children: command.displayName }, command.displayName)));
|
|
2646
2639
|
return [checkedContextMenuItems, onContextMenuCheckedValueChange, contextMenuItems];
|
|
2647
2640
|
}
|
|
2648
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2649
2641
|
const useStyles$k = makeStyles({
|
|
2650
2642
|
rootDiv: {
|
|
2651
2643
|
flex: 1,
|
|
@@ -3811,7 +3803,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3811
3803
|
keywords: ["export", "gltf", "glb", "babylon", "exporter", "tools"],
|
|
3812
3804
|
...BabylonWebResources,
|
|
3813
3805
|
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
|
|
3814
|
-
getExtensionModuleAsync: async () => await import('./exportService-
|
|
3806
|
+
getExtensionModuleAsync: async () => await import('./exportService-DCYVwNJE.js'),
|
|
3815
3807
|
},
|
|
3816
3808
|
{
|
|
3817
3809
|
name: "Capture Tools",
|
|
@@ -3819,7 +3811,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3819
3811
|
keywords: ["capture", "screenshot", "gif", "video", "tools"],
|
|
3820
3812
|
...BabylonWebResources,
|
|
3821
3813
|
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
|
|
3822
|
-
getExtensionModuleAsync: async () => await import('./captureService-
|
|
3814
|
+
getExtensionModuleAsync: async () => await import('./captureService-Bo4xI_X9.js'),
|
|
3823
3815
|
},
|
|
3824
3816
|
{
|
|
3825
3817
|
name: "Import Tools",
|
|
@@ -3827,7 +3819,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3827
3819
|
keywords: ["import", "tools"],
|
|
3828
3820
|
...BabylonWebResources,
|
|
3829
3821
|
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
|
|
3830
|
-
getExtensionModuleAsync: async () => await import('./importService
|
|
3822
|
+
getExtensionModuleAsync: async () => await import('./importService--DIvq_s3.js'),
|
|
3831
3823
|
},
|
|
3832
3824
|
{
|
|
3833
3825
|
name: "Quick Creation Tools (Preview)",
|
|
@@ -3835,7 +3827,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3835
3827
|
keywords: ["creation", "tools"],
|
|
3836
3828
|
...BabylonWebResources,
|
|
3837
3829
|
author: { name: "Babylon.js", forumUserName: "" },
|
|
3838
|
-
getExtensionModuleAsync: async () => await import('./quickCreateToolsService-
|
|
3830
|
+
getExtensionModuleAsync: async () => await import('./quickCreateToolsService-BFr5_q0T.js'),
|
|
3839
3831
|
},
|
|
3840
3832
|
]);
|
|
3841
3833
|
|
|
@@ -4899,13 +4891,13 @@ const ThemeSelectorServiceDefinition = {
|
|
|
4899
4891
|
},
|
|
4900
4892
|
};
|
|
4901
4893
|
|
|
4902
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
4903
4894
|
const useStyles$f = makeStyles({
|
|
4904
4895
|
app: {
|
|
4905
4896
|
colorScheme: "light dark",
|
|
4906
4897
|
flexGrow: 1,
|
|
4907
4898
|
display: "flex",
|
|
4908
4899
|
flexDirection: "column",
|
|
4900
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
4909
4901
|
},
|
|
4910
4902
|
spinner: {
|
|
4911
4903
|
flexGrow: 1,
|
|
@@ -4962,7 +4954,7 @@ function MakeModularTool(options) {
|
|
|
4962
4954
|
});
|
|
4963
4955
|
// Register the extension list service (for browsing/installing extensions) if extension feeds are provided.
|
|
4964
4956
|
if (extensionFeeds.length > 0) {
|
|
4965
|
-
const { ExtensionListServiceDefinition } = await import('./extensionsListService-
|
|
4957
|
+
const { ExtensionListServiceDefinition } = await import('./extensionsListService-BnPM7JOI.js');
|
|
4966
4958
|
await serviceContainer.addServiceAsync(ExtensionListServiceDefinition);
|
|
4967
4959
|
}
|
|
4968
4960
|
// Register the theme selector service (for selecting the theme) if theming is configured.
|
|
@@ -9653,9 +9645,7 @@ const ToolBar = (props) => {
|
|
|
9653
9645
|
}
|
|
9654
9646
|
}, [activeToolIndex, changeTool]);
|
|
9655
9647
|
return (jsxs("div", { className: classes.toolbar, children: [jsx("div", { className: classes.colorSection, children: jsx(Tooltip, { relationship: "label", content: "Pick Tool Color", positioning: "after", children: jsx(ColorPickerPopup, { value: hasAlpha ? computeRGBAColor() : Color3.FromHexString(metadata.color), onChange: handleColorChange }) }) }), jsx(Divider, {}), jsx("div", { className: classes.toolsSection, children: tools.map((tool, index) => {
|
|
9656
|
-
|
|
9657
|
-
const IconComponent = tool.icon;
|
|
9658
|
-
return (jsx(Tooltip, { content: tool.name, relationship: "label", positioning: "after", children: jsx(ToggleButton$1, { className: classes.toolButton, appearance: "subtle", checked: index === activeToolIndex, onClick: () => handleToolClick(index), icon: jsx(IconComponent, {}) }) }, index));
|
|
9648
|
+
return (jsx(Tooltip, { content: tool.name, relationship: "label", positioning: "after", children: jsx(ToggleButton$1, { className: classes.toolButton, appearance: "subtle", checked: index === activeToolIndex, onClick: () => handleToolClick(index), icon: jsx(tool.icon, {}) }) }, index));
|
|
9659
9649
|
}) })] }));
|
|
9660
9650
|
};
|
|
9661
9651
|
|
|
@@ -11442,6 +11432,7 @@ function ShowInspector(scene, options = {}) {
|
|
|
11442
11432
|
// Set default options.
|
|
11443
11433
|
options = {
|
|
11444
11434
|
autoResizeEngine: true,
|
|
11435
|
+
layoutMode: "overlay",
|
|
11445
11436
|
...options,
|
|
11446
11437
|
};
|
|
11447
11438
|
// Sequentialize showing the inspector (e.g. don't start showing until after a previous hide (for example) is finished).
|
|
@@ -11450,14 +11441,27 @@ function ShowInspector(scene, options = {}) {
|
|
|
11450
11441
|
let parentElement = options.containerElement ?? null;
|
|
11451
11442
|
// If a container element was not found, find an appropriate one above the engine's rendering canvas.
|
|
11452
11443
|
if (!parentElement) {
|
|
11453
|
-
|
|
11444
|
+
const renderingCanvas = scene.getEngine().getRenderingCanvas();
|
|
11445
|
+
parentElement = renderingCanvas;
|
|
11454
11446
|
while (parentElement) {
|
|
11455
11447
|
const rootNode = parentElement.getRootNode();
|
|
11456
11448
|
// TODO: Right now we never parent the inspector within a ShadowRoot because we need to do more work to get FluentProvider to work correctly in this context.
|
|
11457
|
-
if (
|
|
11449
|
+
if (rootNode instanceof ShadowRoot) {
|
|
11450
|
+
// If we are in a ShadowRoot, continue up the tree.
|
|
11451
|
+
parentElement = rootNode.host.parentElement;
|
|
11452
|
+
}
|
|
11453
|
+
else {
|
|
11454
|
+
// Found the closest ancestor that is not in a ShadowRoot.
|
|
11458
11455
|
break;
|
|
11459
11456
|
}
|
|
11460
|
-
|
|
11457
|
+
}
|
|
11458
|
+
if (renderingCanvas && parentElement === renderingCanvas) {
|
|
11459
|
+
// If we were not in a ShadowRoot, then the direct parent of the rendering canvas is the container.
|
|
11460
|
+
parentElement = renderingCanvas.parentElement;
|
|
11461
|
+
}
|
|
11462
|
+
if (!parentElement) {
|
|
11463
|
+
// If we still haven't found a parent element, default to document.body.
|
|
11464
|
+
parentElement = document.body;
|
|
11461
11465
|
}
|
|
11462
11466
|
}
|
|
11463
11467
|
// If we couldn't find a parent element, we can't show the inspector.
|
|
@@ -11489,39 +11493,61 @@ function ShowInspector(scene, options = {}) {
|
|
|
11489
11493
|
scene.getEngine().resize();
|
|
11490
11494
|
}
|
|
11491
11495
|
});
|
|
11492
|
-
//
|
|
11493
|
-
const
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11496
|
+
// This array will contain all the default Inspector service definitions.
|
|
11497
|
+
const serviceDefinitions = [];
|
|
11498
|
+
// Create a container element for the inspector UI.
|
|
11499
|
+
// This element will become the root React node, so it must be a new empty node
|
|
11500
|
+
// since React will completely take over its contents.
|
|
11501
|
+
const containerElement = document.createElement("div");
|
|
11502
|
+
containerElement.id = "babylon-inspector-container";
|
|
11503
|
+
containerElement.style.position = "absolute";
|
|
11504
|
+
containerElement.style.inset = "0";
|
|
11505
|
+
containerElement.style.display = "flex";
|
|
11506
|
+
// For "overlay" layout mode, we let pointer events pass through the inspector container.
|
|
11507
|
+
// Pointer events are re-enabled specifically for toolbars, side panes, and central content elements.
|
|
11508
|
+
containerElement.style.pointerEvents = "none";
|
|
11509
|
+
// When the layoutMode is "inline", we will re-parent the child nodes of the parentElement under the containerElement.
|
|
11510
|
+
if (options.layoutMode === "inline") {
|
|
11511
|
+
// Remove all the existing children from the parent element.
|
|
11512
|
+
const canvasContainerDisplay = parentElement.style.display;
|
|
11513
|
+
const canvasContainerChildren = [...parentElement.childNodes];
|
|
11514
|
+
parentElement.replaceChildren();
|
|
11515
|
+
disposeActions.push(async () => {
|
|
11516
|
+
// When the ModularTool token is disposed, it unmounts the react element, which asynchronously
|
|
11517
|
+
// removes all children from the parentElement. We need to wait for that to complete before
|
|
11518
|
+
// re-adding the canvas children back to the parentElement.
|
|
11519
|
+
await new Promise((resolve) => setTimeout(resolve));
|
|
11520
|
+
parentElement.replaceChildren(...canvasContainerChildren);
|
|
11521
|
+
});
|
|
11522
|
+
// This service is responsible for injecting the passed in canvas as the "central content" of the shell UI (the main area between the side panes and toolbars).
|
|
11523
|
+
const canvasInjectorServiceDefinition = {
|
|
11524
|
+
friendlyName: "Canvas Injector",
|
|
11525
|
+
consumes: [ShellServiceIdentity],
|
|
11526
|
+
factory: (shellService) => {
|
|
11527
|
+
const registration = shellService.addCentralContent({
|
|
11528
|
+
key: "Canvas Injector",
|
|
11529
|
+
component: () => {
|
|
11530
|
+
const canvasContainerRef = useRef(null);
|
|
11531
|
+
useEffect(() => {
|
|
11532
|
+
canvasContainerRef.current?.replaceChildren(...canvasContainerChildren);
|
|
11533
|
+
}, []);
|
|
11534
|
+
return jsx("div", { ref: canvasContainerRef, style: { display: canvasContainerDisplay, position: "absolute", inset: "0" } });
|
|
11535
|
+
},
|
|
11536
|
+
});
|
|
11537
|
+
return {
|
|
11538
|
+
dispose: () => {
|
|
11539
|
+
registration.dispose();
|
|
11540
|
+
},
|
|
11541
|
+
};
|
|
11542
|
+
},
|
|
11543
|
+
};
|
|
11544
|
+
serviceDefinitions.push(canvasInjectorServiceDefinition);
|
|
11545
|
+
}
|
|
11546
|
+
// Now it is safe to append the container element to the parent.
|
|
11547
|
+
parentElement.appendChild(containerElement);
|
|
11548
|
+
disposeActions.push(() => {
|
|
11549
|
+
parentElement.removeChild(containerElement);
|
|
11502
11550
|
});
|
|
11503
|
-
// This service is responsible for injecting the passed in canvas as the "central content" of the shell UI (the main area between the side panes and toolbars).
|
|
11504
|
-
const canvasInjectorServiceDefinition = {
|
|
11505
|
-
friendlyName: "Canvas Injector",
|
|
11506
|
-
consumes: [ShellServiceIdentity],
|
|
11507
|
-
factory: (shellService) => {
|
|
11508
|
-
const registration = shellService.addCentralContent({
|
|
11509
|
-
key: "Canvas Injector",
|
|
11510
|
-
component: () => {
|
|
11511
|
-
const canvasContainerRef = useRef(null);
|
|
11512
|
-
useEffect(() => {
|
|
11513
|
-
canvasContainerRef.current?.replaceChildren(...canvasContainerChildren);
|
|
11514
|
-
}, []);
|
|
11515
|
-
return jsx("div", { ref: canvasContainerRef, style: { display: canvasContainerDisplay, width: "100%", height: "100%" } });
|
|
11516
|
-
},
|
|
11517
|
-
});
|
|
11518
|
-
return {
|
|
11519
|
-
dispose: () => {
|
|
11520
|
-
registration.dispose();
|
|
11521
|
-
},
|
|
11522
|
-
};
|
|
11523
|
-
},
|
|
11524
|
-
};
|
|
11525
11551
|
// This service exposes the scene that was passed into Inspector through ISceneContext, which is used by other services that may be used in other contexts outside of Inspector.
|
|
11526
11552
|
const sceneContextServiceDefinition = {
|
|
11527
11553
|
friendlyName: "Inspector Scene Context",
|
|
@@ -11533,85 +11559,51 @@ function ShowInspector(scene, options = {}) {
|
|
|
11533
11559
|
};
|
|
11534
11560
|
},
|
|
11535
11561
|
};
|
|
11562
|
+
serviceDefinitions.push(sceneContextServiceDefinition);
|
|
11536
11563
|
if (options.autoResizeEngine) {
|
|
11537
11564
|
const observer = scene.onBeforeRenderObservable.add(() => scene.getEngine().resize());
|
|
11538
11565
|
disposeActions.push(() => observer.remove());
|
|
11539
11566
|
}
|
|
11567
|
+
serviceDefinitions.push(
|
|
11568
|
+
// Helps with managing gizmos and a shared utility layer.
|
|
11569
|
+
GizmoServiceDefinition,
|
|
11570
|
+
// Scene explorer tab and related services.
|
|
11571
|
+
SceneExplorerServiceDefinition, NodeExplorerServiceDefinition, SkeletonExplorerServiceDefinition, MaterialExplorerServiceDefinition, TextureExplorerServiceDefinition, PostProcessExplorerServiceDefinition, RenderingPipelineExplorerServiceDefinition, EffectLayerExplorerServiceDefinition, ParticleSystemExplorerServiceDefinition, SpriteManagerExplorerServiceDefinition, AnimationGroupExplorerServiceDefinition, GuiExplorerServiceDefinition, FrameGraphExplorerServiceDefinition, AtmosphereExplorerServiceDefinition,
|
|
11572
|
+
// Properties pane tab and related services.
|
|
11573
|
+
ScenePropertiesServiceDefinition, PropertiesServiceDefinition, TexturePropertiesServiceDefinition, CommonPropertiesServiceDefinition, TransformPropertiesServiceDefinition, AnimationPropertiesServiceDefinition, NodePropertiesServiceDefinition, PhysicsPropertiesServiceDefinition, SkeletonPropertiesServiceDefinition, MaterialPropertiesServiceDefinition, LightPropertiesServiceDefinition, SpritePropertiesServiceDefinition, ParticleSystemPropertiesServiceDefinition, CameraPropertiesServiceDefinition, PostProcessPropertiesServiceDefinition, RenderingPipelinePropertiesServiceDefinition, EffectLayerPropertiesServiceDefinition, FrameGraphPropertiesServiceDefinition, AnimationGroupPropertiesServiceDefinition, MetadataPropertiesServiceDefinition, AtmospherePropertiesServiceDefinition,
|
|
11574
|
+
// Texture editor and related services.
|
|
11575
|
+
TextureEditorServiceDefinition,
|
|
11576
|
+
// Debug pane tab and related services.
|
|
11577
|
+
DebugServiceDefinition,
|
|
11578
|
+
// Stats pane tab and related services.
|
|
11579
|
+
StatsServiceDefinition,
|
|
11580
|
+
// Tools pane tab and related services.
|
|
11581
|
+
ToolsServiceDefinition,
|
|
11582
|
+
// Settings pane tab and related services.
|
|
11583
|
+
SettingsServiceDefinition,
|
|
11584
|
+
// Tracks entity selection state (e.g. which Mesh or Material or other entity is currently selected in scene explorer and bound to the properties pane, etc.).
|
|
11585
|
+
SelectionServiceDefinition,
|
|
11586
|
+
// Gizmos for manipulating objects in the scene.
|
|
11587
|
+
GizmoToolbarServiceDefinition,
|
|
11588
|
+
// Allows picking objects from the scene to select them.
|
|
11589
|
+
PickingServiceDefinition,
|
|
11590
|
+
// Adds entry points for user feedback on Inspector v2 (probably eventually will be removed).
|
|
11591
|
+
UserFeedbackServiceDefinition,
|
|
11592
|
+
// Adds always present "mini stats" (like fps) to the toolbar, etc.
|
|
11593
|
+
MiniStatsServiceDefinition,
|
|
11594
|
+
// Legacy service to support custom inspectable properties on objects.
|
|
11595
|
+
LegacyInspectableObjectPropertiesServiceDefinition);
|
|
11540
11596
|
const modularTool = MakeModularTool({
|
|
11541
|
-
containerElement
|
|
11597
|
+
containerElement,
|
|
11542
11598
|
serviceDefinitions: [
|
|
11543
|
-
//
|
|
11544
|
-
|
|
11545
|
-
// Provides access to the scene in a generic way (other tools might provide a scene in a different way).
|
|
11546
|
-
sceneContextServiceDefinition,
|
|
11547
|
-
// Helps with managing gizmos and a shared utility layer.
|
|
11548
|
-
GizmoServiceDefinition,
|
|
11549
|
-
// Scene explorer tab and related services.
|
|
11550
|
-
SceneExplorerServiceDefinition,
|
|
11551
|
-
NodeExplorerServiceDefinition,
|
|
11552
|
-
SkeletonExplorerServiceDefinition,
|
|
11553
|
-
MaterialExplorerServiceDefinition,
|
|
11554
|
-
TextureExplorerServiceDefinition,
|
|
11555
|
-
PostProcessExplorerServiceDefinition,
|
|
11556
|
-
RenderingPipelineExplorerServiceDefinition,
|
|
11557
|
-
EffectLayerExplorerServiceDefinition,
|
|
11558
|
-
ParticleSystemExplorerServiceDefinition,
|
|
11559
|
-
SpriteManagerExplorerServiceDefinition,
|
|
11560
|
-
AnimationGroupExplorerServiceDefinition,
|
|
11561
|
-
GuiExplorerServiceDefinition,
|
|
11562
|
-
FrameGraphExplorerServiceDefinition,
|
|
11563
|
-
AtmosphereExplorerServiceDefinition,
|
|
11564
|
-
// Properties pane tab and related services.
|
|
11565
|
-
ScenePropertiesServiceDefinition,
|
|
11566
|
-
PropertiesServiceDefinition,
|
|
11567
|
-
TexturePropertiesServiceDefinition,
|
|
11568
|
-
CommonPropertiesServiceDefinition,
|
|
11569
|
-
TransformPropertiesServiceDefinition,
|
|
11570
|
-
AnimationPropertiesServiceDefinition,
|
|
11571
|
-
NodePropertiesServiceDefinition,
|
|
11572
|
-
PhysicsPropertiesServiceDefinition,
|
|
11573
|
-
SkeletonPropertiesServiceDefinition,
|
|
11574
|
-
MaterialPropertiesServiceDefinition,
|
|
11575
|
-
LightPropertiesServiceDefinition,
|
|
11576
|
-
SpritePropertiesServiceDefinition,
|
|
11577
|
-
ParticleSystemPropertiesServiceDefinition,
|
|
11578
|
-
CameraPropertiesServiceDefinition,
|
|
11579
|
-
PostProcessPropertiesServiceDefinition,
|
|
11580
|
-
RenderingPipelinePropertiesServiceDefinition,
|
|
11581
|
-
EffectLayerPropertiesServiceDefinition,
|
|
11582
|
-
FrameGraphPropertiesServiceDefinition,
|
|
11583
|
-
AnimationGroupPropertiesServiceDefinition,
|
|
11584
|
-
MetadataPropertiesServiceDefinition,
|
|
11585
|
-
AtmospherePropertiesServiceDefinition,
|
|
11586
|
-
// Texture editor and related services.
|
|
11587
|
-
TextureEditorServiceDefinition,
|
|
11588
|
-
// Debug pane tab and related services.
|
|
11589
|
-
DebugServiceDefinition,
|
|
11590
|
-
// Stats pane tab and related services.
|
|
11591
|
-
StatsServiceDefinition,
|
|
11592
|
-
// Tools pane tab and related services.
|
|
11593
|
-
ToolsServiceDefinition,
|
|
11594
|
-
// Settings pane tab and related services.
|
|
11595
|
-
SettingsServiceDefinition,
|
|
11596
|
-
// Tracks entity selection state (e.g. which Mesh or Material or other entity is currently selected in scene explorer and bound to the properties pane, etc.).
|
|
11597
|
-
SelectionServiceDefinition,
|
|
11598
|
-
// Gizmos for manipulating objects in the scene.
|
|
11599
|
-
GizmoToolbarServiceDefinition,
|
|
11600
|
-
// Allows picking objects from the scene to select them.
|
|
11601
|
-
PickingServiceDefinition,
|
|
11602
|
-
// Adds entry points for user feedback on Inspector v2 (probably eventually will be removed).
|
|
11603
|
-
UserFeedbackServiceDefinition,
|
|
11604
|
-
// Adds always present "mini stats" (like fps) to the toolbar, etc.
|
|
11605
|
-
MiniStatsServiceDefinition,
|
|
11606
|
-
// Legacy service to support custom inspectable properties on objects.
|
|
11607
|
-
LegacyInspectableObjectPropertiesServiceDefinition,
|
|
11599
|
+
// Default Inspector services.
|
|
11600
|
+
...serviceDefinitions,
|
|
11608
11601
|
// Additional services passed in to the Inspector.
|
|
11609
11602
|
...(options.serviceDefinitions ?? []),
|
|
11610
11603
|
],
|
|
11611
11604
|
themeMode: options.themeMode,
|
|
11612
11605
|
showThemeSelector: options.showThemeSelector,
|
|
11613
11606
|
extensionFeeds: [DefaultInspectorExtensionFeed, ...(options.extensionFeeds ?? [])],
|
|
11614
|
-
layoutMode: options.layoutMode,
|
|
11615
11607
|
toolbarMode: "compact",
|
|
11616
11608
|
sidePaneRemapper: options.sidePaneRemapper,
|
|
11617
11609
|
});
|
|
@@ -12420,4 +12412,4 @@ const TextAreaPropertyLine = (props) => {
|
|
|
12420
12412
|
AttachDebugLayer();
|
|
12421
12413
|
|
|
12422
12414
|
export { useSidePaneDockOverrides as $, Accordion as A, ButtonLine as B, Collapse as C, DebugServiceIdentity as D, ExtensibleAccordion as E, FileUploadLine as F, useVector3Property as G, useColor3Property as H, Inspector as I, useColor4Property as J, useQuaternionProperty as K, Link as L, MakeLazyComponent as M, NumberDropdownPropertyLine as N, MakePropertyHook as O, Popover as P, useInterceptObservable as Q, useEventfulState as R, SwitchPropertyLine as S, ToolsServiceIdentity as T, useObservableCollection as U, Vector3PropertyLine as V, useOrderedObservableCollection as W, usePollingObservable as X, useResource as Y, useAsyncResource as Z, useCompactMode as _, SyncedSliderPropertyLine as a, useAngleConverters as a0, MakeTeachingMoment as a1, MakeDialogTeachingMoment as a2, InterceptFunction as a3, GetPropertyDescriptor as a4, IsPropertyReadonly as a5, InterceptProperty as a6, ObservableCollection as a7, ConstructorFactory as a8, SelectionServiceIdentity as a9, TextInput as aA, ToggleButton as aB, ChildWindow as aC, FactorGradientList as aD, Color3GradientList as aE, Color4GradientList as aF, Pane as aG, BooleanBadgePropertyLine as aH, Color3PropertyLine as aI, Color4PropertyLine as aJ, HexPropertyLine as aK, NumberInputPropertyLine as aL, LinkPropertyLine as aM, PropertyLine as aN, LineContainer as aO, PlaceholderPropertyLine as aP, StringifiedPropertyLine as aQ, TextAreaPropertyLine as aR, TextPropertyLine as aS, RotationVectorPropertyLine as aT, QuaternionPropertyLine as aU, Vector2PropertyLine as aV, Vector4PropertyLine as aW, SelectionServiceDefinition as aa, SettingsContextIdentity as ab, ShowInspector as ac, Checkbox as ad, ColorPickerPopup as ae, InputHexField as af, InputHsvField as ag, ComboBox as ah, DraggableLine as ai, Dropdown as aj, NumberDropdown as ak, StringDropdown as al, FactorGradientComponent as am, Color3GradientComponent as an, Color4GradientComponent as ao, ColorStepGradientComponent as ap, InfoLabel as aq, List as ar, MessageBar as as, PositionedPopover as at, SearchBar as au, SearchBox as av, SpinButton as aw, Switch as ax, SyncedSliderInput as ay, Textarea as az, Button as b, TextInputPropertyLine as c, SpinButtonPropertyLine as d, CheckboxPropertyLine as e, ShellServiceIdentity as f, SceneContextIdentity as g, AccordionSection as h, useExtensionManager as i, MakePopoverTeachingMoment as j, TeachingMoment as k, SidePaneContainer as l, PropertiesServiceIdentity as m, SceneExplorerServiceIdentity as n, SettingsServiceIdentity as o, StatsServiceIdentity as p, ConvertOptions as q, AttachDebugLayer as r, DetachDebugLayer as s, StringDropdownPropertyLine as t, useObservableState as u, BoundProperty as v, LinkToEntityPropertyLine as w, Theme as x, BuiltInsExtensionFeed as y, useProperty as z };
|
|
12423
|
-
//# sourceMappingURL=index-
|
|
12415
|
+
//# sourceMappingURL=index-9CJtnfZ3.js.map
|