@babylonjs/inspector 9.25.0 → 9.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/bin/inspector-bridge.mjs +3 -1
  2. package/bin/inspector-cli.mjs +3 -1
  3. package/lib/browser-CANgtOiM.js.map +1 -1
  4. package/lib/components/explorer/explorer.d.ts +40 -0
  5. package/lib/components/{scene/sceneExplorerDragDrop.d.ts → explorer/explorerDragDrop.d.ts} +8 -8
  6. package/lib/components/explorer/explorerModel.d.ts +359 -0
  7. package/lib/components/properties/boundProperty.d.ts +31 -0
  8. package/lib/components/properties/metadataProperties.d.ts +5 -1
  9. package/lib/components/scene/sceneExplorer.d.ts +10 -124
  10. package/lib/contexts/watcherContext.d.ts +11 -0
  11. package/lib/{extensionsListService-CKrN2x5A.js → extensionsListService-2sqR5MRD.js} +13 -14
  12. package/lib/{extensionsListService-CKrN2x5A.js.map → extensionsListService-2sqR5MRD.js.map} +1 -1
  13. package/lib/gif-5DieAkSF.js.map +1 -1
  14. package/lib/hooks/pollingHooks.d.ts +3 -0
  15. package/lib/{index-CgagLRQT.js → index-DvyGGbVg.js} +24463 -23694
  16. package/lib/index-DvyGGbVg.js.map +1 -0
  17. package/lib/index.common.d.ts +88 -0
  18. package/lib/index.d.ts +2 -87
  19. package/lib/index.js +15 -16
  20. package/lib/index.js.map +1 -1
  21. package/lib/inspector.common.d.ts +38 -0
  22. package/lib/inspector.d.ts +3 -39
  23. package/lib/inspectorHost.d.ts +26 -0
  24. package/lib/lite/components/properties/cameraProperties.d.ts +11 -0
  25. package/lib/lite/components/properties/lightProperties.d.ts +33 -0
  26. package/lib/lite/components/properties/sceneNodeProperties.d.ts +8 -0
  27. package/lib/lite/engineContext.d.ts +20 -0
  28. package/lib/lite/engineExplorerService.d.ts +75 -0
  29. package/lib/lite/engineSelectionService.d.ts +11 -0
  30. package/lib/lite/explorerDisplayInfo.d.ts +12 -0
  31. package/lib/lite/extensionsListService-BP2ToO_O.js +214 -0
  32. package/lib/lite/extensionsListService-BP2ToO_O.js.map +1 -0
  33. package/lib/lite/index-6eEEtyAL.js +9687 -0
  34. package/lib/lite/index-6eEEtyAL.js.map +1 -0
  35. package/lib/lite/index.d.ts +6 -0
  36. package/lib/lite/index.js +19 -0
  37. package/lib/lite/index.js.map +1 -0
  38. package/lib/lite/inspector.d.ts +9 -0
  39. package/lib/lite/sceneEntityUtils.d.ts +19 -0
  40. package/lib/lite/services/panes/properties/cameraPropertiesService.d.ts +3 -0
  41. package/lib/lite/services/panes/properties/enginePropertiesService.d.ts +4 -0
  42. package/lib/lite/services/panes/properties/lightPropertiesService.d.ts +3 -0
  43. package/lib/lite/services/panes/properties/materialPropertiesService.d.ts +3 -0
  44. package/lib/lite/services/panes/properties/meshPropertiesService.d.ts +3 -0
  45. package/lib/lite/services/panes/properties/renderingContextPropertiesService.d.ts +4 -0
  46. package/lib/lite/services/panes/properties/sceneNodePropertiesService.d.ts +3 -0
  47. package/lib/lite/services/panes/properties/shadowGeneratorPropertiesService.d.ts +4 -0
  48. package/lib/lite/services/panes/properties/textLayerPropertiesService.d.ts +4 -0
  49. package/lib/lite/services/panes/properties/texturePropertiesService.d.ts +3 -0
  50. package/lib/lite/services/panes/scene/cameraExplorerService.d.ts +7 -0
  51. package/lib/lite/services/panes/scene/lightExplorerService.d.ts +6 -0
  52. package/lib/lite/services/panes/scene/materialExplorerService.d.ts +4 -0
  53. package/lib/lite/services/panes/scene/meshExplorerService.d.ts +7 -0
  54. package/lib/lite/services/panes/scene/sceneExplorerSection.d.ts +21 -0
  55. package/lib/lite/services/panes/scene/sceneResources.d.ts +13 -0
  56. package/lib/lite/services/panes/scene/sceneSelectionUtils.d.ts +3 -0
  57. package/lib/lite/services/panes/scene/shadowGeneratorExplorerService.d.ts +6 -0
  58. package/lib/lite/services/panes/scene/textLayerExplorerService.d.ts +3 -0
  59. package/lib/lite/services/panes/scene/textureExplorerService.d.ts +3 -0
  60. package/lib/{quickCreateToolsService-C-GqDTqc.js → quickCreateToolsService-B0RAjMcI.js} +14 -15
  61. package/lib/{quickCreateToolsService-C-GqDTqc.js.map → quickCreateToolsService-B0RAjMcI.js.map} +1 -1
  62. package/lib/{reflectorService-CPunL_Qs.js → reflectorService-CUFxJIMt.js} +16 -17
  63. package/lib/{reflectorService-CPunL_Qs.js.map → reflectorService-CUFxJIMt.js.map} +1 -1
  64. package/lib/services/panes/explorer/explorerPane.d.ts +79 -0
  65. package/lib/services/panes/explorer/explorerService.d.ts +80 -0
  66. package/lib/services/panes/scene/sceneExplorerService.d.ts +7 -2
  67. package/lib/services/sceneSelectionService.d.ts +11 -0
  68. package/lib/services/selectionService.d.ts +5 -2
  69. package/lib/services/watcherService.d.ts +46 -3
  70. package/package.json +12 -1
  71. package/readme.md +10 -0
  72. package/lib/index-CgagLRQT.js.map +0 -1
