tools

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentTimeMs

func GetCurrentTimeMs() int

func GetFloat

func GetFloat(unk interface{}) (float64, bool)

func GetInt

func GetInt(unk interface{}) (int, bool)

Types

type BackEase

type BackEase struct {
	EasingFunction

	Amplitude float64
}

*

func NewBackEase

func NewBackEase() *BackEase

func (*BackEase) EaseInCore

func (this *BackEase) EaseInCore(gradient float64) float64

* @hidden

type BounceEase

type BounceEase struct {
	EasingFunction

	/** Defines the number of bounces */
	Bounces float64

	/** Defines the amplitude of the bounce*/
	Bounciness float64
}

func NewBounceEase

func NewBounceEase() *BounceEase

func (*BounceEase) EaseInCore

func (this *BounceEase) EaseInCore(gradient float64) float64

type CircleEase

type CircleEase struct {
	EasingFunction
}

*

func NewCircleEase

func NewCircleEase() *CircleEase

func (*CircleEase) EaseInCore

func (this *CircleEase) EaseInCore(gradient float64) float64

type EasingFunction

type EasingFunction struct {
	// contains filtered or unexported fields
}

func (*EasingFunction) Ease

func (this *EasingFunction) Ease(core IEasingCoreFunction, gradient float64) float64

func (*EasingFunction) EaseInCore

func (this *EasingFunction) EaseInCore(gradient float64) float64

type EasingMode

type EasingMode uint8
const (
	/**
	 * Interpolation follows the mathematical formula associated with the easing function.
	 */
	EASINGMODE_EASEIN EasingMode = iota

	/**
	 * Interpolation follows 100% interpolation minus the output of the formula associated with the easing function.
	 */
	EASINGMODE_EASEOUT

	/**
	 * Interpolation uses EaseIn for the first half of the animation and EaseOut for the second half.
	 */
	EASINGMODE_EASEINOUT
)

type IEasingCoreFunction

type IEasingCoreFunction interface {
	EaseInCore(gradient float64) float64
}

type IEasingFunction

type IEasingFunction interface {
	IEasingCoreFunction
	/**
	 * Given an input gradient between 0 and 1, this returns the corresponding value
	 * of the easing function.
	 */
	Ease(corefunc IEasingCoreFunction, gradient float64) float64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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