// Init initializes the width property with the provided element for animation. func (h *Height) Init(elem govfx.Elemental) { h.elem = elem if h.Easer == nil { h.Easer = govfx.GetEasing(h.Easing) } if ws, _, ok := elem.ReadInt("width", ""); ok { h.current = float64(ws) } }
// Init initializes the property for execution. func (t *Color) Init(elem govfx.Elemental) { t.elem = elem rw, gw, bw, aw := govfx.ParseRGB(t.Color) t.color = ColorValue{red: rw, green: gw, blue: bw, alpah: aw} if color, _, ok := elem.Read("color", ""); ok { r, g, b, a := govfx.ParseRGB(color) t.color = ColorValue{red: r, green: g, blue: b, alpah: a} } }
// Init initializes the width property with the provided element for animation. func (w *Width) Init(elem govfx.Elemental) { w.elem = elem if w.Easer == nil { w.Easer = govfx.GetEasing(w.Easing) } if ws, _, ok := elem.ReadInt("width", ""); ok { w.current = float64(ws) } }