sprite

package
v0.0.0-...-1f426e9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sprite

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

func NewSprite

func NewSprite(rcTex la.Rect, width, height float32) *Sprite

func (*Sprite) Draw

func (s *Sprite) Draw(dst *ebiten.Image, src *ebiten.Image, matrix la.Mat3)

type SpriteKey

type SpriteKey uint32

type SpriteManager

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

func NewSpriteManager

func NewSpriteManager() *SpriteManager

func (*SpriteManager) Draw

func (m *SpriteManager) Draw(key SpriteKey, position la.Vec2)

func (*SpriteManager) MakeSquareSprite

func (m *SpriteManager) MakeSquareSprite(logOfSpriteSize uint32, width, height float32) (SpriteKey, *SubImage)

logOfSpriteSize to real sprite size: 3 -> 8x8 4 -> 16x16 5 -> 32x32 6 -> 64x64 7 -> 128x128 8 -> 256x256

func (*SpriteManager) SetTarget

func (m *SpriteManager) SetTarget(img *ebiten.Image, matCamera la.Mat3)

type SubImage

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

func NewSubImage

func NewSubImage(img *ebiten.Image, rect la.Rect) *SubImage

func NewSubImageFromImage

func NewSubImageFromImage(img *ebiten.Image) *SubImage

func (*SubImage) At

func (s *SubImage) At(x, y int) color.Color

func (*SubImage) Bounds

func (s *SubImage) Bounds() image.Rectangle

func (*SubImage) ColorModel

func (s *SubImage) ColorModel() color.Model

func (*SubImage) Set

func (s *SubImage) Set(x, y int, c color.Color)

Jump to

Keyboard shortcuts

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