app

package
v0.0.0-...-ce4c9c0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: BSD-2-Clause, BSD-2-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DemoMap = map[string]DemoI{}

DemoMap maps the demo name string to its object Individual demos sets the keys of this map

Functions

This section is empty.

Types

type App

type App struct {
	*appbase.AppBase // Embedded standard application object
	// contains filtered or unexported fields
}

App contains the application state

func Create

func Create() *App

Create creates the G3ND application using the specified map of demos

func (*App) AmbLight

func (a *App) AmbLight() *light.Ambient

AmbLight returns the default scene ambient light

func (*App) Camera

func (a *App) Camera() *camera.Camera

Camera returns the current application camera

func (*App) ControlFolder

func (a *App) ControlFolder() *gui.ControlFolder

ControlFolder returns the application control folder

func (*App) DemoPanel

func (a *App) DemoPanel() *gui.Panel

DemoPanel returns the current gui panel for demos to add elements to.

func (*App) DirData

func (a *App) DirData() string

DirData returns the base directory for data

func (*App) OnWindowResize

func (a *App) OnWindowResize()

OnWindowResize is default handler for window resize events.

func (*App) Orbit

func (a *App) Orbit() *orbit.OrbitControl

Orbit returns the current camera orbit control

func (*App) Run

func (a *App) Run()

Run runs the application render loop

func (*App) Scene

func (a *App) Scene() *node.Node

Scene returns the current application 3D scene

func (*App) Update

func (a *App) Update(rend *renderer.Renderer, deltaTime time.Duration)

type DemoI

type DemoI interface {
	Start(*App)                 // Called once at the start of the demo
	Update(*App, time.Duration) // Called every frame
	Cleanup(*App)               // Called once at the end of the demo
}

DemoI is the interface that must be satisfied by all demos.

Jump to

Keyboard shortcuts

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