runway

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const HorizRadPerSec = math.Pi / 2
View Source
const MovePerSec = 10
View Source
const VertRadPerSec = math.Pi / 2

Variables

This section is empty.

Functions

This section is empty.

Types

type FrameCapture

type FrameCapture func(*image.RGBA) bool

type GraphicsContext

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

func NewGraphicsContext

func NewGraphicsContext(gla *gtk.GLArea, opts *GraphicsOptions) *GraphicsContext

func (*GraphicsContext) Add

func (gc *GraphicsContext) Add(m model.Model, t ...mesh.Transform)

func (*GraphicsContext) Connect

func (gc *GraphicsContext) Connect()

func (*GraphicsContext) Got

func (gc *GraphicsContext) Got(e *gdk.EventKey)

func (*GraphicsContext) Realize

func (gc *GraphicsContext) Realize()

func (*GraphicsContext) Render

func (gc *GraphicsContext) Render() bool

func (*GraphicsContext) SetFrameCapture

func (gc *GraphicsContext) SetFrameCapture(fn FrameCapture) bool

func (*GraphicsContext) Size

func (gc *GraphicsContext) Size() (width, height int)

func (*GraphicsContext) Tick

func (gc *GraphicsContext) Tick(delta, runtime time.Duration) bool

func (*GraphicsContext) Unrealize

func (gc *GraphicsContext) Unrealize()

type GraphicsOptions

type GraphicsOptions struct {
	Domain glib.Quark
	Debug  bool
	NoCull bool
	Font   font.Face
	Lights []model.Light
}

type Renderer

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

func (*Renderer) Add

func (r *Renderer) Add(m model.Model, t ...mesh.Transform)

func (*Renderer) EnableDebug

func (r *Renderer) EnableDebug(ok bool)

func (*Renderer) Init

func (r *Renderer) Init() error

func (*Renderer) Realize

func (r *Renderer) Realize() error

func (*Renderer) Render

func (r *Renderer) Render(width, height int, g model.Globals) time.Duration

func (*Renderer) SetFrameCapture

func (r *Renderer) SetFrameCapture(fn FrameCapture) bool

func (*Renderer) Tick

func (r *Renderer) Tick(delta, runtime time.Duration) bool

func (*Renderer) Unrealize

func (r *Renderer) Unrealize()

type ViewerApp

type ViewerApp struct {
	*gtk.Application
	GC      *GraphicsContext
	Win     *gtk.ApplicationWindow
	Actions map[string]*glib.SimpleAction
	// contains filtered or unexported fields
}

func NewViewer

func NewViewer(name string, args *[]string, gcOpts *GraphicsOptions, flags glib.ApplicationFlags) *ViewerApp

func (*ViewerApp) OnActivate

func (app *ViewerApp) OnActivate(fn func(*gtk.Application))

func (*ViewerApp) OnOpen

func (app *ViewerApp) OnOpen(fn func(*gtk.Application, []string))

Jump to

Keyboard shortcuts

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