Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultCurve = LinearCurve{}
var EaseIn = CubicBezierCurve{0.3, 0, 1, 1}
var EaseInOut = CubicBezierCurve{0.65, 0, 0.35, 1}
TODO: figure out if what curve to use here. unless we're going back to Ivo's curve (0.3, 0, 0, 1), make sure to update the unit tests
var EaseInOut = CubicBezierCurve{0.3, 0, 0, 1}
var EaseOut = CubicBezierCurve{0, 0, 0, 1}
Functions ¶
This section is empty.
Types ¶
type AnimatedPositioned ¶
type AnimatedPositioned struct { render.Widget Child render.Widget `starlark:"child,required"` XStart int `starlark:"x_start"` XEnd int `starlark:"x_end"` YStart int `starlark:"y_start"` YEnd int `starlark:"y_end"` Duration int `starlark:"duration,required"` Curve Curve `starlark:"curve,required"` Delay int `starlark:"delay"` Hold int `starlark:"hold"` }
Animate a widget from start to end coordinates.
DOC(Child): Widget to animate DOC(XStart): Horizontal start coordinate DOC(XEnd): Horizontal end coordinate DOC(YStart): Vertical start coordinate DOC(YEnd): Vertical end coordinate DOC(Duration): Duration of animation in frames DOC(Curve): Easing curve to use, default is 'linear' DOC(Delay): Delay before animation in frames DOC(Hold): Delay after animation in frames
func (AnimatedPositioned) FrameCount ¶
func (o AnimatedPositioned) FrameCount() int
type CubicBezierCurve ¶
type CubicBezierCurve struct {
// contains filtered or unexported fields
}
Bezier curve defined by a, b, c and d.
func (CubicBezierCurve) Transform ¶
func (cb CubicBezierCurve) Transform(t float64) float64
type Curve ¶
func ParseCurve ¶ added in v0.17.1
type CustomCurve ¶ added in v0.17.1
Custom curve implemented as a starlark function
func (CustomCurve) Transform ¶ added in v0.17.1
func (cc CustomCurve) Transform(t float64) float64
type LinearCurve ¶
type LinearCurve struct{}
Linear curve moving from 0 to 1 (wait for it...) linearly
func (LinearCurve) Transform ¶
func (lc LinearCurve) Transform(t float64) float64