MCPcopy Create free account
hub / github.com/NV404/gova / UseAnimation

Function UseAnimation

animate.go:48–53  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

callerKeyFunction · 0.85
getOrCreateRefFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected