Exemple #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)
	}
}
Exemple #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)
	}
}
Exemple #3
0
// Blend adjust the property details to match appropriate state.
func (t *Color) Blend(interpolation float64) {
	easing := govfx.GetEasing(t.Easing)
	t.color = Colors.Blend(easing, t.color, interpolation)
}
Exemple #4
0
// Update updates the property details.
func (t *Color) Update(delta float64, timeline float64) {
	easing := govfx.GetEasing(t.Easing)
	t.color = Colors.Interpolate(easing, t.base, t.color, delta, timeline)
}