Documentation ¶
Index ¶
- Constants
- Variables
- func Abs(a float32) float32
- func ApplyDeadZone(v float32, deadZone float32) float32
- func Atan(v float32) float32
- func Atan2(y, x float32) float32
- func Clamp(a, low, high float32) float32
- func Clamp01(a float32) float32
- func ClampUnit(a float32) float32
- func Cos(v float32) float32
- func DegToRad(deg float32) float32
- func EnforceInside(pos, vel *V2, bounds Rect, dampening float32)
- func Lerp(a, b, p float32) float32
- func LerpClamp(a, b, p float32) float32
- func Max(a, b float32) float32
- func Min(a, b float32) float32
- func MinMax(a, b float32) (float32, float32)
- func Mod(x, y float32) float32
- func Pow(v, e float32) float32
- func RadToDeg(rad float32) float32
- func RandomBetween(a, b float32) float32
- func Sat8(v float32) uint8
- func Sin(v float32) float32
- func Sqr(v float32) float32
- func Sqrt(v float32) float32
- type Color
- type Font
- func (font *Font) Draw(text string, position V2, glyphHeight float32)
- func (font *Font) DrawColored(text string, position V2, glyphHeight float32, color Color)
- func (font *Font) DrawLines(lines []string, position V2, glyphHeight, lineHeight float32)
- func (font *Font) Width(text string, glyphHeight float32) float32
- type Radian
- type Rect
- type Texture
- func (tex *Texture) Delete()
- func (tex *Texture) Draw(dst Rect)
- func (tex *Texture) DrawColored(dst Rect, color Color)
- func (tex *Texture) DrawSub(dst Rect, src Rect)
- func (tex *Texture) DrawSubColored(dst Rect, src Rect, color Color)
- func (tex *Texture) Line(from, to V2, width float32)
- func (tex *Texture) LineColored(from, to V2, width float32, color Color)
- func (tex *Texture) Reload()
- func (tex *Texture) Upload()
- type V2
- func (a V2) Add(b V2) V2
- func (a V2) AddScale(b V2, s float32) V2
- func (a V2) Angle() float32
- func (a V2) Cross(b V2) float32
- func (a V2) Distance(b V2) float32
- func (a V2) Distance2(b V2) float32
- func (a V2) Dot(b V2) float32
- func (a V2) Length() float32
- func (a V2) Length2() float32
- func (a V2) NearZero() bool
- func (a V2) Negate() V2
- func (a V2) Normalize() V2
- func (a V2) Rotate(angle float32) V2
- func (a V2) Rotate180() V2
- func (a V2) Rotate90() V2
- func (a V2) Rotate90c() V2
- func (a V2) Scale(s float32) V2
- func (a V2) Sub(b V2) V2
- func (a V2) XY() (x, y float32)
- func (a V2) XYZ() (x, y, z float32)
Constants ¶
Variables ¶
View Source
var ( Red = Color{0xFF, 0x00, 0x00, 0xFF} Green = Color{0x00, 0xFF, 0x00, 0xFF} Blue = Color{0x00, 0x00, 0xFF, 0xFF} )
View Source
var Zero2 = V2{}
Functions ¶
func ApplyDeadZone ¶
func EnforceInside ¶
func RandomBetween ¶
Types ¶
type Texture ¶
type Texture struct { Path string Repeat bool RGBA *image.RGBA Size V2 ID uint32 // contains filtered or unexported fields }
func (*Texture) DrawColored ¶
func (*Texture) DrawSubColored ¶
func (*Texture) LineColored ¶
Click to show internal directories.
Click to hide internal directories.