-
Notifications
You must be signed in to change notification settings - Fork 0
/
commons_data.go
executable file
·95 lines (75 loc) · 1.22 KB
/
commons_data.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package lbricks
import "github.com/ungerik/go3d/vec2"
type Typable interface {
Type()
}
type Poolable interface {
Reset()
}
type Disposable interface {
Dispose()
}
type Renderable interface {
Render(Batch)
}
type Positionable interface {
Position() *vec2.T
}
type Scalable interface {
Scale() *vec2.T
}
type Rotable interface {
Rotation() float32
}
type Identificable interface {
Id() uint
}
type Nombrable interface {
Name() string
}
type Tagger interface {
Tags() []string
}
type Displayable interface {
Visible() bool
}
type Colorize interface {
RGB() uint32
Alpha() float32
}
type Drawable interface {
Texture() uint
Width() float32
Height() float32
View() (float32, float32, float32, float32)
}
type Recognizable interface {
Identificable
Nombrable
Tagger
}
type Transformer interface {
Positionable
Scalable
Rotable
}
type Element interface {
Colorize
Drawable
Shape() Shape
Anchor() [2]float32
}
type Layout interface {
Direction() Direction
}
type View interface {
Transformer
Element
Layer() uint
}
type Batch interface {
Begin()
Draw(r Drawable, x, y, originX, originY, scaleX, scaleY, rotation float32, color uint32, transparency float32)
End()
SetProjection(width, height float32)
}