完善样式系统与调试链路底座
This commit is contained in:
109
miniprogram/game/presentation/gpsMarkerStyleConfig.ts
Normal file
109
miniprogram/game/presentation/gpsMarkerStyleConfig.ts
Normal file
@@ -0,0 +1,109 @@
|
||||
export type GpsMarkerStyleId = 'dot' | 'beacon' | 'disc' | 'badge'
|
||||
export type GpsMarkerSizePreset = 'small' | 'medium' | 'large'
|
||||
export type GpsMarkerAnimationProfile = 'minimal' | 'dynamic-runner' | 'warning-reactive'
|
||||
export type GpsMarkerMotionState = 'idle' | 'moving' | 'fast-moving' | 'warning'
|
||||
export type GpsMarkerColorPreset =
|
||||
| 'mint'
|
||||
| 'cyan'
|
||||
| 'sky'
|
||||
| 'blue'
|
||||
| 'violet'
|
||||
| 'pink'
|
||||
| 'orange'
|
||||
| 'yellow'
|
||||
export type GpsMarkerLogoMode = 'center-badge'
|
||||
|
||||
export interface GpsMarkerColorPresetEntry {
|
||||
colorHex: string
|
||||
ringColorHex: string
|
||||
indicatorColorHex: string
|
||||
}
|
||||
|
||||
export const GPS_MARKER_COLOR_PRESET_MAP: Record<GpsMarkerColorPreset, GpsMarkerColorPresetEntry> = {
|
||||
mint: {
|
||||
colorHex: '#18b39a',
|
||||
ringColorHex: '#ffffff',
|
||||
indicatorColorHex: '#9bfff0',
|
||||
},
|
||||
cyan: {
|
||||
colorHex: '#1db7cf',
|
||||
ringColorHex: '#ffffff',
|
||||
indicatorColorHex: '#b2f7ff',
|
||||
},
|
||||
sky: {
|
||||
colorHex: '#54a3ff',
|
||||
ringColorHex: '#ffffff',
|
||||
indicatorColorHex: '#d6efff',
|
||||
},
|
||||
blue: {
|
||||
colorHex: '#4568ff',
|
||||
ringColorHex: '#ffffff',
|
||||
indicatorColorHex: '#bec9ff',
|
||||
},
|
||||
violet: {
|
||||
colorHex: '#8658ff',
|
||||
ringColorHex: '#ffffff',
|
||||
indicatorColorHex: '#dbcaff',
|
||||
},
|
||||
pink: {
|
||||
colorHex: '#ff5cb5',
|
||||
ringColorHex: '#ffffff',
|
||||
indicatorColorHex: '#ffd0ea',
|
||||
},
|
||||
orange: {
|
||||
colorHex: '#ff9238',
|
||||
ringColorHex: '#ffffff',
|
||||
indicatorColorHex: '#ffd7b0',
|
||||
},
|
||||
yellow: {
|
||||
colorHex: '#f3c72b',
|
||||
ringColorHex: '#ffffff',
|
||||
indicatorColorHex: '#fff1ae',
|
||||
},
|
||||
}
|
||||
|
||||
export interface GpsMarkerStyleConfig {
|
||||
visible: boolean
|
||||
style: GpsMarkerStyleId
|
||||
size: GpsMarkerSizePreset
|
||||
colorPreset: GpsMarkerColorPreset
|
||||
colorHex: string
|
||||
ringColorHex: string
|
||||
indicatorColorHex: string
|
||||
showHeadingIndicator: boolean
|
||||
animationProfile: GpsMarkerAnimationProfile
|
||||
motionState: GpsMarkerMotionState
|
||||
motionIntensity: number
|
||||
pulseStrength: number
|
||||
headingAlpha: number
|
||||
effectScale: number
|
||||
wakeStrength: number
|
||||
warningGlowStrength: number
|
||||
indicatorScale: number
|
||||
logoScale: number
|
||||
logoUrl: string
|
||||
logoMode: GpsMarkerLogoMode
|
||||
}
|
||||
|
||||
export const DEFAULT_GPS_MARKER_STYLE_CONFIG: GpsMarkerStyleConfig = {
|
||||
visible: true,
|
||||
style: 'beacon',
|
||||
size: 'medium',
|
||||
colorPreset: 'cyan',
|
||||
colorHex: GPS_MARKER_COLOR_PRESET_MAP.cyan.colorHex,
|
||||
ringColorHex: GPS_MARKER_COLOR_PRESET_MAP.cyan.ringColorHex,
|
||||
indicatorColorHex: GPS_MARKER_COLOR_PRESET_MAP.cyan.indicatorColorHex,
|
||||
showHeadingIndicator: true,
|
||||
animationProfile: 'dynamic-runner',
|
||||
motionState: 'idle',
|
||||
motionIntensity: 0,
|
||||
pulseStrength: 1,
|
||||
headingAlpha: 1,
|
||||
effectScale: 1,
|
||||
wakeStrength: 0,
|
||||
warningGlowStrength: 0,
|
||||
indicatorScale: 1,
|
||||
logoScale: 1,
|
||||
logoUrl: '',
|
||||
logoMode: 'center-badge',
|
||||
}
|
||||
Reference in New Issue
Block a user