startup

package
v0.0.0-...-59761c8 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package startup provides a runtime for connecting to the graphics engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Engine deprecated

func Engine()

Deprecated: Use Scene instead.

func Loader deprecated

func Loader()

Deprecated: Use LoadingScene instead.

func LoadingScene

func LoadingScene()

LoadingScene starts up loading the main scene after this function is called, all graphics functions will be available to use.

A subsequent call to Scene is required to startup the scene.

Blocks indefinitely if the editor is running. As such, make sure to register all editor-accessible classes before calling this function if you want them to be available in the editor.

func MainLoop

func MainLoop(loop MainLoopClass.Interface)

MainLoop uses the given struct as the main loop implementation. This will take care of initialising the Go runtime correctly, blocks until the main loop has shutdown.

func Pin

func Pin[T any](val T) T

Pin the given value to the lifetime of the program, preventing the underlying pointer from expiring, can only be called during initialization.

func Rendering

func Rendering() iter.Seq[Float.X]

Rendering waits for the engine to startup and returns a frame iterator for the primary viewport that is ready for rendering. The iterator will block until the engine shuts down.

	func main() {
		frames := startup.Rendering()
    	// init.
		for frame := range frames {
			// render frame
		}
		// finalize
	}

func Scene

func Scene()

Scene starts up the SceneTree and blocks until the engine shuts down.

Types

type FIXME

type FIXME *struct{}

Jump to

Keyboard shortcuts

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