Closed jiegillet closed 6 years ago
Never mind, I figured it out after I found your batman example. I had to match the path steps. Sorry about that! For reference:
init : ( Model, Cmd Msg )
init =
( startAnimation
{ style =
Animation.style
[ Animation.path
[ Animation.moveTo 0 0
, Animation.lineTo 0 0
]
]
}
, Cmd.none
)
startAnimation : Model -> Model
startAnimation model =
{ model
| style =
Animation.interrupt
[ Animation.to
[ Animation.path
[ Animation.moveTo 0 0
, Animation.lineTo 100 100
]
]
]
model.style
}
view : Model -> Html Msg
view model =
Svg.svg
[]
[ Svg.path
(Animation.render model.style ++ [ Svg.Attributes.stroke "red" ])
[]
]
Hi, great project, I'm very excited to use it! I need some help with animating a path, I can't seem to make it work. I've copied my best guess as how it should work below, but when I run it, only one ticks happens and nothing shows up. Thanks!