rog

package module
v0.0.0-...-f64d42e Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2014 License: BSD-2-Clause Imports: 17 Imported by: 0

README

rog A roguelike game library written in go

Note

rog is no longer maintained. Please check out eng for an updated roguelike library.

Setup

rog depends on github.com/go-gl/glfw. You can skip this step if you already have that up and running.

  • Ubuntu: apt-get install libglfw-dev
  • OSX: brew install glfw
  • Windows: download the glfw binaries, then drop the GL directory into C:\MinGW\include and the files for your arch under libmingw into C:\MinGW\lib. You will then need to install glfw.dll system wide or have it in the directory with your game.

Install

go get hagerbot.com/rog

Try it!

package main

import (
    "github.com/ajhager/rog"
)

func main() {
    rog.Open(20, 11, 2, false, "rog", nil)
    for rog.Running() {
        rog.Set(5, 5, nil, nil, "Hello, 世界!")
        if rog.Key() == rog.Esc {
            rog.Close()
        }
        rog.Flush()
    }
}

Documentation

Overview

Package rog provides algorithms and data structures for creating roguelike games.

Index

Constants

View Source
const (
	NOKEY      = -1
	Esc        = glfw.KeyEsc
	F1         = glfw.KeyF1
	F2         = glfw.KeyF2
	F3         = glfw.KeyF3
	F4         = glfw.KeyF4
	F5         = glfw.KeyF5
	F6         = glfw.KeyF6
	F7         = glfw.KeyF7
	F8         = glfw.KeyF8
	F9         = glfw.KeyF9
	F10        = glfw.KeyF10
	F11        = glfw.KeyF11
	F12        = glfw.KeyF12
	F13        = glfw.KeyF13
	F14        = glfw.KeyF14
	F15        = glfw.KeyF15
	F16        = glfw.KeyF16
	F17        = glfw.KeyF17
	F18        = glfw.KeyF18
	F19        = glfw.KeyF19
	F20        = glfw.KeyF20
	F21        = glfw.KeyF21
	F22        = glfw.KeyF22
	F23        = glfw.KeyF23
	F24        = glfw.KeyF24
	F25        = glfw.KeyF25
	Up         = glfw.KeyUp
	Down       = glfw.KeyDown
	Left       = glfw.KeyLeft
	Right      = glfw.KeyRight
	Lshift     = glfw.KeyLshift
	Rshift     = glfw.KeyRshift
	Lctrl      = glfw.KeyLctrl
	Rctrl      = glfw.KeyRctrl
	Lalt       = glfw.KeyLalt
	Ralt       = glfw.KeyRalt
	Tab        = glfw.KeyTab
	Enter      = glfw.KeyEnter
	Backspace  = glfw.KeyBackspace
	Insert     = glfw.KeyInsert
	Del        = glfw.KeyDel
	Pageup     = glfw.KeyPageup
	Pagedown   = glfw.KeyPagedown
	Home       = glfw.KeyHome
	End        = glfw.KeyEnd
	KP0        = glfw.KeyKP0
	KP1        = glfw.KeyKP1
	KP2        = glfw.KeyKP2
	KP3        = glfw.KeyKP3
	KP4        = glfw.KeyKP4
	KP5        = glfw.KeyKP5
	KP6        = glfw.KeyKP6
	KP7        = glfw.KeyKP7
	KP8        = glfw.KeyKP8
	KP9        = glfw.KeyKP9
	KPDivide   = glfw.KeyKPDivide
	KPMultiply = glfw.KeyKPMultiply
	KPSubtract = glfw.KeyKPSubtract
	KPAdd      = glfw.KeyKPAdd
	KPDecimal  = glfw.KeyKPDecimal
	KPEqual    = glfw.KeyKPEqual
	KPEnter    = glfw.KeyKPEnter
	KPNumlock  = glfw.KeyKPNumlock
	Capslock   = glfw.KeyCapslock
	Scrolllock = glfw.KeyScrolllock
	Pause      = glfw.KeyPause
	Lsuper     = glfw.KeyLsuper
	Rsuper     = glfw.KeyRsuper
	Menu       = glfw.KeyMenu
)
View Source
const (
	LAND = 1 << iota
	WALL
)

Tile information

View Source
const (
	COST_STRAIGHT = 1000
	COST_DIAGONAL = 1414
)

