Versions in this module Expand all Collapse all v1 v1.0.0 Oct 8, 2018 Changes in this version + const EdgeScrollerPriority + const EntityScrollerPriority + const KeyboardScrollerPriority + const MouseRotatorPriority + const MouseZoomerPriority + const RenderSystemPriority + var CameraBounds engo.AABB + var DefaultShader = &basicShader + var HUDShader = &basicShader + var LegacyHUDShader = &legacyShader + var LegacyShader = &legacyShader + var MaxZoom float32 = 3 + var MinZoom float32 = 0.25 + var TextHUDShader = &textShader + var TextShader = &textShader + var UnicodeCap = 200 + func ImageToNRGBA(img image.Image, width, height int) *image.NRGBA + func LoadShader(vertSrc, fragSrc string) (*gl.Program, error) + func SetBackground(c color.Color) + func UploadTexture(img Image) *gl.Texture + type Animation struct + Frames []int + Loop bool + Name string + type AnimationComponent struct + Animations map[string]*Animation + CurrentAnimation *Animation + Drawables []Drawable + Rate float32 + func NewAnimationComponent(drawables []Drawable, rate float32) AnimationComponent + func (ac *AnimationComponent) AddAnimation(action *Animation) + func (ac *AnimationComponent) AddAnimations(actions []*Animation) + func (ac *AnimationComponent) AddDefaultAnimation(action *Animation) + func (ac *AnimationComponent) Cell() Drawable + func (ac *AnimationComponent) NextFrame() + func (ac *AnimationComponent) SelectAnimationByAction(action *Animation) + func (ac *AnimationComponent) SelectAnimationByName(name string) + func (c *AnimationComponent) GetAnimationComponent() *AnimationComponent + type AnimationFace interface + GetAnimationComponent func() *AnimationComponent + type AnimationSystem struct + func (a *AnimationSystem) Add(basic *ecs.BasicEntity, anim *AnimationComponent, render *RenderComponent) + func (a *AnimationSystem) AddByInterface(i ecs.Identifier) + func (a *AnimationSystem) Remove(basic ecs.BasicEntity) + func (a *AnimationSystem) Update(dt float32) + type Animationable interface + type CameraAxis uint8 + const Angle + const XAxis + const YAxis + const ZAxis + type CameraMessage struct + Axis CameraAxis + Duration time.Duration + Incremental bool + Value float32 + func (CameraMessage) Type() string + type CameraSystem struct + func (cam *CameraSystem) Angle() float32 + func (cam *CameraSystem) FollowEntity(basic *ecs.BasicEntity, space *physics.SpaceComponent, trackRotation bool) + func (cam *CameraSystem) New(w *ecs.World) + func (cam *CameraSystem) Remove(ecs.BasicEntity) + func (cam *CameraSystem) Update(dt float32) + func (cam *CameraSystem) X() float32 + func (cam *CameraSystem) Y() float32 + func (cam *CameraSystem) Z() float32 + type Circle struct + BorderColor color.Color + BorderWidth float32 + func (Circle) Close() + func (Circle) Height() float32 + func (Circle) Texture() *gl.Texture + func (Circle) View() (float32, float32, float32, float32) + func (Circle) Width() float32 + type ComplexTriangles struct + BorderColor color.Color + BorderWidth float32 + Points []engo.Point + func (ComplexTriangles) Close() + func (ComplexTriangles) Height() float32 + func (ComplexTriangles) Texture() *gl.Texture + func (ComplexTriangles) View() (float32, float32, float32, float32) + func (ComplexTriangles) Width() float32 + type Drawable interface + Close func() + Height func() float32 + Texture func() *gl.Texture + View func() (float32, float32, float32, float32) + Width func() float32 + type EdgeScroller struct + EdgeMargin float32 + ScrollSpeed float32 + func (*EdgeScroller) Priority() int + func (*EdgeScroller) Remove(ecs.BasicEntity) + func (c *EdgeScroller) Update(dt float32) + type EntityScroller struct + Rotation bool + TrackingBounds engo.AABB + func (*EntityScroller) Priority() int + func (*EntityScroller) Remove(ecs.BasicEntity) + func (c *EntityScroller) New(*ecs.World) + func (c *EntityScroller) Update(dt float32) + type Font struct + BG color.Color + FG color.Color + Size float64 + TTF *truetype.Font + URL string + func (f *Font) Create() error + func (f *Font) CreatePreloaded() error + func (f *Font) Render(text string) Texture + func (f *Font) RenderNRGBA(text string) *image.NRGBA + func (f *Font) TextDimensions(text string) (int, int, int) + type FontAtlas struct + Height []float32 + Texture *gl.Texture + TotalHeight float32 + TotalWidth float32 + Width []float32 + XLocation []float32 + YLocation []float32 + type FontResource struct + Font *truetype.Font + func (f FontResource) URL() string + type FragmentShaderCompilationError struct + OpenGLError string + func (f FragmentShaderCompilationError) Error() string + type Image interface + Data func() interface{} + Height func() int + Width func() int + type ImageLayer struct + Images []*Tile + Name string + OffSetX float32 + OffSetY float32 + Opacity float32 + Properties []Property + Source string + Visible bool + type ImageObject struct + func NewImageObject(img *image.NRGBA) *ImageObject + func (i *ImageObject) Data() interface{} + func (i *ImageObject) Height() int + func (i *ImageObject) Width() int + type KeyboardScroller struct + ScrollSpeed float32 + func NewKeyboardScroller(scrollSpeed float32, hori, vert string) *KeyboardScroller + func (*KeyboardScroller) Priority() int + func (*KeyboardScroller) Remove(ecs.BasicEntity) + func (c *KeyboardScroller) BindKeyboard(hori, vert string) + func (c *KeyboardScroller) Update(dt float32) + type Level struct + ImageLayers []*ImageLayer + NextObjectID int + ObjectLayers []*ObjectLayer + Orientation string + Properties []Property + RenderOrder string + TileHeight int + TileLayers []*TileLayer + TileWidth int + func (l *Level) Bounds() engo.AABB + func (l *Level) GetTile(pt engo.Point) *Tile + func (l *Level) Height() int + func (l *Level) Width() int + type MouseRotator struct + RotationSpeed float32 + func (*MouseRotator) Priority() int + func (*MouseRotator) Remove(ecs.BasicEntity) + func (c *MouseRotator) Update(float32) + type MouseZoomer struct + ZoomSpeed float32 + func (*MouseZoomer) Priority() int + func (*MouseZoomer) Remove(ecs.BasicEntity) + func (c *MouseZoomer) Update(float32) + type NewCameraMessage struct + func (NewCameraMessage) Type() string + type NotAnimationComponent struct + func (n *NotAnimationComponent) GetNotAnimationComponent() *NotAnimationComponent + type NotAnimationable interface + GetNotAnimationComponent func() *NotAnimationComponent + type NotRenderComponent struct + func (n *NotRenderComponent) GetNotRenderComponent() *NotRenderComponent + type NotRenderable interface + GetNotRenderComponent func() *NotRenderComponent + type Object struct + Ellipses []TMXCircle + Height float32 + ID uint32 + Lines []TMXLine + Name string + Properties []Property + Text []TMXText + Tiles []*Tile + Type string + Width float32 + X float32 + Y float32 + type ObjectLayer struct + Color string + DrawOrder string + Name string + Objects []*Object + OffSetX float32 + OffSetY float32 + Opacity float32 + Properties []Property + Visible bool + type Property struct + Name string + Type string + Value string + type Rectangle struct + BorderColor color.Color + BorderWidth float32 + func (Rectangle) Close() + func (Rectangle) Height() float32 + func (Rectangle) Texture() *gl.Texture + func (Rectangle) View() (float32, float32, float32, float32) + func (Rectangle) Width() float32 + type RenderComponent struct + Color color.Color + Drawable Drawable + Hidden bool + Repeat TextureRepeating + Scale engo.Point + func (c *RenderComponent) GetRenderComponent() *RenderComponent + func (r *RenderComponent) IsHUDShader() bool + func (r *RenderComponent) SetMagFilter(z ZoomFilter) + func (r *RenderComponent) SetMinFilter(z ZoomFilter) + func (r *RenderComponent) SetShader(s Shader) + func (r *RenderComponent) SetZIndex(index float32) + type RenderFace interface + GetRenderComponent func() *RenderComponent + type RenderSystem struct + func (*RenderSystem) Priority() int + func (rs *RenderSystem) Add(basic *ecs.BasicEntity, render *RenderComponent, space *physics.SpaceComponent) + func (rs *RenderSystem) AddByInterface(i ecs.Identifier) + func (rs *RenderSystem) EntityExists(basic *ecs.BasicEntity) int + func (rs *RenderSystem) New(w *ecs.World) + func (rs *RenderSystem) Remove(basic ecs.BasicEntity) + func (rs *RenderSystem) Update(dt float32) + type Renderable interface + type Shader interface + Draw func(*RenderComponent, *physics.SpaceComponent) + Post func() + Pre func() + Setup func(*ecs.World) error + type SpriteRegion struct + Height int + Position engo.Point + Width int + type Spritesheet struct + func NewAsymmetricSpritesheetFromFile(textureName string, spriteRegions []SpriteRegion) *Spritesheet + func NewAsymmetricSpritesheetFromTexture(tr *TextureResource, spriteRegions []SpriteRegion) *Spritesheet + func NewSpritesheetFromFile(textureName string, cellWidth, cellHeight int) *Spritesheet + func NewSpritesheetFromTexture(tr *TextureResource, cellWidth, cellHeight int) *Spritesheet + func NewSpritesheetWithBorderFromFile(textureName string, cellWidth, cellHeight, borderWidth, borderHeight int) *Spritesheet + func NewSpritesheetWithBorderFromTexture(tr *TextureResource, cellWidth, cellHeight, borderWidth, borderHeight int) *Spritesheet + func (s *Spritesheet) Cell(index int) Texture + func (s *Spritesheet) CellCount() int + func (s *Spritesheet) Cells() []Texture + func (s *Spritesheet) Drawable(index int) Drawable + func (s *Spritesheet) Drawables() []Drawable + func (s Spritesheet) Height() float32 + func (s Spritesheet) Width() float32 + type TMXCircle struct + Height float32 + Width float32 + X float32 + Y float32 + type TMXLine struct + Lines []*engo.Line + Type string + type TMXResource struct + Level *Level + func (r TMXResource) URL() string + type TMXText struct + Bold bool + CharData string + Color string + FontFamily string + Halign string + Italic bool + Kerning bool + Size float32 + Strikeout bool + Underline bool + Valign string + WordWrap bool + type Text struct + Font *Font + LetterSpacing float32 + LineSpacing float32 + RightToLeft bool + Text string + func (t Text) Close() + func (t Text) Height() float32 + func (t Text) Texture() *gl.Texture + func (t Text) View() (float32, float32, float32, float32) + func (t Text) Width() float32 + type Texture struct + func LoadedSprite(url string) (*Texture, error) + func NewTextureSingle(img Image) Texture + func (t Texture) Close() + func (t Texture) Height() float32 + func (t Texture) Texture() *gl.Texture + func (t Texture) View() (float32, float32, float32, float32) + func (t Texture) Width() float32 + type TextureRepeating uint8 + const ClampToBorder + const ClampToEdge + const MirroredRepeat + const NoRepeat + const Repeat + type TextureResource struct + Height float32 + Texture *gl.Texture + Width float32 + func NewTextureResource(img Image) TextureResource + func (t TextureResource) URL() string + type Tile struct + Image *Texture + func (t *Tile) Close() + func (t *Tile) Height() float32 + func (t *Tile) Texture() *gl.Texture + func (t *Tile) View() (float32, float32, float32, float32) + func (t *Tile) Width() float32 + type TileLayer struct + Height int + Name string + OffSetX float32 + OffSetY float32 + Opacity float32 + Properties []Property + Tiles []*Tile + Visible bool + Width int + X float32 + Y float32 + type Triangle struct + BorderColor color.Color + BorderWidth float32 + TriangleType TriangleType + func (Triangle) Close() + func (Triangle) Height() float32 + func (Triangle) Texture() *gl.Texture + func (Triangle) View() (float32, float32, float32, float32) + func (Triangle) Width() float32 + type TriangleType uint8 + const TriangleIsosceles + const TriangleRight + type VertexShaderCompilationError struct + OpenGLError string + func (v VertexShaderCompilationError) Error() string + type ZoomFilter uint8 + const FilterLinear + const FilterNearest