Ejemplo n.º 1
0
// 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)
	}
}
Ejemplo n.º 2
0
// 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)
	}
}