Tile movement costs

Variables

View Source
var (
	Black        = RGB{0, 0, 0}
	DarkestGrey  = RGB{31, 31, 31}
	DarkerGrey   = RGB{63, 63, 63}
	DarkGrey     = RGB{95, 95, 95}
	Grey         = RGB{127, 127, 127}
	LightGrey    = RGB{159, 159, 159}
	LighterGrey  = RGB{191, 191, 191}
	LightestGrey = RGB{223, 223, 223}
	White        = RGB{255, 255, 255}

	DarkestSepia  = RGB{31, 24, 15}
	DarkerSepia   = RGB{63, 50, 31}
	DarkSepia     = RGB{94, 75, 47}
	Sepia         = RGB{127, 101, 63}
	LightSepia    = RGB{158, 134, 100}
	LighterSepia  = RGB{191, 171, 143}
	LightestSepia = RGB{222, 211, 195}

	DesaturatedRed        = RGB{127, 63, 63}
	DesaturatedFlame      = RGB{127, 79, 63}
	DesaturatedOrange     = RGB{127, 95, 63}
	DesaturatedAmber      = RGB{127, 111, 63}
	DesaturatedYellow     = RGB{127, 127, 63}
	DesaturatedLime       = RGB{111, 127, 63}
	DesaturatedChartreuse = RGB{95, 127, 63}
	DesaturatedGreen      = RGB{63, 127, 63}
	DesaturatedSea        = RGB{63, 127, 95}
	DesaturatedTurquoise  = RGB{63, 127, 111}
	DesaturatedCyan       = RGB{63, 127, 127}
	DesaturatedSky        = RGB{63, 111, 127}
	DesaturatedAzure      = RGB{63, 95, 127}
	DesaturatedBlue       = RGB{63, 63, 127}
	DesaturatedHan        = RGB{79, 63, 127}
	DesaturatedViolet     = RGB{95, 63, 127}
	DesaturatedPurple     = RGB{111, 63, 127}
	DesaturatedFuchsia    = RGB{127, 63, 127}
	DesaturatedMagenta    = RGB{127, 63, 111}
	DesaturatedPink       = RGB{127, 63, 95}
	DesaturatedCrimson    = RGB{127, 63, 79}

	LightestRed        = RGB{255, 191, 191}
	LightestFlame      = RGB{255, 207, 191}
	LightestOrange     = RGB{255, 223, 191}
	LightestAmber      = RGB{255, 239, 191}
	LightestYellow     = RGB{255, 255, 191}
	LightestLime       = RGB{239, 255, 191}
	LightestChartreuse = RGB{223, 255, 191}
	LightestGreen      = RGB{191, 255, 191}
	LightestSea        = RGB{191, 255, 223}
	LightestTurquoise  = RGB{191, 255, 239}
	LightestCyan       = RGB{191, 255, 255}
	LightestSky        = RGB{191, 239, 255}
	LightestAzure      = RGB{191, 223, 255}
	LightestBlue       = RGB{191, 191, 255}
	LightestHan        = RGB{207, 191, 255}
	LightestViolet     = RGB{223, 191, 255}
	LightestPurple     = RGB{239, 191, 255}
	LightestFuchsia    = RGB{255, 191, 255}
	LightestMagenta    = RGB{255, 191, 239}
	LightestPink       = RGB{255, 191, 223}
	LightestCrimson    = RGB{255, 191, 207}

	LighterRed        = RGB{255, 127, 127}
	LighterFlame      = RGB{255, 159, 127}
	LighterOrange     = RGB{255, 191, 127}
	LighterAmber      = RGB{255, 223, 127}
	LighterYellow     = RGB{255, 255, 127}
	LighterLime       = RGB{223, 255, 127}
	LighterChartreuse = RGB{191, 255, 127}
	LighterGreen      = RGB{127, 255, 127}
	LighterSea        = RGB{127, 255, 191}
	LighterTurquoise  = RGB{127, 255, 223}
	LighterCyan       = RGB{127, 255, 255}
	LighterSky        = RGB{127, 223, 255}
	LighterAzure      = RGB{127, 191, 255}
	LighterBlue       = RGB{127, 127, 255}
	LighterHan        = RGB{159, 127, 255}
	LighterViolet     = RGB{191, 127, 255}
	LighterPurple     = RGB{223, 127, 255}
	LighterFuchsia    = RGB{255, 127, 255}
	LighterMagenta    = RGB{255, 127, 223}
	LighterPink       = RGB{255, 127, 191}
	LighterCrimson    = RGB{255, 127, 159}

	LightRed        = RGB{255, 63, 63}
	LightFlame      = RGB{255, 111, 63}
	LightOrange     = RGB{255, 159, 63}
	LightAmber      = RGB{255, 207, 63}
	LightYellow     = RGB{255, 255, 63}
	LightLime       = RGB{207, 255, 63}
	LightChartreuse = RGB{159, 255, 63}
	LightGreen      = RGB{63, 255, 63}
	LightSea        = RGB{63, 255, 159}
	LightTurquoise  = RGB{63, 255, 207}
	LightCyan       = RGB{63, 255, 255}
	LightSky        = RGB{63, 207, 255}
	LightAzure      = RGB{63, 159, 255}
	LightBlue       = RGB{63, 63, 255}
	LightHan        = RGB{111, 63, 255}
	LightViolet     = RGB{159, 63, 255}
	LightPurple     = RGB{207, 63, 255}
	LightFuchsia    = RGB{255, 63, 255}
	LightMagenta    = RGB{255, 63, 207}
	LightPink       = RGB{255, 63, 159}
	LightCrimson    = RGB{255, 63, 111}

	Red        = RGB{255, 0, 0}
	Flame      = RGB{255, 63, 0}
	Orange     = RGB{255, 127, 0}
	Amber      = RGB{255, 191, 0}
	Yellow     = RGB{255, 255, 0}
	Lime       = RGB{191, 255, 0}
	Chartreuse = RGB{127, 255, 0}
	Green      = RGB{0, 255, 0}
	Sea        = RGB{0, 255, 127}
	Turquoise  = RGB{0, 255, 191}
	Cyan       = RGB{0, 255, 255}
	Sky        = RGB{0, 191, 255}
	Azure      = RGB{0, 127, 255}
	Blue       = RGB{0, 0, 255}
	Han        = RGB{63, 0, 255}
	Violet     = RGB{127, 0, 255}
	Purple     = RGB{191, 0, 255}
	Fuchsia    = RGB{255, 0, 255}
	Magenta    = RGB{255, 0, 191}
	Pink       = RGB{255, 0, 127}
	Crimson    = RGB{255, 0, 63}

	DarkRed        = RGB{191, 0, 0}
	DarkFlame      = RGB{191, 47, 0}
	DarkOrange     = RGB{191, 95, 0}
	DarkAmber      = RGB{191, 143, 0}
	DarkYellow     = RGB{191, 191, 0}
	DarkLime       = RGB{143, 191, 0}
	DarkChartreuse = RGB{95, 191, 0}
	DarkGreen      = RGB{0, 191, 0}
	DarkSea        = RGB{0, 191, 95}
	DarkTurquoise  = RGB{0, 191, 143}
	DarkCyan       = RGB{0, 191, 191}
	DarkSky        = RGB{0, 143, 191}
	DarkAzure      = RGB{0, 95, 191}
	DarkBlue       = RGB{0, 0, 191}
	DarkHan        = RGB{47, 0, 191}
	DarkViolet     = RGB{95, 0, 191}
	DarkPurple     = RGB{143, 0, 191}
	DarkFuchsia    = RGB{191, 0, 191}
	DarkMagenta    = RGB{191, 0, 143}
	DarkPink       = RGB{191, 0, 95}
	DarkCrimson    = RGB{191, 0, 47}

	DarkerRed        = RGB{127, 0, 0}
	DarkerFlame      = RGB{127, 31, 0}
	DarkerOrange     = RGB{127, 63, 0}
	DarkerAmber      = RGB{127, 95, 0}
	DarkerYellow     = RGB{127, 127, 0}
	DarkerLime       = RGB{95, 127, 0}
	DarkerChartreuse = RGB{63, 127, 0}
	DarkerGreen      = RGB{0, 127, 0}
	DarkerSea        = RGB{0, 127, 63}
	DarkerTurquoise  = RGB{0, 127, 95}
	DarkerCyan       = RGB{0, 127, 127}
	DarkerSky        = RGB{0, 95, 127}
	DarkerAzure      = RGB{0, 63, 127}
	DarkerBlue       = RGB{0, 0, 127}
	DarkerHan        = RGB{31, 0, 127}
	DarkerViolet     = RGB{63, 0, 127}
	DarkerPurple     = RGB{95, 0, 127}
	DarkerFuchsia    = RGB{127, 0, 127}
	DarkerMagenta    = RGB{127, 0, 95}
	DarkerPink       = RGB{127, 0, 63}
	DarkerCrimson    = RGB{127, 0, 31}

	DarkestRed        = RGB{63, 0, 0}
	DarkestFlame      = RGB{63, 15, 0}
	DarkestOrange     = RGB{63, 31, 0}
	DarkestAmber      = RGB{63, 47, 0}
	DarkestYellow     = RGB{63, 63, 0}
	DarkestLime       = RGB{47, 63, 0}
	DarkestChartreuse = RGB{31, 63, 0}
	DarkestGreen      = RGB{0, 63, 0}
	DarkestSea        = RGB{0, 63, 31}
	DarkestTurquoise  = RGB{0, 63, 47}
	DarkestCyan       = RGB{0, 63, 63}
	DarkestSky        = RGB{0, 47, 63}
	DarkestAzure      = RGB{0, 31, 63}
	DarkestBlue       = RGB{0, 0, 63}
	DarkestHan        = RGB{15, 0, 63}
	DarkestViolet     = RGB{31, 0, 63}
	DarkestPurple     = RGB{47, 0, 63}
	DarkestFuchsia    = RGB{63, 0, 63}
	DarkestMagenta    = RGB{63, 0, 47}
	DarkestPink       = RGB{63, 0, 31}
	DarkestCrimson    = RGB{63, 0, 15}

	Brass  = RGB{191, 151, 96}
	Copper = RGB{197, 136, 124}
	Gold   = RGB{229, 191, 0}
	Silver = RGB{203, 203, 203}

	Celadon = RGB{172, 255, 175}
	Peach   = RGB{255, 159, 127}
)

