Skip to content

fix(animation): keyframed glow_radius/glow_intensity paints a black halo #113

Description

@LeadcodeDev

Surfaced while implementing #109 (wave 2 of #102). Not fixed there because the code lives in a file that workstream did not own.

glow as an animation effect now renders correctly in its configured colour. But animating glow_radius / glow_intensity as raw keyframe properties goes through a different path, which builds a DropShadow with color: None. That resolves to SColor::BLACK, so the halo renders black instead of the configured colour.

GlowConfig.color is never plumbed into that path.

The two ways of expressing the same visual effect therefore disagree — one honours the colour, the other silently paints black. On the dark backgrounds this engine targets, a black halo is invisible, which makes it read as "the animation does nothing".

Where: crates/rustmotion-core/src/css/animation.rs (the DropShadow construction), and crates/rustmotion-core/src/engine/animator.rs for the property targets.

Acceptance: animating glow_radius/glow_intensity produces a halo in the configured colour. Prove it by rendering and sampling pixels — a passing unit test is not evidence that something is visible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions