Documentation ¶
Index ¶
- type Engine
- type EngineImpl
- func (engine *EngineImpl) AddLight(light *renderer.Light)
- func (engine *EngineImpl) AddOrtho(spatial renderer.Spatial)
- func (engine *EngineImpl) AddSpatial(spatial renderer.Spatial)
- func (engine *EngineImpl) AddSpatialTransparent(spatial renderer.Spatial)
- func (engine *EngineImpl) AddUpdatable(updatable Updatable)
- func (engine *EngineImpl) Camera() *renderer.Camera
- func (engine *EngineImpl) DefaultCubeMap(cubeMap *renderer.CubeMap)
- func (engine *EngineImpl) DefaultShader(shader *renderer.Shader)
- func (engine *EngineImpl) FPS() float64
- func (engine *EngineImpl) InitFpsDial()
- func (engine *EngineImpl) RemoveLight(light *renderer.Light)
- func (engine *EngineImpl) RemoveSpatial(spatial renderer.Spatial, destroy bool)
- func (engine *EngineImpl) RemoveUpdatable(updatable Updatable)
- func (engine *EngineImpl) Render()
- func (engine *EngineImpl) Renderer() renderer.Renderer
- func (engine *EngineImpl) RequestAnimationFrame(cb func())
- func (engine *EngineImpl) SetFpsCap(FpsCap float64)
- func (engine *EngineImpl) Start(Init func())
- func (engine *EngineImpl) Update()
- type Updatable
- type UpdatableStore
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 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 UpdatableFanIn ¶
func UpdatableFunc ¶
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)
Click to show internal directories.
Click to hide internal directories.