@babylonjs/inspector 8.53.0 → 8.53.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.
package/lib/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ComponentType, ComponentProps, FunctionComponent, PropsWithChildren, ForwardRefExoticComponent, RefAttributes, MouseEventHandler, HTMLProps, Ref, Component, ReactNode, ErrorInfo, DependencyList, Dispatch, SetStateAction, MouseEvent, ElementRef, ReactElement } from 'react';
3
+ import { ComponentType, ComponentProps, ForwardRefExoticComponent, RefAttributes, FunctionComponent, PropsWithChildren, MouseEventHandler, HTMLProps, Ref, Component, ReactNode, ErrorInfo, DependencyList, Dispatch, SetStateAction, MouseEvent, ElementRef, ReactElement } from 'react';
4
4
  import { Nullable as Nullable$2 } from '@babylonjs/core/types.js';
5
5
  import { IDisposable as IDisposable$1, Nullable as Nullable$1, Scene as Scene$1, IReadonlyObservable as IReadonlyObservable$1, Observable as Observable$1, Camera as Camera$1, Light as Light$1, IInspectorOptions as IInspectorOptions$1 } from '@babylonjs/core/index.js';
6
- import { FluentProviderProps, PositioningImperativeRef, OnOpenChangeData, Theme as Theme$1, SpinnerProps, PositioningShorthand } from '@fluentui/react-components';
6
+ import { FluentProviderProps, OnOpenChangeData, PositioningImperativeRef, Theme as Theme$1, SpinnerProps, PositioningShorthand } from '@fluentui/react-components';
7
7
  import { Color3 as Color3$1, Color4 as Color4$1 } from '@babylonjs/core/Maths/math.color.js';
8
8
  import { Vector3 as Vector3$1, Quaternion as Quaternion$1 } from '@babylonjs/core/Maths/math.vector.js';
9
9
  import * as _fluentui_tokens from '@fluentui/tokens';
@@ -347,6 +347,9 @@ type ServiceDefinition<Produces extends IService<symbol>[] = [], Consumes extend
347
347
  consumes: ExtractContractIdentities<Consumes>;
348
348
  });
349
349
 
350
+ /**
351
+ * Describes a section within a dynamic accordion that can be added at runtime.
352
+ */
350
353
  type DynamicAccordionSection = Readonly<{
351
354
  /**
352
355
  * A unique identity for the section, which can be referenced by section content.
@@ -363,6 +366,9 @@ type DynamicAccordionSection = Readonly<{
363
366
  */
364
367
  collapseByDefault?: boolean;
365
368
  }>;
