motion

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Linear = iota
	Bezier
	Stepped
	InverseStepped
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Curve

type Curve struct {
	Target      string
	Id          string
	FadeInTime  float64
	FadeOutTime float64
	Segments    []Segment
}

type Entry

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

func (*Entry) Update

func (e *Entry) Update(deltaTime float64) (finished bool)

type Meta

type Meta struct {
	Duration             float64
	Loop                 bool
	AreBeziersRestricted bool
}

type Motion

type Motion struct {
	File        string
	FadeInTime  float64
	FadeOutTime float64
	Sound       string
	LoadedSound sound.Sound
	Meta        Meta
	Curves      []Curve
}

type MotionManager

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

func NewMotionManager

func NewMotionManager(core core.Core, modelPtr uintptr, onFinished func(int)) *MotionManager

func (*MotionManager) Close

func (mm *MotionManager) Close(id int)

func (*MotionManager) Reset

func (mm *MotionManager) Reset(id int)

func (*MotionManager) Start

func (mm *MotionManager) Start(motion Motion) int

func (*MotionManager) Update

func (mm *MotionManager) Update(deltaTime float64)

type Point

type Point struct {
	Time  float64
	Value float64
}

type Segment

type Segment struct {
	Points []Point
	Type   int
	Value  float64
}

Jump to

Keyboard shortcuts

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