Functions

func Blit

func Blit(con *Console, x, y int)

func Clear

func Clear(fg, bg Blender, ch rune)

Clear draws a rect over the entire root console.

func Close

func Close()

Close shuts down the windowing system. No rog functions should be called after this.

func Cursor

func Cursor(on bool)

Cursor enables or disables the mouse cursor.

func Dt

func Dt() float64

Dt returns length of the last frame in seconds.

func FOVCircular

func FOVCircular(fov *Map, x, y, r int, walls bool)

FOVCicular raycasts out from the vantage in a circle.

func Fill

func Fill(x, y, w, h int, fg, bg Blender, ch rune)

Fill draws a rect on the root console.

func Flush

func Flush()

Flush renders the root console to the window.

func Fps

func Fps() float64

Fps returns the number of rendered frames per second.

func Get

func Get(x, y int) (RGB, RGB, rune)

Get returns the fg, bg colors and rune of the cell on the root console.

func Height

func Height() int

Height returns the height of the root console in cells.

func Heuristic

func Heuristic(tile, stop *Node) (h int)

Diagonal/Chebyshev distance is used.

func Key

func Key() int

Key returns the last key typed this frame.

func Line

func Line(x0, y0, x1, y1 int) []image.Point

Line returns the points on the grid that the line would pass through.