@@ -1,21 +1,21 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { T as TextInputPropertyLine, N as NumberInputPropertyLine, j as ButtonLine, k as ToolsServiceIdentity } from './index-CgagLRQT.js';
2
+ import { T as TextInputPropertyLine, N as NumberInputPropertyLine, j as ButtonLine, k as ToolsServiceIdentity } from './index-DvyGGbVg.js';
3
3
  import { useState, useRef, useCallback } from 'react';
4
4
  import { Reflector } from '@babylonjs/core/Misc/reflector.js';
5
5
  import { PlugConnectedRegular } from '@fluentui/react-icons';
6
- import '@fluentui/react-components';
7
- import '@babylonjs/core/Maths/math.color.js';
8
- import '@babylonjs/core/Maths/math.vector.js';
9
6
  import '@babylonjs/core/Misc/observable.js';
10
- import '@babylonjs/core/Misc/typeStore.js';
7
+ import '@fluentui/react-components';
11
8
  import '@babylonjs/core/Misc/dataStorage.js';
12
- import '@babylonjs/core/Misc/logger.js';
13
- import '@fluentui/react-motion-components-preview';
14
9
  import '@babylonjs/core/Misc/asyncLock.js';
15
10
  import '@babylonjs/core/Misc/deferred.js';
16
11
  import '@fluentui-contrib/react-resize-handle';
17
- import '@fluentui-contrib/react-virtualizer';
12
+ import '@fluentui/react-motion-components-preview';
13
+ import '@babylonjs/core/Misc/logger.js';
14
+ import 'react-dom/client';
15
+ import '@babylonjs/core/Maths/math.color.js';
16
+ import '@babylonjs/core/Maths/math.vector.js';
18
17
  import '@babylonjs/core/Misc/uniqueIdGenerator.js';
18
+ import '@fluentui-contrib/react-virtualizer';
19
19
  import '@babylonjs/addons/msdfText/fontAsset.js';
20
20
  import '@babylonjs/addons/msdfText/textRenderer.js';
21
21
  import '@babylonjs/core/Debug/physicsViewer.js';
@@ -36,7 +36,6 @@ import '@babylonjs/core/Misc/PerformanceViewer/performanceViewerSceneExtension.j
36
36
  import '@babylonjs/core/Misc/pressureObserverWrapper.js';
37
37
  import '@babylonjs/core/Maths/math.scalar.js';
38
38
  import '@babylonjs/core/Misc/PerformanceViewer/performanceViewerCollector.js';
39
- import '@babylonjs/core/Maths/math.scalar.functions.js';
40
39
  import '@babylonjs/core/Engines/abstractEngine.js';
41
40
  import '@babylonjs/core/Bones/bone.js';
42
41
  import '@babylonjs/core/Cameras/camera.js';
@@ -48,10 +47,14 @@ import '@babylonjs/core/Gizmos/spatialAudioGizmo.js';
48
47
  import '@babylonjs/core/Lights/light.js';
49
48
  import '@babylonjs/core/Meshes/abstractMesh.js';
50
49
  import '@babylonjs/core/node.js';
51
- import 'react-dom/client';
52
50
  import '@babylonjs/core/Misc/screenshotTools.js';
53
51
  import '@babylonjs/core/Layers/selectionOutlineLayer.js';
54
52
  import '@babylonjs/core/Meshes/GaussianSplatting/gaussianSplattingMesh.js';
53
+ import '@babylonjs/core/SmartAssets/smartAssetManager.pure.js';
54
+ import '@babylonjs/core/Loading/Plugins/babylonFileLoader.js';
55
+ import '@babylonjs/core/Meshes/mesh.js';
56
+ import '@babylonjs/core/Misc/sceneSerializer.js';
57
+ import '@babylonjs/core/SmartAssets/smartAssetSerializer.js';
55
58
  import '@babylonjs/core/Animations/animationGroup.js';
56
59
  import '@babylonjs/core/Animations/animation.js';
57
60
  import '@babylonjs/core/Animations/animationPropertiesOverride.js';
@@ -70,9 +73,9 @@ import '@babylonjs/core/Cameras/freeCamera.js';
70
73
  import '@babylonjs/core/Cameras/geospatialCamera.js';
71
74
  import '@babylonjs/core/Cameras/targetCamera.js';
72
75
  import '@babylonjs/core/scene.js';
