Documentation
¶
Index ¶
- Variables
- func ApplyColorWave(lines []string, width, height int, frameCounter int, cfg *FlickerConfig) []string
- func ApplyNoise(lines []string, width, height int, slots []int, activeCount int) []string
- func ApplyRandomFlicker(lines []string, width, height int, cfg *FlickerConfig) []string
- func ApplyShiftingGradient(lines []string, width, height int, frameCounter int, cfg *FlickerConfig) []string
- func HexToRGB(hex string) (int, int, int)
- type FlickerConfig
Constants ¶
This section is empty.
Variables ¶
var BrightnessLevels = []float64{
0.25,
0.40,
0.55,
0.70,
0.85,
1.00,
1.15,
1.30,
}
BrightnessLevels defines the 8 brightness multipliers for the gradient. Goes from dark (left) to bright (right), creating a "marquee" effect. Values < 1.0 = darker, values > 1.0 = brighter
var StateConfigs = map[string]FlickerConfig{ "think": {Enabled: true}, "read": {Enabled: true}, "write": {Enabled: true}, "search": {Enabled: true}, "websearch": {Enabled: true}, "webfetch": {Enabled: true}, "arise": {Enabled: true}, "approval": {Enabled: true}, }
StateConfigs maps state names to their flicker configuration. States not in this map will have no flicker effect.
Functions ¶
func ApplyColorWave ¶
func ApplyColorWave(lines []string, width, height int, frameCounter int, cfg *FlickerConfig) []string
ApplyColorWave redirects to ApplyShiftingGradient
func ApplyNoise ¶
ApplyNoise is deprecated, kept for compatibility
func ApplyRandomFlicker ¶
func ApplyRandomFlicker(lines []string, width, height int, cfg *FlickerConfig) []string
ApplyRandomFlicker redirects to ApplyShiftingGradient
func ApplyShiftingGradient ¶
func ApplyShiftingGradient(lines []string, width, height int, frameCounter int, cfg *FlickerConfig) []string
ApplyShiftingGradient applies a dark-to-light gradient that shifts left each frame. Creates a "marquee" / "Wall Street ticker" effect where brightness sweeps across.
Parameters:
- lines: The avatar lines (ANSI colorized)
- width, height: Avatar dimensions
- frameCounter: Current frame number (controls gradient shift)
- cfg: Flicker configuration for the current state
Each column has a brightness level from BrightnessLevels. Every frame, the pattern shifts left by 1 position (wrapping around).
Types ¶
type FlickerConfig ¶
type FlickerConfig struct {
Enabled bool // Whether flicker is active for this state
}
FlickerConfig defines color flicker behavior for micro avatars
func GetConfig ¶
func GetConfig(stateName string) *FlickerConfig
GetConfig returns the flicker config for a state, or nil if no flicker effect.