MCPcopy Create free account
hub / github.com/charmbracelet/bubbles / SetSpringOptions

Method SetSpringOptions

progress/progress.go:288–290  ·  view source on GitHub ↗

SetSpringOptions sets the frequency and damping for the current spring. Frequency corresponds to speed, and damping to bounciness. For details see: https://github.com/charmbracelet/harmonica

(frequency, damping float64)

Source from the content-addressed store, hash-verified

286//
287// https://github.com/charmbracelet/harmonica
288func (m *Model) SetSpringOptions(frequency, damping float64) {
289 m.spring = harmonica.NewSpring(harmonica.FPS(fps), frequency, damping)
290}
291
292// Percent returns the current visible percentage on the model. This is only
293// relevant when you're animating the progress bar.

Callers 2

NewFunction · 0.95
WithSpringOptionsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected