Versions in this module Expand all Collapse all v1 v1.0.1 Oct 30, 2018 Changes in this version + const CursorArrow + const CursorCrosshair + const CursorHResize + const CursorHand + const CursorIBeam + const CursorNone + const CursorVResize + const EdgeScrollerPriority + const EntityScrollerPriority + const KeyboardScrollerPriority + const MouseRotatorPriority + const MouseSystemPriority + 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 SampleRate = 44100 + var TextHUDShader = &textShader + var TextShader = &textShader + var UnicodeCap = 200 + func GetMasterVolume() float64 + func ImageToNRGBA(img image.Image, width, height int) *image.NRGBA + func IsIntersecting(rect1 engo.AABB, rect2 engo.AABB) bool + func LoadShader(vertSrc, fragSrc string) (*gl.Program, error) + func MinimumTranslation(rect1 engo.AABB, rect2 engo.AABB) engo.Point + func SetBackground(c color.Color) + func SetMasterVolume(volume float64) + 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 AudioComponent struct + Player *Player + func (c *AudioComponent) GetAudioComponent() *AudioComponent + type AudioFace interface + GetAudioComponent func() *AudioComponent + type AudioSystem struct + func (a *AudioSystem) Add(basic *ecs.BasicEntity, audio *AudioComponent) + func (a *AudioSystem) AddByInterface(i ecs.Identifier) + func (a *AudioSystem) New(w *ecs.World) + func (a *AudioSystem) Remove(basic ecs.BasicEntity) + func (a *AudioSystem) Update(dt float32) + type Audioable interface + type BasicFace interface + GetBasicEntity func() *ecs.BasicEntity + ID func() uint64 + 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 *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 CollisionComponent struct + Collides CollisionGroup + Extra engo.Point + Group CollisionGroup + Main CollisionGroup + func (c *CollisionComponent) GetCollisionComponent() *CollisionComponent + type CollisionFace interface + GetCollisionComponent func() *CollisionComponent + type CollisionGroup byte + type CollisionMessage struct + Entity collisionEntity + Groups CollisionGroup + To collisionEntity + func (CollisionMessage) Type() string + type CollisionSystem struct + Solids CollisionGroup + func (c *CollisionSystem) Add(basic *ecs.BasicEntity, collision *CollisionComponent, space *SpaceComponent) + func (c *CollisionSystem) AddByInterface(i ecs.Identifier) + func (c *CollisionSystem) Remove(basic ecs.BasicEntity) + func (c *CollisionSystem) Update(dt float32) + type Collisionable interface + 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 Cursor uint8 + 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 Mouse struct + Action engo.Action + Button engo.MouseButton + Modifer engo.Modifier + ScrollX float32 + ScrollY float32 + X float32 + Y float32 + type MouseComponent struct + Clicked bool + Dragged bool + Enter bool + Hovered bool + Leave bool + Modifier engo.Modifier + MouseX float32 + MouseY float32 + Released bool + RightClicked bool + RightDragged bool + RightReleased bool + Track bool + func (c *MouseComponent) GetMouseComponent() *MouseComponent + type MouseFace interface + GetMouseComponent func() *MouseComponent + type MouseRotator struct + RotationSpeed float32 + func (*MouseRotator) Priority() int + func (*MouseRotator) Remove(ecs.BasicEntity) + func (c *MouseRotator) Update(float32) + type MouseSystem struct + func (m *MouseSystem) Add(basic *ecs.BasicEntity, mouse *MouseComponent, space *SpaceComponent, ...) + func (m *MouseSystem) AddByInterface(i ecs.Identifier) + func (m *MouseSystem) New(w *ecs.World) + func (m *MouseSystem) Priority() int + func (m *MouseSystem) Remove(basic ecs.BasicEntity) + func (m *MouseSystem) Update(dt float32) + type MouseZoomer struct + ZoomSpeed float32 + func (*MouseZoomer) Priority() int + func (*MouseZoomer) Remove(ecs.BasicEntity) + func (c *MouseZoomer) Update(float32) + type Mouseable interface + type NewCameraMessage struct + func (NewCameraMessage) Type() string + type NotAnimationComponent struct + func (n *NotAnimationComponent) GetNotAnimationComponent() *NotAnimationComponent + type NotAnimationable interface + GetNotAnimationComponent func() *NotAnimationComponent + type NotAudioComponent struct + func (n *NotAudioComponent) GetNotAudioComponent() *NotAudioComponent + type NotAudioable interface + GetNotAudioComponent func() *NotAudioComponent + type NotCollisionComponent struct + func (n *NotCollisionComponent) GetNotCollisionComponent() *NotCollisionComponent + type NotCollisionable interface + GetNotCollisionComponent func() *NotCollisionComponent + type NotMouseComponent struct + func (n *NotMouseComponent) GetNotMouseComponent() *NotMouseComponent + type NotMouseable interface + GetNotMouseComponent func() *NotMouseComponent + 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 Player struct + Repeat bool + func LoadedPlayer(url string) (*Player, error) + func (p *Player) Close() error + func (p *Player) Current() time.Duration + func (p *Player) GetVolume() float64 + func (p *Player) IsPlaying() bool + func (p *Player) Pause() + func (p *Player) Play() + func (p *Player) Rewind() error + func (p *Player) Seek(offset time.Duration) error + func (p *Player) SetVolume(volume float64) + func (p *Player) URL() string + 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) 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 *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, *SpaceComponent) + Post func() + Pre func() + Setup func(*ecs.World) error + type SpaceComponent struct + Height float32 + Position engo.Point + Rotation float32 + Width float32 + func (c *SpaceComponent) GetSpaceComponent() *SpaceComponent + func (sc *SpaceComponent) Center() engo.Point + func (sc *SpaceComponent) SetCenter(p engo.Point) + func (sc SpaceComponent) AABB() engo.AABB + func (sc SpaceComponent) Contains(p engo.Point) bool + func (sc SpaceComponent) Corners() (points [4]engo.Point) + type SpaceFace interface + GetSpaceComponent func() *SpaceComponent + 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