func NewStats

func NewStats() *stats

func Open

func Open(width, height, zoom int, fs bool, title string, font *FontData)

Open creates a window and a root console with size width by height cells.

func Path

func Path(g GridMove, this image.Rectangle, start, end image.Point) []image.Point

func Running

func Running() bool

Running returns whether the rog window is open or not.

func Set

func Set(x, y int, fg, bg Blender, data string, rest ...interface{})

Set draws on the root console.

func SetR

func SetR(x, y, w, h int, fg, bg Blender, data string, rest ...interface{})

Set draws on the root console with wrapping bounds of x, y, w, h.

func SetTitle

func SetTitle(title string)

SetTitle changes the title of the window.

func Terminal

func Terminal() []byte

Terminal returns the raw, uncompressed file data data.

func Width

func Width() int

Width returns the width of the root console in cells.

Types

type BlendFunc

type BlendFunc func(RGB) RGB

BlendFunc

func Add

func Add(top RGB) BlendFunc

func AddAlpha

func AddAlpha(top RGB, a float64) BlendFunc

func Alpha

func Alpha(top RGB, a float64) BlendFunc

func Burn

func Burn(top RGB) BlendFunc

func Darken

func Darken(top RGB) BlendFunc

func Dodge

func Dodge(top RGB) BlendFunc

