viewport

package
v0.0.0-...-c5d59ff Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component = Viewport // Component is an alias to Viewport

type ComponentFactory

type ComponentFactory struct {
	*akara.ComponentFactory
}

ComponentFactory is a wrapper for the generic viewport component factory.

func (*ComponentFactory) Add

func (concrete *ComponentFactory) Add(id akara.EID) *Viewport

Add adds a Viewport component to the given entity and returns it

func (*ComponentFactory) ExportToLua

func (concrete *ComponentFactory) ExportToLua(_ *lua.LState, table *lua.LTable) *lua.LTable

ExportToLua exports the component into the given table, using the given lua state machine.

func (*ComponentFactory) Get

func (concrete *ComponentFactory) Get(id akara.EID) (*Viewport, bool)

Get returns the Viewport component for the given entity, and a bool for whether or not it exists

type Viewport

type Viewport struct {
	CameraEntity akara.EID
	Background   color.Color
}

Viewport represents a rendering viewport within a scene. This consists of a camera and background color.

func (*Viewport) ExportToLua

func (component *Viewport) ExportToLua(_ *lua.LState, table *lua.LTable) *lua.LTable

ExportToLua exports the component into the given table, using the given lua state machine.

func (*Viewport) New

func (*Viewport) New() akara.Component

New creates a new viewport

Jump to

Keyboard shortcuts

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