76
+ import '@babylonjs/core/FlowGraph/flowGraph.js';
73
77
  import '@babylonjs/core/FrameGraph/frameGraph.js';
74
78
  import '@babylonjs/core/FrameGraph/Node/nodeRenderGraph.js';
75
- import '@babylonjs/core/FlowGraph/flowGraph.js';
76
79
  import '@babylonjs/core/Lights/Clustered/clusteredLightContainer.js';
77
80
  import '@babylonjs/core/Lights/directionalLight.js';
78
81
  import '@babylonjs/core/Lights/hemisphericLight.js';
@@ -99,7 +102,6 @@ import '@babylonjs/core/Materials/PBR/pbrMaterial.js';
99
102
  import '@babylonjs/core/Materials/Node/Blocks/gradientBlock.js';
100
103
  import '@babylonjs/core/Materials/Node/Enums/nodeMaterialBlockConnectionPointTypes.js';
101
104
  import '@babylonjs/core/Misc/gradients.js';
102
- import '@babylonjs/core/Meshes/mesh.js';
103
105
  import '@babylonjs/core/Debug/skeletonViewer.js';
104
106
  import '@babylonjs/core/Meshes/buffer.js';
105
107
  import '@babylonjs/core/Meshes/Builders/linesBuilder.js';
@@ -138,6 +140,7 @@ import '@babylonjs/core/Maths/colorTemperature.functions.js';
138
140
  import '@babylonjs/core/Bones/skeleton.js';
139
141
  import '@babylonjs/core/Sprites/sprite.js';
140
142
  import '@babylonjs/core/Sprites/spriteManager.js';
143
+ import '@babylonjs/core/Maths/math.scalar.functions.js';
141
144
  import '@babylonjs/core/Misc/textureTools.js';
142
145
  import '@babylonjs/core/Events/keyboardEvents.js';
143
146
  import '@babylonjs/core/Events/pointerEvents.js';
@@ -151,7 +154,6 @@ import '@babylonjs/core/Materials/Textures/renderTargetTexture.js';
151
154
  import '@babylonjs/core/Materials/Textures/thinTexture.js';
152
155
  import '@babylonjs/core/AudioV2/abstractAudio/mainAudioBus.js';
153
156
  import '@babylonjs/core/FlowGraph/flowGraphCoordinator.js';
154
- import '@babylonjs/core/SmartAssets/smartAssetManager.pure.js';
155
157
  import '@babylonjs/core/Rendering/boundingBoxRenderer.js';
156
158
  import '@babylonjs/core/PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.js';
157
159
  import '@babylonjs/core/Sprites/spriteSceneComponent.js';
@@ -159,10 +161,7 @@ import '@babylonjs/core/Materials/Textures/dynamicTexture.js';
159
161
  import '@babylonjs/core/Misc/equirectangularCapture.js';
160
162
  import '@babylonjs/core/Misc/sceneRecorder.js';
161
163
  import '@babylonjs/core/Misc/videoRecorder.js';
162
- import '@babylonjs/core/Misc/sceneSerializer.js';
163
164
  import '@babylonjs/core/Misc/environmentTextureTools.js';
164
- import '@babylonjs/core/Loading/Plugins/babylonFileLoader.js';
165
- import '@babylonjs/core/SmartAssets/smartAssetSerializer.js';
166
165
  import '@babylonjs/core/Loading/sceneLoader.js';
167
166
  import '@babylonjs/core/Misc/filesInput.js';
168
167
  import '@babylonjs/loaders/glTF/2.0/glTFLoaderExtensionRegistry.js';
@@ -209,4 +208,4 @@ var reflectorService = {
209
208
  };
210
209
 
211
210
  export { ReflectorServiceDefinition, reflectorService as default };
