Versions in this module Expand all Collapse all v0 v0.1.4 Jan 7, 2022 v0.1.3 Jan 7, 2022 v0.1.2 Dec 5, 2021 Changes in this version type RectangleRasterInput + Extra interface{} type TriangleRasterInput + Extra interface{} + Indexizer Indexizer + Lights Lights v0.1.1 Dec 4, 2021 v0.1.0 Dec 3, 2021 Changes in this version + var Bits2 = &Ind2Bit + var FullLight = FixedLight + var Palette2BitNames []string + var Palettes2Bit = map[string]Palette + func LoadImage(fileName string) (image.Image, error) + func PerspTriShaderIndexed(iim IndexedImage, tx0, ty0, tx1, ty1, tx2, ty2 int, z0, z1, z2 float64) func(o *TriangleShaderOpts) + func RandomPalette2BitName() string + func RectShaderIndexed(iim IndexedImage, tx0, ty0, tx1, ty1 int) func(o *RectangleShaderOpts) + func TriShaderIndexed(iim IndexedImage, tx0, ty0, tx1, ty1, tx2, ty2 int, ...) func(o *TriangleShaderOpts) + type CircleSource struct + FallRadius float64 + Intensity float64 + Tracked Tracked + func (s *CircleSource) Alive() bool + func (s *CircleSource) OffsetScale(posx, posy int) (offs float64, scale float64) + type Display struct + Atlases map[string]*IndexedImage + Indexizer Indexizer + Lights Lights + Palette Palette + RGBA []byte + Rasterizer Rasterizer + Screen IndexedImage + Sprites map[string]*Sprite + func (d *Display) DrawSprite(name string, x, y float64) + func (d *Display) DrawSpriteAdvanced(o DrawSpriteOpts) + func (d *Display) InitBuffers(w, h int) + func (d *Display) LoadAtlas(fileName string) error + func (d *Display) ReportSprite(name string) + type DrawSpriteOpts struct + DH float64 + DW float64 + DX float64 + DY float64 + Name string + SH float64 + SW float64 + SX float64 + SY float64 + type FixedLight struct + Intensity float64 + func (l FixedLight) Light(val byte, posx, posy int) float64 + type FromImageOpts struct + AlphaThreshold float64 + Colors int + type Ind2Bit struct + Threshold1_5 float64 + Threshold2 float64 + Threshold2_5 float64 + Threshold3 float64 + Threshold3_5 float64 + Threshold4 float64 + func (i *Ind2Bit) Indexize(intens float64, posx, posy int) byte + type IndexedImage struct + Colors int + Height int + Pixels []byte + Width int + func IndexedImageFromImage(img image.Image, o FromImageOpts) IndexedImage + func (iim IndexedImage) Fill(v byte) + func (iim IndexedImage) ToRGBA(o ToRGBAOpts) []byte + type Indexizer interface + Indexize func(intens float64, posx, posy int) byte + type LightSet struct + MaxOffset float64 + MaxScale float64 + MinOffset float64 + MinScale float64 + Sources []LightSource + func (l *LightSet) Light(val byte, posx, posy int) (intens float64) + func (l *LightSet) TrackCircle(t Tracked, intens, rfall float64) + type LightSource interface + Alive func() bool + OffsetScale func(posx, posy int) (offs float64, scale float64) + type Lights interface + Light func(val byte, posx, posy int) (intens float64) + type Palette []byte + func (p Palette) Colorize(canvas []byte, index byte) + func (p Palette) ColorsNumber() int + type Rasterizer struct + Workers int + func (r *Rasterizer) DrawRectangle(ri RectangleInfo) + func (r *Rasterizer) DrawTriangle(ti TriangleInfo) + func (r *Rasterizer) Run() + type RectangleChunk struct + BufferOffset int + Height float64 + Pxo float64 + Pyo float64 + WG *sync.WaitGroup + Width float64 + Xo float64 + Yo float64 + func (c RectangleChunk) Process() + type RectangleInfo struct + H float64 + W float64 + X float64 + Y float64 + type RectangleRasterInput struct + Buffer []byte + BufferHeight int + BufferWidth int + ChunkBits int + Indexizer Indexizer + Lights Lights + Shader func(o *RectangleShaderOpts) + type RectangleRasterStatic struct + Pxs float64 + Pys float64 + type RectangleShaderOpts struct + BufferOffset int + Px float64 + Py float64 + X float64 + Y float64 + type Sprite struct + Atlas *IndexedImage + Height int + Width int + X int + XOrigin int + Y int + YOrigin int + type ToRGBAOpts struct + Palette Palette + Pixels []byte + type Tracked interface + Alive func() bool + Pos func() (float64, float64) + SizeMod func() float64 + type TriangleChunk struct + BufferOffset int + Height float64 + W0o float64 + W1o float64 + W2o float64 + WG *sync.WaitGroup + Width float64 + Xo float64 + Yo float64 + func (c TriangleChunk) Process() + type TriangleInfo struct + X0 float64 + X1 float64 + X2 float64 + Y0 float64 + Y1 float64 + Y2 float64 + type TriangleRasterInput struct + Buffer []byte + BufferHeight int + BufferWidth int + ChunkBits int + Shader func(o *TriangleShaderOpts) + type TriangleRasterStatic struct + A01 float64 + A12 float64 + A20 float64 + B01 float64 + B12 float64 + B20 float64 + Indexizer Indexizer + InvArea float64 + Lights Lights + type TriangleShaderOpts struct + BufferOffset int + W0 float64 + W1 float64 + W2 float64 + X float64 + Y float64