skin

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Animation

type Animation struct {
	Pix []uint8

	FrameCount int

	AnimationExpression int
	// contains filtered or unexported fields
}

func NewAnimation

func NewAnimation(width, height int, expression int, animationType AnimationType) Animation

func (Animation) At

func (a Animation) At(x, y int) color.Color

func (Animation) Bounds

func (a Animation) Bounds() image.Rectangle

func (Animation) ColorModel

func (a Animation) ColorModel() color.Model

func (Animation) Type

func (a Animation) Type() AnimationType

type AnimationType

type AnimationType int
const (
	AnimationHead AnimationType = iota

	AnimationBody32x32

	AnimationBody128x128
)

type Cape

type Cape struct {
	Pix []uint8
	// contains filtered or unexported fields
}

func NewCape

func NewCape(width, height int) Cape

func (Cape) At

func (c Cape) At(x, y int) color.Color

func (Cape) Bounds

func (c Cape) Bounds() image.Rectangle

func (Cape) ColorModel

func (c Cape) ColorModel() color.Model

type ModelConfig

type ModelConfig struct {
	Default string `json:"default"`

	AnimatedFace string `json:"animated_face,omitempty"`
}

func DecodeModelConfig

func DecodeModelConfig(b []byte) (ModelConfig, error)

func (ModelConfig) Encode

func (cfg ModelConfig) Encode() []byte

type Skin

type Skin struct {
	Persona   bool
	PlayFabID string
	FullID    string

	Pix []uint8

	ModelConfig ModelConfig

	Model []byte

	Cape Cape

	Animations []Animation
	// contains filtered or unexported fields
}

func New

func New(width, height int) Skin

func (Skin) At

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

func (Skin) Bounds

func (s Skin) Bounds() image.Rectangle

func (Skin) ColorModel

func (s Skin) ColorModel() color.Model

Jump to

Keyboard shortcuts

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