anim

package
Version: v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package anim provides simple animation primitives

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Normal

type Normal struct {
	time.Duration
	StartTime time.Time
}

Normal holds state for an animation between two states that is not invertible.

func (*Normal) Animating

func (n *Normal) Animating(gtx layout.Context) bool

func (*Normal) Progress

func (n *Normal) Progress(gtx layout.Context) float32

Progress returns the current progress through the animation as a value in the range [0,1]

func (*Normal) SetDuration

func (n *Normal) SetDuration(d time.Duration)

func (*Normal) Start

func (n *Normal) Start(now time.Time)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL