Versions in this module Expand all Collapse all v1 v1.0.0 Jul 30, 2017 Changes in this version + const Bottom + const Fragment + const Hold + const Initial + const Key0 + const Key1 + const Key2 + const Key3 + const Key4 + const Key5 + const Key6 + const Key7 + const Key8 + const Key9 + const KeyA + const KeyApostrophe + const KeyB + const KeyBackslash + const KeyBackspace + const KeyC + const KeyCapsLock + const KeyComma + const KeyD + const KeyDelete + const KeyDown + const KeyE + const KeyEnd + const KeyEnter + const KeyEqual + const KeyEscape + const KeyF + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF13 + const KeyF14 + const KeyF15 + const KeyF16 + const KeyF17 + const KeyF18 + const KeyF19 + const KeyF2 + const KeyF20 + const KeyF21 + const KeyF22 + const KeyF23 + const KeyF24 + const KeyF25 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyG + const KeyGraveAccent + const KeyH + const KeyHome + const KeyI + const KeyInsert + const KeyJ + const KeyK + const KeyKp0 + const KeyKp1 + const KeyKp2 + const KeyKp3 + const KeyKp4 + const KeyKp5 + const KeyKp6 + const KeyKp7 + const KeyKp8 + const KeyKp9 + const KeyKpAdd + const KeyKpDecimal + const KeyKpDivide + const KeyKpEnter + const KeyKpEqual + const KeyKpMultiply + const KeyKpSubtract + const KeyL + const KeyLast + const KeyLeft + const KeyLeftAlt + const KeyLeftBracket + const KeyLeftControl + const KeyLeftShift + const KeyLeftSuper + const KeyM + const KeyMenu + const KeyMinus + const KeyN + const KeyNumLock + const KeyO + const KeyP + const KeyPageDown + const KeyPageUp + const KeyPause + const KeyPeriod + const KeyPrKeyScreen + const KeyQ + const KeyR + const KeyRight + const KeyRightAlt + const KeyRightBracket + const KeyRightControl + const KeyRightShift + const KeyRightSuper + const KeyS + const KeyScrollLock + const KeySemicolon + const KeySlash + const KeySpace + const KeyT + const KeyTab + const KeyU + const KeyUnknown + const KeyUp + const KeyV + const KeyW + const KeyWorld1 + const KeyWorld2 + const KeyX + const KeyY + const KeyZ + const MouseButton1 + const MouseButton2 + const MouseButton3 + const MouseButton4 + const MouseButton5 + const MouseButton6 + const MouseButton7 + const MouseButton8 + const MouseButtonLast + const MouseButtonLeft + const MouseButtonMiddle + const MouseButtonRight + const Paused + const Playing + const Press + const Release + const ShapeLineLoop + const ShapeLineStrip + const ShapeLines + const ShapePoints + const ShapePolygon + const ShapeTriangleFan + const ShapeTriangleStrip + const ShapeTriangles + const Stopped + const Top + const Vertex + func Clear() error + func Collides(collider1, collider2 Collider) bool + func DisableEffects() + func SetClearColor(r uint8, g uint8, b uint8) + func SetNativeWindowSize(nativeWidth, nativeHeight int) + func SetWindowFullScreen(fullscreen bool) + func SetWindowNativeMousePos(shouldBeNative bool) + func SetWindowSize(width, height int) + func SetWindowTitle(title string) + func ShouldClose() bool + func Start() error + func Stop() + func UpdateDisplay() error + func UpdateEvents() error + func UseEffect(effect *Effect) error + type Action int + type Axis int + const X + const Y + type CharacterEventResponder interface + OnCharacter func(character rune) + type Collider interface + DistanceToTangentPoint func(float64, float64, Direction) (float64, float64) + Move func(x, y float64) + Position func() (float64, float64) + SetPosition func(x, y float64) + func NewCollider(coords []float64) Collider + type CollisionEventResponder interface + GetColliders func() []Collider + OnCollision func(c1, c2 Collider, culprit interface{}) + type Direction int + const Down + const Left + const Right + const Up + type DrawEventResponder interface + OnDraw func() + type Effect struct + func NewEffectFromDirectory(directory string) (*Effect, error) + func NewEffectFromFiles(filenames []string) (*Effect, error) + func NewEffectFromStrings(text []string, types []ShaderType) (*Effect, error) + func (effect *Effect) SetVariable2f(variable string, val1 float32, val2 float32) error + func (effect *Effect) SetVariable2i(variable string, val1 int, val2 int) error + func (effect *Effect) SetVariable3f(variable string, val1 float32, val2 float32, val3 float32) error + func (effect *Effect) SetVariable3i(variable string, val1 int, val2 int, val3 int) error + func (effect *Effect) SetVariable4f(variable string, val1 float32, val2 float32, val3 float32, val4 float32) error + func (effect *Effect) SetVariable4i(variable string, val1 int, val2 int, val3 int, val4 int) error + func (effect *Effect) SetVariablef(variable string, val float32) error + func (effect *Effect) SetVariablei(variable string, val int) error + type EventManager struct + Objects []interface{} + func NewEventManager() *EventManager + func (eventManager *EventManager) Collides(collider Collider) bool + func (eventManager *EventManager) GetUserEvents(getting bool) + func (eventManager *EventManager) RunCharacterEvent(character rune) + func (eventManager *EventManager) RunCollisionEvent() + func (eventManager *EventManager) RunDrawEvent() + func (eventManager *EventManager) RunJoystickAxisEvent(device int, value float64) + func (eventManager *EventManager) RunJoystickButtonEvent(button int, action Action) + func (eventManager *EventManager) RunKeyEvent(key Key, action Action) + func (eventManager *EventManager) RunMouseButtonEvent(button MouseButton, action Action, x, y float64) + func (eventManager *EventManager) RunMouseEnterWindowEvent(x, y float64, entered bool) + func (eventManager *EventManager) RunMousePositionEvent(x, y float64) + func (eventManager *EventManager) RunScrollEvent(xOffset, yOffset float64) + func (eventManager *EventManager) RunTickEvent() + func (eventManager *EventManager) RunWindowFocusEvent(focused bool) + func (eventManager *EventManager) RunWindowResizeEvent(width, height int) + type Font struct + func NewFont(fontFile string) (*Font, error) + type JoystickAxisEventResponder interface + OnJoystickAxis func(device int, value float64) + type JoystickButtonEventResponder interface + OnJoystickButton func(button int, action Action) + type Key int + type KeyboardEventResponder interface + OnKeyboard func(key Key, action Action) + type MouseButton int + type MouseButtonEventResponder interface + OnMouseButton func(button MouseButton, action Action, x, y float64) + type MouseEnterWindowResponder interface + OnMouseEnterWindow func(x, y float64, entered bool) + type MousePositionEventResponder interface + OnMousePosition func(x, y float64) + type Mover interface + Move func(x, y float64) + Position func() (x, y float64) + SetPosition func(x, y float64) + type OpenGLError struct + ErrorCodes []gl.Enum + func (err OpenGLError) Error() string + type Physics struct + Movers []Mover + func NewPhysics() *Physics + func (physics *Physics) Accelerate(forceX, forceY float64) + func (physics *Physics) Acceleration() (float64, float64) + func (physics *Physics) AddForce(name string, forceX, forceY float64) + func (physics *Physics) Calculate() + func (physics *Physics) DeleteForce(name string) + func (physics *Physics) DisableForce(name string) + func (physics *Physics) EnableForce(name string) + func (physics *Physics) Move(x, y float64) + func (physics *Physics) Position() (x, y float64) + func (physics *Physics) SetAcceleration(force float64, axis Axis) + func (physics *Physics) SetFriction(forceX, forceY float64) + func (physics *Physics) SetMaxAcceleration(force float64, axis Axis) + func (physics *Physics) SetMinAcceleration(force float64, axis Axis) + func (physics *Physics) SetPosition(x, y float64) + type ScrollResponder interface + OnScroll func(xOffset, yOffset float64) + type ShaderType int + type Shape struct + func NewShape(shapeType ShapeType, verticies []float64) (*Shape, error) + func NewShapeFromShape(copyShape *Shape) (*Shape, error) + func (shape *Shape) Draw() error + func (shape *Shape) Move(x, y float64) + func (shape *Shape) Position() (x, y float64) + func (shape *Shape) SetPosition(x, y float64) + func (shape *Shape) SetScaling(scaleX, scaleY float64) + type ShapeType int + type Sound struct + NumChannels int32 + SampleRate int32 + func NewSound(filename string) (*Sound, error) + func (sound *Sound) Channels() uint + func (sound *Sound) Destroy() + func (sound *Sound) Frequency() uint + func (sound *Sound) Gain() float32 + func (sound *Sound) Length() float32 + func (sound *Sound) Offset() float32 + func (sound *Sound) Pause() + func (sound *Sound) Play() + func (sound *Sound) Playing() SoundState + func (sound *Sound) SetGain(gain float32) + func (sound *Sound) SetLoop(willLoop bool) + func (sound *Sound) SetOffset(seconds float32) + func (sound *Sound) SetPitch(pitch float32) + func (sound *Sound) Size() uint + func (sound *Sound) Stop() + type SoundState int + type Sprite struct + func NewSprite(x, y, width, height float64, data []byte, clip int) (*Sprite, error) + func NewSpriteFromImage(x, y float64, filename string, clip int) (*Sprite, error) + func NewSpriteFromSprite(sprite *Sprite) (*Sprite, error) + func (sprite *Sprite) Draw(frame int) error + func (sprite *Sprite) Move(x, y float64) + func (sprite *Sprite) Position() (x, y float64) + func (sprite *Sprite) SetPosition(x, y float64) + func (sprite *Sprite) SetScaling(xScale, yScale float64) + type Text struct + func NewText(x, y float64, font *Font, fontSize float64, message string) (*Text, error) + func (text *Text) Draw() + func (text *Text) Message() string + func (text *Text) Move(x, y float64) + func (text *Text) Position() (float64, float64) + func (text *Text) SetColor(r, g, b, a uint8) error + func (text *Text) SetMessage(message string) error + func (text *Text) SetPosition(x, y float64) + func (text *Text) Size() (float64, float64) + type TickEventResponder interface + OnTick func() + type WindowFocusEventResponder interface + OnWindowFocus func(focused bool) + type WindowResizeEventResponder interface + OnWindowResize func(width, height int)