-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
210 lines (194 loc) · 11.7 KB
/
index.d.ts
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
import {Container, Circle, Rectangle, Label, Stage, DisplayObject, Point, Tile, Shape, Arrow} from "zimjs"
declare namespace zim {
export class LeaderBoard extends Container {
constructor(config_or_data?:string|[{player:string, score:number}], title?:string, width?:number, height?:number, corner?:number, backgroundColor?:string, titleColor?:string, colors?:{
rankColor?:string,
rankBackgroundColor?:string,
currentRankColor?:string,
currentRankBackgroundColor?:string,
nameColor?:string,
nameBackgroundColor?:string,
currentNameColor?:string,
currentNameBackgroundColor?:string,
scoreColor?:string,
scoreBackgroundColor?:string,
currentScoreColor?:string,
currentScoreBackgroundColor?:string}, total?:number, scoreWidth?:number, scorePlaces?:number, scoreZeros?:boolean, spacing?:number, arrows?:boolean, borderColor?:string, borderWidth?:number, shadowColor?:string, shadowBlur?:number, reverse?:boolean, allowZero?:boolean, font?:string, fontSize?:number, nameShift?:number, scoreShift?:number, rankShift?:number)
constructor(config:{data?:string|[{player:string, score:number}], title?:string, width?:number, height?:number, corner?:number, backgroundColor?:string, titleColor?:string, colors?:{
rankColor?:string,
rankBackgroundColor?:string,
currentRankColor?:string,
currentRankBackgroundColor?:string,
nameColor?:string,
nameBackgroundColor?:string,
currentNameColor?:string,
currentNameBackgroundColor?:string,
scoreColor?:string,
scoreBackgroundColor?:string,
currentScoreColor?:string,
currentScoreBackgroundColor?:string}, total?:number, scoreWidth?:number, scorePlaces?:number, scoreZeros?:boolean, spacing?:number, arrows?:boolean, borderColor?:string, borderWidth?:number, shadowColor?:string, shadowBlur?:number, reverse?:boolean, allowZero?:boolean, font?:string, fontSize?:number, nameShift?:number, scoreShift?:number, rankShift?:number})
score(score:number):number
save():this
cancel():this
startTime():this
stopTime():this
redraw(newData:[{player:string, score:number}], newWinner?:number):this
readonly winner:number
readonly place:number
readonly backing:Rectangle
readonly backdrop:Rectangle
readonly filled:boolean
readonly grid:Container
readonly titleText:Label
readonly dataSource:string|[{player:string, score:number}]
readonly key:string
}
export class Meter extends Label {
constructor(config_or_stage?:Stage, vertical?:boolean, horizontal?:boolean, color?:number, textColor?:color, padding?:number, decimals?:number, alpha?:number, skew?:number)
constructor(config:{stage?:Stage, vertical?:boolean, horizontal?:boolean, color?:number, textColor?:color, padding?:number, decimals?:number, alpha?:number, skew?:number})
position():this
}
interface filter {
data?:any,
notData?:any,
color?:string,
notColor?:string,
icon?:string,
notIcon?:string,
item?:any,
notItem?:any,
col?:number,
notCol?:number,
row?:number,
notRow?:number
}
export class Board extends Container {
constructor(config_or_size?:number, cols?:number, rows?:number, backgroundColor?:string, rollBackgroundColor?:string, borderColor?:string, borderWidth?:number, icon?:DisplayObject, isometric?:boolean, indicatorColor?:string, indicatorBorderColor?:string, indicatorBorderWidth?:number, indicatorSize?:number, indicatorType?:string, arrows?:boolean, arrowColor?:string, arrowRollColor?:string, swipe?:boolean, info?:number, labels?:boolean, color?:string, scaleMin?:number, scaleMax?:number, buffer?:number)
constructor(config:{size?:number, cols?:number, rows?:number, backgroundColor?:string, rollBackgroundColor?:string, borderColor?:string, borderWidth?:number, icon?:DisplayObject, isometric?:boolean, indicatorColor?:string, indicatorBorderColor?:string, indicatorBorderWidth?:number, indicatorSize?:number, indicatorType?:string, arrows?:boolean, arrowColor?:string, arrowRollColor?:string, swipe?:boolean, info?:number, labels?:boolean, color?:string, scaleMin?:number, scaleMax?:number, buffer?:number})
positionBoard(i:number, j:number):this
moveCamera(dir:string):this
addCol(index?:number):this
addRow(index?:number):this
update():this
getTile(col?:number, row?:number):Container
getRandomTile(filter?:filter):Container
getIndexes(tile:Container):[number]
getPoint(a?:number,b?:number):Point
getGlobalPoint(a?:number,b?:number):Point
getInfo(a?:number,b?:number):{data?:any, color?:string, items?:[]}
getData(a?:number,b?:number):any
getColor(a?:number,b?:number):string
getIcon(a?:number,b?:number):DisplayObject
getItems(a?:number,b?:number):[]
getAllItems(filter?:filter):[]
getTilesAround(a?:number,b?:number):[Container]
setData(tile:Container, value:any):this
setColor(tile:Container, color:string):this
setIcon(tile:Container, icon:DisplayObject):this
clearInfo(filter?:filter):this
clearData(filter?:filter):this
clearColors(filter?:filter):this
clearIcons(filter?:filter):this
clearItems(filter?:filter):this
setArrows():this
removeArrows():this
setArrowHover():this
setDepth():this
add(obj?:DisplayObject, col?:number, row?:number, data?:any, color?:string, icon?:DisplayObject):this
remove(obj:DisplayObject):this
position(obj?:DisplayObject, col?:number, row?:number):this
move(obj?:DisplayObject, col?:number, row?:number, time?:number):this
moveTo(obj?:DisplayObject, col?:number, row?:number, time?:number):this
clearPath():this
followPath(obj:DisplayObject, path:[[x:number,y:number]|{x:number,y:number}], time?:number, animation?:number, buffer?:number):this
stopFollowPath():this
shiftPath(lastStartX?:number, startX?:number, lastStartY?:number, startY?:number, obj?:DisplayObject):this
addKeys(obj?:DisplayObject, type?:string, filter?:filter):this
removeKeys(type):this
readonly tiles:Tile
readonly pieces:Container
readonly num:number
readonly size:number
readonly info:[]
readonly data:[]
readonly numCols:number
readonly numRows:number
startCol:number
startRow:number
buffer:number
arrows:boolean
isometric:boolean
readonly currentTile:Container
readonly lastTile:Container
readonly path:Container
}
export class Person extends Container {
constructor(config_or_shirt?:string, pants?:string, head?:string, outline?:boolean, player?:boolean, cache?:boolean)
constructor(config:{shirt?:string, pants?:string, head?:string, outline?:boolean, player?:boolean, cache?:boolean})
readonly boardCol:number
readonly boardRow:number
readonly moving:boolean
readonly boardTile:Container
readonly square:string
}
export class Orb extends Container {
constructor(config_or_radius?:number, color?:string, color2?:string, accentColor?:string, accentColor2?:string, flat?:boolean, alpha?:number, time?:number, delay?:number)
constructor(config:{radius?:number, color?:string, color2?:string, accentColor?:string, accentColor2?:string, flat?:boolean, alpha?:number, time?:number, delay?:number})
color:string
color2:string
circle:Circle
circle2:Circle
readonly boardCol:number
readonly boardRow:number
readonly moving:boolean
readonly boardTile:Container
readonly square:string
}
export class Tree extends Container {
constructor()
readonly boardCol:number
readonly boardRow:number
readonly moving:boolean
readonly boardTile:Container
readonly square:string
}
export class Timer extends Label {
constructor(config_or_time?:number, step?:number, colon?:boolean, down?:boolean, isometric?:string, startPaused?:boolean, size?:number, font?:string, color?:string, backgroundColor?:string, borderColor?:string, borderWidth?:number, align?:string, valign?:string, bold?:boolean, italic?:boolean, variant?:boolean, width?:number, height?:number, decimals?:number)
constructor(config:{time?:number, step?:number, colon?:boolean, down?:boolean, isometric?:string, startPaused?:boolean, size?:number, font?:string, color?:string, backgroundColor?:string, borderColor?:string, borderWidth?:number, align?:string, valign?:string, bold?:boolean, italic?:boolean, variant?:boolean, width?:number, height?:number, decimals?:number})
start(time?:number):this
pause(state?:boolean):this
stop():this
time:number
readonly totalTime:number
paused:boolean
isometric:string
readonly intervalID:any
}
export class Scorer extends Label {
constructor(config_or_score?:number, isometric?:string, size?:number, font?:string, color?:string, backgroundColor?:string, borderColor?:string, borderWidth?:number, align?:string, valign?:string, bold?:boolean, italic?:boolean, variant?:boolean, width?:number, height?:number)
constructor(config:{time?:number, isometric?:string, size?:number, font?:string, color?:string, backgroundColor?:string, borderColor?:string, borderWidth?:number, align?:string, valign?:string, bold?:boolean, italic?:boolean, variant?:boolean, width?:number, height?:number})
score:number
isometric:string
}
export class Dialog extends Container {
constructor(config_or_width?:number, height?:number, words?:string|[string], dialogType?:string, tailType?:string, fill?:boolean, size?:number, font?:string, color?:string, backgroundColor?:string, borderColor?:string, borderWidth?:number, align?:string, valign?:string, corner?:number, shadowColor?:string, shadowBlur?:number, padding?:number, paddingH?:number, paddingV?:number, shiftH?:number, shiftV?:number, slantLeft?:number, slantRight?:number, slantTop?:number, slantBottom?:number, tailH?:string, tailV?:string, tailShiftH?:number, tailShiftV?:number, tailShiftAngle?:number, arrows?:boolean, arrowsInside?:boolean, arrowsFlip?:boolean, selectedIndex?:number)
constructor(config: {width?:number, height?:number, words?:string|[string], dialogType?:string, tailType?:string, fill?:boolean, size?:number, font?:string, color?:string, backgroundColor?:string, borderColor?:string, borderWidth?:number, align?:string, valign?:string, corner?:number, shadowColor?:string, shadowBlur?:number, padding?:number, paddingH?:number, paddingV?:number, shiftH?:number, shiftV?:number, slantLeft?:number, slantRight?:number, slantTop?:number, slantBottom?:number, tailH?:string, tailV?:string, tailShiftH?:number, tailShiftV?:number, tailShiftAngle?:number, arrows?:boolean, arrowsInside?:boolean, arrowsFlip?:boolean, selectedIndex?:number})
setWords(words:string|[string], selectedIndex?:number):this
next():this
prev():this
color:string
backgroundColor:string
borderColor:string
readonly backingContainer:Container
readonly backing:Shape
readonly backingShadow:Container
readonly label:Label
readonly labels:[Label]
readonly words:[]
readonly tail:DisplayObject
readonly arrows:Container
readonly arrowNext:Arrow
readonly arrowPrev:Arrow
}
}
export = zim