-
Notifications
You must be signed in to change notification settings - Fork 0
/
tiles.go
24 lines (19 loc) · 1.08 KB
/
tiles.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package classic
import (
"github.com/dotstart/identicons/library/identicons/icon/tiled"
"github.com/dotstart/identicons/library/identicons/shape"
)
var tileTable = []tiled.Tile{
tiled.Shape(shape.Vert(0, 0), shape.Vert(1, 0), shape.Vert(1, 1)), // triangle down-left
tiled.Shape(shape.Vert(0, 1), shape.Vert(1, 1), shape.Vert(1, 0)), // triangle center
tiled.Shape(shape.Vert(0, 0), shape.Vert(1, 1), shape.Vert(1, 0)), // triangle top-right
tiled.Shape(shape.Vert(0, 0), shape.Vert(0, 1), shape.Vert(1, 0)), // triangle out
tiled.Shape(shape.Vert(0, 0), shape.Vert(0, 1), shape.Vert(0.5, 0)), // steep triangle down
tiled.Shape(shape.Vert(0, 0.5), shape.Vert(0, 1), shape.Vert(1, 1)), // steep triangle right
tiled.Shape(shape.Vert(0.5, 1), shape.Vert(1, 1), shape.Vert(1, 0)), // steep triangle up
tiled.Shape(shape.Vert(0, 0), shape.Vert(1, 0.5), shape.Vert(1, 0)), // steep triangle left
}
var centerTileTable = append(
tileTable,
tiled.Shape(shape.Vert(0, 0), shape.Vert(0, 1), shape.Vert(0.5, 1), shape.Vert(0.25, 0.25), shape.Vert(1, 0.5), shape.Vert(1, 0)), // inverse star
)