-
Notifications
You must be signed in to change notification settings - Fork 563
Closed
Milestone
Description
I tried simple animation on offset of stroke like this
let line = Line(
x1: 0, y1: 100,
x2: 300, y2: 100
)
.stroke(with: Stroke(fill: Color.black, width: 3))
let animation = line.strokeVar.animation(
from: Stroke(fill: Color.black, width: 5, dashes: [5, 100], offset: 0),
to: Stroke(fill: Color.red, width: 5, dashes: [5, 100], offset: 20),
during: 1.0,
delay: 0.0
)
animation.autoreversed().cycle().play()And it looks like the animation for the line here is not working at all. After looking into source code, I realized that lineDashPhase is not set for Stroke.offset in ShapeAnimationGenerator.
and
I will open a PR shortly addressing this lineDashPhase animation missing bug.
Metadata
Metadata
Assignees
Labels
No labels