opacity

package
v0.0.0-...-21449c0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 3 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 = Opacity // Component is an alias to Opacity

type ComponentFactory

type ComponentFactory struct {
	*akara.ComponentFactory
}

ComponentFactory is a wrapper for the generic component factory that returns Opacity component instances. This can be embedded inside of a system to give them the methods for adding, retrieving, and removing a Opacity.

func (*ComponentFactory) Add

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

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

func (*ComponentFactory) ExportToLua

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

func (*ComponentFactory) Get

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

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

type Opacity

type Opacity struct {
	Value float64
}

Opacity is a component that contains normalized alpha transparency (0.0 ... 1.0)

func (*Opacity) ExportToLua

func (component *Opacity) ExportToLua(state *lua.LState, table *lua.LTable) *lua.LTable

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

func (*Opacity) New

func (*Opacity) New() akara.Component

New creates a new alpha component instance. The default alpha is opaque with value 1.0

Jump to

Keyboard shortcuts

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