components

package
v0.0.0-...-50d5a6e Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SHAPES_LIST = [3]string{
	"Rect",
	"Ellipse",
	"Line",
}

Functions

This section is empty.

Types

type PrimitiveRenderer

type PrimitiveRenderer struct {
	Color   color.Color
	Shape   shape.IShape
	Texture *opengl.Texture
	// contains filtered or unexported fields
}

func (*PrimitiveRenderer) GetComponentName

func (component *PrimitiveRenderer) GetComponentName() string

func (*PrimitiveRenderer) Init

func (component *PrimitiveRenderer) Init()

func (*PrimitiveRenderer) MarkRender

func (component *PrimitiveRenderer) MarkRender()

func (*PrimitiveRenderer) RenderControlPanel

func (component *PrimitiveRenderer) RenderControlPanel()

func (*PrimitiveRenderer) SetShape

func (component *PrimitiveRenderer) SetShape(shape Shape2D)

func (*PrimitiveRenderer) SetTexture

func (component *PrimitiveRenderer) SetTexture(textureName string)

func (*PrimitiveRenderer) Update

func (component *PrimitiveRenderer) Update()

type SampleComponent

type SampleComponent struct {
}

A sample component that we can use around the engine for various tasks

func (*SampleComponent) GetComponentName

func (component *SampleComponent) GetComponentName() string

func (*SampleComponent) Init

func (component *SampleComponent) Init()

func (*SampleComponent) MarkRender

func (component *SampleComponent) MarkRender()

func (*SampleComponent) Update

func (component *SampleComponent) Update()

type Shape2D

type Shape2D int
const (
	SHAPE_NONE   Shape2D = -1
	SHAPE_RECT   Shape2D = 0
	SHAPE_CIRCLE Shape2D = 1
	SHAPE_LINE   Shape2D = 2
)

type Shape2DComponent

type Shape2DComponent struct {
	Name  string
	Shape shape.IShape
	// contains filtered or unexported fields
}

func (*Shape2DComponent) Determine

func (component *Shape2DComponent) Determine() Shape2D

Determines what specific shape this is

func (*Shape2DComponent) GetComponentName

func (component *Shape2DComponent) GetComponentName() string

func (*Shape2DComponent) Init

func (component *Shape2DComponent) Init()

func (*Shape2DComponent) RenderControlPanel

func (component *Shape2DComponent) RenderControlPanel()

func (*Shape2DComponent) SetShape

func (component *Shape2DComponent) SetShape(shape shape.IShape)

func (*Shape2DComponent) Update

func (component *Shape2DComponent) Update()

type TransformComponent

type TransformComponent struct {
	Name     string
	Position math.Vec3f
	Rotation math.Vec3f
	Scale    math.Vec3f
}

func (*TransformComponent) GetComponentName

func (transform *TransformComponent) GetComponentName() string

Keeping this here to avoid using reflection

func (*TransformComponent) Init

func (transform *TransformComponent) Init()

func (*TransformComponent) RenderControlPanel

func (transform *TransformComponent) RenderControlPanel()

Allows the component to designate its own control panel within the editor

func (*TransformComponent) Update

func (tranform *TransformComponent) Update()

Don't really need much functionality from this every frame

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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