@babylonjs/inspector 5.0.0-beta.5 → 5.0.0-beta.9

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;
@@ -833,6 +852,9 @@ declare module "@babylonjs/inspector/sharedUiComponents/lines/floatLineComponent
833
852
  icon?: string;
834
853
  iconLabel?: string;
835
854
  defaultValue?: number;
855
+ unit?: string;
856
+ onUnitClicked?: () => void;
857
+ unitLocked?: boolean;
836
858
  }
837
859
  export class FloatLineComponent extends React.Component<IFloatLineComponentProps, {
838
860
  value: string;
@@ -841,6 +863,7 @@ declare module "@babylonjs/inspector/sharedUiComponents/lines/floatLineComponent
841
863
  private _store;
842
864
  constructor(props: IFloatLineComponentProps);
843
865
  componentWillUnmount(): void;
866
+ getValueString(value: any): string;
844
867
  shouldComponentUpdate(nextProps: IFloatLineComponentProps, nextState: {
845
868
  value: string;
846
869
  }): boolean;
@@ -967,6 +990,9 @@ declare module "@babylonjs/inspector/sharedUiComponents/lines/textInputLineCompo
967
990
  noUnderline?: boolean;
968
991
  numbersOnly?: boolean;
969
992
  delayInput?: boolean;
993
+ unit?: string;
994
+ onUnitClicked?: (unit: string) => void;
995
+ unitLocked?: boolean;
970
996
  }
971
997
  export class TextInputLineComponent extends React.Component<ITextInputLineComponentProps, {
972
998
  value: string;
@@ -982,47 +1008,71 @@ declare module "@babylonjs/inspector/sharedUiComponents/lines/textInputLineCompo
982
1008
  render(): JSX.Element;
983
1009
  }
984
1010
  }
