gpsMarkerStyleConfig.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. export type GpsMarkerStyleId = 'dot' | 'beacon' | 'disc' | 'badge'
  2. export type GpsMarkerSizePreset = 'small' | 'medium' | 'large'
  3. export type GpsMarkerAnimationProfile = 'minimal' | 'dynamic-runner' | 'warning-reactive'
  4. export type GpsMarkerMotionState = 'idle' | 'moving' | 'fast-moving' | 'warning'
  5. export type GpsMarkerColorPreset =
  6. | 'mint'
  7. | 'cyan'
  8. | 'sky'
  9. | 'blue'
  10. | 'violet'
  11. | 'pink'
  12. | 'orange'
  13. | 'yellow'
  14. export type GpsMarkerLogoMode = 'center-badge'
  15. export interface GpsMarkerColorPresetEntry {
  16. colorHex: string
  17. ringColorHex: string
  18. indicatorColorHex: string
  19. }
  20. export const GPS_MARKER_COLOR_PRESET_MAP: Record<GpsMarkerColorPreset, GpsMarkerColorPresetEntry> = {
  21. mint: {
  22. colorHex: '#18b39a',
  23. ringColorHex: '#ffffff',
  24. indicatorColorHex: '#9bfff0',
  25. },
  26. cyan: {
  27. colorHex: '#1db7cf',
  28. ringColorHex: '#ffffff',
  29. indicatorColorHex: '#b2f7ff',
  30. },
  31. sky: {
  32. colorHex: '#54a3ff',
  33. ringColorHex: '#ffffff',
  34. indicatorColorHex: '#d6efff',
  35. },
  36. blue: {
  37. colorHex: '#4568ff',
  38. ringColorHex: '#ffffff',
  39. indicatorColorHex: '#bec9ff',
  40. },
  41. violet: {
  42. colorHex: '#8658ff',
  43. ringColorHex: '#ffffff',
  44. indicatorColorHex: '#dbcaff',
  45. },
  46. pink: {
  47. colorHex: '#ff5cb5',
  48. ringColorHex: '#ffffff',
  49. indicatorColorHex: '#ffd0ea',
  50. },
  51. orange: {
  52. colorHex: '#ff9238',
  53. ringColorHex: '#ffffff',
  54. indicatorColorHex: '#ffd7b0',
  55. },
  56. yellow: {
  57. colorHex: '#f3c72b',
  58. ringColorHex: '#ffffff',
  59. indicatorColorHex: '#fff1ae',
  60. },
  61. }
  62. export interface GpsMarkerStyleConfig {
  63. visible: boolean
  64. style: GpsMarkerStyleId
  65. size: GpsMarkerSizePreset
  66. colorPreset: GpsMarkerColorPreset
  67. colorHex: string
  68. ringColorHex: string
  69. indicatorColorHex: string
  70. showHeadingIndicator: boolean
  71. animationProfile: GpsMarkerAnimationProfile
  72. motionState: GpsMarkerMotionState
  73. motionIntensity: number
  74. pulseStrength: number
  75. headingAlpha: number
  76. effectScale: number
  77. wakeStrength: number
  78. warningGlowStrength: number
  79. indicatorScale: number
  80. logoScale: number
  81. logoUrl: string
  82. logoMode: GpsMarkerLogoMode
  83. }
  84. export const DEFAULT_GPS_MARKER_STYLE_CONFIG: GpsMarkerStyleConfig = {
  85. visible: true,
  86. style: 'beacon',
  87. size: 'medium',
  88. colorPreset: 'cyan',
  89. colorHex: GPS_MARKER_COLOR_PRESET_MAP.cyan.colorHex,
  90. ringColorHex: GPS_MARKER_COLOR_PRESET_MAP.cyan.ringColorHex,
  91. indicatorColorHex: GPS_MARKER_COLOR_PRESET_MAP.cyan.indicatorColorHex,
  92. showHeadingIndicator: true,
  93. animationProfile: 'dynamic-runner',
  94. motionState: 'idle',
  95. motionIntensity: 0,
  96. pulseStrength: 1,
  97. headingAlpha: 1,
  98. effectScale: 1,
  99. wakeStrength: 0,
  100. warningGlowStrength: 0,
  101. indicatorScale: 1,
  102. logoScale: 1,
  103. logoUrl: '',
  104. logoMode: 'center-badge',
  105. }