feat(unit-frames): add smooth health bar interpolation#417
Merged
EllesmereGaming merged 1 commit intoJun 21, 2026
Merged
Conversation
439d6dd to
9597b32
Compare
Add per-unit "Smooth Health Bars" toggle to the Health Bar settings section for all unit frame types (player, target, focus, boss, etc). Uses oUF's built-in `.smoothing` property, which passes the interpolation type to StatusBar:SetValue on every health update. Defaults to ExponentialEaseOut (same as Raid Frames), with the toggle allowing users to fall back to Immediate (no smoothing). Enabled by default for all unit types.
9597b32 to
8160532
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Unit Frames health bars currently snap to new values with no interpolation. This adds a per-unit "Smooth Health Bars" toggle to the Health Bar settings section, using the same
Enum.StatusBarInterpolation.ExponentialEaseOutAPI as the Raid Frames module. Minor layout adjustments to the Health Bar settings sections are also included.Changes
EllesmereUIUnitFrames.lua:smoothBars = trueadded to all 8 unit type defaults (player, target, playerTarget, targettarget, focustarget, pet, focus, boss)CreateHealthBar: setshealth.smoothing = ExponentialEaseOutwhensmoothBarsis enabled. oUF's health element already passeselement.smoothingas the second argument toSetValueon every health update, so no custom tick or update logic is neededReloadFrames: updateshealth.smoothinglive when the toggle is flipped (no/reloadrequired)EUI_UnitFrames_Options.lua:Approach
oUF's built-in
.smoothingproperty (documented inoUF/elements/health.lua) defaults toEnum.StatusBarInterpolation.Immediate. Setting it toExponentialEaseOutdelegates all easing to the C engine with zero Lua cost, matching how Raid Frames handles smooth health bars. The toggle lets users opt out per-unit if they prefer instant snaps.Enabled by default for all unit types, consistent with the Raid Frames default.
Files changed
2 files changed, 98 insertions(+), 59 deletions(-)