985
- declare module "@babylonjs/inspector/sharedUiComponents/lines/color3LineComponent" {
1011
+ declare module "@babylonjs/inspector/sharedUiComponents/lines/colorLineComponent" {
986
1012
  import * as React from "react";
987
1013
  import { Observable } from "@babylonjs/core/Misc/observable";
1014
+ import { Color4 } from "@babylonjs/core/Maths/math.color";
988
1015
  import { PropertyChangedEvent } from "@babylonjs/inspector/sharedUiComponents/propertyChangedEvent";
989
- import { Color3, Color4 } from "@babylonjs/core/Maths/math.color";
990
1016
  import { LockObject } from "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/lockObject";
991
- export interface IColor3LineComponentProps {
1017
+ export interface IColorLineComponentProps {
992
1018
  label: string;
993
- target: any;
1019
+ target?: any;
994
1020
  propertyName: string;
995
1021
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
1022
+ onChange?: () => void;
996
1023
  isLinear?: boolean;
997
1024
  icon?: string;
998
- lockObject?: LockObject;
999
1025
  iconLabel?: string;
1000
- onValueChange?: (value: string) => void;
1026
+ lockObject?: LockObject;
1027
+ disableAlpha?: boolean;
1001
1028
  }
1002
- export class Color3LineComponent extends React.Component<IColor3LineComponentProps, {
1029
+ interface IColorLineComponentState {
1003
1030
  isExpanded: boolean;
1004
- color: Color3 | Color4;
1005
- colorText: string;
1006
- }> {
1007
- private _localChange;
1008
- constructor(props: IColor3LineComponentProps);
1009
- private convertToColor3;
1010
- shouldComponentUpdate(nextProps: IColor3LineComponentProps, nextState: {
1011
- color: Color3 | Color4;
1012
- colorText: string;
1013
- }): boolean;
1014
- setPropertyValue(newColor: Color3 | Color4, newColorText: string): void;
1015
- 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;
1016
1046
  switchExpandState(): void;
1017
- raiseOnPropertyChanged(previousValue: Color3 | Color4): void;
1018
1047
  updateStateR(value: number): void;
1019
1048
  updateStateG(value: number): void;
1020
1049
  updateStateB(value: number): void;
1050
+ updateStateA(value: number): void;
1021
1051
  copyToClipboard(): void;
1022
- convert(colorString: string): void;
1023
- private _colorStringSaved;
1024
- private _colorPickerOpen;
1025
- 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> {
1026
1076
  render(): JSX.Element;
1027
1077
  }
1028
1078
  }
@@ -1287,6 +1337,11 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/propertyGrids/an
1287
1337
  import { IAnimatable } from "@babylonjs/core/Animations/animatable.interface";
1288
1338
  import { AnimationGroup, TargetedAnimation } from "@babylonjs/core/Animations/animationGroup";
1289
1339
  import { AnimationKeyInterpolation } from "@babylonjs/core/Animations/animationKey";
1340
+ export interface IActiveAnimationChangedOptions {
1341
+ evaluateKeys?: boolean;
1342
+ frame?: boolean;
1343
+ range?: boolean;
1344
+ }
1290
1345
  export class Context {
1291
1346
  title: string;
1292
1347
  animations: Nullable<Animation[] | TargetedAnimation[]>;
@@ -1311,7 +1366,7 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/propertyGrids/an
1311
1366
  referenceMinFrame: number;
1312
1367
  referenceMaxFrame: number;
1313
1368
  focusedInput: boolean;
1314
- onActiveAnimationChanged: Observable<void>;
1369
+ onActiveAnimationChanged: Observable<IActiveAnimationChangedOptions>;
1315
1370
  onActiveKeyPointChanged: Observable<void>;
1316
1371
  onHostWindowResized: Observable<void>;
1317
1372
  onSelectAllKeys: Observable<void>;
@@ -1652,7 +1707,7 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/propertyGrids/an
1652
1707
  private _invertY;
1653
1708
  private _buildFrameIntervalAxis;
1654
1709
  private _buildYAxis;
1655
- private _frame;
1710
+ private _frameFromActiveKeys;
1656
1711
  private _dropKeyFrames;
1657
1712
  private _onPointerDown;
1658
1713
  private _onPointerMove;
@@ -3031,14 +3086,15 @@ declare module "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/gui/c
3031
3086
  import { Control } from "@babylonjs/gui/2D/controls/control";
3032
3087
  import { LockObject } from "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/lockObject";
3033
3088
  interface ICommonControlPropertyGridComponentProps {
3034
- control: Control;
3089
+ controls?: Control[];
3090
+ control?: Control;
3035
3091
  lockObject: LockObject;
3036
3092
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
3037
3093
  }
3038
3094
  export class CommonControlPropertyGridComponent extends React.Component<ICommonControlPropertyGridComponentProps> {
3039
3095
  constructor(props: ICommonControlPropertyGridComponentProps);
3040
- renderGridInformation(): JSX.Element | null;
3041
- render(): JSX.Element;
3096
+ renderGridInformation(control: Control): JSX.Element | null;
3097
+ render(): JSX.Element | undefined;
3042
3098
  }
3043
3099
  }
3044
3100
  declare module "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/gui/controlPropertyGridComponent" {
@@ -3243,7 +3299,7 @@ declare module "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/gui/r
3243
3299
  import { LockObject } from "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/lockObject";
3244
3300
  import { RadioButton } from "@babylonjs/gui/2D/controls/radioButton";
3245
3301
  interface IRadioButtonPropertyGridComponentProps {
3246
- radioButton: RadioButton;
3302
+ radioButtons: RadioButton[];
3247
3303
  lockObject: LockObject;
3248
3304
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
3249
3305
  }
@@ -3511,7 +3567,6 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/propertyGrids/me
3511
3567
  changeDisplayMode(): void;
3512
3568
  changeDisplayOptions(option: string, value: number): void;
3513
3569
  shouldComponentUpdate(nextProps: ISkeletonPropertyGridComponentProps): boolean;
3514
- onOverrideMeshLink(): void;
3515
3570
  render(): JSX.Element;
3516
3571
  }
3517
3572
  }
@@ -3678,36 +3733,20 @@ declare module "@babylonjs/inspector/components/actionTabs/tabs/gradientNodeProp
3678
3733
  declare module "@babylonjs/inspector/sharedUiComponents/lines/color4LineComponent" {
3679
3734
  import * as React from "react";
3680
3735
  import { Observable } from "@babylonjs/core/Misc/observable";
3681
- import { Color4 } from "@babylonjs/core/Maths/math.color";
3682
3736
  import { PropertyChangedEvent } from "@babylonjs/inspector/sharedUiComponents/propertyChangedEvent";
3737
+ import { LockObject } from "@babylonjs/inspector/sharedUiComponents/tabs/propertyGrids/lockObject";
3683
3738
  export interface IColor4LineComponentProps {
3684
3739
  label: string;
3685
- target: any;
3740
+ target?: any;
3686
3741
  propertyName: string;
3687
3742
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
3688
3743
  onChange?: () => void;
3689
3744
  isLinear?: boolean;
3690
3745
  icon?: string;
3691
3746
  iconLabel?: string;
3747
+ lockObject?: LockObject;
3692
3748
  }
3693
- export class Color4LineComponent extends React.Component<IColor4LineComponentProps, {
3694
- isExpanded: boolean;
3695
- color: Color4;
3696
- }> {
3697
- private _localChange;
3698
- constructor(props: IColor4LineComponentProps);
3699
- shouldComponentUpdate(nextProps: IColor4LineComponentProps, nextState: {
3700
- color: Color4;
3701
- }): boolean;
3702
- setPropertyValue(newColor: Color4): void;
3703
- onChange(newValue: string): void;
3704
- switchExpandState(): void;
3705
- raiseOnPropertyChanged(previousValue: Color4): void;
3706
- updateStateR(value: number): void;
3707
- updateStateG(value: number): void;
3708
- updateStateB(value: number): void;
3709
- updateStateA(value: number): void;
3710
- copyToClipboard(): void;
3749
+ export class Color4LineComponent extends React.Component<IColor4LineComponentProps> {
3711
3750
  render(): JSX.Element;
3712
3751
  }
3713
3752
  }
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.5",
7
+ "version": "5.0.0-beta.9",
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.5",
31
- "@babylonjs/gui": "5.0.0-beta.5",
32
- "@babylonjs/loaders": "5.0.0-beta.5",
33
- "@babylonjs/materials": "5.0.0-beta.5",
34
- "@babylonjs/serializers": "5.0.0-beta.5",
35
- "babylonjs-gltf2interface": "5.0.0-beta.5",
30
+ "@babylonjs/core": "5.0.0-beta.9",
31
+ "@babylonjs/gui": "5.0.0-beta.9",
32
+ "@babylonjs/loaders": "5.0.0-beta.9",
33
+ "@babylonjs/materials": "5.0.0-beta.9",
34
+ "@babylonjs/serializers": "5.0.0-beta.9",
35
+ "babylonjs-gltf2interface": "5.0.0-beta.9",
36
36
  "tslib": "^2.3.1"
37
37
  },
38
38
  "peerDependencies": {