func Lighten

func Lighten(top RGB) BlendFunc

func Multiply

func Multiply(top RGB) BlendFunc

func Overlay

func Overlay(top RGB) BlendFunc

func RandScale

func RandScale() BlendFunc

func Scale

func Scale(s float64) BlendFunc

func Screen

func Screen(top RGB) BlendFunc

func (BlendFunc) Blend

func (bf BlendFunc) Blend(o RGB, i, t int) RGB

BlendFunc Blender interface

type Blender

type Blender interface {
	Blend(RGB, int, int) RGB
}

Blender interface

type Console

type Console struct {
	// contains filtered or unexported fields
}

Console is a double buffered grid of unicode characters that can be rendered to an image.Image.

func NewConsole

func NewConsole(width, height int) *Console

NewConsole creates an empty console.

func (*Console) Blit

func (con *Console) Blit(o *Console, x, y int)

Blit draws con onto this console with top left starting at x, y.

func (*Console) Clear

func (con *Console) Clear(fg, bg Blender, ch rune)

Clear is a short hand to fill the entire screen with the given colors and rune.

func (*Console) Fill

func (con *Console) Fill(x, y, w, h int, fg, bg Blender, ch rune)

Fill draws a rect on the root console using ch.

func (*Console) Get

func (con *Console) Get(x, y int) (RGB, RGB, rune)

Get returns the fg, bg colors and rune of the cell.

func (*Console) Height

func (con *Console) Height() int

Height returns the height of the console in cells.

func (*Console) Set

func (con *Console) Set(x, y int, fg, bg Blender, data string, rest ...interface{})

Set draws a string starting at x,y onto the console, wrapping at the bounds if needed.

func (*Console) SetR

func (con *Console) SetR(x, y, w, h int, fg, bg Blender, data string, rest ...interface{})

SetR draws a string starting at x,y onto the console, wrapping at the bounds created by x, y, w, h if needed. If h is 0, the text will cut off at the bottom of the console, otherwise it will cut off after the y+h row.

func (*Console) Width

func (con *Console) Width() int

Width returns the width of the console in cells.

type FOVAlgo

type FOVAlgo func(*Map, int, int, int, bool)

FOVAlgo takes a FOVMap x,y vantage, radius of the view, whether to include walls and then marks in the map which cells are viewable.

type FontData

type FontData struct {
	Image                 image.Image
	Width, Height         int
	CellWidth, CellHeight int
	// contains filtered or unexported fields
}

func Font

func Font(path string, cellWidth, cellHeight int, maps string) *FontData

func ReadFont

func ReadFont(r io.Reader, cellWidth, cellHeight int, maps string) *FontData

func (*FontData) Map

func (fd *FontData) Map(ch rune) (int, bool)

type Graph

type Graph struct {
	// contains filtered or unexported fields
}

Start, stop nodes and a slice of nodes

func NewGraph

func NewGraph(map_data MapData) *Graph

Return a Graph from a map of coordinates (those that are passible)

func (*Graph) Node

func (g *Graph) Node(x, y int) *Node

Get or create a *Node based on x, y coordinates. Avoids duplicated nodes!

type GridMove

type GridMove interface {
	MoveBlocked(x, y int) bool
}

type Map

type Map struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap(width, height int) *Map

func (*Map) Block

func (this *Map) Block(x, y int, blocked bool)

Block sets a cell as blocking or not.

func (*Map) Clear

func (this *Map) Clear()

Clear resets the map to completely unblocked but unviewable.

func (*Map) Fov

func (this *Map) Fov(x, y, radius int, includeWalls bool, algo FOVAlgo)

Update runs the give fov alogrithm on the map.

func (*Map) Height

func (this *Map) Height() int

Height returns the height in cells of the map.

func (*Map) In

func (this *Map) In(x, y int) bool

In returns whether the coordinate is inside the map bounds.

func (*Map) Look

func (this *Map) Look(x, y int) bool

Look indicates if the cell at the coordinate can be seen.

func (*Map) Width

func (this *Map) Width() int

