@babylonjs/inspector 8.37.1-preview → 8.37.2-preview

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -534,7 +534,7 @@ type ContextMenuCommand = {
534
534
  */
535
535
  mode: "contextMenu";
536
536
  };
537
- type CommandMode = (InlineCommand | ContextMenuCommand)["mode"];
537
+ type CommandMode = NonNullable<(InlineCommand | ContextMenuCommand)["mode"]>;
538
538
  type CommandType = (ActionCommand | ToggleCommand)["type"];
539
539
  type SceneExplorerCommand<ModeT extends CommandMode = CommandMode, TypeT extends CommandType = CommandType> = Partial<IDisposable$1> & Readonly<{
540
540
  /**
@@ -546,20 +546,20 @@ type SceneExplorerCommand<ModeT extends CommandMode = CommandMode, TypeT extends
546
546
  */
547
547
  onChange?: IReadonlyObservable$2<unknown>;
548
548
  }> & (ModeT extends "inline" ? InlineCommand : ContextMenuCommand) & (TypeT extends "action" ? ActionCommand : ToggleCommand);
549
- type SceneExplorerCommandProvider<T extends EntityBase> = Readonly<{
549
+ type SceneExplorerCommandProvider<ContextT, ModeT extends CommandMode = CommandMode, TypeT extends CommandType = CommandType> = Readonly<{
550
550
  /**
551
551
  * An optional order for the section, relative to other commands.
552
552
  * Defaults to 0.
553
553
  */
554
554
  order?: number;
555
555
  /**
556
- * A predicate function that determines if the command is applicable to the given entity.
556
+ * A predicate function that determines if the command is applicable to the given context.
557
557
  */
558
- predicate: (entity: unknown) => entity is T;
558
+ predicate: (context: unknown) => context is ContextT;
559
559
  /**
560
- * Gets the command information for the given entity.
560
+ * Gets the command information for the given context.
561
561
  */
562
- getCommand: (entity: T) => SceneExplorerCommand;
562
+ getCommand: (context: ContextT) => SceneExplorerCommand<ModeT, TypeT>;
563
563
  }>;
564
564
  type ActionCommand = {
565
565
  readonly type: "action";
@@ -1048,7 +1048,12 @@ interface ISceneExplorerService extends IService<typeof SceneExplorerServiceIden
1048
1048
  * Adds a new command (e.g. "Delete", "Rename", etc.) that can be executed on entities in the scene explorer.
1049
1049
  * @param command A description of the command to add.
1050
1050
  */
1051
- addCommand<T extends EntityBase>(command: SceneExplorerCommandProvider<T>): IDisposable$1;
1051
+ addEntityCommand<T extends EntityBase>(command: SceneExplorerCommandProvider<T>): IDisposable$1;
1052
+ /**
1053
+ * Adds a new command that can be executed on sections in the scene explorer.
1054
+ * @param command A description of the command to add.
1055
+ */
1056
+ addSectionCommand<T extends string>(command: SceneExplorerCommandProvider<T, "contextMenu">): IDisposable$1;
1052
1057
  }
1053
1058
 
1054
1059
  declare const DebugServiceIdentity: unique symbol;
@@ -37052,7 +37057,7 @@ declare class TargetCamera extends Camera {
37052
37057
  /**
37053
37058
  * Define the current rotation of the camera as a quaternion to prevent Gimbal lock
37054
37059
  */
37055
- rotationQuaternion: Quaternion;
37060
+ rotationQuaternion: Nullable<Quaternion>;
37056
37061
  /**
37057
37062
  * Define the current speed of the camera
37058
37063
  */
@@ -41976,6 +41981,10 @@ declare class WebXRCamera extends FreeCamera {
41976
41981
  * @internal
41977
41982
  */
41978
41983
  _lastXRViewerPose?: XRViewerPose;
41984
+ /**
41985
+ * webXRCamera relies on rotationQuaternion and doesn't use camera rotation property
41986
+ */
41987
+ rotationQuaternion: Quaternion;
41979
41988
  /**
41980
41989
  * Creates a new webXRCamera, this should only be set at the camera after it has been updated by the xrSessionManager
41981
41990
  * @param name the name of the camera
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { a2 as Accordion, a1 as AccordionSection, ax as BooleanBadgePropertyLine, j as BoundProperty, l as BuiltInsExtensionFeed, a3 as Button, B as ButtonLine, a4 as Checkbox, ay as CheckboxPropertyLine, C as Collapse, ae as Color3GradientComponent, au as Color3GradientList, az as Color3PropertyLine, af as Color4GradientComponent, av as Color4GradientList, aA as Color4PropertyLine, a5 as ColorPickerPopup, ag as ColorStepGradientComponent, a8 as ComboBox, X as ConstructorFactory, D as DebugServiceIdentity, a9 as DraggableLine, aa as Dropdown, E as ExtensibleAccordion, ad as FactorGradientComponent, at as FactorGradientList, F as FileUploadLine, R as GetPropertyDescriptor, aB as HexPropertyLine, ah as InfoLabel, a6 as InputHexField, a7 as InputHsvField, I as Inspector, Q as InterceptFunction, V as InterceptProperty, U as IsPropertyReadonly, aG as LineContainer, L as Link, aE as LinkPropertyLine, k as LinkToEntityPropertyLine, ai as List, O as MakeDialogTeachingMoment, M as MakeLazyComponent, c as MakePopoverTeachingMoment, r as MakePropertyHook, K as MakeTeachingMoment, aj as MessageBar, ab as NumberDropdown, N as NumberDropdownPropertyLine, aD as NumberInputPropertyLine, W as ObservableCollection, aw as Pane, aH as PlaceholderPropertyLine, ak as PositionedPopover, P as PropertiesServiceIdentity, aF as PropertyLine, aN as QuaternionPropertyLine, aM as RotationVectorPropertyLine, Y as SceneContextIdentity, f as SceneExplorerServiceIdentity, al as SearchBar, am as SearchBox, _ as SelectionServiceDefinition, Z as SelectionServiceIdentity, $ as SettingsContextIdentity, g as SettingsServiceIdentity, b as ShellServiceIdentity, a0 as ShowInspector, e as SidePaneContainer, an as SpinButton, aI as SpinButtonPropertyLine, h as StatsServiceIdentity, ac as StringDropdown, i as StringDropdownPropertyLine, aJ as StringifiedPropertyLine, ao as Switch, S as SwitchPropertyLine, ap as SyncedSliderInput, a as SyncedSliderPropertyLine, d as TeachingMoment, aK as TextAreaPropertyLine, ar as TextInput, aC as TextInputPropertyLine, aL as TextPropertyLine, aq as Textarea, as as ToggleButton, T as ToolsServiceIdentity, aO as Vector2PropertyLine, aP as Vector3PropertyLine, aQ as Vector4PropertyLine, J as useAngleConverters, A as useAsyncResource, o as useColor3Property, p as useColor4Property, G as useCompactMode, t as useEventfulState, s as useInterceptObservable, w as useObservableCollection, v as useObservableState, x as useOrderedObservableCollection, y as usePollingObservable, m as useProperty, q as useQuaternionProperty, z as useResource, H as useSidePaneDockOverrides, n as useVector3Property } from './index-ByzP7-y_.js';
1
+ export { a2 as Accordion, a1 as AccordionSection, ax as BooleanBadgePropertyLine, j as BoundProperty, l as BuiltInsExtensionFeed, a3 as Button, B as ButtonLine, a4 as Checkbox, ay as CheckboxPropertyLine, C as Collapse, ae as Color3GradientComponent, au as Color3GradientList, az as Color3PropertyLine, af as Color4GradientComponent, av as Color4GradientList, aA as Color4PropertyLine, a5 as ColorPickerPopup, ag as ColorStepGradientComponent, a8 as ComboBox, X as ConstructorFactory, D as DebugServiceIdentity, a9 as DraggableLine, aa as Dropdown, E as ExtensibleAccordion, ad as FactorGradientComponent, at as FactorGradientList, F as FileUploadLine, R as GetPropertyDescriptor, aB as HexPropertyLine, ah as InfoLabel, a6 as InputHexField, a7 as InputHsvField, I as Inspector, Q as InterceptFunction, V as InterceptProperty, U as IsPropertyReadonly, aG as LineContainer, L as Link, aE as LinkPropertyLine, k as LinkToEntityPropertyLine, ai as List, O as MakeDialogTeachingMoment, M as MakeLazyComponent, c as MakePopoverTeachingMoment, r as MakePropertyHook, K as MakeTeachingMoment, aj as MessageBar, ab as NumberDropdown, N as NumberDropdownPropertyLine, aD as NumberInputPropertyLine, W as ObservableCollection, aw as Pane, aH as PlaceholderPropertyLine, ak as PositionedPopover, P as PropertiesServiceIdentity, aF as PropertyLine, aN as QuaternionPropertyLine, aM as RotationVectorPropertyLine, Y as SceneContextIdentity, f as SceneExplorerServiceIdentity, al as SearchBar, am as SearchBox, _ as SelectionServiceDefinition, Z as SelectionServiceIdentity, $ as SettingsContextIdentity, g as SettingsServiceIdentity, b as ShellServiceIdentity, a0 as ShowInspector, e as SidePaneContainer, an as SpinButton, aI as SpinButtonPropertyLine, h as StatsServiceIdentity, ac as StringDropdown, i as StringDropdownPropertyLine, aJ as StringifiedPropertyLine, ao as Switch, S as SwitchPropertyLine, ap as SyncedSliderInput, a as SyncedSliderPropertyLine, d as TeachingMoment, aK as TextAreaPropertyLine, ar as TextInput, aC as TextInputPropertyLine, aL as TextPropertyLine, aq as Textarea, as as ToggleButton, T as ToolsServiceIdentity, aO as Vector2PropertyLine, aP as Vector3PropertyLine, aQ as Vector4PropertyLine, J as useAngleConverters, A as useAsyncResource, o as useColor3Property, p as useColor4Property, G as useCompactMode, t as useEventfulState, s as useInterceptObservable, w as useObservableCollection, v as useObservableState, x as useOrderedObservableCollection, y as usePollingObservable, m as useProperty, q as useQuaternionProperty, z as useResource, H as useSidePaneDockOverrides, n as useVector3Property } from './index-DE0QdD6v.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import '@babylonjs/core/Maths/math.color.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/inspector",
3
- "version": "8.37.1-preview",
3
+ "version": "8.37.2-preview",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",