core

package
v0.0.0-...-070a714 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FALSE      int    = 0
	TRUE       int    = 1
	VERTEX     uint32 = 0x8B31
	FRAGMENT   uint32 = 0x8B30
	LINEAR     uint32 = 0x2601
	NEAREST    uint32 = 0x2600
	PrefixErr         = "\033[101m ERROR! \033[0m "
	PrefixWarn        = "\033[43m WARNING! \033[0m "
	PrefixInfo        = "\033[42m INFO \033[0m "
	Reset             = "\033[0m"
)
View Source
const OS = runtime.GOOS

Variables

This section is empty.

Functions

func CreateCustomShader

func CreateCustomShader(vertexFile string, fragmentFile string) uint32

func Edit

func Edit(scene Scene, who string, value any)

func End

func End()

func Get

func Get(scene Scene, who string) any

will optimize later

func Init

func Init(config Config)

func LoadImage

func LoadImage(path string, sampling uint32) uint32

func RunScene

func RunScene(scene map[string]interface{})

To-Do

Types

type Config

type Config struct {
	Debug bool
	VSync bool
}
var Engine Config

type Scene

type Scene struct {
	Name    string
	Script  string
	Objects map[string]any
}

func LoadScene

func LoadScene(scenePath string) Scene

Refactor and optimize in future or rn

type Vec2

type Vec2 struct {
	X float64
	Y float64
}

type Vec3

type Vec3 struct {
	X float64
	Y float64
	Z float64
}

func ToVec3

func ToVec3(in any) Vec3

type Window

type Window struct {
	*glfw.Window
}

func CreateWindow

func CreateWindow(width int32, height int32, title string, resizable int) *Window

Jump to

Keyboard shortcuts

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