Width returns the width in cells of the map.

type MapData

type MapData [][]int

func NewMapData

func NewMapData(rows, cols int) MapData

Return a new MapData by value given some dimensions

func (MapData) Clone

func (m MapData) Clone() MapData

type MouseButton

type MouseButton struct {
	Pressed, Released bool
}

type MouseData

type MouseData struct {
	Pos, Cell           image.Point
	Left, Right, Middle MouseButton
}

func Mouse

func Mouse() *MouseData

Mouse returns a struct representing the state of the mouse.

type Node

type Node struct {
	X, Y int
	// contains filtered or unexported fields
}

X and Y are coordinates, parent is a link to where we came from. cost are the estimated cost from start along the best known path. h is the heuristic value (air line distance to goal).

func Astar

func Astar(map_data MapData, startx, starty, stopx, stopy int, dir8 bool) []*Node

A* search algorithm. See http://en.wikipedia.org/wiki/A*_search_algorithm

func NewNode

func NewNode(x, y int) *Node

Create a new Node

func (*Node) String

func (n *Node) String() string

Return string representation of the node

type PriorityQueue

type PriorityQueue []*Node

A PriorityQueue implements heap.Interface and holds Items.

func (PriorityQueue) Len

func (pq PriorityQueue) Len() int

sort.Interface

func (PriorityQueue) Less

func (pq PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() interface{}

func (*PriorityQueue) PopNode

func (pq *PriorityQueue) PopNode() *Node

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(x interface{})

heap.interface

func (*PriorityQueue) PushNode

func (pq *PriorityQueue) PushNode(n *Node)

func (*PriorityQueue) RemoveNode

func (pq *PriorityQueue) RemoveNode(n *Node)

func (PriorityQueue) Swap

func (pq PriorityQueue) Swap(i, j int)

type RGB

type RGB struct {
	R, G, B uint8
}

RGB represents a traditional 24-bit alpha-premultiplied color, having 8 bits for each of red, green, and blue.

func Hex

func Hex(n uint32) RGB

HEX returns parses a uint32 into RGB components.

func Rand

func Rand() RGB

Rand returns a random RGB color

func (RGB) Add

func (c RGB) Add(o RGB) RGB

Add = old + new

func (RGB) AddAlpha

func (c RGB) AddAlpha(o RGB, a float64) RGB

AddAlpha = old + alpha*new

func (RGB) Alpha

func (c RGB) Alpha(o RGB, a float64) RGB

Alpha = (1-alpha)*old + alpha*(new-old)

func (RGB) Blend

func (c RGB) Blend(o RGB, i, t int) RGB

RGB Blender interface

func (RGB) Burn

func (c RGB) Burn(o RGB) RGB

Burn = old + new - white

func (RGB) Darken

func (c RGB) Darken(o RGB) RGB

Darken = MIN(old, new)

func (RGB) Dodge

func (c RGB) Dodge(o RGB) RGB

Dodge = new / (white - old)

func (RGB) Lighten

func (c RGB) Lighten(o RGB) RGB

Lighten = MIN(old, new)

func (RGB) Multiply

func (c RGB) Multiply(o RGB) RGB

Multiply = old * new

func (RGB) Overlay

func (c RGB) Overlay(o RGB) RGB

Overlay = new.x <= 0.5 ? 2*new*old : white - 2*(white-new)*(white-old)

func (RGB) RGBA

func (c RGB) RGBA() (r, g, b, a uint32)

func (RGB) RandScale

func (c RGB) RandScale() RGB

Scale the color a random amount.

func (RGB) Scale

func (c RGB) Scale(s float64) RGB

Scale = old * s

func (RGB) Screen

func (c RGB) Screen(o RGB) RGB

Screen = white - (white - old) * (white - new)

type ScaleFunc

type ScaleFunc func(RGB, int, int) RGB

Scales

func Discrete

func Discrete(blenders ...Blender) ScaleFunc

func Linear

func Linear(blenders ...Blender) ScaleFunc

func (ScaleFunc) Blend

func (sf ScaleFunc) Blend(c RGB, i, t int) RGB

Directories

Path Synopsis
demos
fov
perlin
Submitted by Dustin Lacewell <dlacewell@gmail.com>
Submitted by Dustin Lacewell <dlacewell@gmail.com>

Jump to

Keyboard shortcuts

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