Discover Packages
github.com/DataDrake/pixie
model
encoding
package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Apr 29, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Colors are a palette of Colors
MarshalJSON is a custom marshaler for the Colors type
Each color is stored as a string, consisting of 4 dexadecimal values (RGBA)
UnmarshalJSON is a custom unmarshaler for the Colors type
type Sprite struct {
Size int `json:"size"`
Pixels []string `json:"pixels"`
}
Sprite is the JSON representation of a Pixie sprite
NewSprite creates a Sprite from a paletted image
Sprites are encoded with a size (NxN) and an array of strings, where each string is a row of pixels, and each pixel is a 2 character hex value
Image decodes this sprite as a paletted image
Source Files
¶
Click to show internal directories.
Click to hide internal directories.