Documentation ¶
Overview ¶
http://mortdeus.mit-license.org/
Index ¶
- Constants
- Variables
- func IsLineIntersect(a, b, c, d Point, s_t *struct{ S, T float32 }) bool
- func IsLineOverlap(a, b, c, d Point) bool
- func IsLineParallel(a, b, c, d Point) bool
- func IsSegmentIntersect(a, b, c, d Point) bool
- func IsSegmentOverlap(a, b, c, d Point, s_e []Point) bool
- func NewLayer(tag string, z float32) *layer
- func NewNode(tag string) *node
- func NewScene(tag string) *scene
- func NewShader(s string, typ uint) (shader uint)
- func NewSprite(tag string, r io.Reader) *sprite
- func Program(vsh, fsh uint) uint
- type Action
- type ActionManager
- type AffineTarget
- type AffineTransform
- type Layer
- type Node
- type ParticleSystem
- type Point
- func (p Point) Angle(p2 Point) float32
- func (p Point) Apply(t struct{ ... }) Point
- func (p Point) ClampPoint(min, max Point) Point
- func (p Point) CompOp(f func(float32) float32) Point
- func (p Point) Cross(p2 Point) float32
- func (p Point) Dot(p2 Point) float32
- func (p Point) Equals(p2 Point) bool
- func (p Point) FuzzyEquals(p2 Point, v float32) bool
- func (p Point) Len() float32
- func (p *Point) Lerp(p2 Point, alpha float32) Point
- func (p Point) Midpoint(p2 Point) Point
- func (p Point) Normalize() Point
- func (p Point) Perp() Point
- func (p Point) Project(p2 Point) Point
- func (p Point) RPerp() Point
- func (p Point) Rotate(p2 Point) Point
- func (p Point) RotateByAngle(pivot Point, angle float32) Point
- func (p *Point) SetPoint(x, y float32)
- func (p Point) Unrotate(p2 Point) Point
- type Rect
- func (r Rect) Apply(t struct{ ... }) Rect
- func (r Rect) ContainsPoint(p Point) bool
- func (r Rect) Equals(r2 Rect) bool
- func (r Rect) IntersectsRect(r2 Rect) bool
- func (r Rect) MaxX() float32
- func (r Rect) MaxY() float32
- func (r Rect) MidX() float32
- func (r Rect) MidY() float32
- func (r Rect) MinX() float32
- func (r Rect) MinY() float32
- func (r *Rect) SetRect(x, y, w, h float32)
- func (r Rect) UnionWithRect(r2 Rect) Rect
- type Scene
- type Scheduler
- type Shader
- type Size
- type Sprite
Constants ¶
View Source
const ( WorldSpace = iota NodeSpace AnchorRelative )
View Source
const ( POSITION_COLOR_FRAG = `` /* 258-byte string literal not displayed */ POSITION_COLOR_VERT = `` /* 373-byte string literal not displayed */ POSITION_UCOLOR_FRAG = `` /* 317-byte string literal not displayed */ POSITION_UCOLOR_VERT = `` /* 516-byte string literal not displayed */ POSITION_COLOR_LENGTH_TEXTURE_FRAG = `` /* 195-byte string literal not displayed */ POSITION_COLOR_LENGTH_TEXTURE_VERT = `` /* 447-byte string literal not displayed */ POSITION_TEXTURE_FRAG = `` /* 391-byte string literal not displayed */ POSITION_TEXTURE_VERT = `` /* 457-byte string literal not displayed */ POSITION_TEXTURE_UCOLOR_FRAG = `` /* 551-byte string literal not displayed */ POSITION_TEXTURE_UCOLOR_VERT = `` /* 465-byte string literal not displayed */ POSITION_TEXTURE_A8COLOR_FRAG = `` /* 659-byte string literal not displayed */ POSITION_TEXTURE_A8COLOR_VERT = `` /* 621-byte string literal not displayed */ POSITION_TEXTURE_COLOR_FRAG = `` /* 473-byte string literal not displayed */ POSITION_TEXTURE_COLOR_VERT = `` /* 618-byte string literal not displayed */ POSITION_TEXTURE_COLOR_ALPHATEST_FRAG = `` /* 936-byte string literal not displayed */ EX_SWITCHMASK_FRAG = `` /* 809-byte string literal not displayed */ )
Variables ¶
View Source
var Director = new(director)
The Director is a singleton that is designed to simplify how you manage your game. It is used to initialize a openGL context and It maintains a stack of scenes. You are able to update and draw your scenes directly by calling Director.Update and Director.Draw in your game loop.
View Source
var Identity = &affineTransform{A: 1, D: 1}
Functions ¶
func IsLineIntersect ¶
func IsLineOverlap ¶
func IsLineParallel ¶
func IsSegmentIntersect ¶
func IsSegmentOverlap ¶
Types ¶
type ActionManager ¶
type ActionManager interface { Register(string, Action) Call(string, Node) Run(func(Node)) Pause() Resume() }
func NewActionManager ¶
func NewActionManager() ActionManager
type AffineTarget ¶
type AffineTarget interface {
Apply(affineTransform) AffineTarget
}
type AffineTransform ¶
type AffineTransform interface { Translate(tx, ty float32) AffineTransform Scale(sx, sy float32) AffineTransform Rotate(angle float32) AffineTransform Concat(t2 struct{ A, B, C, D, Tx, Ty float32 }) AffineTransform Equal(t2 struct{ A, B, C, D, Tx, Ty float32 }) bool Invert() AffineTransform }
type Node ¶
type Node interface { sync.Locker Tag() string IsVisible() bool IsDirty() (bool, bool) Update() error Draw() error OnEnter() error OnExit() error Cleanup() error Visit() error Transform(uint) error WorldToNodeTransform() AffineTransform NodeToWorldTransform() AffineTransform ParentToNodeTransform() AffineTransform NodeToParentTransform() AffineTransform ConvertTo(struct{ X, Y float32 }, uint) (struct{ X, Y float32 }, error) GetParent() Node SetParent(Node) AddChild(string, Node) GetChild(string) Node RemoveChild(string) }
type ParticleSystem ¶
type ParticleSystem interface { Node }
type Scheduler ¶
func NewScheduler ¶
func NewScheduler() Scheduler
Source Files ¶
Click to show internal directories.
Click to hide internal directories.