animation

package
v0.16.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EaseIn = CubicBezierCurve{0.3, 0, 1, 1}
View Source
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}

View Source
var EaseOut = CubicBezierCurve{0, 0, 0, 1}

Functions

This section is empty.

Types

type AnimatedPositioned

type AnimatedPositioned struct {
	render.Widget
	Child    render.Widget
	XStart   int
	XEnd     int
	YStart   int
	YEnd     int
	Duration int
	Curve    Curve
	Delay    int
	Hold     int
}

func (AnimatedPositioned) FrameCount

func (o AnimatedPositioned) FrameCount() int

func (AnimatedPositioned) Paint

func (o AnimatedPositioned) Paint(bounds image.Rectangle, frameIdx int) image.Image

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

type Curve interface {
	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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL