Documentation
¶
Index ¶
- Constants
- func Ease(a, b, weight float64, f EaseFunc) float64
- func EaseInCubic(x float64) float64
- func EaseInOutCubic(x float64) float64
- func EaseInOutQuad(x float64) float64
- func EaseInOutQuart(x float64) float64
- func EaseInOutSine(x float64) float64
- func EaseInQuad(x float64) float64
- func EaseInQuart(x float64) float64
- func EaseInSine(x float64) float64
- func EaseLinear(x float64) float64
- func EaseOutCubic(x float64) float64
- func EaseOutQuad(x float64) float64
- func EaseOutQuart(x float64) float64
- func EaseOutSine(x float64) float64
- func Lerp(a, b, weight float64) float64
- type Anchor
- type Circ
- type EaseFunc
- type Inventory
- func (inv *Inventory) Append(item InventoryItem)
- func (inv *Inventory) AppendAndMerge(item InventoryItem)
- func (inv *Inventory) Clean()
- func (inv Inventory) Count() int
- func (inv Inventory) CountArea(row1, col1, row2, col2 int) int
- func (inv Inventory) Item(row, col int) *InventoryItem
- func (inv *Inventory) Organize()
- func (inv *Inventory) Remove(row, col int)
- func (inv *Inventory) Swap(row1, col1, row2, col2 int)
- type InventoryItem
- type Keyframe
- type KeyframeSequence
- func (k KeyframeSequence) Duration() float64
- func (k KeyframeSequence) HasFinished() bool
- func (k KeyframeSequence) HasStarted() bool
- func (k KeyframeSequence) Now() float64
- func (k KeyframeSequence) Progress() float64
- func (k *KeyframeSequence) Update(dt float64) float64
- func (k *KeyframeSequence) UpdateAndLoop(dt float64) float64
- type KeyframeSequenceGroup
- func (k KeyframeSequenceGroup) Duration() float64
- func (k KeyframeSequenceGroup) HasFinished() bool
- func (k KeyframeSequenceGroup) HasStarted() bool
- func (k KeyframeSequenceGroup) Progress() float64
- func (k *KeyframeSequenceGroup) Update(dt float64)
- func (k *KeyframeSequenceGroup) UpdateAndLoop(dt float64)
- type Line
- type Rect
- func (r Rect) AnchorPoint(a Anchor) Vec2
- func (r Rect) Area() float64
- func (r Rect) Bottom(amount float64) Rect
- func (r Rect) Center() Vec2
- func (r *Rect) CutBottom(amount float64) Rect
- func (r *Rect) CutLeft(amount float64) Rect
- func (r *Rect) CutRight(amount float64) Rect
- func (r *Rect) CutSide(from Anchor, amount float64) Rect
- func (r *Rect) CutTop(amount float64) Rect
- func (r Rect) End() Vec2
- func (r *Rect) Extend(amount float64)
- func (r *Rect) ExtendBottom(amount float64)
- func (r *Rect) ExtendLeft(amount float64)
- func (r *Rect) ExtendRight(amount float64)
- func (r *Rect) ExtendSide(from Anchor, amount float64)
- func (r *Rect) ExtendTop(amount float64)
- func (r Rect) HasArea() bool
- func (r Rect) HasPoint(p Vec2) bool
- func (r Rect) Intersection(o Rect) Rect
- func (r Rect) IsIntersecting(o Rect) bool
- func (r Rect) Left(amount float64) Rect
- func (r Rect) Lerp(to Rect, weight float64) Rect
- func (r Rect) Merger(o Rect) Rect
- func (r Rect) OutBottom(amount float64) Rect
- func (r Rect) OutLeft(amount float64) Rect
- func (r Rect) OutRight(amount float64) Rect
- func (r Rect) OutSide(from Anchor, amount float64) Rect
- func (r Rect) OutTop(amount float64) Rect
- func (r Rect) Right(amount float64) Rect
- func (r *Rect) SetCenter(center Vec2)
- func (r *Rect) SetEnd(end Vec2)
- func (r *Rect) SetSize(size Vec2)
- func (r *Rect) SetStart(start Vec2)
- func (r Rect) Side(from Anchor, amount float64) Rect
- func (r Rect) Size() Vec2
- func (r Rect) Start() Vec2
- func (r Rect) Top(amount float64) Rect
- type Tween
- type TweenGroup
- type Vec2
- func (v Vec2) Abs() Vec2
- func (v Vec2) Add(rhs Vec2) Vec2
- func (v Vec2) Ceil() Vec2
- func (v Vec2) Div(rhs Vec2) Vec2
- func (v Vec2) Floor() Vec2
- func (v Vec2) Length() float64
- func (v Vec2) LengthSquared() float64
- func (v Vec2) Lerp(to Vec2, weight float64) Vec2
- func (v Vec2) Mul(rhs Vec2) Vec2
- func (v Vec2) Normalized() Vec2
- func (v Vec2) Round() Vec2
- func (v Vec2) Sub(rhs Vec2) Vec2
Constants ¶
View Source
const InventoryNoneId = -1
Variables ¶
This section is empty.
Functions ¶
func EaseInCubic ¶
func EaseInOutCubic ¶
func EaseInOutQuad ¶
func EaseInOutQuart ¶
func EaseInOutSine ¶
func EaseInQuad ¶
func EaseInQuart ¶
func EaseInSine ¶
func EaseLinear ¶
func EaseOutCubic ¶
func EaseOutQuad ¶
func EaseOutQuart ¶
func EaseOutSine ¶
Types ¶
type Inventory ¶
type Inventory struct {
Items []InventoryItem
Rows int
Cols int
}
func NewInventory ¶
func (*Inventory) Append ¶
func (inv *Inventory) Append(item InventoryItem)
func (*Inventory) AppendAndMerge ¶
func (inv *Inventory) AppendAndMerge(item InventoryItem)
func (Inventory) Item ¶
func (inv Inventory) Item(row, col int) *InventoryItem
type InventoryItem ¶
func (*InventoryItem) Change ¶
func (t *InventoryItem) Change(id, count int)
func (InventoryItem) IsNone ¶
func (it InventoryItem) IsNone() bool
func (InventoryItem) IsSome ¶
func (it InventoryItem) IsSome() bool
func (*InventoryItem) MakeNone ¶
func (it *InventoryItem) MakeNone()
type KeyframeSequence ¶
func NewKeyframeSequence ¶
func NewKeyframeSequence(count int) KeyframeSequence
func (KeyframeSequence) Duration ¶
func (k KeyframeSequence) Duration() float64
func (KeyframeSequence) HasFinished ¶
func (k KeyframeSequence) HasFinished() bool
func (KeyframeSequence) HasStarted ¶
func (k KeyframeSequence) HasStarted() bool
func (KeyframeSequence) Now ¶
func (k KeyframeSequence) Now() float64
func (KeyframeSequence) Progress ¶
func (k KeyframeSequence) Progress() float64
func (*KeyframeSequence) Update ¶
func (k *KeyframeSequence) Update(dt float64) float64
func (*KeyframeSequence) UpdateAndLoop ¶
func (k *KeyframeSequence) UpdateAndLoop(dt float64) float64
type KeyframeSequenceGroup ¶
type KeyframeSequenceGroup struct {
Sequences []KeyframeSequence
}
func NewKeyframeSequenceGroup ¶
func NewKeyframeSequenceGroup(scount int, kcount int) KeyframeSequenceGroup
func (KeyframeSequenceGroup) Duration ¶
func (k KeyframeSequenceGroup) Duration() float64
func (KeyframeSequenceGroup) HasFinished ¶
func (k KeyframeSequenceGroup) HasFinished() bool
func (KeyframeSequenceGroup) HasStarted ¶
func (k KeyframeSequenceGroup) HasStarted() bool
func (KeyframeSequenceGroup) Progress ¶
func (k KeyframeSequenceGroup) Progress() float64
func (*KeyframeSequenceGroup) Update ¶
func (k *KeyframeSequenceGroup) Update(dt float64)
func (*KeyframeSequenceGroup) UpdateAndLoop ¶
func (k *KeyframeSequenceGroup) UpdateAndLoop(dt float64)
type Rect ¶
func (Rect) AnchorPoint ¶
func (*Rect) ExtendBottom ¶
func (*Rect) ExtendLeft ¶
func (*Rect) ExtendRight ¶
func (*Rect) ExtendSide ¶
func (Rect) Intersection ¶
func (Rect) IsIntersecting ¶
type TweenGroup ¶
type TweenGroup struct {
Tweens []Tween
}
func NewTweenGroup ¶
func NewTweenGroup(count int, duration float64, f EaseFunc) TweenGroup
func (TweenGroup) HasFinished ¶
func (t TweenGroup) HasFinished() bool
func (TweenGroup) HasStarted ¶
func (t TweenGroup) HasStarted() bool
func (TweenGroup) Progress ¶
func (t TweenGroup) Progress() float64
func (*TweenGroup) Update ¶
func (t *TweenGroup) Update(dt float64)
func (*TweenGroup) UpdateAndLoop ¶
func (t *TweenGroup) UpdateAndLoop(dt float64)
Click to show internal directories.
Click to hide internal directories.