@babylonjs/inspector 5.0.0-beta.4 → 5.0.0-beta.8

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.
@@ -411,6 +411,9 @@ declare module "@babylonjs/inspector/sharedUiComponents/lines/colorPickerCompone
411
411
  constructor(props: IColorPickerComponentProps);
412
412
  syncPositions(): void;
413
413
  shouldComponentUpdate(nextProps: IColorPickerComponentProps, nextState: IColorPickerComponentState): boolean;
414
+ getHexString(props?: Readonly<IColorPickerComponentProps> & Readonly<{
415
+ children?: React.ReactNode;
416
+ }>): string;
414
417
  componentDidUpdate(): void;
415
418
  componentDidMount(): void;
416
419
  render(): JSX.Element;
@@ -425,6 +428,20 @@ declare module "@babylonjs/inspector/sharedUiComponents/propertyChangedEvent" {
425
428
  allowNullValue?: boolean;
426
429
  }
427
430
  }
431
+ declare module "@babylonjs/inspector/sharedUiComponents/lines/targetsProxy" {
432
+ import { PropertyChangedEvent } from "@babylonjs/inspector/sharedUiComponents/propertyChangedEvent";
433
+ import { Observable } from "@babylonjs/core/Misc/observable";
434
+ export const conflictingValuesPlaceholder = "\u2014";
435
+ /**
436
+ *
437
+ * @param propertyName the property that the input changes
438
+ * @param targets a list of selected targets
439
+ * @param defaultValue the value that should be returned when two targets have conflicting values
440
+ * @param setter an optional setter function to override the default setter behavior
441
+ * @returns a proxy object that can be passed as a target into the input
442
+ */
443
+ export function makeTargetsProxy<Type>(targets: Type[], onPropertyChangedObservable?: Observable<PropertyChangedEvent>, getProperty?: (target: Type, property: keyof Type) => any): any;
444
+ }
428
445
  declare module "@babylonjs/inspector/sharedUiComponents/lines/checkBoxLineComponent" {
429
446
  import * as React from "react";
430
447
  import { Observable } from "@babylonjs/core/Misc/observable";
@@ -446,6 +463,7 @@ declare module "@babylonjs/inspector/sharedUiComponents/lines/checkBoxLineCompon
446
463
  export class CheckBoxLineComponent extends React.Component<ICheckBoxLineComponentProps, {
447
464
  isSelected: boolean;
448
465
  isDisabled?: boolean;
466
+ isConflict: boolean;
449
467
  }> {
450
468
  private static _UniqueIdSeed;
451
469
  private _uniqueId;
@@ -454,6 +472,7 @@ declare module "@babylonjs/inspector/sharedUiComponents/lines/checkBoxLineCompon
454
472
  shouldComponentUpdate(nextProps: ICheckBoxLineComponentProps, nextState: {
455
473
  isSelected: boolean;
456
474
  isDisabled: boolean;
475
+ isConflict: boolean;
457
476
  }): boolean;
458
477
  onChange(): void;
459
478
  render(): JSX.Element;
@@ -524,6 +543,8 @@ declare module "@babylonjs/inspector/components/graph/canvasGraphService" {
524
543
  * Force resets the position in the data, effectively returning to the most current data.
525
544
  */
526
545
  resetDataPosition(): void;
546
+ private _prevPointById;
547
+ private _prevValueById;
527
548
  /**
528
549
  * This method draws the data and sets up the appropriate scales.
529
550
  */
@@ -720,6 +741,10 @@ declare module "@babylonjs/inspector/components/graph/canvasGraphComponent" {
720
741
  layoutObservable?: Observable<IPerfLayoutSize>;
721
742
  returnToPlayheadObservable?: Observable<void>;
722
743
  onVisibleRangeChangedObservable?: Observable<IVisibleRangeChangedObservableProps>;
744
+ initialGraphSize?: {
745
+ width: number;
746
+ height: number;
747
+ };
723
748
  }
724
749
  export const CanvasGraphComponent: React.FC<ICanvasGraphComponentProps>;
725
750
  }
@@ -734,6 +759,10 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/performanceViewe
734
759
  layoutObservable: Observable<IPerfLayoutSize>;
735
760
  returnToLiveObservable: Observable<void>;
736
761
  performanceCollector: PerformanceViewerCollector;
762
+ initialGraphSize?: {
763
+ width: number;
764
+ height: number;
765
+ };
737
766
  }
738
767
  export const PerformanceViewerPopupComponent: React.FC<IPerformanceViewerPopupComponentProps>;
739
768
  }
