sprite

package
v0.0.0-...-0996e1c Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 10 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 {
	Widget *widget.Widget
	// contains filtered or unexported fields
}

func New

func New(b *broker.Broker, offset geom.Offset, elementSize geom.Size) *Sprite

as *actor.ActorSystem, spriteSheetOffset geom.Offset, spriteSize widget.Size

func NewCanvas

func NewCanvas(b *broker.Broker, offset geom.Offset, elementSize geom.Size) *Sprite

func (*Sprite) Encode

func (s *Sprite) Encode() string

Encode outputs the sprite data as a hex string.

this might be convenient if we want to package the spritesheet in a cart

func (*Sprite) EncodeSelected

func (s *Sprite) EncodeSelected(start, end geom.Coordinate) string

func (*Sprite) Render

func (s *Sprite) Render(dst *ebiten.Image)

Jump to

Keyboard shortcuts

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