212
- //# sourceMappingURL=reflectorService-CPunL_Qs.js.map
211
+ //# sourceMappingURL=reflectorService-CUFxJIMt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reflectorService-CPunL_Qs.js","sources":["../../../../../../../../dev/inspector-v2/src/components/tools/reflectorTools.tsx","../../../../../../../../dev/inspector-v2/src/services/panes/tools/reflectorService.tsx"],"sourcesContent":["import { ButtonLine } from \"shared-ui-components/fluent/hoc/buttonLine\";\r\nimport { useState, useCallback, useRef, type FunctionComponent } from \"react\";\r\nimport { type Scene } from \"core/scene\";\r\nimport { TextInputPropertyLine, NumberInputPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine\";\r\nimport { Reflector } from \"core/Misc/reflector\";\r\nimport { PlugConnectedRegular } from \"@fluentui/react-icons\";\r\n\r\nexport const ReflectorTools: FunctionComponent<{ scene: Scene }> = ({ scene }) => {\r\n const [hostname, setHostname] = useState(\"localhost\");\r\n const [port, setPort] = useState(1234);\r\n const reflectorRef = useRef<Reflector | null>(null);\r\n\r\n const connectReflector = useCallback(() => {\r\n if (reflectorRef.current) {\r\n reflectorRef.current.close();\r\n }\r\n\r\n reflectorRef.current = new Reflector(scene, hostname, port);\r\n }, [scene, hostname, port]);\r\n\r\n return (\r\n <>\r\n <TextInputPropertyLine label=\"Hostname\" value={hostname} onChange={(value) => setHostname(value)} />\r\n <NumberInputPropertyLine label=\"Port\" value={port} onChange={(value) => setPort(value)} forceInt />\r\n <ButtonLine label=\"Connect\" icon={PlugConnectedRegular} onClick={connectReflector} />\r\n </>\r\n );\r\n};\r\n","import { type ServiceDefinition } from \"shared-ui-components/modularTool/modularity/serviceDefinition\";\r\nimport { ToolsServiceIdentity, type IToolsService } from \"../toolsService\";\r\nimport { type IDisposable } from \"core/scene\";\r\nimport { ReflectorTools } from \"../../../components/tools/reflectorTools\";\r\n\r\nexport const ReflectorServiceDefinition: ServiceDefinition<[], [IToolsService]> = {\r\n friendlyName: \"Reflector Tools\",\r\n consumes: [ToolsServiceIdentity],\r\n factory: (toolsService) => {\r\n const contentRegistrations: IDisposable[] = [];\r\n\r\n // Reflector content\r\n contentRegistrations.push(\r\n toolsService.addSectionContent({\r\n key: \"Reflector\",\r\n section: \"Reflector\",\r\n component: ({ context }) => <ReflectorTools scene={context} />,\r\n })\r\n );\r\n\r\n return {\r\n dispose: () => {\r\n contentRegistrations.forEach((registration) => registration.dispose());\r\n },\r\n };\r\n },\r\n};\r\n\r\nexport default {\r\n serviceDefinitions: [ReflectorServiceDefinition],\r\n} as const;\r\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CACtF;AAEX,CAAC;;ACtBM,MAAM,0BAA0B,GAA2C;AAC9E,IAAA,YAAY,EAAE,iBAAiB;IAC/B,QAAQ,EAAE,CAAC,oBAAoB,CAAC;AAChC,IAAA,OAAO,EAAE,CAAC,YAAY,KAAI;QACtB,MAAM,oBAAoB,GAAkB,EAAE;;AAG9C,QAAA,oBAAoB,CAAC,IAAI,CACrB,YAAY,CAAC,iBAAiB,CAAC;AAC3B,YAAA,GAAG,EAAE,WAAW;AAChB,YAAA,OAAO,EAAE,WAAW;AACpB,YAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,cAAc,EAAA,EAAC,KAAK,EAAE,OAAO,EAAA,CAAI;AACjE,SAAA,CAAC,CACL;QAED,OAAO;YACH,OAAO,EAAE,MAAK;AACV,gBAAA,oBAAoB,CAAC,OAAO,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1E,CAAC;SACJ;IACL,CAAC;;AAGL,uBAAe;IACX,kBAAkB,EAAE,CAAC,0BAA0B,CAAC;CAC1C;;;;"}
1
+ {"version":3,"file":"reflectorService-CUFxJIMt.js","sources":["../../../../../../../../dev/inspector-v2/src/components/tools/reflectorTools.tsx","../../../../../../../../dev/inspector-v2/src/services/panes/tools/reflectorService.tsx"],"sourcesContent":["import { ButtonLine } from \"shared-ui-components/fluent/hoc/buttonLine\";\r\nimport { useState, useCallback, useRef, type FunctionComponent } from \"react\";\r\nimport { type Scene } from \"core/scene\";\r\nimport { TextInputPropertyLine, NumberInputPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine\";\r\nimport { Reflector } from \"core/Misc/reflector\";\r\nimport { PlugConnectedRegular } from \"@fluentui/react-icons\";\r\n\r\nexport const ReflectorTools: FunctionComponent<{ scene: Scene }> = ({ scene }) => {\r\n const [hostname, setHostname] = useState(\"localhost\");\r\n const [port, setPort] = useState(1234);\r\n const reflectorRef = useRef<Reflector | null>(null);\r\n\r\n const connectReflector = useCallback(() => {\r\n if (reflectorRef.current) {\r\n reflectorRef.current.close();\r\n }\r\n\r\n reflectorRef.current = new Reflector(scene, hostname, port);\r\n }, [scene, hostname, port]);\r\n\r\n return (\r\n <>\r\n <TextInputPropertyLine label=\"Hostname\" value={hostname} onChange={(value) => setHostname(value)} />\r\n <NumberInputPropertyLine label=\"Port\" value={port} onChange={(value) => setPort(value)} forceInt />\r\n <ButtonLine label=\"Connect\" icon={PlugConnectedRegular} onClick={connectReflector} />\r\n </>\r\n );\r\n};\r\n","import { type ServiceDefinition } from \"shared-ui-components/modularTool/modularity/serviceDefinition\";\r\nimport { ToolsServiceIdentity, type IToolsService } from \"../toolsService\";\r\nimport { type IDisposable } from \"core/scene\";\r\nimport { ReflectorTools } from \"../../../components/tools/reflectorTools\";\r\n\r\nexport const ReflectorServiceDefinition: ServiceDefinition<[], [IToolsService]> = {\r\n friendlyName: \"Reflector Tools\",\r\n consumes: [ToolsServiceIdentity],\r\n factory: (toolsService) => {\r\n const contentRegistrations: IDisposable[] = [];\r\n\r\n // Reflector content\r\n contentRegistrations.push(\r\n toolsService.addSectionContent({\r\n key: \"Reflector\",\r\n section: \"Reflector\",\r\n component: ({ context }) => <ReflectorTools scene={context} />,\r\n })\r\n );\r\n\r\n return {\r\n dispose: () => {\r\n contentRegistrations.forEach((registration) => registration.dispose());\r\n },\r\n };\r\n },\r\n};\r\n\r\nexport default {\r\n serviceDefinitions: [ReflectorServiceDefinition],\r\n} as const;\r\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,MAAM,cAAc,GAAwC,CAAC,EAAE,KAAK,EAAE,KAAI;IAC7E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AG9C,QAAA,oBAAoB,CAAC,IAAI,CACrB,YAAY,CAAC,iBAAiB,CAAC;AAC3B,YAAA,GAAG,EAAE,WAAW;AAChB,YAAA,OAAO,EAAE,WAAW;AACpB,YAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,cAAc,EAAA,EAAC,KAAK,EAAE,OAAO,EAAA,CAAI;AACjE,SAAA,CAAC,CACL;QAED,OAAO;YACH,OAAO,EAAE,MAAK;AACV,gBAAA,oBAAoB,CAAC,OAAO,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1E,CAAC;SACJ;IACL,CAAC;;AAGL,uBAAe;IACX,kBAAkB,EAAE,CAAC,0BAA0B,CAAC;CAC1C;;"}
@@ -0,0 +1,79 @@
1
+ import { type IDisposable, type IReadonlyObservable, type Nullable } from "@babylonjs/core/index.js";
2
+ import { type ComponentType } from "react";
3
+ import { type ExplorerCommandProvider, type ExplorerNodeDescription } from "../../../components/explorer/explorerModel";
4
+ import { type ExplorerNodeProvider } from "./explorerService";
5
+ import { type ISelectionService } from "../../selectionService";
6
+ import { type IShellService } from "@babylonjs/shared-ui-components/modularTool/services/shellService.js";
7
+ import { type IReadonlyObservableCollection } from "@babylonjs/shared-ui-components/modularTool/misc/observableCollection.js";
8
+ /**
9
+ * Describes an Explorer side pane, including the services it needs and the hierarchy it displays.
10
+ *
11
+ * This is intentionally not a service: products (such as the Full/BJS Inspector's Scene Explorer or the
12
+ * Babylon Lite engine explorer) own their pane directly and use this to share the common pane plumbing.
13
+ * @internal
14
+ */
15
+ export type ExplorerPaneOptions = Readonly<{
16
+ /**
17
+ * The unique key of the side pane.
18
+ */
19
+ key: string;
20
+ /**
21
+ * The title displayed on the side pane.
22
+ */
23
+ title: string;
24
+ /**
25
+ * Gets the root object of the hierarchy (e.g. a Scene for the Full Inspector, or an engine for
26
+ * the Babylon Lite Inspector). It is displayed as the root node, and nothing is rendered while
27
+ * it is null. This is re-evaluated whenever `onRootChanged` notifies.
28
+ */
29
+ getRoot: () => Nullable<object>;
30
+ /**
31
+ * The name displayed for the root node (e.g. "Scene" or "Engine").
32
+ */
33
+ rootLabel: string;
34
+ /**
35
+ * An optional icon component to render for the root node.
36
+ */
37
+ rootIcon?: ComponentType<{
38
+ entity: object;
39
+ }>;
40
+ /**
41
+ * An optional observable that notifies when the object returned by `getRoot` changes. Products
42
+ * with a fixed root (such as the Babylon Lite Inspector, which inspects a single engine for the
43
+ * lifetime of the pane) can omit it.
44
+ */
45
+ onRootChanged?: IReadonlyObservable<unknown>;
46
+ /**
47
+ * Enumerates the top level nodes of the hierarchy (excluding the root node, which represents the
48
+ * object being inspected and is added automatically). This is re-invoked whenever the Explorer
49
+ * rebuilds its tree, so it should always reflect the current state.
50
+ */
51
+ getNodes: () => readonly ExplorerNodeDescription[];
52
+ /**
53
+ * An optional observable that notifies when the set of nodes returned by `getNodes` changes
54
+ * (e.g. a new top level node was added). Changes within an already described node are
55
+ * communicated through that node's own change observables instead.
56
+ */
57
+ onNodesChanged?: IReadonlyObservable<void>;
58
+ /**
59
+ * Optional providers that contribute nodes beneath compatible entity-backed nodes.
60
+ */
61
+ nodeProviders?: IReadonlyObservableCollection<ExplorerNodeProvider<object>>;
62
+ /**
63
+ * Optional command providers for nodes that represent an entity.
64
+ */
65
+ itemCommandProviders?: IReadonlyObservableCollection<ExplorerCommandProvider<object>>;
66
+ /**
67
+ * Optional command providers for group nodes (the command context is the group's display name).
68
+ */
69
+ groupCommandProviders?: IReadonlyObservableCollection<ExplorerCommandProvider<string, "contextMenu">>;
70
+ }>;
71
+ /**
72
+ * Registers an Explorer side pane that enables browsing a hierarchy and executing commands on its entities.
73
+ * @param shellService The shell service the pane is added to.
74
+ * @param selectionService The selection service used to read and update the selected entity.
75
+ * @param options Options describing the pane, its root object, and the hierarchy it displays.
76
+ * @returns A disposable that removes the pane.
77
+ * @internal
78
+ */
79
+ export declare function CreateExplorerPaneRegistration(shellService: IShellService, selectionService: ISelectionService, options: ExplorerPaneOptions): IDisposable;
@@ -0,0 +1,80 @@
1
+ import { type IDisposable, type IReadonlyObservable } from "@babylonjs/core/index.js";
2
+ import { type ExplorerCommandProvider, type ExplorerNodeDescription } from "../../../components/explorer/explorerModel";
3
+ import { type IReadonlyObservableCollection } from "@babylonjs/shared-ui-components/modularTool/misc/observableCollection.js";
4
+ import { type IService } from "@babylonjs/shared-ui-components/modularTool/modularity/serviceDefinition.js";
5
+ /**
6
+ * The unique identity symbol for the product-neutral Explorer service.
7
+ * @experimental
8
+ */
9
+ export declare const ExplorerServiceIdentity: unique symbol;
10
+ /**
11
+ * Contributes Explorer nodes beneath compatible entity-backed parent nodes.
12
+ *
13
+ * Providers return ordinary {@link ExplorerNodeDescription}s, so each contribution may contain arbitrary
14
+ * nested groups and items. Providers attach by parent entity rather than node id because structural groups
15
+ * are presentation details owned by product adapters.
16
+ * @experimental
17
+ */
18
+ export type ExplorerNodeProvider<T extends object> = Readonly<{
19
+ /** Controls this provider's position relative to other providers attached to the same parent. */
20
+ order?: number;
21
+ /** Returns whether this provider supports the parent entity. */
22
+ predicate: (parent: unknown) => parent is T;
23
+ /** Gets the Explorer nodes contributed beneath the parent entity. */
24
+ getNodes: (parent: T) => readonly ExplorerNodeDescription[];
25
+ /** Optionally notifies when the nodes returned by this provider may have changed. */
26
+ onChanged?: IReadonlyObservable<unknown>;
27
+ }>;
28
+ /**
29
+ * Allows hierarchy and commands to be contributed to an Explorer without depending on a product-specific API.
30
+ *
31
+ * The item/group terminology intentionally matches `ExplorerNodeKind`. Product adapters may expose
32
+ * domain-specific aliases (such as entity/section), but a generic Explorer group is not necessarily a scene section.
33
+ * @experimental
34
+ */
35
+ export interface IExplorerService extends IService<typeof ExplorerServiceIdentity> {
36
+ /**
37
+ * Adds a provider that contributes nodes beneath compatible entity-backed Explorer nodes.
38
+ * @param provider The node provider to add.
39
+ * @returns A disposable that removes the node provider.
40
+ */
41
+ addNodeProvider<T extends object>(provider: ExplorerNodeProvider<T>): IDisposable;
42
+ /**
43
+ * Adds a command that can be executed on Explorer item nodes.
44
+ * @param command The command provider to add.
45
+ * @returns A disposable that removes the command provider.
46
+ */
47
+ addItemCommand<T extends object>(command: ExplorerCommandProvider<T>): IDisposable;
48
+ /**
49
+ * Adds a context-menu command that can be executed on Explorer group nodes.
50
+ * @param command The command provider to add.
51
+ * @returns A disposable that removes the command provider.
52
+ */
53
+ addGroupCommand<T extends string>(command: ExplorerCommandProvider<T, "contextMenu">): IDisposable;
54
+ }
55
+ /**
56
+ * The shared Explorer service implementation and the command collections consumed by an Explorer pane.
57
+ * @internal
58
+ */
59
+ export type ExplorerServiceState = IExplorerService & Readonly<{
60
+ nodeProviders: IReadonlyObservableCollection<ExplorerNodeProvider<object>>;
61
+ itemCommandProviders: IReadonlyObservableCollection<ExplorerCommandProvider<object>>;
62
+ groupCommandProviders: IReadonlyObservableCollection<ExplorerCommandProvider<string, "contextMenu">>;
63
+ dispose: () => void;
64
+ }>;
65
+ /**
66
+ * Creates the product-neutral Explorer contribution service.
67
+ * @returns The service implementation and its observable contribution collections.
68
+ * @internal
69
+ */
70
+ export declare function CreateExplorerService(): ExplorerServiceState;
71
+ /**
72
+ * Combines product-owned children with shared provider contributions and recursively enables contributions
73
+ * beneath every entity-backed descendant.
74
+ * @param parent The entity represented by the parent node, if any.
75
+ * @param children The children owned by the product adapter.
76
+ * @param providers The shared node providers registered with the Explorer.
77
+ * @returns The combined child node descriptions.
78
+ * @internal
79
+ */
80
+ export declare function GetExplorerNodeChildren(parent: object | undefined, children: readonly ExplorerNodeDescription[], providers: readonly ExplorerNodeProvider<object>[]): readonly ExplorerNodeDescription[];
@@ -4,12 +4,16 @@ import { type IService, type ServiceDefinition } from "@babylonjs/shared-ui-comp
4
4
  import { type ISceneContext } from "../../sceneContext";
5
5
  import { type ISelectionService } from "../../selectionService";
6
6
  import { type IShellService } from "@babylonjs/shared-ui-components/modularTool/services/shellService.js";
7
+ import { type IExplorerService } from "../explorer/explorerService";
7
8
  /**
8
9
  * The unique identity symbol for the scene explorer service.
9
10
  */
10
11
  export declare const SceneExplorerServiceIdentity: unique symbol;
11
12
  /**
12
13
  * Allows new sections or commands to be added to the scene explorer pane.
14
+ *
15
+ * Entity and section commands are Full Inspector conveniences over the product-neutral item and group command APIs.
16
+ * They remain scene-specific so other Explorer products do not have to model their groups as scene sections.
13
17
  */
14
18
  export interface ISceneExplorerService extends IService<typeof SceneExplorerServiceIdentity> {
15
19
  /**
@@ -29,6 +33,7 @@ export interface ISceneExplorerService extends IService<typeof SceneExplorerServ
29
33
  addSectionCommand<T extends string>(command: SceneExplorerCommandProvider<T, "contextMenu">): IDisposable;
30
34
  }
31
35
  /**
32
- * Provides a scene explorer pane that enables browsing the scene graph and executing commands on entities.
36
+ * Adapts the Babylon.js scene section/entity model onto the generic Explorer, and owns the "Scene Explorer"
37
+ * pane that enables browsing the scene graph and executing commands on entities.
33
38
  */
34
- export declare const SceneExplorerServiceDefinition: ServiceDefinition<[ISceneExplorerService], [ISceneContext, IShellService, ISelectionService]>;
39
+ export declare const SceneExplorerServiceDefinition: ServiceDefinition<[ISceneExplorerService, IExplorerService], [ISceneContext, IShellService, ISelectionService]>;
@@ -0,0 +1,11 @@
1
+ import { type ServiceDefinition } from "@babylonjs/shared-ui-components/modularTool/modularity/serviceDefinition.js";
2
+ import { type ISceneContext } from "./sceneContext";
3
+ import { type ISelectionService } from "./selectionService";
4
+ /**
5
+ * Selects the scene by default when the Babylon.js Inspector starts.
6
+ *
7
+ * The selection service itself is product agnostic (it starts with no selection), so this Babylon.js
8
+ * specific service owns the notion of "the scene is what is selected when nothing else is". It does not
9
+ * produce a service contract: it only wires the scene context to the selection service at startup.
10
+ */
11
+ export declare const SceneSelectionServiceDefinition: ServiceDefinition<[], [ISceneContext, ISelectionService]>;
@@ -1,7 +1,6 @@
1
1
  import { type IReadonlyObservable, type Nullable } from "@babylonjs/core/index.js";
2
2
  import { type IService, type ServiceDefinition } from "@babylonjs/shared-ui-components/modularTool/modularity/serviceDefinition.js";
3
3
  import { type ISettingsService } from "@babylonjs/shared-ui-components/modularTool/services/settingsService.js";
4
- import { type ISceneContext } from "./sceneContext";
5
4
  import { type ISettingsStore } from "@babylonjs/shared-ui-components/modularTool/services/settingsStore.js";
6
5
  import { type IShellService } from "@babylonjs/shared-ui-components/modularTool/services/shellService.js";
7
6
  /**
@@ -21,4 +20,8 @@ export interface ISelectionService extends IService<typeof SelectionServiceIdent
21
20
  */
22
21
  readonly onSelectedEntityChanged: IReadonlyObservable<void>;
23
22
  }
24
- export declare const SelectionServiceDefinition: ServiceDefinition<[ISelectionService], [IShellService, ISettingsStore, ISettingsService, ISceneContext]>;
23
+ /**
24
+ * Tracks the currently selected entity. This service is product agnostic: it starts with no selection,
25
+ * and each product decides which entity (if any) is selected by default.
26
+ */
27
+ export declare const SelectionServiceDefinition: ServiceDefinition<[ISelectionService], [IShellService, ISettingsStore, ISettingsService]>;
@@ -4,6 +4,31 @@ import { type ISettingsService } from "@babylonjs/shared-ui-components/modularTo
4
4
  import { type ISettingsStore } from "@babylonjs/shared-ui-components/modularTool/services/settingsStore.js";
5
5
  import { type IShellService } from "@babylonjs/shared-ui-components/modularTool/services/shellService.js";
6
6
  import { type IReactContextService } from "@babylonjs/shared-ui-components/modularTool/services/reactContextService.js";
7
+ type InterceptSettings = {
8
+ mode: "intercept";
9
+ };
10
+ type PollingSettings = {
11
+ mode: "polling";
12
+ interval: number;
13
+ };
14
+ type ManualSettings = {
15
+ mode: "manual";
16
+ };
17
+ type WatcherSettings = InterceptSettings | PollingSettings | ManualSettings;
18
+ type WatcherServiceOptions = {
19
+ /**
20
+ * The watcher settings used when no settings have been persisted.
21
+ */
22
+ defaultSettings?: WatcherSettings;
23
+ /**
24
+ * The watcher modes supported by this Inspector target.
25
+ */
26
+ supportedModes?: readonly WatcherSettings["mode"][];
27
+ /**
28
+ * The fallback interval for computed values when interception is the preferred mode.
29
+ */
30
+ computedValuePollingInterval?: number;
31
+ };
7
32
  /**
8
33
  * The unique identity symbol for the watcher service.
9
34
  */
@@ -28,11 +53,29 @@ export interface IWatcherService extends IService<typeof WatcherServiceIdentity>
28
53
  * @returns A disposable that stops watching when disposed.
29
54
  */
30
55
  watchProperty<T extends object>(target: T, propertyKey: keyof T, onChanged: (value: unknown) => void): IDisposable;
56
+ /**
57
+ * Watches a computed value and calls the callback whenever it changes. Computed values use fallback
58
+ * polling when interception is preferred, the configured interval in polling mode, and explicit
59
+ * refreshes in manual mode.
60
+ * @param getValue A function that returns the current value.
61
+ * @param onChanged A callback that is called with the new value when it changes.
62
+ * @param equals An optional equality comparison. Defaults to {@link Object.is}.
63
+ * @returns A disposable that stops watching when disposed.
64
+ */
65
+ watchValue<T>(getValue: () => T, onChanged: (value: T) => void, equals?: (left: T, right: T) => boolean): IDisposable;
31
66
  /**
32
67
  * Manually triggers a refresh of all watched properties.
33
68
  */
34
69
  refresh(): void;
35
70
  }
