components

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package components provides a standard set of components for E2.

Index

Constants

View Source
const (
	MaskName  = wecqs.Component0
	MaskGroup = wecqs.Component1

	MaskPosition     = wecqs.Component2
	MaskVelocity     = wecqs.Component3
	MaskAcceleration = wecqs.Component4
	MaskImpulse      = wecqs.Component5

	MaskRenderable = wecqs.Component6
)

Component mask constant.

Variables

This section is empty.

Functions

This section is empty.

Types

type Acceleration

type Acceleration struct {
	Magnitude unit.Acceleration
	Direction r3.Vec
}

Acceleration marks change in velocity in 3D space.

func (*Acceleration) Mask

func (*Acceleration) Mask() uint64

type Group

type Group struct {
	Name string
}

func (*Group) Mask

func (*Group) Mask() uint64

type Impulse

type Impulse struct {
	Magnitude unit.Acceleration
	Direction r3.Vec
}

Impulse marks a single-frame change in velocity in 3D space.

func (*Impulse) Mask

func (*Impulse) Mask() uint64

type Position

type Position struct {
	r3.Vec
}

Position marks a point in 3D space.

func (*Position) Mask

func (*Position) Mask() uint64

type Renderable

type Renderable struct {
	Hidden bool
	Order  float64

	Vertices []ebiten.Vertex
	Indices  []uint16
	Image    *ebiten.Image
	Opts     *ebiten.DrawTrianglesOptions
}

func (*Renderable) Mask

func (*Renderable) Mask() uint64

type Velocity

type Velocity struct {
	Magnitude unit.Velocity
	Direction r3.Vec
}

Velocity marks change in position in 3D space.

func (*Velocity) Mask

func (*Velocity) Mask() uint64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL