@babylonjs/inspector 9.29.0 → 9.31.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.
Files changed (71) hide show
  1. package/bin/inspector-bridge.mjs +4730 -4446
  2. package/bin/inspector-cli.mjs +4765 -3866
  3. package/lib/components/curveEditor/animatableAnimations.d.ts +27 -0
  4. package/lib/components/properties/nodes/gaussianSplattingProperties.d.ts +13 -2
  5. package/lib/{extensionsListService-DfE1ZOnF.js → extensionsListService-O8zrOnmL.js} +5 -2
  6. package/lib/{extensionsListService-DfE1ZOnF.js.map → extensionsListService-O8zrOnmL.js.map} +1 -1
  7. package/lib/gif-ut7hgn9U.js +45 -0
  8. package/lib/gif-ut7hgn9U.js.map +1 -0
  9. package/lib/{index-CZ1-Y-Rv.js → index-DbbhJJ1G.js} +321 -85
  10. package/lib/index-DbbhJJ1G.js.map +1 -0
  11. package/lib/index.js +4 -1
  12. package/lib/index.js.map +1 -1
  13. package/lib/lite/animationProperties-BKVw6_ls.js +95 -0
  14. package/lib/lite/animationProperties-BKVw6_ls.js.map +1 -0
  15. package/lib/lite/animationUtils.d.ts +47 -0
  16. package/lib/lite/components/properties/animationProperties.d.ts +48 -0
  17. package/lib/lite/directTextureBinding-C5MB2OV2.js +99 -0
  18. package/lib/lite/directTextureBinding-C5MB2OV2.js.map +1 -0
  19. package/lib/lite/dynamicMaterialField-L_nQAxAA.js +107 -0
  20. package/lib/lite/dynamicMaterialField-L_nQAxAA.js.map +1 -0
  21. package/lib/lite/engineExplorerService.d.ts +3 -1
  22. package/lib/lite/{extensionsListService-D1JivcAu.js → extensionsListService-Bl1rTNl1.js} +2 -2
  23. package/lib/lite/{extensionsListService-D1JivcAu.js.map → extensionsListService-Bl1rTNl1.js.map} +1 -1
  24. package/lib/lite/{index-D8vFySa7.js → index-Cy8gzpYG.js} +1453 -394
  25. package/lib/lite/index-Cy8gzpYG.js.map +1 -0
  26. package/lib/lite/index.js +1 -1
  27. package/lib/lite/nodeMaterialProperties-ELFMlzS1.js +182 -0
  28. package/lib/lite/nodeMaterialProperties-ELFMlzS1.js.map +1 -0
  29. package/lib/lite/pbrMaterialProperties-jfJddBxY.js +614 -0
  30. package/lib/lite/pbrMaterialProperties-jfJddBxY.js.map +1 -0
  31. package/lib/lite/services/panes/properties/animationPropertiesService.d.ts +5 -0
  32. package/lib/lite/services/panes/properties/materialPropertiesService.d.ts +3 -1
  33. package/lib/lite/services/panes/properties/materials/directTextureBinding.d.ts +29 -0
  34. package/lib/lite/services/panes/properties/materials/dynamicMaterialField.d.ts +35 -0
  35. package/lib/lite/services/panes/properties/materials/materialAdapterTypes.d.ts +11 -0
  36. package/lib/lite/services/panes/properties/materials/materialReachability.d.ts +9 -0
  37. package/lib/lite/services/panes/properties/materials/nodeMaterialProperties.d.ts +8 -0
  38. package/lib/lite/services/panes/properties/materials/pbrMaterialProperties.d.ts +8 -0
  39. package/lib/lite/services/panes/properties/materials/shaderMaterialProperties.d.ts +8 -0
  40. package/lib/lite/services/panes/properties/materials/standardMaterialProperties.d.ts +8 -0
  41. package/lib/lite/services/panes/properties/materials/useDirectMaterialOperations.d.ts +31 -0
  42. package/lib/lite/services/panes/properties/textureMetadataProperties.d.ts +14 -0
  43. package/lib/lite/services/panes/properties/texturePropertiesService.d.ts +3 -1
  44. package/lib/lite/services/panes/properties/useLatestAsyncOperation.d.ts +24 -0
  45. package/lib/lite/services/panes/scene/animationGroupExplorerService.d.ts +7 -0
  46. package/lib/lite/services/panes/scene/materialExplorerService.d.ts +2 -1
  47. package/lib/lite/services/panes/scene/materialTopologyBindings.d.ts +13 -0
  48. package/lib/lite/services/panes/scene/sceneResourceIndexService.d.ts +36 -0
  49. package/lib/lite/services/panes/scene/sceneResources.d.ts +55 -11
  50. package/lib/lite/services/panes/scene/textureExplorerService.d.ts +2 -1
  51. package/lib/lite/services/pickingService.d.ts +10 -0
  52. package/lib/lite/shaderMaterialProperties-CTH_KfBK.js +229 -0
  53. package/lib/lite/shaderMaterialProperties-CTH_KfBK.js.map +1 -0
  54. package/lib/lite/standardMaterialProperties-BbYdFX86.js +287 -0
  55. package/lib/lite/standardMaterialProperties-BbYdFX86.js.map +1 -0
  56. package/lib/lite/textureMetadataProperties-BdNmp0Pk.js +221 -0
  57. package/lib/lite/textureMetadataProperties-BdNmp0Pk.js.map +1 -0
  58. package/lib/lite/useDirectMaterialOperations-D6V7OtC1.js +83 -0
  59. package/lib/lite/useDirectMaterialOperations-D6V7OtC1.js.map +1 -0
  60. package/lib/lite/useLatestAsyncOperation-k59AgA3B.js +78 -0
  61. package/lib/lite/useLatestAsyncOperation-k59AgA3B.js.map +1 -0
  62. package/lib/{quickCreateToolsService-owfaw163.js → quickCreateToolsService-Cs46Amv7.js} +5 -2
  63. package/lib/{quickCreateToolsService-owfaw163.js.map → quickCreateToolsService-Cs46Amv7.js.map} +1 -1
  64. package/lib/{reflectorService-oIAxxpQt.js → reflectorService-C43FgOiC.js} +5 -2
  65. package/lib/{reflectorService-oIAxxpQt.js.map → reflectorService-C43FgOiC.js.map} +1 -1
  66. package/lib/services/panes/properties/gaussianSplattingDebugController.d.ts +46 -0
  67. package/package.json +8 -8
  68. package/lib/gif-5DieAkSF.js +0 -38
  69. package/lib/gif-5DieAkSF.js.map +0 -1
  70. package/lib/index-CZ1-Y-Rv.js.map +0 -1
  71. package/lib/lite/index-D8vFySa7.js.map +0 -1
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { A as Accordion, i as AccordionSection, l as AccordionSectionItem, m as AttachDebugLayer, n as BooleanBadgePropertyLine, o as BoundProperty, p as BridgeCommandRegistryIdentity, q as BuiltInsExtensionFeed, B as Button, j as ButtonLine, r as Checkbox, C as CheckboxPropertyLine, s as ChildWindow, t as Collapse, v as Color3GradientComponent, w as Color3GradientList, x as Color3PropertyLine, y as Color4GradientComponent, z as Color4GradientList, D as Color4PropertyLine, E as ColorPickerPopup, F as ColorStepGradientComponent, G as ComboBox, H as ComboBoxPropertyLine, I as ComputedProperty, J as ConstructorFactory, K as ConvertOptions, O as DebugServiceIdentity, Q as DerivedProperty, R as DetachDebugLayer, U as DraggableLine, W as Dropdown, X as EntitySelector, Y as ErrorBoundary, Z as ExplorerServiceIdentity, _ as ExtensibleAccordion, $ as FactorGradientComponent, a0 as FactorGradientList, a1 as FileUploadLine, a2 as GetPropertyDescriptor, a3 as GizmoServiceIdentity, a4 as HexPropertyLine, a5 as InfoLabel, a6 as InputHexField, a7 as InputHsvField, a8 as Inspector, a9 as InterceptFunction, aa as InterceptProperty, ab as IsPropertyReadonly, ac as LineContainer, L as Link, ad as LinkPropertyLine, c as LinkToEntity, ae as LinkToEntityPropertyLine, af as List, ag as MakeDialogTeachingMoment, ah as MakeLazyComponent, ai as MakeModularBridge, aj as MakeModularTool, ak as MakePopoverTeachingMoment, al as MakePropertyHook, am as MakeTeachingMoment, an as MaterialSelector, M as MessageBar, ao as NodeSelector, ap as NumberDropdown, aq as NumberDropdownPropertyLine, N as NumberInputPropertyLine, ar as ObservableCollection, as as Pane, at as PlaceholderPropertyLine, P as Popover, au as PositionedPopover, av as PropertiesServiceIdentity, aw as Property, ax as PropertyContext, ay as PropertyLine, az as QuaternionPropertyLine, aA as RotationVectorPropertyLine, f as SceneContextIdentity, aB as SceneExplorerServiceIdentity, aC as SearchBar, aD as SearchBox, aE as SelectionServiceDefinition, g as SelectionServiceIdentity, aF as SettingsServiceIdentity, aG as SettingsStore, aH as SettingsStoreIdentity, S as ShellServiceIdentity, aI as ShowInspector, aJ as SidePaneContainer, aK as SkeletonSelector, aL as Slider, aM as SpinButton, d as SpinButtonPropertyLine, aN as StartInspectable, aO as StatsServiceIdentity, aP as StringDropdown, aQ as StringDropdownPropertyLine, aR as StringifiedPropertyLine, aS as Switch, aT as SwitchPropertyLine, aU as SyncedSliderInput, aV as SyncedSliderPropertyLine, aW as TeachingMoment, aX as TextAreaPropertyLine, aY as TextInput, T as TextInputPropertyLine, aZ as TextPropertyLine, a_ as Textarea, a$ as TextureSelector, b0 as TextureUpload, b1 as Theme, b2 as ThemeServiceIdentity, b3 as ToastProvider, b4 as ToggleButton, k as ToolsServiceIdentity, b5 as Tooltip, b6 as UploadButton, b7 as Vector2PropertyLine, V as Vector3PropertyLine, b8 as Vector4PropertyLine, b9 as WatcherServiceIdentity, ba as inspectorAssetNotFoundHandler, bb as useAngleConverters, bc as useAsyncResource, bd as useColor3Property, be as useColor4Property, bf as useEventListener, bg as useEventfulState, b as useInterceptObservable, bh as useKeyListener, bi as useKeyState, bj as useObservableCollection, h as useObservableState, bk as useOrderedObservableCollection, bl as usePollingObservable, e as useProperty, bm as usePropertyChangedNotifier, bn as useQuaternionProperty, bo as useResource, bp as useTheme, bq as useThemeMode, a as useToast, br as useVector3Property } from './index-CZ1-Y-Rv.js';
1
+ export { A as Accordion, i as AccordionSection, l as AccordionSectionItem, m as AttachDebugLayer, n as BooleanBadgePropertyLine, o as BoundProperty, p as BridgeCommandRegistryIdentity, q as BuiltInsExtensionFeed, B as Button, j as ButtonLine, r as Checkbox, C as CheckboxPropertyLine, s as ChildWindow, t as Collapse, v as Color3GradientComponent, w as Color3GradientList, x as Color3PropertyLine, y as Color4GradientComponent, z as Color4GradientList, D as Color4PropertyLine, E as ColorPickerPopup, F as ColorStepGradientComponent, G as ComboBox, H as ComboBoxPropertyLine, I as ComputedProperty, J as ConstructorFactory, K as ConvertOptions, O as DebugServiceIdentity, Q as DerivedProperty, R as DetachDebugLayer, U as DraggableLine, W as Dropdown, X as EntitySelector, Y as ErrorBoundary, Z as ExplorerServiceIdentity, _ as ExtensibleAccordion, $ as FactorGradientComponent, a0 as FactorGradientList, a1 as FileUploadLine, a2 as GetPropertyDescriptor, a3 as GizmoServiceIdentity, a4 as HexPropertyLine, a5 as InfoLabel, a6 as InputHexField, a7 as InputHsvField, a8 as Inspector, a9 as InterceptFunction, aa as InterceptProperty, ab as IsPropertyReadonly, ac as LineContainer, L as Link, ad as LinkPropertyLine, c as LinkToEntity, ae as LinkToEntityPropertyLine, af as List, ag as MakeDialogTeachingMoment, ah as MakeLazyComponent, ai as MakeModularBridge, aj as MakeModularTool, ak as MakePopoverTeachingMoment, al as MakePropertyHook, am as MakeTeachingMoment, an as MaterialSelector, M as MessageBar, ao as NodeSelector, ap as NumberDropdown, aq as NumberDropdownPropertyLine, N as NumberInputPropertyLine, ar as ObservableCollection, as as Pane, at as PlaceholderPropertyLine, P as Popover, au as PositionedPopover, av as PropertiesServiceIdentity, aw as Property, ax as PropertyContext, ay as PropertyLine, az as QuaternionPropertyLine, aA as RotationVectorPropertyLine, f as SceneContextIdentity, aB as SceneExplorerServiceIdentity, aC as SearchBar, aD as SearchBox, aE as SelectionServiceDefinition, g as SelectionServiceIdentity, aF as SettingsServiceIdentity, aG as SettingsStore, aH as SettingsStoreIdentity, S as ShellServiceIdentity, aI as ShowInspector, aJ as SidePaneContainer, aK as SkeletonSelector, aL as Slider, aM as SpinButton, d as SpinButtonPropertyLine, aN as StartInspectable, aO as StatsServiceIdentity, aP as StringDropdown, aQ as StringDropdownPropertyLine, aR as StringifiedPropertyLine, aS as Switch, aT as SwitchPropertyLine, aU as SyncedSliderInput, aV as SyncedSliderPropertyLine, aW as TeachingMoment, aX as TextAreaPropertyLine, aY as TextInput, T as TextInputPropertyLine, aZ as TextPropertyLine, a_ as Textarea, a$ as TextureSelector, b0 as TextureUpload, b1 as Theme, b2 as ThemeServiceIdentity, b3 as ToastProvider, b4 as ToggleButton, k as ToolsServiceIdentity, b5 as Tooltip, b6 as UploadButton, b7 as Vector2PropertyLine, V as Vector3PropertyLine, b8 as Vector4PropertyLine, b9 as WatcherServiceIdentity, ba as inspectorAssetNotFoundHandler, bb as useAngleConverters, bc as useAsyncResource, bd as useColor3Property, be as useColor4Property, bf as useEventListener, bg as useEventfulState, b as useInterceptObservable, bh as useKeyListener, bi as useKeyState, bj as useObservableCollection, h as useObservableState, bk as useOrderedObservableCollection, bl as usePollingObservable, e as useProperty, bm as usePropertyChangedNotifier, bn as useQuaternionProperty, bo as useResource, bp as useTheme, bq as useThemeMode, a as useToast, br as useVector3Property } from './index-DbbhJJ1G.js';
2
2
  import '@babylonjs/core/Misc/observable.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
