utils

package
v0.0.0-...-50c553c Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetColor

func GetColor(H, S, V, alpha float64) mgl32.Vec4

func GetColorShifted

func GetColorShifted(color mgl32.Vec4, hueOffset float64) mgl32.Vec4

func GetColors

func GetColors(baseHue, hueShift float64, times int, alpha float64) []mgl32.Vec4

func GetColorsSV

func GetColorsSV(baseHue, hueShift float64, times int, S, V, alpha float64) []mgl32.Vec4

func GetColorsSVT

func GetColorsSVT(baseHue, hueShift, tagShift float64, times, tag int, S, V, alpha float64) []mgl32.Vec4

func GetNanoTime

func GetNanoTime() int64

func LoadImage

func LoadImage(path string) (*image.NRGBA, error)

func LoadTexture

func LoadTexture(path string) (*texture.TextureSingle, error)

func LoadTextureToAtlas

func LoadTextureToAtlas(atlas *texture.TextureAtlas, path string) (*texture.TextureRegion, error)

func MakeScreenshot

func MakeScreenshot(win glfw.Window)

func PathExists

func PathExists(path string) (bool, error)

func ResetTime

func ResetTime()

func SortRankHighToLow

func SortRankHighToLow(array []float64) (rank []int)

对数组排序,获得其序号(反序)

func SortRankLowToHigh

func SortRankLowToHigh(array []float64) (rank []int)

对数组排序,获得其序号(正序)

Types

type FPSCounter

type FPSCounter struct {
	FPS float64
	// contains filtered or unexported fields
}

func NewFPSCounter

func NewFPSCounter(samples int, log bool) *FPSCounter

func (*FPSCounter) GetFPS

func (prof *FPSCounter) GetFPS() float64

func (*FPSCounter) PutSample

func (prof *FPSCounter) PutSample(fps float64)

Jump to

Keyboard shortcuts

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