Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetImageSection ¶
func GetImageSection(path string) *aggregateImageSection
GetImageSEction returns the image section based on named image
func GetUVFromPosition ¶
func LoadImages ¶
func LoadImages(path string)
- NewAggregateImage *
- Walk the directory and aggregate all images to one image and store in meemory
- @param {[type]} location string [description]
func NewBuddyAggregator ¶
func NewBuddyAggregator(maxBounds int) *partition
NewBuddyAggregator creates a new partition which recursively finds free space in any aggregate image
Types ¶
type AggregateImage ¶
type AggregateImage struct {
// contains filtered or unexported fields
}
AggregateImage is our class for grouping all images, sprites, etc. into one place. This will improve performance over loading an image every time it's needed. Instead we only need to select a space of our pre-rendered composite image
func (*AggregateImage) Print ¶
func (this *AggregateImage) Print(path string)
type Color ¶
type Color struct {
R, G, B, A float32
}
Color represents floating point unit color 0 to 1
type FontImage ¶
func NewFontImage ¶
creates a new font rune image TODO create interface ImageSection that has a "recursive" getSection function
func (*FontImage) VertexData ¶
func (this *FontImage) VertexData() *Opengl.OpenGLVertexInfo
type FontImageSection ¶
type FontImageSection struct { FontSections map[rune]image.Rectangle // contains filtered or unexported fields }
FontImageSection keeps track of where our fonts are within the aggregate image
func GetFontImageSection ¶
func GetFontImageSection(font string) *FontImageSection
GetFontImageSection returns FontImageSection based on named font
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func (*Image) VertexData ¶
func (this *Image) VertexData() *Opengl.OpenGLVertexInfo
type SpriteSheetImage ¶
type SpriteSheetImage struct { Image // contains filtered or unexported fields }
SpriteSheetImage TODO: may be useful for sprite grouping in aggregate, SpriteRenderer will handle animations though