babylonjs-node-geometry-editor 8.12.1 → 8.13.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/babylon.nodeGeometryEditor.d.ts +529 -3
- package/babylon.nodeGeometryEditor.js +1 -1
- package/babylon.nodeGeometryEditor.js.LICENSE.txt +15 -0
- package/babylon.nodeGeometryEditor.js.map +1 -1
- package/babylon.nodeGeometryEditor.max.js +3 -82554
- package/babylon.nodeGeometryEditor.module.d.ts +981 -9
- package/package.json +3 -3
- package/webpack.config.js +1 -0
|
@@ -2539,7 +2539,9 @@ export class Vector3LineComponent extends React.Component<IVector3LineComponentP
|
|
|
2539
2539
|
updateStateX(value: number): void;
|
|
2540
2540
|
updateStateY(value: number): void;
|
|
2541
2541
|
updateStateZ(value: number): void;
|
|
2542
|
-
onCopyClick():
|
|
2542
|
+
onCopyClick(): string;
|
|
2543
|
+
|
|
2544
|
+
|
|
2543
2545
|
|
|
2544
2546
|
}
|
|
2545
2547
|
export {};
|
|
@@ -2656,6 +2658,9 @@ interface ITextLineComponentProps {
|
|
|
2656
2658
|
export class TextLineComponent extends React.Component<ITextLineComponentProps> {
|
|
2657
2659
|
constructor(props: ITextLineComponentProps);
|
|
2658
2660
|
onLink(): void;
|
|
2661
|
+
copyFn(): (() => string) | undefined;
|
|
2662
|
+
|
|
2663
|
+
|
|
2659
2664
|
|
|
2660
2665
|
|
|
2661
2666
|
}
|
|
@@ -2663,7 +2668,8 @@ export {};
|
|
|
2663
2668
|
|
|
2664
2669
|
}
|
|
2665
2670
|
declare module "babylonjs-node-geometry-editor/lines/textInputLineComponent" {
|
|
2666
|
-
import
|
|
2671
|
+
import { ReactNode, KeyboardEvent } from "react";
|
|
2672
|
+
import { Component } from "react";
|
|
2667
2673
|
import { Observable } from "babylonjs/Misc/observable";
|
|
2668
2674
|
import { PropertyChangedEvent } from "babylonjs-node-geometry-editor/propertyChangedEvent";
|
|
2669
2675
|
import { LockObject } from "babylonjs-node-geometry-editor/tabs/propertyGrids/lockObject";
|
|
@@ -2688,14 +2694,14 @@ export interface ITextInputLineComponentProps {
|
|
|
2688
2694
|
min?: number;
|
|
2689
2695
|
max?: number;
|
|
2690
2696
|
placeholder?: string;
|
|
2691
|
-
unit?:
|
|
2697
|
+
unit?: ReactNode;
|
|
2692
2698
|
validator?: (value: string) => boolean;
|
|
2693
2699
|
multilines?: boolean;
|
|
2694
2700
|
throttlePropertyChangedNotification?: boolean;
|
|
2695
2701
|
throttlePropertyChangedNotificationDelay?: number;
|
|
2696
2702
|
disabled?: boolean;
|
|
2697
2703
|
}
|
|
2698
|
-
export class TextInputLineComponent extends
|
|
2704
|
+
export class TextInputLineComponent extends Component<ITextInputLineComponentProps, {
|
|
2699
2705
|
value: string;
|
|
2700
2706
|
dragging: boolean;
|
|
2701
2707
|
}> {
|
|
@@ -2710,7 +2716,9 @@ export class TextInputLineComponent extends React.Component<ITextInputLineCompon
|
|
|
2710
2716
|
getCurrentNumericValue(value: string): number;
|
|
2711
2717
|
updateValue(value: string, valueToValidate?: string): void;
|
|
2712
2718
|
incrementValue(amount: number): void;
|
|
2713
|
-
onKeyDown(event:
|
|
2719
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
2720
|
+
|
|
2721
|
+
|
|
2714
2722
|
|
|
2715
2723
|
}
|
|
2716
2724
|
|
|
@@ -2767,6 +2775,8 @@ export class SliderLineComponent extends React.Component<ISliderLineComponentPro
|
|
|
2767
2775
|
prepareDataToRead(value: number): number;
|
|
2768
2776
|
onCopyClick(): void;
|
|
2769
2777
|
|
|
2778
|
+
|
|
2779
|
+
|
|
2770
2780
|
}
|
|
2771
2781
|
export {};
|
|
2772
2782
|
|
|
@@ -2831,7 +2841,9 @@ export class OptionsLine extends React.Component<IOptionsLineProps, {
|
|
|
2831
2841
|
raiseOnPropertyChanged(newValue: number, previousValue: number): void;
|
|
2832
2842
|
setValue(value: string | number): void;
|
|
2833
2843
|
updateValue(valueString: string): void;
|
|
2834
|
-
|
|
2844
|
+
onCopyClickStr(): string;
|
|
2845
|
+
private _renderFluent;
|
|
2846
|
+
private _renderOriginal;
|
|
2835
2847
|
|
|
2836
2848
|
}
|
|
2837
2849
|
|
|
@@ -3192,6 +3204,8 @@ export class FileButtonLine extends React.Component<IFileButtonLineProps> {
|
|
|
3192
3204
|
constructor(props: IFileButtonLineProps);
|
|
3193
3205
|
onChange(evt: any): void;
|
|
3194
3206
|
|
|
3207
|
+
|
|
3208
|
+
|
|
3195
3209
|
}
|
|
3196
3210
|
export {};
|
|
3197
3211
|
|
|
@@ -3295,6 +3309,8 @@ export class ColorLine extends React.Component<IColorLineProps, IColorLineCompon
|
|
|
3295
3309
|
private _toColor3;
|
|
3296
3310
|
onCopyClick(): void;
|
|
3297
3311
|
|
|
3312
|
+
|
|
3313
|
+
|
|
3298
3314
|
}
|
|
3299
3315
|
export {};
|
|
3300
3316
|
|
|
@@ -3378,6 +3394,8 @@ export class CheckBoxLineComponent extends React.Component<ICheckBoxLineComponen
|
|
|
3378
3394
|
onChange(): void;
|
|
3379
3395
|
onCopyClick(): void;
|
|
3380
3396
|
|
|
3397
|
+
|
|
3398
|
+
|
|
3381
3399
|
}
|
|
3382
3400
|
|
|
3383
3401
|
}
|
|
@@ -3393,6 +3411,8 @@ export interface IButtonLineComponentProps {
|
|
|
3393
3411
|
export class ButtonLineComponent extends React.Component<IButtonLineComponentProps> {
|
|
3394
3412
|
constructor(props: IButtonLineComponentProps);
|
|
3395
3413
|
|
|
3414
|
+
|
|
3415
|
+
|
|
3396
3416
|
}
|
|
3397
3417
|
|
|
3398
3418
|
}
|
|
@@ -3409,6 +3429,432 @@ export class BooleanLineComponent extends React.Component<IBooleanLineComponentP
|
|
|
3409
3429
|
|
|
3410
3430
|
}
|
|
3411
3431
|
|
|
3432
|
+
}
|
|
3433
|
+
declare module "babylonjs-node-geometry-editor/fluent/primitives/textarea" {
|
|
3434
|
+
|
|
3435
|
+
import { FunctionComponent } from "react";
|
|
3436
|
+
import { BaseComponentProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3437
|
+
export type TextareaProps = BaseComponentProps<string> & {
|
|
3438
|
+
placeholder?: string;
|
|
3439
|
+
};
|
|
3440
|
+
/**
|
|
3441
|
+
* This is a texarea box that stops propagation of change/keydown events
|
|
3442
|
+
* @param props
|
|
3443
|
+
* @returns
|
|
3444
|
+
*/
|
|
3445
|
+
export const Textarea: FunctionComponent<any>;
|
|
3446
|
+
|
|
3447
|
+
}
|
|
3448
|
+
declare module "babylonjs-node-geometry-editor/fluent/primitives/syncedSlider" {
|
|
3449
|
+
import { FunctionComponent } from "react";
|
|
3450
|
+
import { BaseComponentProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3451
|
+
export type SyncedSliderProps = BaseComponentProps<number> & {
|
|
3452
|
+
min?: number;
|
|
3453
|
+
max?: number;
|
|
3454
|
+
step?: number;
|
|
3455
|
+
};
|
|
3456
|
+
/**
|
|
3457
|
+
* Component which synchronizes a slider and an input field, allowing the user to change a value using either control
|
|
3458
|
+
* @param props
|
|
3459
|
+
* @returns SyncedSlider component
|
|
3460
|
+
*/
|
|
3461
|
+
export const SyncedSliderInput: FunctionComponent<SyncedSliderProps>;
|
|
3462
|
+
|
|
3463
|
+
}
|
|
3464
|
+
declare module "babylonjs-node-geometry-editor/fluent/primitives/switch" {
|
|
3465
|
+
import { FunctionComponent } from "react";
|
|
3466
|
+
import { BaseComponentProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3467
|
+
export type SwitchProps = BaseComponentProps<boolean>;
|
|
3468
|
+
/**
|
|
3469
|
+
* This is a primitive fluent boolean switch component whose only knowledge is the shared styling across all tools
|
|
3470
|
+
* @param props
|
|
3471
|
+
* @returns Switch component
|
|
3472
|
+
*/
|
|
3473
|
+
export const Switch: FunctionComponent<SwitchProps>;
|
|
3474
|
+
|
|
3475
|
+
}
|
|
3476
|
+
declare module "babylonjs-node-geometry-editor/fluent/primitives/spinButton" {
|
|
3477
|
+
import { FunctionComponent } from "react";
|
|
3478
|
+
import { BaseComponentProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3479
|
+
export type SpinButtonProps = BaseComponentProps<number>;
|
|
3480
|
+
export const SpinButton: FunctionComponent<SpinButtonProps>;
|
|
3481
|
+
|
|
3482
|
+
}
|
|
3483
|
+
declare module "babylonjs-node-geometry-editor/fluent/primitives/link" {
|
|
3484
|
+
|
|
3485
|
+
|
|
3486
|
+
}
|
|
3487
|
+
declare module "babylonjs-node-geometry-editor/fluent/primitives/input" {
|
|
3488
|
+
import { FunctionComponent } from "react";
|
|
3489
|
+
import { BaseComponentProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3490
|
+
export type InputProps<T extends string | number> = BaseComponentProps<T> & {
|
|
3491
|
+
step?: number;
|
|
3492
|
+
placeholder?: string;
|
|
3493
|
+
min?: number;
|
|
3494
|
+
max?: number;
|
|
3495
|
+
};
|
|
3496
|
+
/**
|
|
3497
|
+
* This is an input text box that stops propagation of change events and sets its width based on the type of input (text or number)
|
|
3498
|
+
* @param props
|
|
3499
|
+
* @returns
|
|
3500
|
+
*/
|
|
3501
|
+
export const Input: FunctionComponent<InputProps<string | number>>;
|
|
3502
|
+
|
|
3503
|
+
}
|
|
3504
|
+
declare module "babylonjs-node-geometry-editor/fluent/primitives/dropdown" {
|
|
3505
|
+
import { FunctionComponent } from "react";
|
|
3506
|
+
import { BaseComponentProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3507
|
+
export type AcceptedDropdownValue = string | number;
|
|
3508
|
+
export type DropdownOption = {
|
|
3509
|
+
/**
|
|
3510
|
+
* Defines the visible part of the option
|
|
3511
|
+
*/
|
|
3512
|
+
label: string;
|
|
3513
|
+
/**
|
|
3514
|
+
* Defines the value part of the option
|
|
3515
|
+
*/
|
|
3516
|
+
value: AcceptedDropdownValue;
|
|
3517
|
+
};
|
|
3518
|
+
export type DropdownProps = BaseComponentProps<AcceptedDropdownValue | undefined> & {
|
|
3519
|
+
options: DropdownOption[];
|
|
3520
|
+
includeUndefined?: boolean;
|
|
3521
|
+
};
|
|
3522
|
+
/**
|
|
3523
|
+
* Renders a fluent UI dropdown component for the options passed in, and an additional 'Not Defined' option if includeUndefined is set to true
|
|
3524
|
+
* @param props
|
|
3525
|
+
* @returns dropdown component
|
|
3526
|
+
*/
|
|
3527
|
+
export const Dropdown: FunctionComponent<DropdownProps>;
|
|
3528
|
+
|
|
3529
|
+
}
|
|
3530
|
+
declare module "babylonjs-node-geometry-editor/fluent/primitives/colorPicker" {
|
|
3531
|
+
import { FunctionComponent } from "react";
|
|
3532
|
+
import { Color3, Color4 } from "babylonjs/Maths/math.color";
|
|
3533
|
+
import { BaseComponentProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3534
|
+
export type ColorPickerProps<C extends Color3 | Color4> = {
|
|
3535
|
+
isLinearMode?: boolean;
|
|
3536
|
+
} & BaseComponentProps<C>;
|
|
3537
|
+
export const ColorPickerPopup: FunctionComponent<ColorPickerProps<Color3 | Color4>>;
|
|
3538
|
+
type HsvKey = "h" | "s" | "v";
|
|
3539
|
+
export type InputHexProps = BaseComponentProps<Color3 | Color4> & {
|
|
3540
|
+
label?: string;
|
|
3541
|
+
linearHex?: boolean;
|
|
3542
|
+
isLinearMode?: boolean;
|
|
3543
|
+
};
|
|
3544
|
+
/**
|
|
3545
|
+
* Component which displays the passed in color's HEX value, either in linearSpace (if linearHex is true) or in gamma space
|
|
3546
|
+
* When the hex color is changed by user, component calculates the new Color3/4 value and calls onChange
|
|
3547
|
+
*
|
|
3548
|
+
* Component uses the isLinearMode boolean to display an informative label regarding linear / gamma space
|
|
3549
|
+
* @param props - The properties for the InputHexField component.
|
|
3550
|
+
* @returns
|
|
3551
|
+
*/
|
|
3552
|
+
export const InputHexField: FunctionComponent<InputHexProps>;
|
|
3553
|
+
type InputHsvFieldProps = {
|
|
3554
|
+
color: Color3 | Color4;
|
|
3555
|
+
label: string;
|
|
3556
|
+
hsvKey: HsvKey;
|
|
3557
|
+
onChange: (color: Color3 | Color4) => void;
|
|
3558
|
+
max: number;
|
|
3559
|
+
scale?: number;
|
|
3560
|
+
};
|
|
3561
|
+
/**
|
|
3562
|
+
* In the HSV (Hue, Saturation, Value) color model, Hue (H) ranges from 0 to 360 degrees, representing the color's position on the color wheel.
|
|
3563
|
+
* Saturation (S) ranges from 0 to 100%, indicating the intensity or purity of the color, with 0 being shades of gray and 100 being a fully saturated color.
|
|
3564
|
+
* Value (V) ranges from 0 to 100%, representing the brightness of the color, with 0 being black and 100 being the brightest.
|
|
3565
|
+
* @param props - The properties for the InputHsvField component.
|
|
3566
|
+
*/
|
|
3567
|
+
export const InputHsvField: FunctionComponent<InputHsvFieldProps>;
|
|
3568
|
+
export {};
|
|
3569
|
+
|
|
3570
|
+
}
|
|
3571
|
+
declare module "babylonjs-node-geometry-editor/fluent/primitives/checkbox" {
|
|
3572
|
+
import { FunctionComponent } from "react";
|
|
3573
|
+
import { BaseComponentProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3574
|
+
export type CheckboxProps = BaseComponentProps<boolean>;
|
|
3575
|
+
/**
|
|
3576
|
+
* This is a primitive fluent checkbox that can both read and write checked state
|
|
3577
|
+
* @param props
|
|
3578
|
+
* @returns Checkbox component
|
|
3579
|
+
*/
|
|
3580
|
+
export const Checkbox: FunctionComponent<CheckboxProps>;
|
|
3581
|
+
|
|
3582
|
+
}
|
|
3583
|
+
declare module "babylonjs-node-geometry-editor/fluent/primitives/accordion" {
|
|
3584
|
+
import { FunctionComponent, PropsWithChildren } from "react";
|
|
3585
|
+
export type AccordionSectionProps = {
|
|
3586
|
+
title: string;
|
|
3587
|
+
};
|
|
3588
|
+
export const AccordionSection: FunctionComponent<PropsWithChildren<AccordionSectionProps>>;
|
|
3589
|
+
export const Accordion: FunctionComponent<PropsWithChildren>;
|
|
3590
|
+
|
|
3591
|
+
}
|
|
3592
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/vectorPropertyLine" {
|
|
3593
|
+
import { FunctionComponent } from "react";
|
|
3594
|
+
import { BaseComponentProps, PropertyLineProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3595
|
+
import { Vector4 } from "babylonjs/Maths/math.vector";
|
|
3596
|
+
import { Vector3 } from "babylonjs/Maths/math.vector";
|
|
3597
|
+
export type VectorPropertyLineProps<V extends Vector3 | Vector4> = BaseComponentProps<V> & PropertyLineProps & {
|
|
3598
|
+
/**
|
|
3599
|
+
* If passed, all sliders will use this for the min value
|
|
3600
|
+
*/
|
|
3601
|
+
min?: number;
|
|
3602
|
+
/**
|
|
3603
|
+
* If passed, all sliders will use this for the max value
|
|
3604
|
+
*/
|
|
3605
|
+
max?: number;
|
|
3606
|
+
/**
|
|
3607
|
+
* If passed, the UX will use the conversion functions to display/update values
|
|
3608
|
+
*/
|
|
3609
|
+
valueConverter?: {
|
|
3610
|
+
/**
|
|
3611
|
+
* Will call from(val) before displaying in the UX
|
|
3612
|
+
*/
|
|
3613
|
+
from: (val: number) => number;
|
|
3614
|
+
/**
|
|
3615
|
+
* Will call to(val) before calling onChange
|
|
3616
|
+
*/
|
|
3617
|
+
to: (val: number) => number;
|
|
3618
|
+
};
|
|
3619
|
+
};
|
|
3620
|
+
type RotationVectorPropertyLineProps = VectorPropertyLineProps<Vector3> & {
|
|
3621
|
+
/**
|
|
3622
|
+
* Display angles as degrees instead of radians
|
|
3623
|
+
*/
|
|
3624
|
+
useDegrees?: boolean;
|
|
3625
|
+
};
|
|
3626
|
+
export const RotationVectorPropertyLine: FunctionComponent<RotationVectorPropertyLineProps>;
|
|
3627
|
+
export const Vector3PropertyLine: FunctionComponent<VectorPropertyLineProps<Vector3>>;
|
|
3628
|
+
export const Vector4PropertyLine: FunctionComponent<VectorPropertyLineProps<Vector4>>;
|
|
3629
|
+
export {};
|
|
3630
|
+
|
|
3631
|
+
}
|
|
3632
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/textPropertyLine" {
|
|
3633
|
+
import { PropertyLineProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3634
|
+
import { FunctionComponent } from "react";
|
|
3635
|
+
type TextProps = {
|
|
3636
|
+
value: string;
|
|
3637
|
+
tooltip?: string;
|
|
3638
|
+
};
|
|
3639
|
+
/**
|
|
3640
|
+
* Wraps text in a property line
|
|
3641
|
+
* @param props - PropertyLineProps and TextProps
|
|
3642
|
+
* @returns property-line wrapped text
|
|
3643
|
+
*/
|
|
3644
|
+
export const TextPropertyLine: FunctionComponent<PropertyLineProps & TextProps>;
|
|
3645
|
+
export {};
|
|
3646
|
+
|
|
3647
|
+
}
|
|
3648
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/syncedSliderLine" {
|
|
3649
|
+
import { PropertyLineProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3650
|
+
import { SyncedSliderProps } from "babylonjs-node-geometry-editor/fluent/primitives/syncedSlider";
|
|
3651
|
+
import { FunctionComponent } from "react";
|
|
3652
|
+
type SyncedSliderLineProps = SyncedSliderProps & PropertyLineProps;
|
|
3653
|
+
/**
|
|
3654
|
+
* Renders a simple wrapper around the SyncedSliderInput
|
|
3655
|
+
* @param props
|
|
3656
|
+
* @returns
|
|
3657
|
+
*/
|
|
3658
|
+
export const SyncedSliderLine: FunctionComponent<SyncedSliderLineProps>;
|
|
3659
|
+
export {};
|
|
3660
|
+
|
|
3661
|
+
}
|
|
3662
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/switchPropertyLine" {
|
|
3663
|
+
import { PropertyLineProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3664
|
+
import { FunctionComponent } from "react";
|
|
3665
|
+
import { SwitchProps } from "babylonjs-node-geometry-editor/fluent/primitives/switch";
|
|
3666
|
+
/**
|
|
3667
|
+
* Wraps a switch in a property line
|
|
3668
|
+
* @param props - The properties for the switch and property line
|
|
3669
|
+
* @returns A React element representing the property line with a switch
|
|
3670
|
+
*/
|
|
3671
|
+
export const SwitchPropertyLine: FunctionComponent<PropertyLineProps & SwitchProps>;
|
|
3672
|
+
|
|
3673
|
+
}
|
|
3674
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/propertyLine" {
|
|
3675
|
+
import { FunctionComponent } from "react";
|
|
3676
|
+
export type PropertyLineProps = {
|
|
3677
|
+
/**
|
|
3678
|
+
* The name of the property to display in the property line.
|
|
3679
|
+
*/
|
|
3680
|
+
label: string;
|
|
3681
|
+
/**
|
|
3682
|
+
* Optional description for the property, shown on hover of the info icon
|
|
3683
|
+
*/
|
|
3684
|
+
description?: string;
|
|
3685
|
+
/**
|
|
3686
|
+
* Optional function returning a string to copy to clipboard.
|
|
3687
|
+
*/
|
|
3688
|
+
onCopy?: () => string;
|
|
3689
|
+
/**
|
|
3690
|
+
* If supplied, an 'expand' icon will be shown which, when clicked, renders this component within the property line.
|
|
3691
|
+
*/
|
|
3692
|
+
expandedContent?: JSX.Element;
|
|
3693
|
+
/**
|
|
3694
|
+
* Link to the documentation for this property, available from the info icon either linked from the description (if provided) or defalt 'docs' text
|
|
3695
|
+
*/
|
|
3696
|
+
docLink?: string;
|
|
3697
|
+
};
|
|
3698
|
+
export const LineContainer: import("react").ForwardRefExoticComponent<{
|
|
3699
|
+
children?: import("react").ReactNode | undefined;
|
|
3700
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
3701
|
+
export type BaseComponentProps<T> = {
|
|
3702
|
+
/**
|
|
3703
|
+
* The value of the property to be displayed and modified.
|
|
3704
|
+
*/
|
|
3705
|
+
value: T;
|
|
3706
|
+
/**
|
|
3707
|
+
* Callback function to handle changes to the value
|
|
3708
|
+
*/
|
|
3709
|
+
onChange: (value: T) => void;
|
|
3710
|
+
/**
|
|
3711
|
+
* Optional flag to disable the component, preventing any interaction.
|
|
3712
|
+
*/
|
|
3713
|
+
disabled?: boolean;
|
|
3714
|
+
/**
|
|
3715
|
+
* Optional class name to apply custom styles to the component.
|
|
3716
|
+
*/
|
|
3717
|
+
className?: string;
|
|
3718
|
+
};
|
|
3719
|
+
/**
|
|
3720
|
+
* A reusable component that renders a property line with a label and child content, and an optional description, copy button, and expandable section.
|
|
3721
|
+
*
|
|
3722
|
+
* @param props - The properties for the PropertyLine component.
|
|
3723
|
+
* @returns A React element representing the property line.
|
|
3724
|
+
*
|
|
3725
|
+
*/
|
|
3726
|
+
export const PropertyLine: import("react").ForwardRefExoticComponent<PropertyLineProps & {
|
|
3727
|
+
children?: import("react").ReactNode | undefined;
|
|
3728
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
3729
|
+
export const PlaceholderPropertyLine: FunctionComponent<BaseComponentProps<any> & PropertyLineProps>;
|
|
3730
|
+
|
|
3731
|
+
}
|
|
3732
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/linkPropertyLine" {
|
|
3733
|
+
import { PropertyLineProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3734
|
+
import { FunctionComponent } from "react";
|
|
3735
|
+
type LinkProps = {
|
|
3736
|
+
value: string;
|
|
3737
|
+
tooltip?: string;
|
|
3738
|
+
onLink?: () => void;
|
|
3739
|
+
url?: string;
|
|
3740
|
+
};
|
|
3741
|
+
/**
|
|
3742
|
+
* Wraps a link in a property line
|
|
3743
|
+
* @param props - PropertyLineProps and LinkProps
|
|
3744
|
+
* @returns property-line wrapped link
|
|
3745
|
+
*/
|
|
3746
|
+
export const LinkPropertyLine: FunctionComponent<PropertyLineProps & LinkProps>;
|
|
3747
|
+
export {};
|
|
3748
|
+
|
|
3749
|
+
}
|
|
3750
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/inputPropertyLine" {
|
|
3751
|
+
import { PropertyLineProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3752
|
+
import { FunctionComponent } from "react";
|
|
3753
|
+
import { InputProps } from "babylonjs-node-geometry-editor/fluent/primitives/input";
|
|
3754
|
+
export const TextInputPropertyLine: FunctionComponent<InputProps<string> & PropertyLineProps>;
|
|
3755
|
+
export const FloatInputPropertyLine: FunctionComponent<InputProps<number> & PropertyLineProps>;
|
|
3756
|
+
|
|
3757
|
+
}
|
|
3758
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/hexLineComponent" {
|
|
3759
|
+
import { PropertyLineProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3760
|
+
import { FunctionComponent } from "react";
|
|
3761
|
+
import { InputHexProps } from "babylonjs-node-geometry-editor/fluent/primitives/colorPicker";
|
|
3762
|
+
/**
|
|
3763
|
+
* Wraps a hex input in a property line
|
|
3764
|
+
* @param props - PropertyLineProps and InputHexProps
|
|
3765
|
+
* @returns property-line wrapped input hex component
|
|
3766
|
+
*/
|
|
3767
|
+
export const HexPropertyLine: FunctionComponent<InputHexProps & PropertyLineProps>;
|
|
3768
|
+
|
|
3769
|
+
}
|
|
3770
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/fluentToolWrapper" {
|
|
3771
|
+
import { PropsWithChildren, FunctionComponent } from "react";
|
|
3772
|
+
|
|
3773
|
+
export type ToolHostProps = {
|
|
3774
|
+
/**
|
|
3775
|
+
* Allows host to pass in a theme
|
|
3776
|
+
*/
|
|
3777
|
+
customTheme?: any;
|
|
3778
|
+
/**
|
|
3779
|
+
* Can be set to true to disable the copy button in the tool's property lines. Default is false (copy enabled)
|
|
3780
|
+
*/
|
|
3781
|
+
disableCopy?: boolean;
|
|
3782
|
+
};
|
|
3783
|
+
export const ToolContext: import("react").Context<{
|
|
3784
|
+
readonly useFluent: boolean;
|
|
3785
|
+
readonly disableCopy: boolean;
|
|
3786
|
+
}>;
|
|
3787
|
+
/**
|
|
3788
|
+
* For tools which are ready to move over the fluent, wrap the root of the tool (or the panel which you want fluentized) with this component
|
|
3789
|
+
* Today we will only enable fluent if the URL has the `newUX` query parameter is truthy
|
|
3790
|
+
* @param props
|
|
3791
|
+
* @returns
|
|
3792
|
+
*/
|
|
3793
|
+
export const FluentToolWrapper: FunctionComponent<PropsWithChildren<ToolHostProps>>;
|
|
3794
|
+
|
|
3795
|
+
}
|
|
3796
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/fileUploadLine" {
|
|
3797
|
+
import { FunctionComponent } from "react";
|
|
3798
|
+
import { ButtonLineProps } from "babylonjs-node-geometry-editor/fluent/hoc/buttonLine";
|
|
3799
|
+
type FileUploadLineProps = Omit<ButtonLineProps, "onClick"> & {
|
|
3800
|
+
onClick: (file: File) => void;
|
|
3801
|
+
accept: string;
|
|
3802
|
+
};
|
|
3803
|
+
export const FileUploadLine: FunctionComponent<FileUploadLineProps>;
|
|
3804
|
+
export {};
|
|
3805
|
+
|
|
3806
|
+
}
|
|
3807
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/dropdownPropertyLine" {
|
|
3808
|
+
import { DropdownProps } from "babylonjs-node-geometry-editor/fluent/primitives/dropdown";
|
|
3809
|
+
import { PropertyLineProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3810
|
+
import { FunctionComponent } from "react";
|
|
3811
|
+
/**
|
|
3812
|
+
* Wraps a dropdown in a property line
|
|
3813
|
+
* @param props - PropertyLineProps and DropdownProps
|
|
3814
|
+
* @returns property-line wrapped dropdown
|
|
3815
|
+
*/
|
|
3816
|
+
export const DropdownPropertyLine: FunctionComponent<PropertyLineProps & DropdownProps>;
|
|
3817
|
+
|
|
3818
|
+
}
|
|
3819
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/colorPropertyLine" {
|
|
3820
|
+
import { FunctionComponent } from "react";
|
|
3821
|
+
import { PropertyLineProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3822
|
+
import { Color3 } from "babylonjs/Maths/math.color";
|
|
3823
|
+
import { Color4 } from "babylonjs/Maths/math.color";
|
|
3824
|
+
import { ColorPickerProps } from "babylonjs-node-geometry-editor/fluent/primitives/colorPicker";
|
|
3825
|
+
export type ColorPropertyLineProps = ColorPickerProps<Color3 | Color4> & PropertyLineProps;
|
|
3826
|
+
export const Color3PropertyLine: FunctionComponent<ColorPickerProps<Color3> & PropertyLineProps>;
|
|
3827
|
+
export const Color4PropertyLine: FunctionComponent<ColorPickerProps<Color4> & PropertyLineProps>;
|
|
3828
|
+
|
|
3829
|
+
}
|
|
3830
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/checkboxPropertyLine" {
|
|
3831
|
+
import { PropertyLineProps } from "babylonjs-node-geometry-editor/fluent/hoc/propertyLine";
|
|
3832
|
+
import { FunctionComponent } from "react";
|
|
3833
|
+
import { CheckboxProps } from "babylonjs-node-geometry-editor/fluent/primitives/checkbox";
|
|
3834
|
+
/**
|
|
3835
|
+
* Wraps a checkbox in a property line
|
|
3836
|
+
* @param props - PropertyLineProps and CheckboxProps
|
|
3837
|
+
* @returns property-line wrapped checkbox
|
|
3838
|
+
*/
|
|
3839
|
+
export const CheckboxPropertyLine: FunctionComponent<PropertyLineProps & CheckboxProps>;
|
|
3840
|
+
|
|
3841
|
+
}
|
|
3842
|
+
declare module "babylonjs-node-geometry-editor/fluent/hoc/buttonLine" {
|
|
3843
|
+
import { FunctionComponent } from "react";
|
|
3844
|
+
export type ButtonLineProps = {
|
|
3845
|
+
label: string;
|
|
3846
|
+
onClick: () => void;
|
|
3847
|
+
disabled?: boolean;
|
|
3848
|
+
icon?: string;
|
|
3849
|
+
title?: string;
|
|
3850
|
+
};
|
|
3851
|
+
/**
|
|
3852
|
+
* Wraps a button with a label in a line container
|
|
3853
|
+
* @param props Button props plus a label
|
|
3854
|
+
* @returns A button inside a line
|
|
3855
|
+
*/
|
|
3856
|
+
export const ButtonLine: FunctionComponent<ButtonLineProps>;
|
|
3857
|
+
|
|
3412
3858
|
}
|
|
3413
3859
|
declare module "babylonjs-node-geometry-editor/components/classNames" {
|
|
3414
3860
|
export function ClassNames(names: any, styleObject: any): string;
|
|
@@ -6844,7 +7290,9 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
|
6844
7290
|
updateStateX(value: number): void;
|
|
6845
7291
|
updateStateY(value: number): void;
|
|
6846
7292
|
updateStateZ(value: number): void;
|
|
6847
|
-
onCopyClick():
|
|
7293
|
+
onCopyClick(): string;
|
|
7294
|
+
renderFluent(): import("react/jsx-runtime").JSX.Element;
|
|
7295
|
+
renderOriginal(): import("react/jsx-runtime").JSX.Element;
|
|
6848
7296
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
6849
7297
|
}
|
|
6850
7298
|
|
|
@@ -6976,7 +7424,10 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
|
6976
7424
|
export class TextLineComponent extends React.Component<ITextLineComponentProps> {
|
|
6977
7425
|
constructor(props: ITextLineComponentProps);
|
|
6978
7426
|
onLink(): void;
|
|
6979
|
-
|
|
7427
|
+
copyFn(): (() => string) | undefined;
|
|
7428
|
+
renderContent(isLink: boolean, tooltip: string): import("react/jsx-runtime").JSX.Element | null;
|
|
7429
|
+
renderOriginal(isLink: boolean, tooltip: string): import("react/jsx-runtime").JSX.Element;
|
|
7430
|
+
renderFluent(isLink: boolean, tooltip: string): import("react/jsx-runtime").JSX.Element;
|
|
6980
7431
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
6981
7432
|
}
|
|
6982
7433
|
|
|
@@ -7032,6 +7483,8 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
|
7032
7483
|
updateValue(value: string, valueToValidate?: string): void;
|
|
7033
7484
|
incrementValue(amount: number): void;
|
|
7034
7485
|
onKeyDown(event: React.KeyboardEvent): void;
|
|
7486
|
+
renderFluent(value: string, placeholder: string, step: number): import("react/jsx-runtime").JSX.Element;
|
|
7487
|
+
renderOriginal(value: string, placeholder: string, step: number): import("react/jsx-runtime").JSX.Element;
|
|
7035
7488
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
7036
7489
|
}
|
|
7037
7490
|
|
|
@@ -7093,6 +7546,8 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
|
7093
7546
|
onInput(newValueString: any): void;
|
|
7094
7547
|
prepareDataToRead(value: number): number;
|
|
7095
7548
|
onCopyClick(): void;
|
|
7549
|
+
renderFluent(): import("react/jsx-runtime").JSX.Element;
|
|
7550
|
+
renderOriginal(): import("react/jsx-runtime").JSX.Element;
|
|
7096
7551
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
7097
7552
|
}
|
|
7098
7553
|
|
|
@@ -7162,7 +7617,9 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
|
7162
7617
|
raiseOnPropertyChanged(newValue: number, previousValue: number): void;
|
|
7163
7618
|
setValue(value: string | number): void;
|
|
7164
7619
|
updateValue(valueString: string): void;
|
|
7165
|
-
|
|
7620
|
+
onCopyClickStr(): string;
|
|
7621
|
+
private _renderFluent;
|
|
7622
|
+
private _renderOriginal;
|
|
7166
7623
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
7167
7624
|
}
|
|
7168
7625
|
|
|
@@ -7571,6 +8028,8 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
|
7571
8028
|
private _uploadInputRef;
|
|
7572
8029
|
constructor(props: IFileButtonLineProps);
|
|
7573
8030
|
onChange(evt: any): void;
|
|
8031
|
+
renderFluent(): import("react/jsx-runtime").JSX.Element;
|
|
8032
|
+
renderOriginal(): import("react/jsx-runtime").JSX.Element;
|
|
7574
8033
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
7575
8034
|
}
|
|
7576
8035
|
|
|
@@ -7686,6 +8145,8 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
|
7686
8145
|
private _convertToColor;
|
|
7687
8146
|
private _toColor3;
|
|
7688
8147
|
onCopyClick(): void;
|
|
8148
|
+
renderFluent(): import("react/jsx-runtime").JSX.Element;
|
|
8149
|
+
renderOriginal(): import("react/jsx-runtime").JSX.Element;
|
|
7689
8150
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
7690
8151
|
}
|
|
7691
8152
|
|
|
@@ -7774,6 +8235,8 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
|
7774
8235
|
}): boolean;
|
|
7775
8236
|
onChange(): void;
|
|
7776
8237
|
onCopyClick(): void;
|
|
8238
|
+
renderOriginal(): import("react/jsx-runtime").JSX.Element;
|
|
8239
|
+
renderFluent(): import("react/jsx-runtime").JSX.Element;
|
|
7777
8240
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
7778
8241
|
}
|
|
7779
8242
|
|
|
@@ -7794,6 +8257,8 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
|
7794
8257
|
}
|
|
7795
8258
|
export class ButtonLineComponent extends React.Component<IButtonLineComponentProps> {
|
|
7796
8259
|
constructor(props: IButtonLineComponentProps);
|
|
8260
|
+
renderFluent(): import("react/jsx-runtime").JSX.Element;
|
|
8261
|
+
renderOriginal(): import("react/jsx-runtime").JSX.Element;
|
|
7797
8262
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
7798
8263
|
}
|
|
7799
8264
|
|
|
@@ -7818,6 +8283,513 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
|
7818
8283
|
|
|
7819
8284
|
|
|
7820
8285
|
|
|
8286
|
+
}
|
|
8287
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8288
|
+
|
|
8289
|
+
|
|
8290
|
+
}
|
|
8291
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8292
|
+
export type TextareaProps = BABYLON.NodeGeometryEditor.SharedUIComponents.BaseComponentProps<string> & {
|
|
8293
|
+
placeholder?: string;
|
|
8294
|
+
};
|
|
8295
|
+
/**
|
|
8296
|
+
* This is a texarea box that stops propagation of change/keydown events
|
|
8297
|
+
* @param props
|
|
8298
|
+
* @returns
|
|
8299
|
+
*/
|
|
8300
|
+
export var Textarea: React.FunctionComponent<any>;
|
|
8301
|
+
|
|
8302
|
+
|
|
8303
|
+
|
|
8304
|
+
}
|
|
8305
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8306
|
+
|
|
8307
|
+
|
|
8308
|
+
}
|
|
8309
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8310
|
+
export type SyncedSliderProps = BABYLON.NodeGeometryEditor.SharedUIComponents.BaseComponentProps<number> & {
|
|
8311
|
+
min?: number;
|
|
8312
|
+
max?: number;
|
|
8313
|
+
step?: number;
|
|
8314
|
+
};
|
|
8315
|
+
/**
|
|
8316
|
+
* Component which synchronizes a slider and an input field, allowing the user to change a value using either control
|
|
8317
|
+
* @param props
|
|
8318
|
+
* @returns SyncedSlider component
|
|
8319
|
+
*/
|
|
8320
|
+
export var SyncedSliderInput: React.FunctionComponent<SyncedSliderProps>;
|
|
8321
|
+
|
|
8322
|
+
|
|
8323
|
+
|
|
8324
|
+
}
|
|
8325
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8326
|
+
|
|
8327
|
+
|
|
8328
|
+
}
|
|
8329
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8330
|
+
export type SwitchProps = BABYLON.NodeGeometryEditor.SharedUIComponents.BaseComponentProps<boolean>;
|
|
8331
|
+
/**
|
|
8332
|
+
* This is a primitive fluent boolean switch component whose only knowledge is the shared styling across all tools
|
|
8333
|
+
* @param props
|
|
8334
|
+
* @returns Switch component
|
|
8335
|
+
*/
|
|
8336
|
+
export var Switch: React.FunctionComponent<SwitchProps>;
|
|
8337
|
+
|
|
8338
|
+
|
|
8339
|
+
|
|
8340
|
+
}
|
|
8341
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8342
|
+
|
|
8343
|
+
|
|
8344
|
+
}
|
|
8345
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8346
|
+
export type SpinButtonProps = BABYLON.NodeGeometryEditor.SharedUIComponents.BaseComponentProps<number>;
|
|
8347
|
+
export var SpinButton: React.FunctionComponent<SpinButtonProps>;
|
|
8348
|
+
|
|
8349
|
+
|
|
8350
|
+
|
|
8351
|
+
}
|
|
8352
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8353
|
+
|
|
8354
|
+
|
|
8355
|
+
}
|
|
8356
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8357
|
+
|
|
8358
|
+
|
|
8359
|
+
|
|
8360
|
+
}
|
|
8361
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8362
|
+
|
|
8363
|
+
|
|
8364
|
+
}
|
|
8365
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8366
|
+
export type InputProps<T extends string | number> = BABYLON.NodeGeometryEditor.SharedUIComponents.BaseComponentProps<T> & {
|
|
8367
|
+
step?: number;
|
|
8368
|
+
placeholder?: string;
|
|
8369
|
+
min?: number;
|
|
8370
|
+
max?: number;
|
|
8371
|
+
};
|
|
8372
|
+
/**
|
|
8373
|
+
* This is an input text box that stops propagation of change events and sets its width based on the type of input (text or number)
|
|
8374
|
+
* @param props
|
|
8375
|
+
* @returns
|
|
8376
|
+
*/
|
|
8377
|
+
export var Input: React.FunctionComponent<InputProps<string | number>>;
|
|
8378
|
+
|
|
8379
|
+
|
|
8380
|
+
|
|
8381
|
+
}
|
|
8382
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8383
|
+
|
|
8384
|
+
|
|
8385
|
+
}
|
|
8386
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8387
|
+
export type AcceptedDropdownValue = string | number;
|
|
8388
|
+
export type DropdownOption = {
|
|
8389
|
+
/**
|
|
8390
|
+
* Defines the visible part of the option
|
|
8391
|
+
*/
|
|
8392
|
+
label: string;
|
|
8393
|
+
/**
|
|
8394
|
+
* Defines the value part of the option
|
|
8395
|
+
*/
|
|
8396
|
+
value: AcceptedDropdownValue;
|
|
8397
|
+
};
|
|
8398
|
+
export type DropdownProps = BABYLON.NodeGeometryEditor.SharedUIComponents.BaseComponentProps<AcceptedDropdownValue | undefined> & {
|
|
8399
|
+
options: DropdownOption[];
|
|
8400
|
+
includeUndefined?: boolean;
|
|
8401
|
+
};
|
|
8402
|
+
/**
|
|
8403
|
+
* Renders a fluent UI dropdown component for the options passed in, and an additional 'Not Defined' option if includeUndefined is set to true
|
|
8404
|
+
* @param props
|
|
8405
|
+
* @returns dropdown component
|
|
8406
|
+
*/
|
|
8407
|
+
export var Dropdown: React.FunctionComponent<DropdownProps>;
|
|
8408
|
+
|
|
8409
|
+
|
|
8410
|
+
|
|
8411
|
+
}
|
|
8412
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8413
|
+
|
|
8414
|
+
|
|
8415
|
+
}
|
|
8416
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8417
|
+
export type ColorPickerProps<C extends BABYLON.Color3 | BABYLON.Color4> = {
|
|
8418
|
+
isLinearMode?: boolean;
|
|
8419
|
+
} & BABYLON.NodeGeometryEditor.SharedUIComponents.BaseComponentProps<C>;
|
|
8420
|
+
export var ColorPickerPopup: React.FunctionComponent<ColorPickerProps<BABYLON.Color3 | BABYLON.Color4>>;
|
|
8421
|
+
type HsvKey = "h" | "s" | "v";
|
|
8422
|
+
export type InputHexProps = BABYLON.NodeGeometryEditor.SharedUIComponents.BaseComponentProps<BABYLON.Color3 | BABYLON.Color4> & {
|
|
8423
|
+
label?: string;
|
|
8424
|
+
linearHex?: boolean;
|
|
8425
|
+
isLinearMode?: boolean;
|
|
8426
|
+
};
|
|
8427
|
+
/**
|
|
8428
|
+
* Component which displays the passed in color's HEX value, either in linearSpace (if linearHex is true) or in gamma space
|
|
8429
|
+
* When the hex color is changed by user, component calculates the new BABYLON.Color3/4 value and calls onChange
|
|
8430
|
+
*
|
|
8431
|
+
* Component uses the isLinearMode boolean to display an informative label regarding linear / gamma space
|
|
8432
|
+
* @param props - The properties for the InputHexField component.
|
|
8433
|
+
* @returns
|
|
8434
|
+
*/
|
|
8435
|
+
export var InputHexField: React.FunctionComponent<InputHexProps>;
|
|
8436
|
+
type InputHsvFieldProps = {
|
|
8437
|
+
color: BABYLON.Color3 | BABYLON.Color4;
|
|
8438
|
+
label: string;
|
|
8439
|
+
hsvKey: HsvKey;
|
|
8440
|
+
onChange: (color: BABYLON.Color3 | BABYLON.Color4) => void;
|
|
8441
|
+
max: number;
|
|
8442
|
+
scale?: number;
|
|
8443
|
+
};
|
|
8444
|
+
/**
|
|
8445
|
+
* In the HSV (Hue, Saturation, Value) color model, Hue (H) ranges from 0 to 360 degrees, representing the color's position on the color wheel.
|
|
8446
|
+
* Saturation (S) ranges from 0 to 100%, indicating the intensity or purity of the color, with 0 being shades of gray and 100 being a fully saturated color.
|
|
8447
|
+
* Value (V) ranges from 0 to 100%, representing the brightness of the color, with 0 being black and 100 being the brightest.
|
|
8448
|
+
* @param props - The properties for the InputHsvField component.
|
|
8449
|
+
*/
|
|
8450
|
+
export var InputHsvField: React.FunctionComponent<InputHsvFieldProps>;
|
|
8451
|
+
|
|
8452
|
+
|
|
8453
|
+
|
|
8454
|
+
}
|
|
8455
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8456
|
+
|
|
8457
|
+
|
|
8458
|
+
}
|
|
8459
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8460
|
+
export type CheckboxProps = BABYLON.NodeGeometryEditor.SharedUIComponents.BaseComponentProps<boolean>;
|
|
8461
|
+
/**
|
|
8462
|
+
* This is a primitive fluent checkbox that can both read and write checked state
|
|
8463
|
+
* @param props
|
|
8464
|
+
* @returns Checkbox component
|
|
8465
|
+
*/
|
|
8466
|
+
export var Checkbox: React.FunctionComponent<CheckboxProps>;
|
|
8467
|
+
|
|
8468
|
+
|
|
8469
|
+
|
|
8470
|
+
}
|
|
8471
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8472
|
+
|
|
8473
|
+
|
|
8474
|
+
}
|
|
8475
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8476
|
+
export type AccordionSectionProps = {
|
|
8477
|
+
title: string;
|
|
8478
|
+
};
|
|
8479
|
+
export var AccordionSection: React.FunctionComponent<React.PropsWithChildren<AccordionSectionProps>>;
|
|
8480
|
+
export var Accordion: React.FunctionComponent<React.PropsWithChildren>;
|
|
8481
|
+
|
|
8482
|
+
|
|
8483
|
+
|
|
8484
|
+
}
|
|
8485
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8486
|
+
|
|
8487
|
+
|
|
8488
|
+
}
|
|
8489
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8490
|
+
export type VectorPropertyLineProps<V extends BABYLON.Vector3 | BABYLON.Vector4> = BABYLON.NodeGeometryEditor.SharedUIComponents.BaseComponentProps<V> & BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps & {
|
|
8491
|
+
/**
|
|
8492
|
+
* If passed, all sliders will use this for the min value
|
|
8493
|
+
*/
|
|
8494
|
+
min?: number;
|
|
8495
|
+
/**
|
|
8496
|
+
* If passed, all sliders will use this for the max value
|
|
8497
|
+
*/
|
|
8498
|
+
max?: number;
|
|
8499
|
+
/**
|
|
8500
|
+
* If passed, the UX will use the conversion functions to display/update values
|
|
8501
|
+
*/
|
|
8502
|
+
valueConverter?: {
|
|
8503
|
+
/**
|
|
8504
|
+
* Will call from(val) before displaying in the UX
|
|
8505
|
+
*/
|
|
8506
|
+
from: (val: number) => number;
|
|
8507
|
+
/**
|
|
8508
|
+
* Will call to(val) before calling onChange
|
|
8509
|
+
*/
|
|
8510
|
+
to: (val: number) => number;
|
|
8511
|
+
};
|
|
8512
|
+
};
|
|
8513
|
+
type RotationVectorPropertyLineProps = VectorPropertyLineProps<BABYLON.Vector3> & {
|
|
8514
|
+
/**
|
|
8515
|
+
* Display angles as degrees instead of radians
|
|
8516
|
+
*/
|
|
8517
|
+
useDegrees?: boolean;
|
|
8518
|
+
};
|
|
8519
|
+
export var RotationVectorPropertyLine: React.FunctionComponent<RotationVectorPropertyLineProps>;
|
|
8520
|
+
export var Vector3PropertyLine: React.FunctionComponent<VectorPropertyLineProps<BABYLON.Vector3>>;
|
|
8521
|
+
export var Vector4PropertyLine: React.FunctionComponent<VectorPropertyLineProps<BABYLON.Vector4>>;
|
|
8522
|
+
|
|
8523
|
+
|
|
8524
|
+
|
|
8525
|
+
}
|
|
8526
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8527
|
+
|
|
8528
|
+
|
|
8529
|
+
}
|
|
8530
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8531
|
+
type TextProps = {
|
|
8532
|
+
value: string;
|
|
8533
|
+
tooltip?: string;
|
|
8534
|
+
};
|
|
8535
|
+
/**
|
|
8536
|
+
* Wraps text in a property line
|
|
8537
|
+
* @param props - BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps and TextProps
|
|
8538
|
+
* @returns property-line wrapped text
|
|
8539
|
+
*/
|
|
8540
|
+
export var TextPropertyLine: React.FunctionComponent<BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps & TextProps>;
|
|
8541
|
+
|
|
8542
|
+
|
|
8543
|
+
|
|
8544
|
+
}
|
|
8545
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8546
|
+
|
|
8547
|
+
|
|
8548
|
+
}
|
|
8549
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8550
|
+
type SyncedSliderLineProps = BABYLON.NodeGeometryEditor.SharedUIComponents.SyncedSliderProps & BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps;
|
|
8551
|
+
/**
|
|
8552
|
+
* Renders a simple wrapper around the SyncedSliderInput
|
|
8553
|
+
* @param props
|
|
8554
|
+
* @returns
|
|
8555
|
+
*/
|
|
8556
|
+
export var SyncedSliderLine: React.FunctionComponent<SyncedSliderLineProps>;
|
|
8557
|
+
|
|
8558
|
+
|
|
8559
|
+
|
|
8560
|
+
}
|
|
8561
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8562
|
+
|
|
8563
|
+
|
|
8564
|
+
}
|
|
8565
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8566
|
+
/**
|
|
8567
|
+
* Wraps a switch in a property line
|
|
8568
|
+
* @param props - The properties for the switch and property line
|
|
8569
|
+
* @returns A React element representing the property line with a switch
|
|
8570
|
+
*/
|
|
8571
|
+
export var SwitchPropertyLine: React.FunctionComponent<BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps & BABYLON.NodeGeometryEditor.SharedUIComponents.SwitchProps>;
|
|
8572
|
+
|
|
8573
|
+
|
|
8574
|
+
|
|
8575
|
+
}
|
|
8576
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8577
|
+
|
|
8578
|
+
|
|
8579
|
+
}
|
|
8580
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8581
|
+
export type PropertyLineProps = {
|
|
8582
|
+
/**
|
|
8583
|
+
* The name of the property to display in the property line.
|
|
8584
|
+
*/
|
|
8585
|
+
label: string;
|
|
8586
|
+
/**
|
|
8587
|
+
* Optional description for the property, shown on hover of the info icon
|
|
8588
|
+
*/
|
|
8589
|
+
description?: string;
|
|
8590
|
+
/**
|
|
8591
|
+
* Optional function returning a string to copy to clipboard.
|
|
8592
|
+
*/
|
|
8593
|
+
onCopy?: () => string;
|
|
8594
|
+
/**
|
|
8595
|
+
* If supplied, an 'expand' icon will be shown which, when clicked, renders this component within the property line.
|
|
8596
|
+
*/
|
|
8597
|
+
expandedContent?: JSX.Element;
|
|
8598
|
+
/**
|
|
8599
|
+
* Link to the documentation for this property, available from the info icon either linked from the description (if provided) or defalt 'docs' text
|
|
8600
|
+
*/
|
|
8601
|
+
docLink?: string;
|
|
8602
|
+
};
|
|
8603
|
+
export var LineContainer: import("react").ForwardRefExoticComponent<{
|
|
8604
|
+
children?: import("react").ReactNode | undefined;
|
|
8605
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
8606
|
+
export type BaseComponentProps<T> = {
|
|
8607
|
+
/**
|
|
8608
|
+
* The value of the property to be displayed and modified.
|
|
8609
|
+
*/
|
|
8610
|
+
value: T;
|
|
8611
|
+
/**
|
|
8612
|
+
* Callback function to handle changes to the value
|
|
8613
|
+
*/
|
|
8614
|
+
onChange: (value: T) => void;
|
|
8615
|
+
/**
|
|
8616
|
+
* Optional flag to disable the component, preventing any interaction.
|
|
8617
|
+
*/
|
|
8618
|
+
disabled?: boolean;
|
|
8619
|
+
/**
|
|
8620
|
+
* Optional class name to apply custom styles to the component.
|
|
8621
|
+
*/
|
|
8622
|
+
className?: string;
|
|
8623
|
+
};
|
|
8624
|
+
/**
|
|
8625
|
+
* A reusable component that renders a property line with a label and child content, and an optional description, copy button, and expandable section.
|
|
8626
|
+
*
|
|
8627
|
+
* @param props - The properties for the PropertyLine component.
|
|
8628
|
+
* @returns A React element representing the property line.
|
|
8629
|
+
*
|
|
8630
|
+
*/
|
|
8631
|
+
export var PropertyLine: import("react").ForwardRefExoticComponent<PropertyLineProps & {
|
|
8632
|
+
children?: import("react").ReactNode | undefined;
|
|
8633
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
8634
|
+
export var PlaceholderPropertyLine: React.FunctionComponent<BaseComponentProps<any> & PropertyLineProps>;
|
|
8635
|
+
|
|
8636
|
+
|
|
8637
|
+
|
|
8638
|
+
}
|
|
8639
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8640
|
+
|
|
8641
|
+
|
|
8642
|
+
}
|
|
8643
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8644
|
+
type LinkProps = {
|
|
8645
|
+
value: string;
|
|
8646
|
+
tooltip?: string;
|
|
8647
|
+
onLink?: () => void;
|
|
8648
|
+
url?: string;
|
|
8649
|
+
};
|
|
8650
|
+
/**
|
|
8651
|
+
* Wraps a link in a property line
|
|
8652
|
+
* @param props - BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps and LinkProps
|
|
8653
|
+
* @returns property-line wrapped link
|
|
8654
|
+
*/
|
|
8655
|
+
export var LinkPropertyLine: React.FunctionComponent<BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps & LinkProps>;
|
|
8656
|
+
|
|
8657
|
+
|
|
8658
|
+
|
|
8659
|
+
}
|
|
8660
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8661
|
+
|
|
8662
|
+
|
|
8663
|
+
}
|
|
8664
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8665
|
+
export var TextInputPropertyLine: React.FunctionComponent<BABYLON.NodeGeometryEditor.SharedUIComponents.InputProps<string> & BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps>;
|
|
8666
|
+
export var FloatInputPropertyLine: React.FunctionComponent<BABYLON.NodeGeometryEditor.SharedUIComponents.InputProps<number> & BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps>;
|
|
8667
|
+
|
|
8668
|
+
|
|
8669
|
+
|
|
8670
|
+
}
|
|
8671
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8672
|
+
|
|
8673
|
+
|
|
8674
|
+
}
|
|
8675
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8676
|
+
/**
|
|
8677
|
+
* Wraps a hex input in a property line
|
|
8678
|
+
* @param props - BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps and BABYLON.NodeGeometryEditor.SharedUIComponents.InputHexProps
|
|
8679
|
+
* @returns property-line wrapped input hex component
|
|
8680
|
+
*/
|
|
8681
|
+
export var HexPropertyLine: React.FunctionComponent<BABYLON.NodeGeometryEditor.SharedUIComponents.InputHexProps & BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps>;
|
|
8682
|
+
|
|
8683
|
+
|
|
8684
|
+
|
|
8685
|
+
}
|
|
8686
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8687
|
+
|
|
8688
|
+
|
|
8689
|
+
}
|
|
8690
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8691
|
+
export type ToolHostProps = {
|
|
8692
|
+
/**
|
|
8693
|
+
* Allows host to pass in a theme
|
|
8694
|
+
*/
|
|
8695
|
+
customTheme?: any;
|
|
8696
|
+
/**
|
|
8697
|
+
* Can be set to true to disable the copy button in the tool's property lines. Default is false (copy enabled)
|
|
8698
|
+
*/
|
|
8699
|
+
disableCopy?: boolean;
|
|
8700
|
+
};
|
|
8701
|
+
export var ToolContext: import("react").Context<{
|
|
8702
|
+
readonly useFluent: boolean;
|
|
8703
|
+
readonly disableCopy: boolean;
|
|
8704
|
+
}>;
|
|
8705
|
+
/**
|
|
8706
|
+
* For tools which are ready to move over the fluent, wrap the root of the tool (or the panel which you want fluentized) with this component
|
|
8707
|
+
* Today we will only enable fluent if the URL has the `newUX` query parameter is truthy
|
|
8708
|
+
* @param props
|
|
8709
|
+
* @returns
|
|
8710
|
+
*/
|
|
8711
|
+
export var FluentToolWrapper: React.FunctionComponent<React.PropsWithChildren<ToolHostProps>>;
|
|
8712
|
+
|
|
8713
|
+
|
|
8714
|
+
|
|
8715
|
+
}
|
|
8716
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8717
|
+
|
|
8718
|
+
|
|
8719
|
+
}
|
|
8720
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8721
|
+
type FileUploadLineProps = Omit<BABYLON.NodeGeometryEditor.SharedUIComponents.ButtonLineProps, "onClick"> & {
|
|
8722
|
+
onClick: (file: File) => void;
|
|
8723
|
+
accept: string;
|
|
8724
|
+
};
|
|
8725
|
+
export var FileUploadLine: React.FunctionComponent<FileUploadLineProps>;
|
|
8726
|
+
|
|
8727
|
+
|
|
8728
|
+
|
|
8729
|
+
}
|
|
8730
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8731
|
+
|
|
8732
|
+
|
|
8733
|
+
}
|
|
8734
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8735
|
+
/**
|
|
8736
|
+
* Wraps a dropdown in a property line
|
|
8737
|
+
* @param props - BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps and BABYLON.NodeGeometryEditor.SharedUIComponents.DropdownProps
|
|
8738
|
+
* @returns property-line wrapped dropdown
|
|
8739
|
+
*/
|
|
8740
|
+
export var DropdownPropertyLine: React.FunctionComponent<BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps & BABYLON.NodeGeometryEditor.SharedUIComponents.DropdownProps>;
|
|
8741
|
+
|
|
8742
|
+
|
|
8743
|
+
|
|
8744
|
+
}
|
|
8745
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8746
|
+
|
|
8747
|
+
|
|
8748
|
+
}
|
|
8749
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8750
|
+
export type ColorPropertyLineProps = BABYLON.NodeGeometryEditor.SharedUIComponents.ColorPickerProps<BABYLON.Color3 | BABYLON.Color4> & BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps;
|
|
8751
|
+
export var Color3PropertyLine: React.FunctionComponent<BABYLON.NodeGeometryEditor.SharedUIComponents.ColorPickerProps<BABYLON.Color3> & BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps>;
|
|
8752
|
+
export var Color4PropertyLine: React.FunctionComponent<BABYLON.NodeGeometryEditor.SharedUIComponents.ColorPickerProps<BABYLON.Color4> & BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps>;
|
|
8753
|
+
|
|
8754
|
+
|
|
8755
|
+
|
|
8756
|
+
}
|
|
8757
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8758
|
+
|
|
8759
|
+
|
|
8760
|
+
}
|
|
8761
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8762
|
+
/**
|
|
8763
|
+
* Wraps a checkbox in a property line
|
|
8764
|
+
* @param props - BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps and BABYLON.NodeGeometryEditor.SharedUIComponents.CheckboxProps
|
|
8765
|
+
* @returns property-line wrapped checkbox
|
|
8766
|
+
*/
|
|
8767
|
+
export var CheckboxPropertyLine: React.FunctionComponent<BABYLON.NodeGeometryEditor.SharedUIComponents.PropertyLineProps & BABYLON.NodeGeometryEditor.SharedUIComponents.CheckboxProps>;
|
|
8768
|
+
|
|
8769
|
+
|
|
8770
|
+
|
|
8771
|
+
}
|
|
8772
|
+
declare module BABYLON.NodeGeometryEditor {
|
|
8773
|
+
|
|
8774
|
+
|
|
8775
|
+
}
|
|
8776
|
+
declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
|
|
8777
|
+
export type ButtonLineProps = {
|
|
8778
|
+
label: string;
|
|
8779
|
+
onClick: () => void;
|
|
8780
|
+
disabled?: boolean;
|
|
8781
|
+
icon?: string;
|
|
8782
|
+
title?: string;
|
|
8783
|
+
};
|
|
8784
|
+
/**
|
|
8785
|
+
* Wraps a button with a label in a line container
|
|
8786
|
+
* @param props Button props plus a label
|
|
8787
|
+
* @returns A button inside a line
|
|
8788
|
+
*/
|
|
8789
|
+
export var ButtonLine: React.FunctionComponent<ButtonLineProps>;
|
|
8790
|
+
|
|
8791
|
+
|
|
8792
|
+
|
|
7821
8793
|
}
|
|
7822
8794
|
declare module BABYLON.NodeGeometryEditor {
|
|
7823
8795
|
|