@@ -109,6 +109,9 @@ import '@babylonjs/core/Meshes/meshBlendingTag.js';
109
109
  import '@babylonjs/core/Rendering/renderingManager.js';
110
110
  import '@babylonjs/core/Rendering/edgesRenderer.js';
111
111
  import '@babylonjs/core/Rendering/outlineRenderer.js';
112
+ import '@babylonjs/core/Materials/GaussianSplatting/gaussianSplattingMaterial.js';
113
+ import '@babylonjs/core/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js';
114
+ import '@babylonjs/core/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js';
112
115
  import '@babylonjs/core/Particles/gpuParticleSystem.js';
113
116
  import '@babylonjs/core/Particles/Node/nodeParticleSystemSet.helper.js';
114
117
  import '@babylonjs/core/Particles/particleHelper.js';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,95 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { pauseAnimation, playAnimation, stopAnimation, setAnimationWeight } from '@babylonjs/lite';
3
+ import { useCallback } from 'react';
4
+ import { a as useWatcher, b as useWatchedValue, c as SeekAnimationFrame, B as ButtonLine, d as BoundProperty, e as SyncedSliderPropertyLine, f as SwitchPropertyLine, D as DerivedProperty, T as TextPropertyLine, C as ComputedProperty, g as StringifiedPropertyLine, G as GetAnimationFrameRate, h as GetTargetedAnimationDisplayName, P as PropertyLine, L as Link, i as GetEntityAnimationGroups, j as GetEntityId, M as MessageBar } from './index-Cy8gzpYG.js';
5
+ import '@babylonjs/core/Misc/observable.js';
6
+ import '@fluentui/react-components';
7
+ import '@fluentui/react-icons';
8
+ import '@babylonjs/core/Misc/dataStorage.js';
9
+ import '@babylonjs/core/Misc/asyncLock.js';
10
+ import '@babylonjs/core/Misc/deferred.js';
11
+ import '@fluentui-contrib/react-resize-handle';
12
+ import '@fluentui/react-motion-components-preview';
13
+ import '@babylonjs/core/Misc/logger.js';
14
+ import 'react-dom/client';
15
+ import '@fluentui-contrib/react-virtualizer';
16
+ import '@babylonjs/core/Misc/uniqueIdGenerator.js';
17
+ import '@babylonjs/core/Maths/math.color.js';
18
+ import '@babylonjs/core/Maths/math.vector.js';
19
+
20
+ const GetIsPlaying = (group) => group.isPlaying;
21
+ const GetCurrentFrame = (group) => group.currentTime * GetAnimationFrameRate(group);
22
+ const GetLastFrame = (group) => group.duration * GetAnimationFrameRate(group);
23
+ const GetAnimationCount = (group) => group.targetedAnimations.length;
24
+ const GetWeight = (group) => group.weight;
25
+ const GetGroupName = (group) => group.name || "Unnamed Animation Group";
26
+ const GetAnimationTarget = (animation) => animation.target;
27
+ const GetGroupPropertyOwner = (group) => group;
28
+ /**
29
+ * Renders Lite animation playback and frame controls.
30
+ * @param props The engine and animation group.
31
+ * @returns The group's control property lines.
32
+ */
33
+ const AnimationGroupControlProperties = (props) => {
34
+ const { engine, group } = props;
35
+ const watcher = useWatcher();
36
+ const isPlaying = useWatchedValue(group, GetIsPlaying);
37
+ const lastFrame = useWatchedValue(group, GetLastFrame);
38
+ const seekFrame = useCallback((animationGroup, frame) => {
39
+ SeekAnimationFrame(engine, animationGroup, frame);
40
+ }, [engine]);
41
+ return (jsxs(Fragment, { children: [jsx(ButtonLine, { uniqueId: "Start/Stop", label: isPlaying ? "Pause" : "Play", onClick: () => {
42
+ if (group.isPlaying) {
43
+ pauseAnimation(group);
44
+ }
45
+ else {
46
+ playAnimation(group);
47
+ }
48
+ watcher.refresh();
49
+ } }), jsx(ButtonLine, { label: "Stop", onClick: () => {
50
+ stopAnimation(group);
51
+ watcher.refresh();
52
+ } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Speed Ratio", min: 0, max: 10, step: 0.1, target: group, propertyKey: "speedRatio" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Loop", target: group, propertyKey: "loopAnimation" }), jsx(DerivedProperty, { component: SyncedSliderPropertyLine, label: "Current Frame", target: group, getValue: GetCurrentFrame, setValue: seekFrame, min: 0, max: lastFrame, step: lastFrame > 0 ? lastFrame / 1000 : 1, disabled: lastFrame <= 0 }), jsx(DerivedProperty, { component: SyncedSliderPropertyLine, label: "Weight", min: 0, max: 1, step: 0.01, target: group, getValue: GetWeight, setValue: setAnimationWeight, propertyPath: "weight", getPropertyOwner: GetGroupPropertyOwner, propertyKey: "weight" })] }));
53
+ };
54
+ /**
55
+ * Renders public clip information in Lite frame units.
56
+ * @param props The animation group.
57
+ * @returns Read-only clip property lines.
58
+ */
59
+ const AnimationGroupInfoProperties = (props) => {
60
+ const { group } = props;
61
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: TextPropertyLine, label: "Name", target: group, propertyKey: "name" }), jsx(ComputedProperty, { component: StringifiedPropertyLine, label: "Animation Count", target: group, getValue: GetAnimationCount }), jsx(BoundProperty, { component: StringifiedPropertyLine, label: "Duration (seconds)", target: group, propertyKey: "duration", precision: 2 }), jsx(ComputedProperty, { component: StringifiedPropertyLine, label: "Frame Rate", target: group, getValue: GetAnimationFrameRate }), jsx(ComputedProperty, { component: StringifiedPropertyLine, label: "End Frame", target: group, getValue: GetLastFrame, precision: 2 })] }));
62
+ };
63
+ /**
64
+ * Renders a public animation target description and optional runtime link.
65
+ * @param props The target description and selection service.
66
+ * @returns The target's general property lines.
67
+ */
68
+ const TargetedAnimationProperties = (props) => {
69
+ const { animation, selectionService } = props;
70
+ const target = useWatchedValue(animation, GetAnimationTarget);
71
+ const displayName = useWatchedValue(animation, GetTargetedAnimationDisplayName);
72
+ return (jsxs(Fragment, { children: [target ? (jsx(PropertyLine, { label: "Target", description: "The runtime object affected by this animation, when exposed by Babylon Lite.", children: jsx(Link, { value: displayName, onLink: () => (selectionService.selectedEntity = target) }) })) : (jsx(TextPropertyLine, { label: "Target", value: displayName })), jsx(BoundProperty, { component: TextPropertyLine, label: "Path", target: animation, propertyKey: "path" }), jsx(BoundProperty, { component: TextPropertyLine, label: "Target Name", target: animation, propertyKey: "targetName", defaultValue: null }), jsx(BoundProperty, { component: StringifiedPropertyLine, label: "Node Index", target: animation, propertyKey: "nodeIndex", defaultValue: null })] }));
73
+ };
74
+ const AnimationGroupLink = (props) => {
75
+ const { group, selectionService } = props;
76
+ const name = useWatchedValue(group, GetGroupName);
77
+ return (jsx(PropertyLine, { label: "Animation Group", uniqueId: `AnimationGroup-${GetEntityId(group)}`, children: jsx(Link, { value: name, onLink: () => (selectionService.selectedEntity = group) }) }));
78
+ };
79
+ /**
80
+ * Lists an entity's reachable animation groups.
81
+ * @param props The engine, entity, and selection service.
82
+ * @returns Group links or an explanation when no runtime targets match.
83
+ */
84
+ const EntityAnimationProperties = (props) => {
85
+ const { engine, entity, selectionService } = props;
86
+ const getGroupIdentities = useCallback(() => GetEntityAnimationGroups(engine, entity)
87
+ .map((group) => GetEntityId(group))
88
+ .join(","), [engine, entity]);
89
+ useWatchedValue(entity, getGroupIdentities);
90
+ const groups = GetEntityAnimationGroups(engine, entity);
91
+ return groups.length ? (jsx(Fragment, { children: groups.map((group) => (jsx(AnimationGroupLink, { group: group, selectionService: selectionService }, GetEntityId(group)))) })) : (jsx(MessageBar, { intent: "info", title: "No Animations", message: "No scene animation groups expose a runtime target for this entity." }));
92
+ };
93
+
94
+ export { AnimationGroupControlProperties, AnimationGroupInfoProperties, EntityAnimationProperties, TargetedAnimationProperties };
95
+ //# sourceMappingURL=animationProperties-BKVw6_ls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animationProperties-BKVw6_ls.js","sources":["../../../../../../../../../../dev/inspector-v2/src/lite/components/properties/animationProperties.tsx"],"sourcesContent":["import { pauseAnimation, playAnimation, setAnimationWeight, stopAnimation, type AnimationGroup, type EngineContext, type TargetedAnimation } from \"@babylonjs/lite\";\r\nimport { type FunctionComponent, useCallback } from \"react\";\r\n\r\nimport { ButtonLine } from \"shared-ui-components/fluent/hoc/buttonLine\";\r\nimport { PropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/propertyLine\";\r\nimport { StringifiedPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/stringifiedPropertyLine\";\r\nimport { SwitchPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/switchPropertyLine\";\r\nimport { SyncedSliderPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/syncedSliderPropertyLine\";\r\nimport { TextPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/textPropertyLine\";\r\nimport { Link } from \"shared-ui-components/fluent/primitives/link\";\r\nimport { MessageBar } from \"shared-ui-components/fluent/primitives/messageBar\";\r\n\r\nimport { GetEntityId } from \"../../../components/explorer/explorerModel\";\r\nimport { BoundProperty, ComputedProperty, DerivedProperty } from \"../../../components/properties/boundProperty\";\r\nimport { useWatchedValue, useWatcher } from \"../../../contexts/watcherContext\";\r\nimport { type ISelectionService } from \"../../../services/selectionService\";\r\nimport { GetAnimationFrameRate, GetEntityAnimationGroups, GetTargetedAnimationDisplayName, SeekAnimationFrame } from \"../../animationUtils\";\r\n\r\nconst GetIsPlaying = (group: AnimationGroup) => group.isPlaying;\r\nconst GetCurrentFrame = (group: AnimationGroup) => group.currentTime * GetAnimationFrameRate(group);\r\nconst GetLastFrame = (group: AnimationGroup) => group.duration * GetAnimationFrameRate(group);\r\nconst GetAnimationCount = (group: AnimationGroup) => group.targetedAnimations.length;\r\nconst GetWeight = (group: AnimationGroup) => group.weight;\r\nconst GetGroupName = (group: AnimationGroup) => group.name || \"Unnamed Animation Group\";\r\nconst GetAnimationTarget = (animation: TargetedAnimation) => animation.target;\r\nconst GetGroupPropertyOwner = (group: AnimationGroup) => group;\r\n\r\ntype AnimationGroupProps = {\r\n /** The engine used to apply GPU-backed poses when seeking. */\r\n engine: EngineContext;\r\n /** The animation group being inspected. */\r\n group: AnimationGroup;\r\n};\r\n\r\ntype TargetedAnimationProps = {\r\n /** The public target description being inspected. */\r\n animation: TargetedAnimation;\r\n /** The selection service used to navigate to runtime targets. */\r\n selectionService: ISelectionService;\r\n};\r\n\r\ntype EntityAnimationProps = {\r\n /** The engine whose registered scene groups are searched. */\r\n engine: EngineContext;\r\n /** The runtime entity whose animation relationships are displayed. */\r\n entity: object;\r\n /** The selection service used to navigate to groups. */\r\n selectionService: ISelectionService;\r\n};\r\n\r\n/**\r\n * Renders Lite animation playback and frame controls.\r\n * @param props The engine and animation group.\r\n * @returns The group's control property lines.\r\n */\r\nexport const AnimationGroupControlProperties: FunctionComponent<AnimationGroupProps> = (props) => {\r\n const { engine, group } = props;\r\n const watcher = useWatcher();\r\n const isPlaying = useWatchedValue(group, GetIsPlaying);\r\n const lastFrame = useWatchedValue(group, GetLastFrame);\r\n const seekFrame = useCallback(\r\n (animationGroup: AnimationGroup, frame: number) => {\r\n SeekAnimationFrame(engine, animationGroup, frame);\r\n },\r\n [engine]\r\n );\r\n\r\n return (\r\n <>\r\n <ButtonLine\r\n uniqueId=\"Start/Stop\"\r\n label={isPlaying ? \"Pause\" : \"Play\"}\r\n onClick={() => {\r\n if (group.isPlaying) {\r\n pauseAnimation(group);\r\n } else {\r\n playAnimation(group);\r\n }\r\n watcher.refresh();\r\n }}\r\n />\r\n <ButtonLine\r\n label=\"Stop\"\r\n onClick={() => {\r\n stopAnimation(group);\r\n watcher.refresh();\r\n }}\r\n />\r\n <BoundProperty component={SyncedSliderPropertyLine} label=\"Speed Ratio\" min={0} max={10} step={0.1} target={group} propertyKey=\"speedRatio\" />\r\n <BoundProperty component={SwitchPropertyLine} label=\"Loop\" target={group} propertyKey=\"loopAnimation\" />\r\n <DerivedProperty\r\n component={SyncedSliderPropertyLine}\r\n label=\"Current Frame\"\r\n target={group}\r\n getValue={GetCurrentFrame}\r\n setValue={seekFrame}\r\n min={0}\r\n max={lastFrame}\r\n step={lastFrame > 0 ? lastFrame / 1000 : 1}\r\n disabled={lastFrame <= 0}\r\n />\r\n <DerivedProperty\r\n component={SyncedSliderPropertyLine}\r\n label=\"Weight\"\r\n min={0}\r\n max={1}\r\n step={0.01}\r\n target={group}\r\n getValue={GetWeight}\r\n setValue={setAnimationWeight}\r\n propertyPath=\"weight\"\r\n getPropertyOwner={GetGroupPropertyOwner}\r\n propertyKey=\"weight\"\r\n />\r\n </>\r\n );\r\n};\r\n\r\n/**\r\n * Renders public clip information in Lite frame units.\r\n * @param props The animation group.\r\n * @returns Read-only clip property lines.\r\n */\r\nexport const AnimationGroupInfoProperties: FunctionComponent<Pick<AnimationGroupProps, \"group\">> = (props) => {\r\n const { group } = props;\r\n\r\n return (\r\n <>\r\n <BoundProperty component={TextPropertyLine} label=\"Name\" target={group} propertyKey=\"name\" />\r\n <ComputedProperty component={StringifiedPropertyLine} label=\"Animation Count\" target={group} getValue={GetAnimationCount} />\r\n <BoundProperty component={StringifiedPropertyLine} label=\"Duration (seconds)\" target={group} propertyKey=\"duration\" precision={2} />\r\n <ComputedProperty component={StringifiedPropertyLine} label=\"Frame Rate\" target={group} getValue={GetAnimationFrameRate} />\r\n <ComputedProperty component={StringifiedPropertyLine} label=\"End Frame\" target={group} getValue={GetLastFrame} precision={2} />\r\n </>\r\n );\r\n};\r\n\r\n/**\r\n * Renders a public animation target description and optional runtime link.\r\n * @param props The target description and selection service.\r\n * @returns The target's general property lines.\r\n */\r\nexport const TargetedAnimationProperties: FunctionComponent<TargetedAnimationProps> = (props) => {\r\n const { animation, selectionService } = props;\r\n const target = useWatchedValue(animation, GetAnimationTarget);\r\n const displayName = useWatchedValue(animation, GetTargetedAnimationDisplayName);\r\n\r\n return (\r\n <>\r\n {target ? (\r\n <PropertyLine label=\"Target\" description=\"The runtime object affected by this animation, when exposed by Babylon Lite.\">\r\n <Link value={displayName} onLink={() => (selectionService.selectedEntity = target)} />\r\n </PropertyLine>\r\n ) : (\r\n <TextPropertyLine label=\"Target\" value={displayName} />\r\n )}\r\n <BoundProperty component={TextPropertyLine} label=\"Path\" target={animation} propertyKey=\"path\" />\r\n <BoundProperty component={TextPropertyLine} label=\"Target Name\" target={animation} propertyKey=\"targetName\" defaultValue={null} />\r\n <BoundProperty component={StringifiedPropertyLine} label=\"Node Index\" target={animation} propertyKey=\"nodeIndex\" defaultValue={null} />\r\n </>\r\n );\r\n};\r\n\r\nconst AnimationGroupLink: FunctionComponent<Pick<AnimationGroupProps, \"group\"> & Pick<EntityAnimationProps, \"selectionService\">> = (props) => {\r\n const { group, selectionService } = props;\r\n const name = useWatchedValue(group, GetGroupName);\r\n return (\r\n <PropertyLine label=\"Animation Group\" uniqueId={`AnimationGroup-${GetEntityId(group)}`}>\r\n <Link value={name} onLink={() => (selectionService.selectedEntity = group)} />\r\n </PropertyLine>\r\n );\r\n};\r\n\r\n/**\r\n * Lists an entity's reachable animation groups.\r\n * @param props The engine, entity, and selection service.\r\n * @returns Group links or an explanation when no runtime targets match.\r\n */\r\nexport const EntityAnimationProperties: FunctionComponent<EntityAnimationProps> = (props) => {\r\n const { engine, entity, selectionService } = props;\r\n const getGroupIdentities = useCallback(\r\n () =>\r\n GetEntityAnimationGroups(engine, entity)\r\n .map((group) => GetEntityId(group))\r\n .join(\",\"),\r\n [engine, entity]\r\n );\r\n useWatchedValue(entity, getGroupIdentities);\r\n const groups = GetEntityAnimationGroups(engine, entity);\r\n\r\n return groups.length ? (\r\n <>\r\n {groups.map((group) => (\r\n <AnimationGroupLink key={GetEntityId(group)} group={group} selectionService={selectionService} />\r\n ))}\r\n </>\r\n ) : (\r\n <MessageBar intent=\"info\" title=\"No Animations\" message=\"No scene animation groups expose a runtime target for this entity.\" />\r\n );\r\n};\r\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,MAAM,YAAY,GAAG,CAAC,KAAqB,KAAK,KAAK,CAAC,SAAS;AAC/D,MAAM,eAAe,GAAG,CAAC,KAAqB,KAAK,KAAK,CAAC,WAAW,GAAG,qBAAqB,CAAC,KAAK,CAAC;AACnG,MAAM,YAAY,GAAG,CAAC,KAAqB,KAAK,KAAK,CAAC,QAAQ,GAAG,qBAAqB,CAAC,KAAK,CAAC;AAC7F,MAAM,iBAAiB,GAAG,CAAC,KAAqB,KAAK,KAAK,CAAC,kBAAkB,CAAC,MAAM;AACpF,MAAM,SAAS,GAAG,CAAC,KAAqB,KAAK,KAAK,CAAC,MAAM;AACzD,MAAM,YAAY,GAAG,CAAC,KAAqB,KAAK,KAAK,CAAC,IAAI,IAAI,yBAAyB;AACvF,MAAM,kBAAkB,GAAG,CAAC,SAA4B,KAAK,SAAS,CAAC,MAAM;AAC7E,MAAM,qBAAqB,GAAG,CAAC,KAAqB,KAAK,KAAK;AAyB9D;;;;AAIG;AACI,MAAM,+BAA+B,GAA2C,CAAC,KAAK,KAAI;AAC7F,IAAA,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK;AAC/B,IAAA,MAAM,OAAO,GAAG,UAAU,EAAE;IAC5B,MAAM,SAAS,GAAG,eAAe,CAAC,KAAK,EAAE,YAAY,CAAC;IACtD,MAAM,SAAS,GAAG,eAAe,CAAC,KAAK,EAAE,YAAY,CAAC;IACtD,MAAM,SAAS,GAAG,WAAW,CACzB,CAAC,cAA8B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,KAAK,CAAC,CAAsD,CACpG,CAAC,EAAA,CACH,KAEHA,GAAA,CAAC,UAAU,EAAA,EAAC,MAAM,EAAC,MAAM,EAAC,KAAK,EAAC,eAAe,EAAC,OAAO,EAAC,oEAAoE,EAAA,CAAG,CAClI;AACL;;"}
@@ -0,0 +1,47 @@
1
+ import { type AnimationGroup, type EngineContext, type TargetedAnimation } from "@babylonjs/lite";
2
+ /**
3
+ * Gets the distinct animation groups exposed by the inspected engine's registered scenes.
4
+ * @param engine The engine to inspect.
5
+ * @returns The animation groups in scene order, without duplicates.
6
+ */
7
+ export declare function GetSceneAnimationGroups(engine: EngineContext): readonly AnimationGroup[];
8
+ /**
9
+ * Tests whether an entity is an animation group in a registered scene.
10
+ * @param engine The inspected engine.
11
+ * @param entity The entity to test.
12
+ * @returns Whether the entity is a reachable animation group.
13
+ */
14
+ export declare function IsAnimationGroup(engine: EngineContext, entity: unknown): entity is AnimationGroup;
15
+ /**
16
+ * Tests whether an entity is a public target description in a registered scene's animation group.
17
+ * @param engine The inspected engine.
18
+ * @param entity The entity to test.
19
+ * @returns Whether the entity is a reachable targeted animation.
20
+ */
21
+ export declare function IsTargetedAnimation(engine: EngineContext, entity: unknown): entity is TargetedAnimation;
22
+ /**
23
+ * Gets animation groups that directly animate an entity or one of a scene node's transform values.
24
+ * @param engine The inspected engine.
25
+ * @param entity The entity whose animations should be listed.
26
+ * @returns Reachable groups with matching public runtime targets.
27
+ */
28
+ export declare function GetEntityAnimationGroups(engine: EngineContext, entity: object): readonly AnimationGroup[];
29
+ /**
30
+ * Gets a display name using the live runtime name when available, without requiring a runtime target.
31
+ * @param animation The targeted animation.
32
+ * @returns The target name or node identity and its animated path.
33
+ */
34
+ export declare function GetTargetedAnimationDisplayName(animation: TargetedAnimation): string;
35
+ /**
36
+ * Gets the frame rate used by Lite's goToFrame API.
37
+ * @param group The animation group.
38
+ * @returns The authored frame rate, or Lite's default of 60 frames per second.
39
+ */
40
+ export declare function GetAnimationFrameRate(group: AnimationGroup): number;
41
+ /**
42
+ * Seeks through Lite's public API while preserving whether playback was active.
43
+ * @param engine The engine used to apply GPU-backed animation poses.
44
+ * @param group The animation group to seek.
45
+ * @param frame The requested frame.
46
+ */
47
+ export declare function SeekAnimationFrame(engine: EngineContext, group: AnimationGroup, frame: number): void;
@@ -0,0 +1,48 @@
1
+ import { type AnimationGroup, type EngineContext, type TargetedAnimation } from "@babylonjs/lite";
2
+ import { type FunctionComponent } from "react";
3
+ import { type ISelectionService } from "../../../services/selectionService";
4
+ type AnimationGroupProps = {
5
+ /** The engine used to apply GPU-backed poses when seeking. */
6
+ engine: EngineContext;
7
+ /** The animation group being inspected. */
8
+ group: AnimationGroup;
9
+ };
10
+ type TargetedAnimationProps = {
11
+ /** The public target description being inspected. */
12
+ animation: TargetedAnimation;
13
+ /** The selection service used to navigate to runtime targets. */
14
+ selectionService: ISelectionService;
15
+ };
16
+ type EntityAnimationProps = {
17
+ /** The engine whose registered scene groups are searched. */
18
+ engine: EngineContext;
19
+ /** The runtime entity whose animation relationships are displayed. */
20
+ entity: object;
21
+ /** The selection service used to navigate to groups. */
22
+ selectionService: ISelectionService;
23
+ };
24
+ /**
25
+ * Renders Lite animation playback and frame controls.
26
+ * @param props The engine and animation group.
27
+ * @returns The group's control property lines.
28
+ */
29
+ export declare const AnimationGroupControlProperties: FunctionComponent<AnimationGroupProps>;
30
+ /**
31
+ * Renders public clip information in Lite frame units.
32
+ * @param props The animation group.
33
+ * @returns Read-only clip property lines.
34
+ */
35
+ export declare const AnimationGroupInfoProperties: FunctionComponent<Pick<AnimationGroupProps, "group">>;
36
+ /**
37
+ * Renders a public animation target description and optional runtime link.
38
+ * @param props The target description and selection service.
39
+ * @returns The target's general property lines.
40
+ */
41
+ export declare const TargetedAnimationProperties: FunctionComponent<TargetedAnimationProps>;
42
+ /**
43
+ * Lists an entity's reachable animation groups.
44
+ * @param props The engine, entity, and selection service.
45
+ * @returns Group links or an explanation when no runtime targets match.
46
+ */
47
+ export declare const EntityAnimationProperties: FunctionComponent<EntityAnimationProps>;
48
+ export {};
@@ -0,0 +1,99 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Body1, makeStyles, tokens } from '@fluentui/react-components';
3
+ import { useMemo } from 'react';
4
+ import { R as ResourceSelector, P as PropertyLine } from './index-Cy8gzpYG.js';
5
+
6
+ const useStyles = makeStyles({
7
+ content: {
8
+ display: "flex",
9
+ flexDirection: "row",
10
+ alignItems: "center",
11
+ gap: tokens.spacingHorizontalS,
12
+ minWidth: 0,
13
+ },
14
+ });
15
+ /**
16
+ * Displays a runtime-neutral, direction-aware material texture binding.
17
+ * @param props The binding props. Missing assign, clear, or navigation callbacks remove those actions.
18
+ * @returns A texture binding property line.
19
+ */
20
+ const MaterialTextureBindingPropertyLine = (props) => {
21
+ const classes = useStyles();
22
+ const candidates = useMemo(() => props.candidates.filter((texture) => props.acceptedKinds.includes(props.getKind(texture)) && (props.isCandidateAccepted?.(texture) ?? true)), [props.acceptedKinds, props.candidates, props.getKind, props.isCandidateAccepted]);
23
+ const getId = (texture) => props.getId?.(texture) ?? String(props.candidates.indexOf(texture));
24
+ const content = (jsxs("div", { className: classes.content, children: [jsx(ResourceSelector, { value: props.value, getEntities: () => candidates, getName: props.getDisplayName, getId: getId, onSelect: props.write?.assign ? (texture) => texture && props.write?.assign?.(texture) : undefined, onClear: props.write?.clear, onLink: props.navigate, disabled: props.pending, ariaLabel: props.label }), props.pending ? jsx(Body1, { role: "status", children: "Applying\u2026" }) : undefined] }));
25
+ return (jsx("div", { role: props.error ? "alert" : undefined, "aria-label": props.error ? `${props.label}: ${props.error}` : undefined, "aria-busy": props.pending, children: props.expandedContent ? (jsx(PropertyLine, { label: props.label, uniqueId: props.id, description: props.error, expandedContent: props.expandedContent, children: content })) : (jsx(PropertyLine, { label: props.label, uniqueId: props.id, description: props.error, children: content })) }));
26
+ };
27
+
28
+ function GetTextureDisplayName(record) {
29
+ if (!record) {
30
+ return "Texture";
31
+ }
32
+ if (record.metadata.name) {
33
+ return record.metadata.name;
34
+ }
35
+ const kind = record.metadata.kind === "cube" ? "Cube" : record.metadata.kind === "3d" ? "3D" : record.metadata.kind === "2d-array" ? "2D Array" : "2D";
36
+ return `${kind} Texture ${record.ordinal}`;
37
+ }
38
+ function AcceptsSampleType(sampleType, category) {
39
+ if (sampleType === "depth") {
40
+ return category !== "float";
41
+ }
42
+ return category !== "depth" && (sampleType === undefined || sampleType === "float" || sampleType === "unfilterable-float");
43
+ }
44
+ /**
45
+ * Connects one family-owned Lite texture slot to the runtime-neutral directional control.
46
+ * @param props The slot getter result, supported directions, and Inspector-owned services.
47
+ * @returns The navigable texture binding row.
48
+ */
49
+ const DirectTextureBinding = (props) => {
50
+ const { record, resourceIndexService, selectionService, operations, commit, id, label, value, read, acceptedKinds, sampleCategory = "float", canClear = true, invalidate, apply, } = props;
51
+ const currentRecord = value ? resourceIndexService.getTextureRecord(value) : undefined;
52
+ const unsupported = value && (!currentRecord || !acceptedKinds.includes(currentRecord.metadata.kind) || !AcceptsSampleType(currentRecord.metadata.sampleType, sampleCategory));
53
+ const candidates = [];
54
+ const seen = new Set();
55
+ for (const scene of record.scenes) {
56
+ for (const texture of resourceIndexService.getSceneSnapshot(scene).textures) {
57
+ if (!seen.has(texture.entity)) {
58
+ seen.add(texture.entity);
59
+ candidates.push(texture.entity);
60
+ }
61
+ }
62
+ }
63
+ const mutate = (texture) => {
64
+ commit({
65
+ id,
66
+ oldValue: value ?? null,
67
+ newValue: texture,
68
+ apply: () => {
69
+ if ((read() ?? null) !== (value ?? null)) {
70
+ throw new Error(`Texture binding "${id}" is stale.`);
71
+ }
72
+ const metadata = texture && resourceIndexService.getTextureRecord(texture)?.metadata;
73
+ if (texture && (!metadata || !acceptedKinds.includes(metadata.kind) || !AcceptsSampleType(metadata.sampleType, sampleCategory))) {
74
+ throw new TypeError(`Texture binding "${id}" does not accept this texture.`);
75
+ }
76
+ return apply(texture);
77
+ },
78
+ invalidate,
79
+ });
80
+ };
81
+ return (jsx(MaterialTextureBindingPropertyLine, { id: id, label: label, value: unsupported ? null : (value ?? null), candidates: candidates, getId: (texture) => String(resourceIndexService.getTextureRecord(texture)?.ordinal ?? candidates.indexOf(texture)), getDisplayName: (texture) => GetTextureDisplayName(resourceIndexService.getTextureRecord(texture)), getKind: (texture) => resourceIndexService.getTextureRecord(texture)?.metadata.kind ?? "unknown", acceptedKinds: acceptedKinds, isCandidateAccepted: (texture) => {
82
+ const metadata = resourceIndexService.getTextureRecord(texture)?.metadata;
83
+ return !!metadata && AcceptsSampleType(metadata.sampleType, sampleCategory);
84
+ }, write: unsupported
85
+ ? undefined
86
+ : {
87
+ assign: (texture) => mutate(texture),
88
+ clear: value && canClear ? () => mutate(null) : undefined,
89
+ }, navigate: value && !unsupported
90
+ ? (texture) => {
91
+ if (!resourceIndexService.isDisposed && read() === texture && resourceIndexService.getTextureRecord(texture)) {
92
+ selectionService.selectedEntity = texture;
93
+ }
94
+ }
95
+ : undefined, pending: operations[id]?.pending, error: operations[id]?.error ?? (unsupported ? `${label} contains an unsupported texture value.` : undefined) }));
96
+ };
97
+
98
+ export { DirectTextureBinding as D };
99
+ //# sourceMappingURL=directTextureBinding-C5MB2OV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directTextureBinding-C5MB2OV2.js","sources":["../../../../../../../../../../dev/sharedUiComponents/src/fluent/hoc/propertyLines/materialTextureBindingPropertyLine.tsx","../../../../../../../../../../dev/inspector-v2/src/lite/services/panes/properties/materials/directTextureBinding.tsx"],"sourcesContent":["import { Body1, makeStyles, tokens } from \"@fluentui/react-components\";\nimport { type ReactElement, useMemo } from \"react\";\n\nimport { ResourceSelector } from \"../../primitives/resourceSelector\";\nimport { PropertyLine } from \"./propertyLine\";\n\nconst useStyles = makeStyles({\n content: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: tokens.spacingHorizontalS,\n minWidth: 0,\n },\n});\n\n/** Directional mutations supported by a texture binding. */\nexport type TextureBindingWriteCapabilities<TextureT> = Readonly<{\n assign?: (texture: TextureT) => void;\n clear?: () => void;\n}>;\n\n/** Runtime-neutral presentation and mutation props for a material texture binding. */\nexport type MaterialTextureBindingProps<TextureT> = Readonly<{\n id: string;\n label: string;\n value: TextureT | null;\n candidates: readonly TextureT[];\n getDisplayName: (texture: TextureT) => string;\n getKind: (texture: TextureT) => string;\n acceptedKinds: readonly string[];\n isCandidateAccepted?: (texture: TextureT) => boolean;\n getId?: (texture: TextureT) => string;\n write?: TextureBindingWriteCapabilities<TextureT>;\n navigate?: (texture: TextureT) => void;\n pending?: boolean;\n error?: string;\n expandedContent?: ReactElement;\n}>;\n\n/**\n * Displays a runtime-neutral, direction-aware material texture binding.\n * @param props The binding props. Missing assign, clear, or navigation callbacks remove those actions.\n * @returns A texture binding property line.\n */\nexport const MaterialTextureBindingPropertyLine = <TextureT,>(props: MaterialTextureBindingProps<TextureT>): JSX.Element => {\n const classes = useStyles();\n const candidates = useMemo(\n () => props.candidates.filter((texture) => props.acceptedKinds.includes(props.getKind(texture)) && (props.isCandidateAccepted?.(texture) ?? true)),\n [props.acceptedKinds, props.candidates, props.getKind, props.isCandidateAccepted]\n );\n const getId = (texture: TextureT) => props.getId?.(texture) ?? String(props.candidates.indexOf(texture));\n\n const content = (\n <div className={classes.content}>\n <ResourceSelector\n value={props.value}\n getEntities={() => candidates}\n getName={props.getDisplayName}\n getId={getId}\n onSelect={props.write?.assign ? (texture) => texture && props.write?.assign?.(texture) : undefined}\n onClear={props.write?.clear}\n onLink={props.navigate}\n disabled={props.pending}\n ariaLabel={props.label}\n />\n {props.pending ? <Body1 role=\"status\">Applying…</Body1> : undefined}\n </div>\n );\n\n return (\n <div role={props.error ? \"alert\" : undefined} aria-label={props.error ? `${props.label}: ${props.error}` : undefined} aria-busy={props.pending}>\n {props.expandedContent ? (\n <PropertyLine label={props.label} uniqueId={props.id} description={props.error} expandedContent={props.expandedContent}>\n {content}\n </PropertyLine>\n ) : (\n <PropertyLine label={props.label} uniqueId={props.id} description={props.error}>\n {content}\n </PropertyLine>\n )}\n </div>\n );\n};\n","import { type FunctionComponent } from \"react\";\n\nimport { MaterialTextureBindingPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/materialTextureBindingPropertyLine\";\n\nimport { type ISelectionService } from \"../../../../../services/selectionService\";\nimport { type ISceneResourceIndexService } from \"../../scene/sceneResourceIndexService\";\nimport { type IMaterialResourceRecord, type ITextureResourceRecord } from \"../../scene/sceneResources\";\nimport { type useDirectMaterialOperations } from \"./useDirectMaterialOperations\";\n\ntype DirectOperations = ReturnType<typeof useDirectMaterialOperations>;\n\nexport type DirectTextureBindingProps = Readonly<{\n record: IMaterialResourceRecord;\n resourceIndexService: ISceneResourceIndexService;\n selectionService: ISelectionService;\n operations: DirectOperations[\"operations\"];\n commit: DirectOperations[\"commit\"];\n id: string;\n label: string;\n value: object | null | undefined;\n read: () => object | null | undefined;\n acceptedKinds: readonly string[];\n sampleCategory?: \"float\" | \"depth\" | \"float-or-depth\";\n canClear?: boolean;\n invalidate: \"rebuild\" | \"owned\";\n apply: (texture: object | null) => void | Promise<void>;\n}>;\n\nfunction GetTextureDisplayName(record: ITextureResourceRecord | undefined): string {\n if (!record) {\n return \"Texture\";\n }\n if (record.metadata.name) {\n return record.metadata.name;\n }\n const kind = record.metadata.kind === \"cube\" ? \"Cube\" : record.metadata.kind === \"3d\" ? \"3D\" : record.metadata.kind === \"2d-array\" ? \"2D Array\" : \"2D\";\n return `${kind} Texture ${record.ordinal}`;\n}\n\nfunction AcceptsSampleType(sampleType: string | undefined, category: \"float\" | \"depth\" | \"float-or-depth\"): boolean {\n if (sampleType === \"depth\") {\n return category !== \"float\";\n }\n return category !== \"depth\" && (sampleType === undefined || sampleType === \"float\" || sampleType === \"unfilterable-float\");\n}\n\n/**\n * Connects one family-owned Lite texture slot to the runtime-neutral directional control.\n * @param props The slot getter result, supported directions, and Inspector-owned services.\n * @returns The navigable texture binding row.\n */\nexport const DirectTextureBinding: FunctionComponent<DirectTextureBindingProps> = (props) => {\n const {\n record,\n resourceIndexService,\n selectionService,\n operations,\n commit,\n id,\n label,\n value,\n read,\n acceptedKinds,\n sampleCategory = \"float\",\n canClear = true,\n invalidate,\n apply,\n } = props;\n const currentRecord = value ? resourceIndexService.getTextureRecord(value) : undefined;\n const unsupported = value && (!currentRecord || !acceptedKinds.includes(currentRecord.metadata.kind) || !AcceptsSampleType(currentRecord.metadata.sampleType, sampleCategory));\n const candidates: object[] = [];\n const seen = new Set<object>();\n for (const scene of record.scenes) {\n for (const texture of resourceIndexService.getSceneSnapshot(scene).textures) {\n if (!seen.has(texture.entity)) {\n seen.add(texture.entity);\n candidates.push(texture.entity);\n }\n }\n }\n const mutate = (texture: object | null) => {\n commit({\n id,\n oldValue: value ?? null,\n newValue: texture,\n apply: (): void | Promise<void> => {\n if ((read() ?? null) !== (value ?? null)) {\n throw new Error(`Texture binding \"${id}\" is stale.`);\n }\n const metadata = texture && resourceIndexService.getTextureRecord(texture)?.metadata;\n if (texture && (!metadata || !acceptedKinds.includes(metadata.kind) || !AcceptsSampleType(metadata.sampleType, sampleCategory))) {\n throw new TypeError(`Texture binding \"${id}\" does not accept this texture.`);\n }\n return apply(texture);\n },\n invalidate,\n });\n };\n return (\n <MaterialTextureBindingPropertyLine\n id={id}\n label={label}\n value={unsupported ? null : (value ?? null)}\n candidates={candidates}\n getId={(texture) => String(resourceIndexService.getTextureRecord(texture)?.ordinal ?? candidates.indexOf(texture))}\n getDisplayName={(texture) => GetTextureDisplayName(resourceIndexService.getTextureRecord(texture))}\n getKind={(texture) => resourceIndexService.getTextureRecord(texture)?.metadata.kind ?? \"unknown\"}\n acceptedKinds={acceptedKinds}\n isCandidateAccepted={(texture) => {\n const metadata = resourceIndexService.getTextureRecord(texture)?.metadata;\n return !!metadata && AcceptsSampleType(metadata.sampleType, sampleCategory);\n }}\n write={\n unsupported\n ? undefined\n : {\n assign: (texture) => mutate(texture),\n clear: value && canClear ? () => mutate(null) : undefined,\n }\n }\n navigate={\n value && !unsupported\n ? (texture) => {\n if (!resourceIndexService.isDisposed && read() === texture && resourceIndexService.getTextureRecord(texture)) {\n selectionService.selectedEntity = texture;\n }\n }\n : undefined\n }\n pending={operations[id]?.pending}\n error={operations[id]?.error ?? (unsupported ? `${label} contains an unsupported texture value.` : undefined)}\n />\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;AAMA,MAAM,SAAS,GAAG,UAAU,CAAC;AACzB,IAAA,OAAO,EAAE;AACL,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,aAAa,EAAE,KAAK;AACpB,QAAA,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,MAAM,CAAC,kBAAkB;AAC9B,QAAA,QAAQ,EAAE,CAAC;AACd,KAAA;AACJ,CAAA,CAAC;AA0BF;;;;AAIG;AACI,MAAM,kCAAkC,GAAG,CAAY,KAA4C,KAAiB;AACvH,IAAA,MAAM,OAAO,GAAG,SAAS,EAAE;AAC3B,IAAA,MAAM,UAAU,GAAG,OAAO,CACtB,MAAM,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,OAAO,KAAK,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK,CAAC,mBAAmB,GAAG,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,EAClJ,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,mBAAmB,CAAC,CACpF;IACD,MAAM,KAAK,GAAG,CAAC,OAAiB,KAAK,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAExG,MAAM,OAAO,IACTA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,OAAO,CAAC,OAAO,EAAA,QAAA,EAAA,CAC3BC,GA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AAC,OAAO,KAAI;AACR,gBAAA,IAAI,CAAC,oBAAoB,CAAC,UAAU,IAAI,IAAI,EAAE,KAAK,OAAO,IAAI,oBAAoB,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE;AAC1G,oBAAA,gBAAgB,CAAC,cAAc,GAAG,OAAO;gBAC7C;YACJ;AACF,cAAE,SAAS,EAEnB,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,OAAO,EAChC,KAAK,EAAE,UAAU,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,WAAW,GAAG,CAAA,EAAG,KAAK,CAAA,uCAAA,CAAyC,GAAG,SAAS,CAAC,EAAA,CAC/G;AAEV;;"}
@@ -0,0 +1,107 @@
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import { Body1 } from '@fluentui/react-components';
3
+ import { useRef, useCallback, useState, useEffect } from 'react';
4
+ import { b as useWatchedValue, C as ComputedProperty, T as TextPropertyLine, D as DerivedProperty, s as Vector4PropertyLine, t as Vector3PropertyLine, V as Vector2PropertyLine, N as NumberInputPropertyLine, P as PropertyLine } from './index-Cy8gzpYG.js';
5
+
6
+ const MatrixField = (props) => {
7
+ const { label, uniqueId, description, disabled, value, onChange } = props;
8
+ const [draft, setDraft] = useState(value);
9
+ useEffect(() => setDraft(value), [value]);
10
+ return (jsx(PropertyLine, { label: label, uniqueId: uniqueId, description: description, expandedContent: jsx(Fragment, { children: draft.map((component, index) => (jsx(NumberInputPropertyLine, { label: `M${Math.floor(index / 4)}${index % 4}`, value: component, disabled: disabled, onChange: (nextValue) => {
11
+ const next = [...draft];
12
+ next[index] = nextValue;
13
+ setDraft(next);
14
+ onChange(next);
15
+ } }, index))) }), children: jsx(Body1, { children: "[4 \u00D7 4]" }) }));
16
+ };
17
+ /**
18
+ * Displays a discovered scalar, vector, or matrix input with a guarded write callback.
19
+ * @param props The runtime value reader, writer, constraints, and row status.
20
+ * @returns An editable property line or an unavailable read-only fallback.
21
+ */
22
+ const DynamicMaterialField = (props) => {
23
+ const { target, id, label, type, read, write, unavailable, pending, error, integer, min, max } = props;
24
+ const lastValue = useRef(undefined);
25
+ const getValue = useCallback(() => {
26
+ try {
27
+ const value = read();
28
+ const previous = lastValue.current;
29
+ const previousValue = previous?.value;
30
+ if (previous?.target === target &&
31
+ Array.isArray(value) &&
32
+ Array.isArray(previousValue) &&
33
+ value.length === previousValue.length &&
34
+ value.every((component, index) => Object.is(component, previousValue[index]))) {
35
+ return previousValue;
36
+ }
37
+ lastValue.current = { target, value };
38
+ return value;
39
+ }
40
+ catch {
41
+ return undefined;
42
+ }
43
+ }, [read, target]);
44
+ const value = useWatchedValue(target, getValue);
45
+ const common = { label, uniqueId: id, disabled: pending, description: error ? `Error: ${error}` : undefined };
46
+ let control;
47
+ if (value === undefined) {
48
+ control = jsx(ComputedProperty, { component: TextPropertyLine, target: target, getValue: () => `Unavailable: ${unavailable}`, label: label, uniqueId: id });
49
+ }
50
+ else {
51
+ switch (type) {
52
+ case "number":
53
+ control = (jsx(DerivedProperty, { component: NumberInputPropertyLine, target: target, getValue: getValue, setValue: (_target, next) => write(next), ...common, min: min, max: max, step: integer ? 1 : undefined, forceInt: integer }));
54
+ break;
55
+ case "vec2":
56
+ control = (jsx(DerivedProperty, { component: Vector2PropertyLine, target: target, getValue: getValue, setValue: (_target, next) => write("x" in next ? [next.x, next.y] : next), ...common }));
57
+ break;
58
+ case "vec3":
59
+ control = (jsx(DerivedProperty, { component: Vector3PropertyLine, target: target, getValue: getValue, setValue: (_target, next) => write("x" in next ? [next.x, next.y, next.z] : next), ...common }));
60
+ break;
61
+ case "vec4":
62
+ control = (jsx(DerivedProperty, { component: Vector4PropertyLine, target: target, getValue: getValue, setValue: (_target, next) => write("x" in next ? [next.x, next.y, next.z, next.w] : next), ...common }));
63
+ break;
64
+ case "mat4":
65
+ control = (jsx(DerivedProperty, { component: MatrixField, target: target, getValue: getValue, setValue: (_target, next) => write(next), ...common }));
66
+ break;
67
+ }
68
+ }
69
+ return (jsxs("div", { "aria-busy": pending, children: [control, pending ? jsx(Body1, { role: "status", children: `Applying ${label}…` }) : undefined, error ? jsx(Body1, { role: "alert", children: error }) : undefined] }));
70
+ };
71
+ /**
72
+ * Validates a discovered numeric input before sending it to the Lite setter.
73
+ * @param id The property row identifier.
74
+ * @param value The proposed scalar or tuple.
75
+ * @param length The expected tuple length, or one for a scalar.
76
+ * @param integer Whether the scalar must be an integer.
77
+ * @param min The optional scalar lower bound.
78
+ * @param max The optional scalar upper bound.
79
+ * @returns A detached scalar or array suitable for the Lite setter.
80
+ */
81
+ function ValidateDynamicValue(id, value, length, integer = false, min, max) {
82
+ if (length === 1) {
83
+ if (typeof value !== "number" || !Number.isFinite(value)) {
84
+ throw new TypeError(`Property "${id}" requires a finite number.`);
85
+ }
86
+ if (integer && !Number.isInteger(value)) {
87
+ throw new TypeError(`Property "${id}" requires an integer.`);
88
+ }
89
+ if (min !== undefined && value < min) {
90
+ throw new RangeError(`Property "${id}" must be at least ${min}.`);
91
+ }
92
+ if (max !== undefined && value > max) {
93
+ throw new RangeError(`Property "${id}" must be at most ${max}.`);
94
+ }
95
+ return value;
96
+ }
97
+ if (!Array.isArray(value) || value.length !== length) {
98
+ throw new TypeError(`Property "${id}" requires a ${length}-component tuple.`);
99
+ }
100
+ if (value.some((component) => typeof component !== "number" || !Number.isFinite(component))) {
101
+ throw new TypeError(`Property "${id}" requires finite tuple components.`);
102
+ }
103
+ return [...value];
104
+ }
105
+
106
+ export { DynamicMaterialField as D, ValidateDynamicValue as V };
107
+ //# sourceMappingURL=dynamicMaterialField-L_nQAxAA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamicMaterialField-L_nQAxAA.js","sources":["../../../../../../../../../../dev/inspector-v2/src/lite/services/panes/properties/materials/dynamicMaterialField.tsx"],"sourcesContent":["import { Body1 } from \"@fluentui/react-components\";\nimport { type FunctionComponent, useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { NumberInputPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine\";\nimport { PropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/propertyLine\";\nimport { TextPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/textPropertyLine\";\nimport { Vector2PropertyLine, Vector3PropertyLine, Vector4PropertyLine } from \"shared-ui-components/lite/fluent/hoc/propertyLines/vectorPropertyLine\";\n\nimport { ComputedProperty, DerivedProperty } from \"../../../../../components/properties/boundProperty\";\nimport { useWatchedValue } from \"../../../../../contexts/watcherContext\";\n\nexport type DynamicFieldType = \"number\" | \"vec2\" | \"vec3\" | \"vec4\" | \"mat4\";\nexport type DynamicFieldValue = number | readonly number[];\n\ntype DynamicFieldProps = Readonly<{\n target: object;\n id: string;\n label: string;\n type: DynamicFieldType;\n read: () => DynamicFieldValue | undefined;\n write: (value: DynamicFieldValue) => void;\n unavailable: string;\n pending?: boolean;\n error?: string;\n integer?: boolean;\n min?: number;\n max?: number;\n}>;\n\ntype MatrixValue = readonly [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number];\n\nconst MatrixField: FunctionComponent<{\n label: string;\n uniqueId: string;\n description?: string;\n disabled?: boolean;\n value: MatrixValue;\n onChange: (value: MatrixValue) => void;\n}> = (props) => {\n const { label, uniqueId, description, disabled, value, onChange } = props;\n const [draft, setDraft] = useState(value);\n useEffect(() => setDraft(value), [value]);\n return (\n <PropertyLine\n label={label}\n uniqueId={uniqueId}\n description={description}\n expandedContent={\n <>\n {draft.map((component, index) => (\n <NumberInputPropertyLine\n key={index}\n label={`M${Math.floor(index / 4)}${index % 4}`}\n value={component}\n disabled={disabled}\n onChange={(nextValue) => {\n const next = [...draft] as [...MatrixValue];\n next[index] = nextValue;\n setDraft(next);\n onChange(next);\n }}\n />\n ))}\n </>\n }\n >\n <Body1>[4 × 4]</Body1>\n </PropertyLine>\n );\n};\n\n/**\n * Displays a discovered scalar, vector, or matrix input with a guarded write callback.\n * @param props The runtime value reader, writer, constraints, and row status.\n * @returns An editable property line or an unavailable read-only fallback.\n */\nexport const DynamicMaterialField: FunctionComponent<DynamicFieldProps> = (props) => {\n const { target, id, label, type, read, write, unavailable, pending, error, integer, min, max } = props;\n const lastValue = useRef<{ target: object; value: DynamicFieldValue | undefined }>(undefined);\n const getValue = useCallback(() => {\n try {\n const value = read();\n const previous = lastValue.current;\n const previousValue = previous?.value;\n if (\n previous?.target === target &&\n Array.isArray(value) &&\n Array.isArray(previousValue) &&\n value.length === previousValue.length &&\n value.every((component, index) => Object.is(component, previousValue[index]))\n ) {\n return previousValue;\n }\n lastValue.current = { target, value };\n return value;\n } catch {\n return undefined;\n }\n }, [read, target]);\n const value = useWatchedValue(target, getValue);\n const common = { label, uniqueId: id, disabled: pending, description: error ? `Error: ${error}` : undefined };\n let control: React.ReactNode;\n if (value === undefined) {\n control = <ComputedProperty component={TextPropertyLine} target={target} getValue={() => `Unavailable: ${unavailable}`} label={label} uniqueId={id} />;\n } else {\n switch (type) {\n case \"number\":\n control = (\n <DerivedProperty\n component={NumberInputPropertyLine}\n target={target}\n getValue={getValue as () => number}\n setValue={(_target, next) => write(next)}\n {...common}\n min={min}\n max={max}\n step={integer ? 1 : undefined}\n forceInt={integer}\n />\n );\n break;\n case \"vec2\":\n control = (\n <DerivedProperty\n component={Vector2PropertyLine}\n target={target}\n getValue={getValue as () => readonly [number, number]}\n setValue={(_target, next) => write(\"x\" in next ? [next.x, next.y] : next)}\n {...common}\n />\n );\n break;\n case \"vec3\":\n control = (\n <DerivedProperty\n component={Vector3PropertyLine}\n target={target}\n getValue={getValue as () => readonly [number, number, number]}\n setValue={(_target, next) => write(\"x\" in next ? [next.x, next.y, next.z] : next)}\n {...common}\n />\n );\n break;\n case \"vec4\":\n control = (\n <DerivedProperty\n component={Vector4PropertyLine}\n target={target}\n getValue={getValue as () => readonly [number, number, number, number]}\n setValue={(_target, next) => write(\"x\" in next ? [next.x, next.y, next.z, next.w] : next)}\n {...common}\n />\n );\n break;\n case \"mat4\":\n control = (\n <DerivedProperty component={MatrixField} target={target} getValue={getValue as () => MatrixValue} setValue={(_target, next) => write(next)} {...common} />\n );\n break;\n }\n }\n return (\n <div aria-busy={pending}>\n {control}\n {pending ? <Body1 role=\"status\">{`Applying ${label}…`}</Body1> : undefined}\n {error ? <Body1 role=\"alert\">{error}</Body1> : undefined}\n </div>\n );\n};\n\n/**\n * Validates a discovered numeric input before sending it to the Lite setter.\n * @param id The property row identifier.\n * @param value The proposed scalar or tuple.\n * @param length The expected tuple length, or one for a scalar.\n * @param integer Whether the scalar must be an integer.\n * @param min The optional scalar lower bound.\n * @param max The optional scalar upper bound.\n * @returns A detached scalar or array suitable for the Lite setter.\n */\nexport function ValidateDynamicValue(id: string, value: DynamicFieldValue, length: number, integer = false, min?: number, max?: number): number | number[] {\n if (length === 1) {\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new TypeError(`Property \"${id}\" requires a finite number.`);\n }\n if (integer && !Number.isInteger(value)) {\n throw new TypeError(`Property \"${id}\" requires an integer.`);\n }\n if (min !== undefined && value < min) {\n throw new RangeError(`Property \"${id}\" must be at least ${min}.`);\n }\n if (max !== undefined && value > max) {\n throw new RangeError(`Property \"${id}\" must be at most ${max}.`);\n }\n return value;\n }\n if (!Array.isArray(value) || value.length !== length) {\n throw new TypeError(`Property \"${id}\" requires a ${length}-component tuple.`);\n }\n if (value.some((component) => typeof component !== \"number\" || !Number.isFinite(component))) {\n throw new TypeError(`Property \"${id}\" requires finite tuple components.`);\n }\n return [...value];\n}\n"],"names":["_jsx","_Fragment","_jsxs"],"mappings":";;;;;AA+BA,MAAM,WAAW,GAOZ,CAAC,KAAK,KAAI;AACX,IAAA,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK;IACzE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AACzC,IAAA,SAAS,CAAC,MAAM,QAAQ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CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;AACrC,YAAA,MAAM,IAAI,SAAS,CAAC,aAAa,EAAE,CAAA,sBAAA,CAAwB,CAAC;QAChE;QACA,IAAI,GAAG,KAAK,SAAS,IAAI,KAAK,GAAG,GAAG,EAAE;YAClC,MAAM,IAAI,UAAU,CAAC,CAAA,UAAA,EAAa,EAAE,CAAA,mBAAA,EAAsB,GAAG,CAAA,CAAA,CAAG,CAAC;QACrE;QACA,IAAI,GAAG,KAAK,SAAS,IAAI,KAAK,GAAG,GAAG,EAAE;YAClC,MAAM,IAAI,UAAU,CAAC,CAAA,UAAA,EAAa,EAAE,CAAA,kBAAA,EAAqB,GAAG,CAAA,CAAA,CAAG,CAAC;QACpE;AACA,QAAA,OAAO,KAAK;IAChB;AACA,IAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE;QAClD,MAAM,IAAI,SAAS,CAAC,CAAA,UAAA,EAAa,EAAE,CAAA,aAAA,EAAgB,MAAM,CAAA,iBAAA,CAAmB,CAAC;IACjF;IACA,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE;AACzF,QAAA,MAAM,IAAI,SAAS,CAAC,aAAa,EAAE,CAAA,mCAAA,CAAqC,CAAC;IAC7E;AACA,IAAA,OAAO,CAAC,GAAG,KAAK,CAAC;AACrB;;"}
@@ -1,6 +1,6 @@
1
1
  import { type RenderingContext } from "@babylonjs/lite";
