UseAnimation returns a runner that can start/stop an animation. The tick callback receives progress from 0.0 to 1.0.
(s *Scope, anim Animation)
| 46 | // UseAnimation returns a runner that can start/stop an animation. |
| 47 | // The tick callback receives progress from 0.0 to 1.0. |
| 48 | func UseAnimation(s *Scope, anim Animation) *AnimationHandle { |
| 49 | key := callerKey(2) |
| 50 | return getOrCreateRef(s, "anim:"+key, &AnimationHandle{ |
| 51 | anim: anim, |
| 52 | }).Get() |
| 53 | } |
| 54 | |
| 55 | type AnimationHandle struct { |
| 56 | anim Animation |
nothing calls this directly
no test coverage detected