@@ -823,6 +852,9 @@ declare module "@babylonjs/inspector/sharedUiComponents/lines/floatLineComponent
823
852
  icon?: string;
824
853
  iconLabel?: string;
825
854
  defaultValue?: number;
855
+ unit?: string;
856
+ onUnitClicked?: () => void;
857
+ unitLocked?: boolean;
826
858
  }
827
859
  export class FloatLineComponent extends React.Component<IFloatLineComponentProps, {
828
860
  value: string;
@@ -831,6 +863,7 @@ declare module "@babylonjs/inspector/sharedUiComponents/lines/floatLineComponent
831
863
  private _store;
832
864
  constructor(props: IFloatLineComponentProps);
833
865
  componentWillUnmount(): void;
866
+ getValueString(value: any): string;
834
867
  shouldComponentUpdate(nextProps: IFloatLineComponentProps, nextState: {
835
868
  value: string;
836
869
  }): boolean;
@@ -957,6 +990,9 @@ declare module "@babylonjs/inspector/sharedUiComponents/lines/textInputLineCompo
957
990
  noUnderline?: boolean;
958
991
  numbersOnly?: boolean;
959
992
  delayInput?: boolean;
993
+ unit?: string;
994
+ onUnitClicked?: (unit: string) => void;
995
+ unitLocked?: boolean;
960
996
  }
961
997
  export class TextInputLineComponent extends React.Component<ITextInputLineComponentProps, {
962
998
  value: string;
@@ -972,47 +1008,71 @@ declare module "@babylonjs/inspector/sharedUiComponents/lines/textInputLineCompo
972
1008
  render(): JSX.Element;
973
1009
  }
974
1010
  }