36
- export declare const WatcherServiceDefinition: ServiceDefinition<[IWatcherService], [ISettingsStore, IReactContextService]>;
37
- export declare const WatcherSettingsServiceDefinition: ServiceDefinition<[], [ISettingsService]>;
38
- export declare const WatcherRefreshToolbarServiceDefinition: ServiceDefinition<[], [IWatcherService, ISettingsStore, IShellService]>;
71
+ /**
72
+ * Creates the watcher services for a specific Inspector target.
73
+ * @param options Options that control the default and supported watcher modes.
74
+ * @returns Service definitions for watching values, configuring the watcher, and manually refreshing it.
75
+ */
76
+ export declare function MakeWatcherServiceDefinitions(options?: WatcherServiceOptions): {
77
+ readonly watcherServiceDefinition: ServiceDefinition<[IWatcherService], [ISettingsStore, IReactContextService]>;
78
+ readonly watcherSettingsServiceDefinition: ServiceDefinition<[], [ISettingsService]>;
79
+ readonly watcherRefreshToolbarServiceDefinition: ServiceDefinition<[], [IWatcherService, ISettingsStore, IShellService]>;
80
+ };
81
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/inspector",
3
- "version": "9.25.0",
3
+ "version": "9.26.1",
4
4
  "main": "lib/index.js",
