123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- /**
- * Enum that determines the text-wrapping mode to use.
- */
- export declare enum InspectableType {
- /**
- * Checkbox for booleans
- */
- Checkbox = 0,
- /**
- * Sliders for numbers
- */
- Slider = 1,
- /**
- * Vector3
- */
- Vector3 = 2,
- /**
- * Quaternions
- */
- Quaternion = 3,
- /**
- * Color3
- */
- Color3 = 4,
- /**
- * String
- */
- String = 5,
- /**
- * Button
- */
- Button = 6,
- /**
- * Options
- */
- Options = 7,
- /**
- * Tab
- */
- Tab = 8,
- /**
- * File button
- */
- FileButton = 9,
- /**
- * Vector2
- */
- Vector2 = 10
- }
- /**
- * Interface used to define custom inspectable options in "Options" mode.
- * This interface is used by the inspector to display the list of options
- */
- export interface IInspectableOptions {
- /**
- * Defines the visible part of the option
- */
- label: string;
- /**
- * Defines the value part of the option (returned through the callback)
- */
- value: number | string;
- /**
- * Defines if the option should be selected or not
- */
- selected?: boolean;
- }
- /**
- * Interface used to define custom inspectable properties.
- * This interface is used by the inspector to display custom property grids
- * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility
- */
- export interface IInspectable {
- /**
- * Gets the label to display
- */
- label: string;
- /**
- * Gets the name of the property to edit
- */
- propertyName: string;
- /**
- * Gets the type of the editor to use
- */
- type: InspectableType;
- /**
- * Gets the minimum value of the property when using in "slider" mode
- */
- min?: number;
- /**
- * Gets the maximum value of the property when using in "slider" mode
- */
- max?: number;
- /**
- * Gets the setp to use when using in "slider" mode
- */
- step?: number;
- /**
- * Gets the callback function when using "Button" mode
- */
- callback?: () => void;
- /**
- * Gets the callback function when using "FileButton" mode
- */
- fileCallback?: (file: File) => void;
- /**
- * Gets the list of options when using "Option" mode
- */
- options?: IInspectableOptions[];
- /**
- * Gets the extensions to accept when using "FileButton" mode.
- * The value should be a comma separated string with the list of extensions to accept e.g., ".jpg, .png, .tga, .dds, .env".
- */
- accept?: string;
- }
|