doodlekit

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: BSD-2-Clause Imports: 6 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Canvas

func Canvas(ctx context.Context) *canvas.Canvas

Canvas return the drawing context pointer from the context.

func Rng

func Rng(ctx context.Context) rng.RNG

Rng return the pseudo random numbers generator from the context.

Types

type Loop

type Loop interface {
	Run(fx []Scene)
}

func NewLoop

func NewLoop(id string, opts ...Option) Loop

type Option

type Option func(l *demoLoop)

func FPS

func FPS(fps float64) Option

func OutDir

func OutDir(dir string) Option

func StopAfter

func StopAfter(secs int) Option

type Scene

type Scene interface {
	Init(ctx context.Context)
	Update(ctx context.Context, dt float64)
	Draw(ctx context.Context)
}

Directories

Path Synopsis
internal
rng

Jump to

Keyboard shortcuts

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