Documentation
¶
Overview ¶
Package microstateregistry provides types and loading for micro (10x2) avatar definitions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MicroDefinition ¶
type MicroDefinition struct {
Name string `json:"name"`
Width int `json:"width"`
Height int `json:"height"`
BaseFrame MicroFrame `json:"base_frame"`
States []MicroState `json:"states"`
}
MicroDefinition represents a complete micro avatar definition with base frame and states.
var DefaultDefinition *MicroDefinition
DefaultDefinition is the global micro avatar definition loaded from embedded JSON
func LoadEmbedded ¶
func LoadEmbedded() (*MicroDefinition, error)
LoadEmbedded loads the micro definition from the embedded JSON file
type MicroFrame ¶
MicroFrame represents a single frame in a micro avatar animation.
func GetBaseFrame ¶
func GetBaseFrame() MicroFrame
GetBaseFrame returns the base frame from the default definition
type MicroState ¶
type MicroState struct {
Name string `json:"name"`
FPS int `json:"fps,omitempty"`
Frames []MicroFrame `json:"frames"`
}
MicroState represents an animation state with multiple frames.
Click to show internal directories.
Click to hide internal directories.