5
5
  "module": "lib/index.js",
6
6
  "esnext": "lib/index.js",
@@ -10,6 +10,10 @@
10
10
  "types": "./lib/index.d.ts",
11
11
  "default": "./lib/index.js"
12
12
  },
13
+ "./lite": {
14
+ "types": "./lib/lite/index.d.ts",
15
+ "default": "./lib/lite/index.js"
16
+ },
13
17
  "./package.json": "./package.json"
14
18
  },
15
19
  "bin": {
@@ -36,6 +40,7 @@
36
40
  "@babylonjs/core": "^9.0.0",
37
41
  "@babylonjs/gui": "^9.0.0",
38
42
  "@babylonjs/gui-editor": "^9.0.0",
43
+ "@babylonjs/lite": "^1.27.0",
39
44
  "@babylonjs/loaders": "^9.0.0",
40
45
  "@babylonjs/materials": "^9.0.0",
41
46
  "@babylonjs/node-editor": "^9.0.0",
@@ -53,7 +58,13 @@
53
58
  "react-dom": ">=16.14.0 <20.0.0",
54
59
  "usehooks-ts": "^3.1.1"
55
60
  },
61
+ "peerDependenciesMeta": {
62
+ "@babylonjs/lite": {
63
+ "optional": true
64
+ }
65
+ },
56
66
  "devDependencies": {
67
+ "@babylonjs/lite": "1.27.0",
57
68
  "@dev/build-tools": "^1.0.0",
58
69
  "@dev/inspector": "1.0.0",
59
70
  "@rollup/plugin-alias": "^5.1.0",
package/readme.md CHANGED
@@ -22,6 +22,16 @@ import { ShowInspector } from "@babylonjs/inspector";
22
22
  ShowInspector(scene);
23
23
  ```
24
24
 
25
+ ### Babylon Lite
26
+
27
+ The initial Babylon Lite Inspector can display the surfaces and rendering contexts associated with an engine:
28
+
29
+ ```ts
30
+ import { ShowInspector } from "@babylonjs/inspector/lite";
31
+
32
+ ShowInspector(engine);
33
+ ```
34
+
25
35
  ## Headless Inspectable (No UI)
26
36
 
27
37
  You can make a scene inspectable for the CLI without showing the Inspector UI by calling `StartInspectable`: