v0.0.0-...-42068ab Latest Latest

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

Go to latest
Published: Dec 13, 2021 License: BSD-2-Clause Imports: 23 Imported by: 0




This section is empty.


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

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


This section is empty.


type App

type App struct {
	*app.Application // 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) Log

func (a *App) Log() *logger.Logger

Log returns the application logger

func (*App) OnWindowResize

func (a *App) OnWindowResize()

OnWindowResize is default handler for window resize events.

func (*App) Orbit

func (a *App) Orbit() *camera.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() *core.Node

Scene returns the current application 3D scene

func (*App) Update

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

type IDemo

type IDemo 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

IDemo 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