noise

package
Version: v0.0.0-...-8b49de5 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fbm2

func Fbm2(x, y, frequency, lacunarity, gain float32, octaves int) float32

Fbm2 generates fractal brownian motion

func MakeNoise

func MakeNoise(noiseType NoiseType, frequency, lacunarity, gain float32, octaves, w, h int) (noise []float32, min, max float32)

MakeNoise generates a 2d block of noise

func Snoise2

func Snoise2(x, y float32) float32

2D simplex noise

func Turbulence

func Turbulence(x, y, frequency, lacunarity, gain float32, octaves int) float32

Turbulence generates turbulent fractal noise

Types

type NoiseType

type NoiseType int

NoiseType indicates which noise MakeNoise will generate

const (
	FBM NoiseType = iota
	TURBULENCE
)

Source Files

Jump to

Keyboard shortcuts

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