975
- declare module "@babylonjs/inspector/sharedUiComponents/lines/color3LineComponent" {
1011
+ declare module "@babylonjs/inspector/sharedUiComponents/lines/colorLineComponent" {
976
1012
  import * as React from "react";
977
1013
  import { Observable } from "@babylonjs/core/Misc/observable";
1014
+ import { Color4 } from "@babylonjs/core/Maths/math.color";
978
1015
  import { PropertyChangedEvent } from "@babylonjs/inspector/sharedUiComponents/propertyChangedEvent";
979
- import { Color3, Color4 } from "@babylonjs/core/Maths/math.color";
980
1016
  import { LockObject } from "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/lockObject";
981
- export interface IColor3LineComponentProps {
1017
+ export interface IColorLineComponentProps {
982
1018
  label: string;
983
- target: any;
1019
+ target?: any;
984
1020
  propertyName: string;
985
1021
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
1022
+ onChange?: () => void;
986
1023
  isLinear?: boolean;
987
1024
  icon?: string;
988
- lockObject?: LockObject;
989
1025
  iconLabel?: string;
990
- onValueChange?: (value: string) => void;
1026
+ lockObject?: LockObject;
1027
+ disableAlpha?: boolean;
991
1028
  }
992
- export class Color3LineComponent extends React.Component<IColor3LineComponentProps, {
1029
+ interface IColorLineComponentState {
993
1030
  isExpanded: boolean;
994
- color: Color3 | Color4;
995
- colorText: string;
996
- }> {
997
- private _localChange;
998
- constructor(props: IColor3LineComponentProps);
999
- private convertToColor3;
1000
- shouldComponentUpdate(nextProps: IColor3LineComponentProps, nextState: {
1001
- color: Color3 | Color4;
1002
- colorText: string;
1003
- }): boolean;
1004
- setPropertyValue(newColor: Color3 | Color4, newColorText: string): void;
1005
- onChange(newValue: string): void;
1031
+ color: Color4;
1032
+ colorString: string;
1033
+ }
1034
+ export class ColorLineComponent extends React.Component<IColorLineComponentProps, IColorLineComponentState> {
1035
+ constructor(props: IColorLineComponentProps);
1036
+ shouldComponentUpdate(nextProps: IColorLineComponentProps, nextState: IColorLineComponentState): boolean;
1037
+ getValue(props?: Readonly<IColorLineComponentProps> & Readonly<{
1038
+ children?: React.ReactNode;
1039
+ }>): Color4;
1040
+ getValueAsString(props?: Readonly<IColorLineComponentProps> & Readonly<{
1041
+ children?: React.ReactNode;
1042
+ }>): string;
1043
+ setColorFromString(colorString: string): void;
1044
+ setColor(color: Color4): void;
1045
+ updateColor(newColor: Color4): void;
1006
1046
  switchExpandState(): void;
1007
- raiseOnPropertyChanged(previousValue: Color3 | Color4): void;
1008
1047
  updateStateR(value: number): void;
1009
1048
  updateStateG(value: number): void;
1010
1049
  updateStateB(value: number): void;
1050
+ updateStateA(value: number): void;
1011
1051
  copyToClipboard(): void;
1012
- convert(colorString: string): void;
1013
- private _colorStringSaved;
1014
- private _colorPickerOpen;
1015
- private _colorString;
1052
+ get colorString(): string;
1053
+ set colorString(_: string);
1054
+ private convertToColor;
1055
+ private toColor3;
1056
+ render(): JSX.Element;
1057
+ }
1058
+ }
1059
+ declare module "@babylonjs/inspector/sharedUiComponents/lines/color3LineComponent" {
1060
+ import * as React from "react";
1061
+ import { Observable } from "@babylonjs/core/Misc/observable";
1062
+ import { PropertyChangedEvent } from "@babylonjs/inspector/sharedUiComponents/propertyChangedEvent";
1063
+ import { LockObject } from "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/lockObject";
1064
+ export interface IColor3LineComponentProps {
1065
+ label: string;
1066
+ target: any;
1067
+ propertyName: string;
1068
+ onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
1069
+ isLinear?: boolean;
1070
+ icon?: string;
1071
+ lockObject?: LockObject;
1072
+ iconLabel?: string;
1073
+ onValueChange?: (value: string) => void;
1074
+ }
1075
+ export class Color3LineComponent extends React.Component<IColor3LineComponentProps> {
1016
1076
  render(): JSX.Element;
1017
1077
  }
1018
1078
  }
@@ -1277,6 +1337,11 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/propertyGrids/an
1277
1337
  import { IAnimatable } from "@babylonjs/core/Animations/animatable.interface";
1278
1338
  import { AnimationGroup, TargetedAnimation } from "@babylonjs/core/Animations/animationGroup";
1279
1339
  import { AnimationKeyInterpolation } from "@babylonjs/core/Animations/animationKey";
1340
+ export interface IActiveAnimationChangedOptions {
1341
+ evaluateKeys?: boolean;
1342
+ frame?: boolean;
1343
+ range?: boolean;
1344
+ }
1280
1345
  export class Context {
1281
1346
  title: string;
1282
1347
  animations: Nullable<Animation[] | TargetedAnimation[]>;
@@ -1294,13 +1359,14 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/propertyGrids/an
1294
1359
  activeFrame: number;
1295
1360
  fromKey: number;
1296
1361
  toKey: number;
1362
+ useExistingPlayRange: boolean;
1297
1363
  forwardAnimation: boolean;
1298
1364
  isPlaying: boolean;
1299
1365
  clipLength: number;
1300
1366
  referenceMinFrame: number;
1301
1367
  referenceMaxFrame: number;
1302
1368
  focusedInput: boolean;
1303
- onActiveAnimationChanged: Observable<void>;
1369
+ onActiveAnimationChanged: Observable<IActiveAnimationChangedOptions>;
1304
1370
  onActiveKeyPointChanged: Observable<void>;
1305
1371
  onHostWindowResized: Observable<void>;
1306
1372
  onSelectAllKeys: Observable<void>;
@@ -1339,6 +1405,9 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/propertyGrids/an
1339
1405
  from: number;
1340
1406
  to: number;
1341
1407
  }>;
1408
+ lockLastFrameValue: boolean;
1409
+ lockLastFrameFrame: boolean;
1410
+ onActiveKeyDataChanged: Observable<number>;
1342
1411
  prepare(): void;
1343
1412
  play(forward: boolean): void;
1344
1413
  stop(): void;
@@ -1527,7 +1596,8 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/propertyGrids/an
1527
1596
  interface ITopBarComponentState {
1528
1597
  keyFrameValue: string;
1529
1598
  keyValue: string;
1530
- editControlsVisible: boolean;
1599
+ frameControlEnabled: boolean;
1600
+ valueControlEnabled: boolean;
1531
1601
  }
1532
1602
  export class TopBarComponent extends React.Component<ITopBarComponentProps, ITopBarComponentState> {
1533
1603
  private _onFrameSetObserver;
@@ -1620,6 +1690,7 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/propertyGrids/an
1620
1690
  private _pointerIsDown;
1621
1691
  private _sourcePointerX;
1622
1692
  private _sourcePointerY;
1693
+ private _selectionMade;
1623
1694
  private _selectionStartX;
1624
1695
  private _selectionStartY;
1625
1696
  private _onActiveAnimationChangedObserver;
@@ -1636,7 +1707,7 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/propertyGrids/an
1636
1707
  private _invertY;
1637
1708
  private _buildFrameIntervalAxis;
1638
1709
  private _buildYAxis;
1639
- private _frame;
1710
+ private _frameFromActiveKeys;
1640
1711
  private _dropKeyFrames;
1641
1712
  private _onPointerDown;
1642
1713
  private _onPointerMove;
@@ -3015,14 +3086,15 @@ declare module "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/gui/c
3015
3086
  import { Control } from "@babylonjs/gui/2D/controls/control";
3016
3087
  import { LockObject } from "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/lockObject";
3017
3088
  interface ICommonControlPropertyGridComponentProps {
3018
- control: Control;
3089
+ controls?: Control[];
3090
+ control?: Control;
3019
3091
  lockObject: LockObject;
3020
3092
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
3021
3093
  }
3022
3094
  export class CommonControlPropertyGridComponent extends React.Component<ICommonControlPropertyGridComponentProps> {
3023
3095
  constructor(props: ICommonControlPropertyGridComponentProps);
3024
- renderGridInformation(): JSX.Element | null;
3025
- render(): JSX.Element;
3096
+ renderGridInformation(control: Control): JSX.Element | null;
3097
+ render(): JSX.Element | undefined;
3026
3098
  }
3027
3099
  }
3028
3100
  declare module "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/gui/controlPropertyGridComponent" {
@@ -3227,7 +3299,7 @@ declare module "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/gui/r
3227
3299
  import { LockObject } from "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/lockObject";
3228
3300
  import { RadioButton } from "@babylonjs/gui/2D/controls/radioButton";
3229
3301
  interface IRadioButtonPropertyGridComponentProps {
3230
- radioButton: RadioButton;
3302
+ radioButtons: RadioButton[];
3231
3303
  lockObject: LockObject;
3232
3304
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
3233
3305
  }
@@ -3495,7 +3567,6 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/propertyGrids/me
3495
3567
  changeDisplayMode(): void;
3496
3568
  changeDisplayOptions(option: string, value: number): void;
3497
3569
  shouldComponentUpdate(nextProps: ISkeletonPropertyGridComponentProps): boolean;
3498
- onOverrideMeshLink(): void;
3499
3570
  render(): JSX.Element;
3500
3571
  }
3501
3572
  }
@@ -3662,36 +3733,20 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/gradientNodeProp
3662
3733
  declare module "@babylonjs/inspector/sharedUiComponents/lines/color4LineComponent" {
3663
3734
  import * as React from "react";
3664
3735
  import { Observable } from "@babylonjs/core/Misc/observable";
3665
- import { Color4 } from "@babylonjs/core/Maths/math.color";
3666
3736
  import { PropertyChangedEvent } from "@babylonjs/inspector/sharedUiComponents/propertyChangedEvent";
3737
+ import { LockObject } from "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/lockObject";
3667
3738
  export interface IColor4LineComponentProps {
3668
3739
  label: string;
3669
- target: any;
3740
+ target?: any;
3670
3741
  propertyName: string;
3671
3742
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
3672
3743
  onChange?: () => void;
3673
3744
  isLinear?: boolean;
3674
3745
  icon?: string;
3675
3746
  iconLabel?: string;
3747
+ lockObject?: LockObject;
3676
3748
  }
3677
- export class Color4LineComponent extends React.Component<IColor4LineComponentProps, {
3678
- isExpanded: boolean;
3679
- color: Color4;
3680
- }> {
3681
- private _localChange;
3682
- constructor(props: IColor4LineComponentProps);
3683
- shouldComponentUpdate(nextProps: IColor4LineComponentProps, nextState: {
3684
- color: Color4;
3685
- }): boolean;
3686
- setPropertyValue(newColor: Color4): void;
3687
- onChange(newValue: string): void;
3688
- switchExpandState(): void;
3689
- raiseOnPropertyChanged(previousValue: Color4): void;
3690
- updateStateR(value: number): void;
3691
- updateStateG(value: number): void;
3692
- updateStateB(value: number): void;
3693
- updateStateA(value: number): void;
3694
- copyToClipboard(): void;
3749
+ export class Color4LineComponent extends React.Component<IColor4LineComponentProps> {
3695
3750
  render(): JSX.Element;
3696
3751
  }
3697
3752
  }
@@ -4789,6 +4844,7 @@ declare module "@babylonjs/inspector/components/sceneExplorer/entities/sceneTree
4789
4844
  isSelected: boolean;
4790
4845
  isInPickingMode: boolean;
4791
4846
  }): boolean;
4847
+ updateGizmoAutoPicking(isInPickingMode: boolean): void;
4792
4848
  componentDidMount(): void;
4793
4849
  componentWillUnmount(): void;
4794
4850
  onSelect(): void;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  },
5
5
  "name": "@babylonjs/inspector",
6
6
  "description": "The Babylon.js inspector.",
7
- "version": "5.0.0-beta.4",
7
+ "version": "5.0.0-beta.8",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/BabylonJS/Babylon.js.git"
@@ -27,12 +27,12 @@
27
27
  ],
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@babylonjs/core": "5.0.0-beta.4",
31
- "@babylonjs/gui": "5.0.0-beta.4",
32
- "@babylonjs/loaders": "5.0.0-beta.4",
33
- "@babylonjs/materials": "5.0.0-beta.4",
34
- "@babylonjs/serializers": "5.0.0-beta.4",
35
- "babylonjs-gltf2interface": "5.0.0-beta.4",
30
+ "@babylonjs/core": "5.0.0-beta.8",
31
+ "@babylonjs/gui": "5.0.0-beta.8",
32
+ "@babylonjs/loaders": "5.0.0-beta.8",
33
+ "@babylonjs/materials": "5.0.0-beta.8",
34
+ "@babylonjs/serializers": "5.0.0-beta.8",
35
+ "babylonjs-gltf2interface": "5.0.0-beta.8",
36
36
  "tslib": "^2.3.1"
37
37
  },
38
38
  "peerDependencies": {