sprite

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT 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 {
	Image *ebiten.Image
	// contains filtered or unexported fields
}

func NewEmptySprite

func NewEmptySprite() (sprite Sprite)

func NewSprite

func NewSprite(img image.Image) (sprite Sprite)

func NewSpriteFromRects

func NewSpriteFromRects(img image.Image, rects []image.Rectangle) (sprites []Sprite)

func NewSpriteWithId

func NewSpriteWithId(img image.Image, id string) (sprite Sprite)

func NewSpritesFromRectMap

func NewSpritesFromRectMap(img image.Image, rectMap map[string]image.Rectangle) (sprites []Sprite)

func (*Sprite) Id

func (s *Sprite) Id() string

func (*Sprite) IsEmpty

func (s *Sprite) IsEmpty() bool

func (*Sprite) MarshalJSON

func (s *Sprite) MarshalJSON() ([]byte, error)

func (*Sprite) UnmarshalJSON

func (s *Sprite) UnmarshalJSON(bytes []byte) (err error)

type SpriteP

type SpriteP struct {
	Id      string `json:"id"`
	IsEmpty bool   `json:"isEmpty"`
}

スプライトの永続化モデル

type SubImager

type SubImager interface {
	SubImage(r image.Rectangle) image.Image
}

Jump to

Keyboard shortcuts

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