Documentation ¶
Overview ¶
Package std add circle, rect, mesh, transform, vector, and color components
Index ¶
- type Animatable
- type Circle
- type Color
- type Integer
- type Rect
- type Transform
- func (t *Transform) Position() *Vector3
- func (t *Transform) Position2D() *Vector2
- func (t *Transform) Rotation() *Vector3
- func (t *Transform) Scale() *Vector3
- func (t *Transform) Set(pos *Vector3, rot *Vector3, scl *Vector3)
- func (t *Transform) SetPosition(x float32, y float32, z float32)
- func (t *Transform) SetRotation(x float32, y float32, z float32)
- func (t *Transform) SetScale(scale *Vector3)
- type VEB
- type Vector2
- type Vector3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Animatable ¶
type Animatable interface { Add(Animatable) Sub(Animatable) Div(float32) Set(float32) Mul(Animatable) Copy() Animatable Zero() One() }
Animatable interface allows math to be applied to variables for animation
TODO(F): Rename this to something more generic because it could be applied to something other than animation TODO(F): Split other structs inside vector.go file to their respective files
type Color ¶
Color defines the RGBA values
type Integer ¶
type Integer struct {
V int
}
Integer defines an integer
type Transform ¶
type Transform struct { engine.Component // contains filtered or unexported fields }
Transform defines the position, orientiation, and scale
func GetTransform ¶
func GetTransform(e *engine.Entity) *Transform
GetTransform searching and returns an entity's Transform component
func NewTransform ¶
func NewTransform() *Transform
NewTransform creates and sets a new orphan transform
func (*Transform) Position2D ¶
Position2D returns two-dimensional position vector
func (*Transform) SetPosition ¶
SetPosition sets/changes position
func (*Transform) SetRotation ¶
SetRotation sets/changes rotation/orientation
type VEB ¶
VEB combines vertex and element array buffers
var QuadMesh *VEB
QuadMesh simple predefined quad mesh
type Vector2 ¶
Vector2 defines two vector values (x, y)