Skip to content

feat(unit-frames): add smooth health bar interpolation#417

Merged
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
TF0rd:feature/smooth-unitframe-health
Jun 21, 2026
Merged

feat(unit-frames): add smooth health bar interpolation#417
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
TF0rd:feature/smooth-unitframe-health

Conversation

@TF0rd

@TF0rd TF0rd commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

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.ExponentialEaseOut API as the Raid Frames module. Minor layout adjustments to the Health Bar settings sections are also included.

Changes

EllesmereUIUnitFrames.lua:

  • smoothBars = true added to all 8 unit type defaults (player, target, playerTarget, targettarget, focustarget, pet, focus, boss)
  • CreateHealthBar: sets health.smoothing = ExponentialEaseOut when smoothBars is enabled. oUF's health element already passes element.smoothing as the second argument to SetValue on every health update, so no custom tick or update logic is needed
  • ReloadFrames: updates health.smoothing live when the toggle is flipped (no /reload required)

EUI_UnitFrames_Options.lua:

  • "Smooth Health Bars" toggle added to both Health Bar settings sections (shared frames and other units)
  • Minor layout adjustments: regrouped existing controls so "Smooth Health Bars" sits in a consistent left-side position across all frame type sections, pairing it with "Bar Opacity" in Main Frames and "Reverse Fill" in Boss/Mini Frames

Approach

oUF's built-in .smoothing property (documented in oUF/elements/health.lua) defaults to Enum.StatusBarInterpolation.Immediate. Setting it to ExponentialEaseOut delegates 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(-)

@TF0rd TF0rd force-pushed the feature/smooth-unitframe-health branch 2 times, most recently from 439d6dd to 9597b32 Compare June 21, 2026 01:41
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.
@TF0rd TF0rd force-pushed the feature/smooth-unitframe-health branch from 9597b32 to 8160532 Compare June 21, 2026 01:45
@EllesmereGaming EllesmereGaming merged commit c076391 into EllesmereGaming:main Jun 21, 2026
@TF0rd TF0rd deleted the feature/smooth-unitframe-health branch June 21, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants