iInspectable.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**
  2. * Enum that determines the text-wrapping mode to use.
  3. */
  4. export enum InspectableType {
  5. /**
  6. * Checkbox for booleans
  7. */
  8. Checkbox = 0,
  9. /**
  10. * Sliders for numbers
  11. */
  12. Slider = 1,
  13. /**
  14. * Vector3
  15. */
  16. Vector3 = 2,
  17. /**
  18. * Quaternions
  19. */
  20. Quaternion = 3,
  21. /**
  22. * Color3
  23. */
  24. Color3 = 4,
  25. /**
  26. * String
  27. */
  28. String = 5
  29. }
  30. /**
  31. * Interface used to define custom inspectable properties.
  32. * This interface is used by the inspector to display custom property grids
  33. * @see https://doc.babylonjs.com/how_to/debug_layer#extensibility
  34. */
  35. export interface IInspectable {
  36. /**
  37. * Gets the label to display
  38. */
  39. label: string;
  40. /**
  41. * Gets the name of the property to edit
  42. */
  43. propertyName: string;
  44. /**
  45. * Gets the type of the editor to use
  46. */
  47. type: InspectableType;
  48. /**
  49. * Gets the minimum value of the property when using in "slider" mode
  50. */
  51. min?: number;
  52. /**
  53. * Gets the maximum value of the property when using in "slider" mode
  54. */
  55. max?: number;
  56. /**
  57. * Gets the setp to use when using in "slider" mode
  58. */
  59. step?: number;
  60. }