369
+ /**
370
+ * Describes content that belongs to a section within a dynamic accordion.
371
+ */
366
372
  type DynamicAccordionSectionContent<ContextT> = Readonly<{
367
373
  /**
368
374
  * A unique key for the the content.
@@ -384,9 +390,22 @@ type DynamicAccordionSectionContent<ContextT> = Readonly<{
384
390
  context: ContextT;
385
391
  }>;
386
392
  }>;
393
+ /**
394
+ * Imperative handle for controlling section highlights on the extensible accordion.
395
+ */
387
396
  type SectionsImperativeRef = {
397
+ /**
398
+ * Highlights the specified sections, collapsing all others until the context changes.
399
+ * @param sections The identity strings of the sections to highlight.
400
+ */
388
401
  highlightSections: (sections: readonly string[]) => void;
389
402
  };
403
+ /**
404
+ * An accordion component that supports dynamically adding sections and section content at runtime.
405
+ * Combines statically defined children sections with dynamically registered sections and content.
406
+ * @param props The accordion props including sections, section content, context, and an optional imperative ref.
407
+ * @returns The extensible accordion component.
408
+ */
390
409
  declare function ExtensibleAccordion<ContextT = unknown>(props: PropsWithChildren<{
391
410
  sections: readonly DynamicAccordionSection[];
392
411
  sectionContent: readonly DynamicAccordionSectionContent<ContextT>[];
@@ -394,6 +413,9 @@ declare function ExtensibleAccordion<ContextT = unknown>(props: PropsWithChildre
394
413
  sectionsRef?: Ref<SectionsImperativeRef>;
395
414
  } & AccordionProps>): react_jsx_runtime.JSX.Element;
396
415
 
416
+ /**
417
+ * The unique identity symbol for the scene context service.
418
+ */
397
419
  declare const SceneContextIdentity: unique symbol;
398
420
  /**
399
421
  * SceneContext provides the current scene, but could have different implementations depending on the context (e.g. inspector, sandbox, etc.)
@@ -409,26 +431,67 @@ interface ISceneContext extends IService<typeof SceneContextIdentity> {
409
431
  readonly currentSceneObservable: IReadonlyObservable$1<Nullable$1<Scene$1>>;
410
432
  }
411
433
 
434
+ /**
435
+ * The unique identity symbol for the settings store service.
436
+ */
412
437
  declare const SettingsStoreIdentity: unique symbol;
438
+ /**
439
+ * Describes a setting by its key and default value.
440
+ */
413
441
  type SettingDescriptor<T> = {
442
+ /**
443
+ * The unique key used to identify this setting in the store.
444
+ */
414
445
  readonly key: string;
446
+ /**
447
+ * The default value to use when the setting has not been explicitly set.
448
+ */
415
449
  readonly defaultValue: T;
416
450
  };
451
+ /**
452
+ * Provides a key-value store for persisting user settings.
453
+ */
417
454
  interface ISettingsStore extends IService<typeof SettingsStoreIdentity> {
455
+ /**
456
+ * An observable that notifies when a setting has changed, providing the key of the changed setting.
457
+ */
418
458
  onChanged: IReadonlyObservable$1<string>;
459
+ /**
460
+ * Reads a setting from the store.
461
+ * @param descriptor The descriptor of the setting to read.
462
+ * @returns The current value of the setting, or the default value if it has not been set.
463
+ */
419
464
  readSetting<T>(descriptor: SettingDescriptor<T>): T;
465
+ /**
466
+ * Writes a setting to the store.
467
+ * @param descriptor The descriptor of the setting to write.
468
+ * @param value The value to write.
469
+ */
420
470
  writeSetting<T>(descriptor: SettingDescriptor<T>, value: T): void;
421
471
  }
472
+ /**
473
+ * Default implementation of {@link ISettingsStore} that persists settings using browser local storage.
474
+ */
422
475
  declare class SettingsStore implements ISettingsStore {
423
476
  private readonly _namespace;
424
477
  private readonly _onChanged;
478
+ /**
479
+ * Creates a new settings store.
480
+ * @param _namespace A namespace used to scope the settings keys to avoid collisions with other stores.
481
+ */
425
482
  constructor(_namespace: string);
426
483
  get onChanged(): IReadonlyObservable$1<Readonly<string>>;
427
484
  readSetting<T>(descriptor: SettingDescriptor<T>): T;
428
485
  writeSetting<T>(descriptor: SettingDescriptor<T>, value: T): void;
429
486
  }
430
487
 
488
+ /**
489
+ * Represents a horizontal location in the shell layout.
490
+ */
431
491
  type HorizontalLocation = "left" | "right";
492
+ /**
493
+ * Represents a vertical location in the shell layout.
494
+ */
432
495
  type VerticalLocation = "top" | "bottom";
433
496
  type TeachingMomentInfo = boolean | {
434
497
  readonly title: string;
@@ -553,6 +616,9 @@ type CentralContentDefinition = {
553
616
  */
554
617
  order?: number;
555
618
  };
619
+ /**
620
+ * The unique identity symbol for the shell service.
621
+ */
556
622
  declare const ShellServiceIdentity: unique symbol;
557
623
  /**
558
624
  * Provides a shell for the application, including toolbars, side panes, and central content.
@@ -634,6 +700,9 @@ type ShellServiceOptions = {
634
700
  }>;
635
701
  };
636
702
 
703
+ /**
704
+ * The unique identity symbol for the settings service.
705
+ */
637
706
  declare const SettingsServiceIdentity: unique symbol;
638
707
  /**
639
708
  * Allows new sections or content to be added to the Settings pane.
@@ -651,6 +720,9 @@ interface ISettingsService extends IService<typeof SettingsServiceIdentity> {
651
720
  addSectionContent(content: DynamicAccordionSectionContent<Scene$1>): IDisposable$1;
652
721
  }
653
722
 
723
+ /**
724
+ * The unique identity symbol for the selection service.
725
+ */
654
726
  declare const SelectionServiceIdentity: unique symbol;
655
727
  /**
656
728
  * Tracks the currently selected entity.
@@ -665,7 +737,7 @@ interface ISelectionService extends IService<typeof SelectionServiceIdentity> {
665
737
  */
666
738
  readonly onSelectedEntityChanged: IReadonlyObservable$1<void>;
667
739
  }
668
- declare const SelectionServiceDefinition: ServiceDefinition<[ISelectionService], [IShellService, ISettingsStore, ISettingsService]>;
740
+ declare const SelectionServiceDefinition: ServiceDefinition<[ISelectionService], [IShellService, ISettingsStore, ISettingsService, ISceneContext]>;
669
741
 
670
742
  /** Props for the LinkToEntity component */
671
743
  type LinkToEntityProps = {
@@ -691,6 +763,9 @@ declare const LinkToEntity: FunctionComponent<LinkToEntityProps>;
691
763
  */
692
764
  declare const LinkToEntityPropertyLine: FunctionComponent<PropertyLineProps<string> & LinkToEntityProps>;
693
765
 
766
+ /**
767
+ * Information about how to display an entity in the Scene Explorer tree.
768
+ */
694
769
  type EntityDisplayInfo = Partial<IDisposable$1> & Readonly<{
695
770
  /**
696
771
  * The name of the entity to display in the Scene Explorer tree.
@@ -725,6 +800,9 @@ type SceneExplorerDragDropConfig<T> = Readonly<{
725
800
  */
726
801
  onDrop: (draggedEntity: T, targetEntity: T | null) => void;
727
802
  }>;
803
+ /**
804
+ * Describes a section in the Scene Explorer (e.g. "Nodes", "Materials", etc.).
805
+ */
728
806
  type SceneExplorerSection<T extends object> = Readonly<{
729
807
  /**
730
808
  * The display name of the section (e.g. "Nodes", "Materials", etc.).
@@ -795,6 +873,9 @@ type ContextMenuCommand = {
795
873
  };
796
874
  type CommandMode = NonNullable<(InlineCommand | ContextMenuCommand)["mode"]>;
797
875
  type CommandType = (ActionCommand | ToggleCommand)["type"];
876
+ /**
877
+ * Describes a command that can be executed on entities or sections in the Scene Explorer.
878
+ */
798
879
  type SceneExplorerCommand<ModeT extends CommandMode = CommandMode, TypeT extends CommandType = CommandType> = Partial<IDisposable$1> & Readonly<{
799
880
  /**
800
881
  * The display name of the command (e.g. "Delete", "Rename", etc.).
@@ -815,6 +896,9 @@ type SceneExplorerCommand<ModeT extends CommandMode = CommandMode, TypeT extends
815
896
  */
816
897
  onChange?: IReadonlyObservable$1<unknown>;
817
898
  }> & (ModeT extends "inline" ? InlineCommand : ContextMenuCommand) & (TypeT extends "action" ? ActionCommand : ToggleCommand);
899
+ /**
900
+ * Provides a command for a specific entity or section context in the Scene Explorer.
901
+ */
818
902
  type SceneExplorerCommandProvider<ContextT, ModeT extends CommandMode = CommandMode, TypeT extends CommandType = CommandType> = Readonly<{
819
903
  /**
820
904
  * An optional order for the section, relative to other commands.
@@ -851,6 +935,9 @@ declare const ToggleCommand: FunctionComponent<{
851
935
  command: SceneExplorerCommand<"inline", "toggle">;
852
936
  }>;
853
937
 
938
+ /**
939
+ * Props for the {@link ErrorBoundary} component.
940
+ */
854
941
  type ErrorBoundaryProps = {
855
942
  /** Child components to render */
856
943
  children: ReactNode;
@@ -883,6 +970,11 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryS
883
970
  */
884
971
  declare const SidePaneContainer: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
885
972
 
973
+ /**
974
+ * A themed Fluent UI provider that applies the current theme mode (light or dark).
975
+ * @param props Fluent provider props, plus an optional `invert` flag to swap the theme.
976
+ * @returns The themed Fluent UI provider component.
977
+ */
886
978
  declare const Theme: FunctionComponent<FluentProviderProps & {
887
979
  invert?: boolean;
888
980
  }>;
@@ -920,7 +1012,13 @@ declare function MakePopoverTeachingMoment(name: string): (suppress?: boolean) =
920
1012
  readonly reset: () => void;
921
1013
  };
922
1014
 
1015
+ /**
1016
+ * The state returned by the teaching moment hook.
1017
+ */
923
1018
  type TeachingMomentState = ReturnType<ReturnType<typeof MakePopoverTeachingMoment>>;
1019
+ /**
1020
+ * Props for the {@link TeachingMoment} component.
1021
+ */
924
1022
  type TeachingMomentProps = Pick<TeachingMomentState, "shouldDisplay" | "positioningRef" | "onOpenChange"> & {
925
1023
  title: string;
926
1024
  description: string;
@@ -932,16 +1030,34 @@ type TeachingMomentProps = Pick<TeachingMomentState, "shouldDisplay" | "position
932
1030
  */
933
1031
  declare const TeachingMoment: FunctionComponent<TeachingMomentProps>;
934
1032
 
1033
+ /**
1034
+ * Describes a property change event, including the entity, the property key, and the old and new values.
1035
+ */
935
1036
  type PropertyChangeInfo = {
1037
+ /** The entity whose property was changed. */
936
1038
  readonly entity: unknown;
1039
+ /** The key of the property that was changed. */
937
1040
  readonly propertyKey: PropertyKey;
1041
+ /** The value of the property before the change. */
938
1042
  readonly oldValue: unknown;
1043
+ /** The value of the property after the change. */
939
1044
  readonly newValue: unknown;
940
1045
  };
1046
+ /**
1047
+ * Context that provides an observable for property change notifications within the inspector.
1048
+ */
941
1049
  type PropertyContext = {
1050
+ /** An observable that fires whenever a property is changed through the inspector UI. */
942
1051
  readonly onPropertyChanged: Observable$1<PropertyChangeInfo>;
943
1052
  };
1053
+ /**
1054
+ * React context for accessing the property change observable.
1055
+ */
944
1056
  declare const PropertyContext: react.Context<PropertyContext | undefined>;
1057
+ /**
1058
+ * Hook that returns a callback to notify the property context when a property has been changed.
1059
+ * @returns A function that accepts (entity, propertyKey, oldValue, newValue) and notifies observers.
1060
+ */
945
1061
  declare function usePropertyChangedNotifier(): <ObjectT, PropertyT extends keyof ObjectT>(entity: ObjectT, propertyKey: PropertyT, oldValue: ObjectT[PropertyT], newValue: ObjectT[PropertyT]) => void;
946
1062
 
947
1063
  type WeaklyTypedServiceDefinition = Omit<ServiceDefinition<IService<symbol>[] | [], IService<symbol>[] | []>, "factory"> & {
@@ -1195,6 +1311,11 @@ declare function useResource<T extends IDisposable$1 | null | undefined>(factory
1195
1311
  */
1196
1312
  declare function useAsyncResource<T extends IDisposable$1 | null | undefined>(factory: (abortSignal: AbortSignal) => Promise<T>, deps?: DependencyList): T | undefined;
1197
1313
 
1314
+ /**
1315
+ * Hook that reads and writes a setting from the settings store.
1316
+ * @param descriptor The setting descriptor that identifies the setting and its default value.
1317
+ * @returns A tuple of [currentValue, setValue, resetValue] similar to React's useState.
1318
+ */
1198
1319
  declare function useSetting<T>(descriptor: SettingDescriptor<T>): [T, Dispatch<SetStateAction<T>>, () => void];
1199
1320
  /**
1200
1321
  * Gets functions used to convert to/from display values for angles based on the current settings.
@@ -1202,7 +1323,13 @@ declare function useSetting<T>(descriptor: SettingDescriptor<T>): [T, Dispatch<S
1202
1323
  */
1203
1324
  declare function useAngleConverters(): readonly [(angle: number, wrap?: boolean) => number, (angle: number, wrap?: boolean) => number, boolean];
1204
1325
 
1326
+ /**
1327
+ * Represents the theme mode preference.
1328
+ */
1205
1329
  type ThemeMode = "system" | "light" | "dark";
1330
+ /**
1331
+ * The unique identity symbol for the theme service.
1332
+ */
1206
1333
  declare const ThemeServiceIdentity: unique symbol;
1207
1334
  /**
1208
1335
  * Exposes the current theme used by the application.
@@ -1230,14 +1357,26 @@ interface IThemeService extends IService<typeof ThemeServiceIdentity> {
1230
1357
  readonly onChanged: IReadonlyObservable$1<void>;
1231
1358
  }
1232
1359
 
1360
+ /**
1361
+ * Hook that provides the current theme mode state and controls for changing it.
1362
+ * @returns An object with the current dark mode state, theme mode, and functions to set or toggle the theme.
1363
+ */
1233
1364
  declare function useThemeMode(): {
1234
1365
  readonly isDarkMode: boolean;
1235
1366
  readonly themeMode: ThemeMode;
1236
1367
  readonly setThemeMode: (mode: ThemeMode) => void;
1237
1368
  readonly toggleThemeMode: () => void | undefined;
1238
1369
  };
1370
+ /**
1371
+ * Hook that returns the current Fluent UI theme based on the active theme mode.
1372
+ * @param invert If true, inverts the theme (returns light theme in dark mode and vice versa). Defaults to false.
1373
+ * @returns The current Fluent UI theme object.
1374
+ */
1239
1375
  declare function useTheme(invert?: boolean): _fluentui_tokens.Theme;
1240
1376
 
1377
+ /**
1378
+ * Hooks that can be registered on a function to intercept its execution.
1379
+ */
1241
1380
  type FunctionHooks<Args extends unknown[] = unknown[]> = {
1242
1381
  /**
1243
1382
  * This function will be called after the hooked function is called.
@@ -1268,6 +1407,9 @@ declare function GetPropertyDescriptor<T extends object>(target: T, propertyKey:
1268
1407
  * @returns True if the property is readonly, false otherwise.
1269
1408
  */
1270
1409
  declare function IsPropertyReadonly(propertyDescriptor: PropertyDescriptor): boolean;
1410
+ /**
1411
+ * Hooks that can be registered on a property to intercept its setter.
1412
+ */
1271
1413
  type PropertyHooks<T = unknown> = {
1272
1414
  /**
1273
1415
  * This function will be called after the hooked property is set.
@@ -1285,6 +1427,9 @@ type PropertyHooks<T = unknown> = {
1285
1427
  declare function InterceptProperty<T extends object, K extends keyof T>(target: T, propertyKey: string extends K ? never : number extends K ? never : symbol extends K ? never : K, hooks: PropertyHooks<NonNullable<T[K]>>): IDisposable$1;
1286
1428
  declare function InterceptProperty<T extends object>(target: T, propertyKey: keyof T, hooks: PropertyHooks): IDisposable$1;
1287
1429
 
1430
+ /**
1431
+ * The unique identity symbol for the properties service.
1432
+ */
1288
1433
  declare const PropertiesServiceIdentity: unique symbol;
1289
1434
  type PropertiesSectionContent<EntityT> = {
1290
1435
  /**
@@ -1325,6 +1470,9 @@ interface IPropertiesService extends IService<typeof PropertiesServiceIdentity>
1325
1470
  readonly onPropertyChanged: IReadonlyObservable$1<PropertyChangeInfo>;
1326
1471
  }
1327
1472
 
1473
+ /**
1474
+ * The unique identity symbol for the scene explorer service.
1475
+ */
1328
1476
  declare const SceneExplorerServiceIdentity: unique symbol;
1329
1477
  /**
1330
1478
  * Allows new sections or commands to be added to the scene explorer pane.
@@ -1347,6 +1495,9 @@ interface ISceneExplorerService extends IService<typeof SceneExplorerServiceIden
1347
1495
  addSectionCommand<T extends string>(command: SceneExplorerCommandProvider<T, "contextMenu">): IDisposable$1;
1348
1496
  }
1349
1497
 
1498
+ /**
1499
+ * The unique identity symbol for the debug service.
1500
+ */
1350
1501
  declare const DebugServiceIdentity: unique symbol;
1351
1502
  /**
1352
1503
  * Allows new sections or content to be added to the debug pane.
@@ -1364,6 +1515,9 @@ interface IDebugService extends IService<typeof DebugServiceIdentity> {
1364
1515
  addSectionContent(content: DynamicAccordionSectionContent<Scene$1>): IDisposable$1;
1365
1516
  }
1366
1517
 
1518
+ /**
1519
+ * The unique identity symbol for the stats service.
1520
+ */
1367
1521
  declare const StatsServiceIdentity: unique symbol;
1368
1522
  /**
1369
1523
  * Allows new sections or content to be added to the stats pane.
@@ -1381,6 +1535,9 @@ interface IStatsService extends IService<typeof StatsServiceIdentity> {
1381
1535
  addSectionContent(content: DynamicAccordionSectionContent<Scene$1>): IDisposable$1;
1382
1536
  }
1383
1537
 
1538
+ /**
1539
+ * The unique identity symbol for the tools service.
1540
+ */
1384
1541
  declare const ToolsServiceIdentity: unique symbol;
1385
1542
  /**
1386
1543
  * A service that provides tools for the user to generate artifacts or perform actions on entities.
@@ -1398,29 +1555,107 @@ interface IToolsService extends IService<typeof ToolsServiceIdentity> {
1398
1555
  addSectionContent(content: DynamicAccordionSectionContent<Scene$2>): IDisposable$2;
1399
1556
  }
1400
1557
 
1558
+ /**
1559
+ * The unique identity symbol for the watcher service.
1560
+ */
1401
1561
  declare const WatcherServiceIdentity: unique symbol;
1562
+ /**
1563
+ * Watches for property changes on objects, using either interception, polling, or manual refresh.
1564
+ */
1402
1565
  interface IWatcherService extends IService<typeof WatcherServiceIdentity> {
1566
+ /**
1567
+ * Watches a property on an object and calls the callback whenever it changes.
1568
+ * @param target The object containing the property to watch.
1569
+ * @param propertyKey The key of the property to watch.
1570
+ * @param onChanged A callback that is called with the new value when the property changes.
1571
+ * @returns A disposable that stops watching when disposed.
1572
+ */
1403
1573
  watchProperty<T extends object, K extends keyof T>(target: T, propertyKey: string extends K ? never : number extends K ? never : symbol extends K ? never : K, onChanged: (value: NonNullable<T[K]>) => void): IDisposable$1;
1574
+ /**
1575
+ * Watches a property on an object and calls the callback whenever it changes.
1576
+ * @param target The object containing the property to watch.
1577
+ * @param propertyKey The key of the property to watch.
1578
+ * @param onChanged A callback that is called with the new value when the property changes.
1579
+ * @returns A disposable that stops watching when disposed.
1580
+ */
1404
1581
  watchProperty<T extends object>(target: T, propertyKey: keyof T, onChanged: (value: unknown) => void): IDisposable$1;
1582
+ /**
1583
+ * Manually triggers a refresh of all watched properties.
1584
+ */
1405
1585
  refresh(): void;
1406
1586
  }
1407
1587
 
1408
1588
  type Reference<T> = {
1409
1589
  value: T;
1410
1590
  } & IDisposable$1;
1591
+ /**
1592
+ * Represents the available gizmo manipulation modes.
1593
+ */
1411
1594
  type GizmoMode = "translate" | "rotate" | "scale" | "boundingBox";
1595
+ /**
1596
+ * The unique identity symbol for the gizmo service.
1597
+ */
1412
1598
  declare const GizmoServiceIdentity: unique symbol;
1599
+ /**
1600
+ * Manages gizmos for manipulating objects in the scene, including shared utility layers
1601
+ * and camera/light gizmo lifecycle.
1602
+ */
1413
1603
  interface IGizmoService extends IService<typeof GizmoServiceIdentity> {
1604
+ /**
1605
+ * Gets a ref-counted utility layer for the specified scene. The layer is shared across consumers
1606
+ * and disposed when the last reference is released.
1607
+ * @param scene The scene to get the utility layer for.
1608
+ * @param layer An optional layer name to differentiate between multiple utility layers.
1609
+ * @returns A ref-counted reference to the utility layer. Dispose to release.
1610
+ */
1414
1611
  getUtilityLayer(scene: Scene$1, layer?: string): Reference<UtilityLayerRenderer$1>;
1612
+ /**
1613
+ * Gets a ref-counted camera gizmo for the specified camera.
1614
+ * @param camera The camera to get the gizmo for.
1615
+ * @returns A ref-counted reference to the camera gizmo. Dispose to release.
1616
+ */
1415
1617
  getCameraGizmo(camera: Camera$1): Reference<CameraGizmo>;
1618
+ /**
1619
+ * Gets a ref-counted light gizmo for the specified light.
1620
+ * @param light The light to get the gizmo for.
1621
+ * @returns A ref-counted reference to the light gizmo. Dispose to release.
1622
+ */
1416
1623
  getLightGizmo(light: Light$1): Reference<LightGizmo>;
1624
+ /**
1625
+ * Gets all camera gizmos currently active for the specified scene.
1626
+ * @param scene The scene to get camera gizmos for.
1627
+ * @returns A readonly array of camera gizmos.
1628
+ */
1417
1629
  getCameraGizmos(scene: Scene$1): readonly CameraGizmo[];
1630
+ /**
1631
+ * Gets all light gizmos currently active for the specified scene.
1632
+ * @param scene The scene to get light gizmos for.
1633
+ * @returns A readonly array of light gizmos.
1634
+ */
1418
1635
  getLightGizmos(scene: Scene$1): readonly LightGizmo[];
1636
+ /**
1637
+ * Gets or sets the current gizmo mode (translate, rotate, scale, or boundingBox), or undefined if no gizmo mode is active.
1638
+ */
1419
1639
  gizmoMode: GizmoMode | undefined;
1640
+ /**
1641
+ * An observable that notifies when the gizmo mode changes.
1642
+ */
1420
1643
  readonly onGizmoModeChanged: IReadonlyObservable$1<void>;
1644
+ /**
1645
+ * Gets or sets the coordinates mode for gizmos (local or world).
1646
+ */
1421
1647
  coordinatesMode: GizmoCoordinatesMode;
1648
+ /**
1649
+ * An observable that notifies when the coordinates mode changes.
1650
+ */
1422
1651
  readonly onCoordinatesModeChanged: IReadonlyObservable$1<void>;
1652
+ /**
1653
+ * Gets or sets the camera used by gizmos, or null to use the default scene camera.
1654
+ */
1423
1655
  gizmoCamera: Camera$1 | null;
1656
+ /**
1657
+ * An observable that notifies when the gizmo camera changes.
1658
+ */
1424
1659
  readonly onCameraGizmoChanged: IReadonlyObservable$1<void>;
1425
1660
  }
1426
1661
 
@@ -1452,14 +1687,42 @@ type ModularToolOptions = {
1452
1687
  } & ShellServiceOptions;
1453
1688
 
1454
1689
  type LayoutMode = "inline" | "overlay";
1455
- type InspectorOptions = Omit<ModularToolOptions, "toolbarMode"> & {
1690
+ /**
1691
+ * Options for configuring the inspector.
1692
+ */
1693
+ type InspectorOptions = Omit<ModularToolOptions, "namespace" | "toolbarMode"> & {
1694
+ /**
1695
+ * Whether to automatically resize the engine when the inspector layout changes. Defaults to true.
1696
+ */
1456
1697
  autoResizeEngine?: boolean;
1698
+ /**
1699
+ * The layout mode for the inspector.
1700
+ * - "inline": The inspector is embedded within the same container as the rendering canvas, and re-hosts the canvas.
1701
+ * - "overlay": The inspector is rendered as an overlay on top of the rendering canvas.
1702
+ * Defaults to "overlay".
1703
+ */
1457
1704
  layoutMode?: LayoutMode;
1458
1705
  };
1706
+ /**
1707
+ * A token returned by {@link ShowInspector} that can be used to dispose the inspector
1708
+ * and observe its disposal.
1709
+ */
1459
1710
  type InspectorToken = IDisposable$1 & {
1711
+ /**
1712
+ * Whether the inspector has been disposed.
1713
+ */
1460
1714
  readonly isDisposed: boolean;
1715
+ /**
1716
+ * An observable that fires when the inspector is disposed.
1717
+ */
1461
1718
  readonly onDisposed: IReadonlyObservable$1<void>;
1462
1719
  };
1720
+ /**
1721
+ * Shows the inspector for the specified scene.
1722
+ * @param scene The scene to inspect.
1723
+ * @param options Optional configuration for the inspector.
1724
+ * @returns An {@link InspectorToken} that can be disposed to hide the inspector.
1725
+ */
1463
1726
  declare function ShowInspector(scene: Scene$1, options?: Partial<InspectorOptions>): InspectorToken;
1464
1727
 
1465
1728
  type PropertyChangedEvent = {
@@ -8653,10 +8916,6 @@ declare class IntersectionInfo {
8653
8916
  * https://www.khronos.org/opengl/wiki/Uniform_Buffer_Object
8654
8917
  */
8655
8918
  declare class UniformBuffer {
8656
- /** @internal */
8657
- static _UpdatedUbosInFrame: {
8658
- [name: string]: number;
8659
- };
8660
8919
  private _engine;
8661
8920
  private _buffer;
8662
8921
  private _buffers;
@@ -24082,14 +24341,10 @@ declare abstract class ThinWebGPUEngine extends AbstractEngine {
24082
24341
  /** @internal */
24083
24342
  dbgSanityChecks: boolean;
24084
24343
  /** @internal */
24085
- dbgVerboseLogsNumFrames: number;
24086
- /** @internal */
24087
24344
  dbgLogIfNotDrawWrapper: boolean;
24088
24345
  /** @internal */
24089
24346
  dbgShowEmptyEnableEffectCalls: boolean;
24090
24347
  /** @internal */
24091
- dbgVerboseLogsForFirstFrames: boolean;
24092
- /** @internal */
24093
24348
  _textureHelper: WebGPUTextureManager;
24094
24349
  /** @internal */
24095
24350
  _cacheRenderPipeline: WebGPUCacheRenderPipeline;
@@ -24107,6 +24362,14 @@ declare abstract class ThinWebGPUEngine extends AbstractEngine {
24107
24362
  _timestampQuery: WebGPUTimestampQuery;
24108
24363
  /** @internal */
24109
24364
  _timestampIndex: number;
24365
+ /** @internal */
24366
+ _showGPUDebugMarkersLog: boolean;
24367
+ /** @internal */
24368
+ _debugStackRenderEncoder: string[];
24369
+ /** @internal */
24370
+ _debugStackRenderPass: string[];
24371
+ /** @internal */
24372
+ _debugNumPopPending: number;
24110
24373
  /**
24111
24374
  * Gets the GPU time spent in the main render pass for the last frame rendered (in nanoseconds).
24112
24375
  * You have to enable the "timestamp-query" extension in the engine constructor options and set engine.enableGPUTimingMeasurements = true.
@@ -24131,6 +24394,7 @@ declare abstract class ThinWebGPUEngine extends AbstractEngine {
24131
24394
  * @internal
24132
24395
  */
24133
24396
  _generateMipmaps(texture: InternalTexture, commandEncoder?: GPUCommandEncoder): void;
24397
+ protected _debugPushPendingGroups(forRenderPass: boolean): void;
24134
24398
  }
24135
24399
 
24136
24400
  /** @internal */
@@ -25637,6 +25901,7 @@ declare class WebGPUEngine extends ThinWebGPUEngine {
25637
25901
  private _dummyIndexBuffer;
25638
25902
  private _colorWriteLocal;
25639
25903
  private _forceEnableEffect;
25904
+ private _internalFrameCounter;
25640
25905
  /**
25641
25906
  * Gets or sets the snapshot rendering mode
25642
25907
  */
@@ -27286,7 +27551,7 @@ declare class RenderingGroup {
27286
27551
  * @param renderTransparentMeshes
27287
27552
  * @param customRenderTransparentSubMeshes
27288
27553
  */
27289
- render(customRenderFunction: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, renderSprites: boolean, renderParticles: boolean, activeMeshes: Nullable<AbstractMesh[]>, renderDepthOnlyMeshes?: boolean, renderOpaqueMeshes?: boolean, renderAlphaTestMeshes?: boolean, renderTransparentMeshes?: boolean, customRenderTransparentSubMeshes?: (transparentSubMeshes: SmartArray<SubMesh>) => void): void;
27554
+ render(customRenderFunction: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, renderSprites: boolean, renderParticles: boolean, activeMeshes: Nullable<AbstractMesh[]>, renderDepthOnlyMeshes?: boolean, renderOpaqueMeshes?: boolean, renderAlphaTestMeshes?: boolean, renderTransparentMeshes?: boolean, customRenderTransparentSubMeshes?: (transparentSubMeshes: SmartArray<SubMesh>, renderingGroup?: RenderingGroup) => void): void;
27290
27555
  /**
27291
27556
  * Renders the opaque submeshes in the order from the opaqueSortCompareFn.
27292
27557
  * @param subMeshes The submeshes to render
@@ -27476,7 +27741,7 @@ declare class RenderingManager {
27476
27741
  * Renders the entire managed groups. This is used by the scene or the different render targets.
27477
27742
  * @internal
27478
27743
  */
27479
- render(customRenderFunction: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, activeMeshes: Nullable<AbstractMesh[]>, renderParticles: boolean, renderSprites: boolean, renderDepthOnlyMeshes?: boolean, renderOpaqueMeshes?: boolean, renderAlphaTestMeshes?: boolean, renderTransparentMeshes?: boolean, customRenderTransparentSubMeshes?: (transparentSubMeshes: SmartArray<SubMesh>) => void): void;
27744
+ render(customRenderFunction: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, activeMeshes: Nullable<AbstractMesh[]>, renderParticles: boolean, renderSprites: boolean, renderDepthOnlyMeshes?: boolean, renderOpaqueMeshes?: boolean, renderAlphaTestMeshes?: boolean, renderTransparentMeshes?: boolean, customRenderTransparentSubMeshes?: (transparentSubMeshes: SmartArray<SubMesh>, renderingGroup?: RenderingGroup) => void): void;
27480
27745
  /**
27481
27746
  * Resets the different information of the group to prepare a new frame
27482
27747
  * @internal
@@ -33920,7 +34185,13 @@ declare const enum PhysicsMaterialCombineMode {
33920
34185
  * min( valueA , valueB )
33921
34186
  */
33922
34187
  MINIMUM = 1,
34188
+ /** The final value will be the larger of the two:
34189
+ * max( valueA , valueB )
34190
+ */
33923
34191
  MAXIMUM = 2,
34192
+ /** The final value will be the arithmetic mean of the two values:
34193
+ * (valueA + valueB) / 2
34194
+ */
33924
34195
  ARITHMETIC_MEAN = 3,
33925
34196
  /**
33926
34197
  * The final value will be the product of the two values:
@@ -34083,18 +34354,56 @@ declare class GroundMesh extends Mesh {
34083
34354
 
34084
34355
  /** How a specific axis can be constrained */
34085
34356
  declare const enum PhysicsConstraintAxisLimitMode {
34357
+ /**
34358
+ * The axis is not restricted at all
34359
+ */
34086
34360
  FREE = 0,
34361
+ /**
34362
+ * The axis has a minimum/maximum limit
34363
+ */
34087
34364
  LIMITED = 1,
34365
+ /**
34366
+ * The axis allows no relative movement of the pivots
34367
+ */
34088
34368
  LOCKED = 2
34089
34369
  }
34090
34370
  /** The constraint specific axis to use when setting Friction, `ConstraintAxisLimitMode`, max force, ... */
34091
34371
  declare const enum PhysicsConstraintAxis {
34372
+ /**
34373
+ * Translation along the primary axis of the constraint (i.e. the
34374
+ * direction specified by PhysicsConstraintParameters.axisA/axisB)
34375
+ */
34092
34376
  LINEAR_X = 0,
34377
+ /**
34378
+ * Translation along the second axis of the constraint (i.e. the
34379
+ * direction specified by PhysicsConstraintParameters.perpAxisA/perpAxisB)
34380
+ */
34093
34381
  LINEAR_Y = 1,
34382
+ /**
34383
+ * Translation along the third axis of the constraint. This axis is
34384
+ * computed from the cross product of axisA/axisB and perpAxisA/perpAxisB)
34385
+ */
34094
34386
  LINEAR_Z = 2,
34387
+ /**
34388
+ * Rotation around the primary axis of the constraint (i.e. the
34389
+ * axis specified by PhysicsConstraintParameters.axisA/axisB)
34390
+ */
34095
34391
  ANGULAR_X = 3,
34392
+ /**
34393
+ * Rotation around the second axis of the constraint (i.e. the
34394
+ * axis specified by PhysicsConstraintParameters.perpAxisA/perpAxisB)
34395
+ */
34096
34396
  ANGULAR_Y = 4,
34397
+ /**
34398
+ * Rotation around the third axis of the constraint. This axis is
34399
+ * computed from the cross product of axisA/axisB and perpAxisA/perpAxisB)
34400
+ */
34097
34401
  ANGULAR_Z = 5,
34402
+ /**
34403
+ * A 3D distance limit; similar to specifying the LINEAR_X/Y/Z axes
34404
+ * individually, but the distance calculation uses all three axes
34405
+ * simultaneously, instead of individually.
34406
+ */
34098
34407
  LINEAR_DISTANCE = 6
34099
34408
  }
34100
34409
  /** Type of Constraint */
@@ -34125,7 +34434,16 @@ declare const enum PhysicsConstraintType {
34125
34434
  * up between both bodies, allowing no relative movement.
34126
34435
  */
34127
34436
  LOCK = 5,
34437
+ /**
34438
+ * A prismatic will lock the rotations of the bodies, and allow translation
34439
+ * only along one axis
34440
+ */
34128
34441
  PRISMATIC = 6,
34442
+ /**
34443
+ * A generic constraint; this starts with no limits on how the bodies can
34444
+ * move relative to each other, but limits can be added via the PhysicsConstraint
34445
+ * interfaces. This can be used to specify a large variety of constraints
34446
+ */
34129
34447
  SIX_DOF = 7
34130
34448
  }
34131
34449
  /** Type of Shape */
@@ -34182,7 +34500,7 @@ interface IBasePhysicsCollisionEvent {
34182
34500
  */
34183
34501
  interface IPhysicsCollisionEvent extends IBasePhysicsCollisionEvent {
34184
34502
  /**
34185
- * World position where the collision occured
34503
+ * World position where the collision occurred
34186
34504
  */
34187
34505
  point: Nullable<Vector3>;
34188
34506
  /**
@@ -34223,7 +34541,7 @@ interface PhysicsShapeParameters {
34223
34541
  */
34224
34542
  rotation?: Quaternion;
34225
34543
  /**
34226
- * Dimesion extention for the box
34544
+ * Dimension extents for the box
34227
34545
  */
34228
34546
  extents?: Vector3;
34229
34547
  /**
@@ -34292,7 +34610,7 @@ interface PhysicsConstraintParameters {
34292
34610
  */
34293
34611
  perpAxisB?: Vector3;
34294
34612
  /**
34295
- * The maximum distance that can seperate the two pivots.
34613
+ * The maximum distance that can separate the two pivots.
34296
34614
  * Only used for DISTANCE constraints
34297
34615
  */
34298
34616
  maxDistance?: number;
@@ -34330,7 +34648,7 @@ interface PhysicsMassProperties {
34330
34648
  * The principal moments of inertia of this object
34331
34649
  * for a unit mass. This determines how easy it is
34332
34650
  * for the body to rotate. A value of zero on any
34333
- * axis will be used as infinite interia about that
34651
+ * axis will be used as infinite inertia about that
34334
34652
  * axis.
34335
34653
  *
34336
34654
  * If not provided, the physics engine will compute
@@ -34671,6 +34989,9 @@ declare class CastingResult {
34671
34989
  * Gets if there was a hit
34672
34990
  */
34673
34991
  get hasHit(): boolean;
34992
+ /**
34993
+ * The index of the original triangle which was hit. Will be -1 if contact point is not on a mesh shape
34994
+ */
34674
34995
  get triangleIndex(): number;
34675
34996
  /**
34676
34997
  * Sets the hit data
@@ -34685,7 +35006,7 @@ declare class CastingResult {
34685
35006
  reset(): void;
34686
35007
  }
34687
35008
  /**
34688
- * Interface for the size containing width and height
35009
+ * Interface for 3D coordinates
34689
35010
  */
34690
35011
  interface IXYZ {
34691
35012
  /**
@@ -43188,6 +43509,7 @@ declare class WebXRCamera extends FreeCamera {
43188
43509
  private _referenceQuaternion;
43189
43510
  private _referencedPosition;
43190
43511
  private _trackingState;
43512
+ private _onWorldScaleFactorChanged;
43191
43513
  /**
43192
43514
  * This will be triggered after the first XR Frame initialized the camera,
43193
43515
  * including the right number of views and their rendering parameters
@@ -43424,6 +43746,7 @@ declare class WebXRInput implements IDisposable {
43424
43746
  private _frameObserver;
43425
43747
  private _sessionEndedObserver;
43426
43748
  private _sessionInitObserver;
43749
+ private _currentXRSession;
43427
43750
  /**
43428
43751
  * Event when a controller has been connected/added
43429
43752
  */
@@ -47068,6 +47391,9 @@ declare class WebXRExperienceHelper implements IDisposable {
47068
47391
  private _supported;
47069
47392
  private _spectatorMode;
47070
47393
  private _lastTimestamp;
47394
+ private _spectatorStateChangedObserver;
47395
+ private _spectatorXRFrameObserver;
47396
+ private _spectatorAfterRenderObserver;
47071
47397
  /**
47072
47398
  * Camera used to render xr content
47073
47399
  */
@@ -47134,6 +47460,7 @@ declare class WebXRExperienceHelper implements IDisposable {
47134
47460
  * Disable spectator mode for desktop VR experiences.
47135
47461
  */
47136
47462
  disableSpecatatorMode(): void;
47463
+ private _clearSpectatorObservers;
47137
47464
  private _switchSpectatorMode;
47138
47465
  private _nonXRToXRCamera;
47139
47466
  private _setState;
@@ -49778,8 +50105,6 @@ interface EngineFeatures {
49778
50105
  forceVertexBufferStrideAndOffsetMultiple4Bytes: boolean;
49779
50106
  /** @internal */
49780
50107
  _checkNonFloatVertexBuffersDontRecreatePipelineContext: boolean;
49781
- /** @internal */
49782
- _collectUbosUpdatedInFrame: boolean;
49783
50108
  }
49784
50109
 
49785
50110
  /**
@@ -50370,8 +50695,6 @@ declare abstract class FrameGraphTask {
50370
50695
  * The (texture) dependencies of the task (optional).
50371
50696
  */
50372
50697
  dependencies?: Set<FrameGraphTextureHandle>;
50373
- /** @internal */
50374
- _disableDebugMarkers: boolean;
50375
50698
  /**
50376
50699
  * Records the task in the frame graph. Use this function to add content (render passes, ...) to the task.
50377
50700
  * @param skipCreationOfDisabledPasses If true, the disabled passe(s) won't be created.
@@ -51878,8 +52201,7 @@ declare class FrameGraphObjectRendererTask extends FrameGraphTaskMultiRenderTarg
51878
52201
  protected _getTargetHandles(): FrameGraphTextureHandle[];
51879
52202
  protected _prepareRendering(context: FrameGraphRenderContext, depthEnabled: boolean): Nullable<number[]>;
51880
52203
  protected _setLightsForShadow(): void;
51881
- protected _renderTransparentMeshesWithOIT(transparentSubMeshes: SmartArray<SubMesh>): void;
51882
- protected _sceneHasClusteredLights(): boolean;
52204
+ protected _renderTransparentMeshesWithOIT(transparentSubMeshes: SmartArray<SubMesh>, renderingGroup: RenderingGroup): void;
51883
52205
  }
51884
52206
 
51885
52207
  /**
@@ -57034,7 +57356,7 @@ declare module "../../Meshes/transformNode" {
57034
57356
  /** @internal */
57035
57357
  _physicsBody: Nullable<PhysicsBody>;
57036
57358
  /**
57037
- * @see
57359
+ * Gets or sets the physics body associated with this node.
57038
57360
  */
57039
57361
  physicsBody: Nullable<PhysicsBody>;
57040
57362
  /**