2
2
  import { type ComponentType } from "react";
3
- import { type IDisposable } from "@babylonjs/core/index.js";
3
+ import { type IDisposable, type IReadonlyObservable } from "@babylonjs/core/index.js";
4
4
  import { type ExplorerDisplayInfo, type ExplorerNodeDescription } from "../components/explorer/explorerModel";
5
5
  import { type IService, type ServiceDefinition } from "@babylonjs/shared-ui-components/modularTool/modularity/serviceDefinition.js";
6
6
  import { type IShellService } from "@babylonjs/shared-ui-components/modularTool/services/shellService.js";
@@ -26,6 +26,8 @@ export type RenderingContextNodeProvider<T extends RenderingContext> = Readonly<
26
26
  getNodes: (context: T) => readonly ExplorerNodeDescription[];
27
27
  /** Gets the object identities used to detect changes in the contributed nodes. */
28
28
  getSnapshot: (context: T) => readonly object[];
29
+ /** Optionally notifies when the nodes returned by this provider may have changed. */
30
+ onChanged?: IReadonlyObservable<unknown>;
29
31
  }>;
30
32
  /**
31
33
  * Overrides presentation for a Babylon Lite rendering context node.
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { Dialog, DialogTrigger, Tooltip, Button, DialogSurface, DialogBody, DialogTitle, TabList, Tab, DialogContent, Accordion, makeStyles, tokens, AccordionItem, AccordionHeader, Body1Strong, PresenceBadge, AccordionPanel, Card, CardHeader, Caption1, Body1, CardPreview, Persona, AvatarGroup, AvatarGroupItem, CardFooter, Spinner, Popover, PopoverTrigger, PopoverSurface } from '@fluentui/react-components';
3
3
  import { useState, useEffect, memo, useMemo, useCallback } from 'react';
4
- import { S as ShellServiceIdentity, u as useExtensionManager, L as Link } from './index-D8vFySa7.js';
4
+ import { S as ShellServiceIdentity, u as useExtensionManager, L as Link } from './index-Cy8gzpYG.js';
5
5
  import { AppsAddInRegular, DismissRegular, LinkRegular, BranchForkRegular, BugRegular, ArrowDownloadRegular, DeleteRegular, MailRegular, PeopleCommunityRegular } from '@fluentui/react-icons';
6
6
  import { Fade } from '@fluentui/react-motion-components-preview';
7
7
  import { Logger } from '@babylonjs/core/Misc/logger.js';
@@ -211,4 +211,4 @@ const ExtensionListServiceDefinition = {
211
211
  };
212
212
 
213
213
  export { ExtensionListServiceDefinition };
214
- //# sourceMappingURL=extensionsListService-D1JivcAu.js.map
214
+ //# sourceMappingURL=extensionsListService-Bl1rTNl1.js.map