engine

package
v0.0.0-...-5b12917 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Start(Init func())
	DefaultShader(shader *renderer.Shader)
	DefaultCubeMap(cubeMap *renderer.CubeMap)
	AddOrtho(spatial renderer.Spatial)
	AddSpatial(spatial renderer.Spatial)
	AddSpatialTransparent(spatial renderer.Spatial)
	RemoveSpatial(spatial renderer.Spatial, destroy bool)
	AddUpdatable(updatable Updatable)
	RemoveUpdatable(updatable Updatable)
	AddLight(light *renderer.Light)
	RemoveLight(light *renderer.Light)
	RequestAnimationFrame(cb func())
	Camera() *renderer.Camera
	Renderer() renderer.Renderer
	SetFpsCap(FpsCap float64)
	FPS() float64
	InitFpsDial()
	Update()
}

func NewEngine

func NewEngine(r renderer.Renderer) Engine

func NewHeadlessEngine

func NewHeadlessEngine() Engine

type EngineImpl

type EngineImpl struct {
	// contains filtered or unexported fields
}

func (*EngineImpl) AddLight

func (engine *EngineImpl) AddLight(light *renderer.Light)

func (*EngineImpl) AddOrtho

func (engine *EngineImpl) AddOrtho(spatial renderer.Spatial)

func (*EngineImpl) AddSpatial

func (engine *EngineImpl) AddSpatial(spatial renderer.Spatial)

func (*EngineImpl) AddSpatialTransparent

func (engine *EngineImpl) AddSpatialTransparent(spatial renderer.Spatial)

func (*EngineImpl) AddUpdatable

func (engine *EngineImpl) AddUpdatable(updatable Updatable)

func (*EngineImpl) Camera

func (engine *EngineImpl) Camera() *renderer.Camera

func (*EngineImpl) DefaultCubeMap

func (engine *EngineImpl) DefaultCubeMap(cubeMap *renderer.CubeMap)

func (*EngineImpl) DefaultShader

func (engine *EngineImpl) DefaultShader(shader *renderer.Shader)

func (*EngineImpl) FPS

func (engine *EngineImpl) FPS() float64

func (*EngineImpl) InitFpsDial

func (engine *EngineImpl) InitFpsDial()

func (*EngineImpl) RemoveLight

func (engine *EngineImpl) RemoveLight(light *renderer.Light)

func (*EngineImpl) RemoveSpatial

func (engine *EngineImpl) RemoveSpatial(spatial renderer.Spatial, destroy bool)

func (*EngineImpl) RemoveUpdatable

func (engine *EngineImpl) RemoveUpdatable(updatable Updatable)

func (*EngineImpl) Render

func (engine *EngineImpl) Render()

func (*EngineImpl) Renderer

func (engine *EngineImpl) Renderer() renderer.Renderer

func (*EngineImpl) RequestAnimationFrame

func (engine *EngineImpl) RequestAnimationFrame(cb func())

func (*EngineImpl) SetFpsCap

func (engine *EngineImpl) SetFpsCap(FpsCap float64)

func (*EngineImpl) Start

func (engine *EngineImpl) Start(Init func())

func (*EngineImpl) Update

func (engine *EngineImpl) Update()

type Updatable

type Updatable interface {
	Update(dt float64)
}

func Interval

func Interval(e Engine, time float64, fn func()) Updatable

func Timeout

func Timeout(e Engine, time float64, fn func()) Updatable

func UpdatableFanIn

func UpdatableFanIn(updatables ...Updatable) Updatable

func UpdatableFunc

func UpdatableFunc(update func(dt float64)) Updatable

type UpdatableStore

type UpdatableStore struct {
	// contains filtered or unexported fields
}

func NewUpdatableStore

func NewUpdatableStore() *UpdatableStore

func (*UpdatableStore) Add

func (store *UpdatableStore) Add(updatable Updatable)

func (*UpdatableStore) Remove

func (store *UpdatableStore) Remove(updatable Updatable)

func (*UpdatableStore) UpdateAll

func (store *UpdatableStore) UpdateAll(dt float64)

Jump to

Keyboard shortcuts

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