@kk-garden/shared 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/asssets-map.d.ts +10 -0
- package/dist/assets/asssets-map.d.ts.map +1 -0
- package/dist/assets/asssets-map.js +13 -0
- package/dist/assets/asssets-map.js.map +1 -0
- package/dist/assets/index.d.ts +2 -0
- package/dist/assets/index.d.ts.map +1 -0
- package/dist/assets/index.js +2 -0
- package/dist/assets/index.js.map +1 -0
- package/dist/assets/spritesheets/animation_spritesheet.png +0 -0
- package/dist/assets/spritesheets/decorations_spritesheet.png +0 -0
- package/dist/assets/spritesheets/stones_spritesheet.png +0 -0
- package/dist/assets/spritesheets/tiles_spritesheet.png +0 -0
- package/dist/constants/decoration-constants.d.ts +16 -0
- package/dist/constants/decoration-constants.d.ts.map +1 -0
- package/dist/constants/decoration-constants.js +18 -0
- package/dist/constants/decoration-constants.js.map +1 -0
- package/dist/constants/grid-constants.d.ts +10 -0
- package/dist/constants/grid-constants.d.ts.map +1 -0
- package/dist/constants/grid-constants.js +20 -0
- package/dist/constants/grid-constants.js.map +1 -0
- package/dist/constants/index.d.ts +5 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +5 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/object-constants.d.ts +20 -0
- package/dist/constants/object-constants.d.ts.map +1 -0
- package/dist/constants/object-constants.js +24 -0
- package/dist/constants/object-constants.js.map +1 -0
- package/dist/constants/path-constants.d.ts +21 -0
- package/dist/constants/path-constants.d.ts.map +1 -0
- package/dist/constants/path-constants.js +24 -0
- package/dist/constants/path-constants.js.map +1 -0
- package/dist/spritesheet-set/animated-sprite/animated-sprite-set.d.ts +8 -0
- package/dist/spritesheet-set/animated-sprite/animated-sprite-set.d.ts.map +1 -0
- package/dist/spritesheet-set/animated-sprite/animated-sprite-set.js +21 -0
- package/dist/spritesheet-set/animated-sprite/animated-sprite-set.js.map +1 -0
- package/dist/spritesheet-set/animated-sprite/animated-sprite.d.ts +9 -0
- package/dist/spritesheet-set/animated-sprite/animated-sprite.d.ts.map +1 -0
- package/dist/spritesheet-set/animated-sprite/animated-sprite.js +13 -0
- package/dist/spritesheet-set/animated-sprite/animated-sprite.js.map +1 -0
- package/dist/spritesheet-set/animation-sets/bushes-set/bushes-animation-set.d.ts +3 -0
- package/dist/spritesheet-set/animation-sets/bushes-set/bushes-animation-set.d.ts.map +1 -0
- package/dist/spritesheet-set/animation-sets/bushes-set/bushes-animation-set.js +12 -0
- package/dist/spritesheet-set/animation-sets/bushes-set/bushes-animation-set.js.map +1 -0
- package/dist/spritesheet-set/animation-sets/bushes-set/simple-bush/simple-bush-sprite.d.ts +3 -0
- package/dist/spritesheet-set/animation-sets/bushes-set/simple-bush/simple-bush-sprite.d.ts.map +1 -0
- package/dist/spritesheet-set/animation-sets/bushes-set/simple-bush/simple-bush-sprite.js +25 -0
- package/dist/spritesheet-set/animation-sets/bushes-set/simple-bush/simple-bush-sprite.js.map +1 -0
- package/dist/spritesheet-set/animation-sets/trees-set/regular-tree/regular-tree-sprite.d.ts +3 -0
- package/dist/spritesheet-set/animation-sets/trees-set/regular-tree/regular-tree-sprite.d.ts.map +1 -0
- package/dist/spritesheet-set/animation-sets/trees-set/regular-tree/regular-tree-sprite.js +25 -0
- package/dist/spritesheet-set/animation-sets/trees-set/regular-tree/regular-tree-sprite.js.map +1 -0
- package/dist/spritesheet-set/animation-sets/trees-set/trees-animation-set.d.ts +3 -0
- package/dist/spritesheet-set/animation-sets/trees-set/trees-animation-set.d.ts.map +1 -0
- package/dist/spritesheet-set/animation-sets/trees-set/trees-animation-set.js +12 -0
- package/dist/spritesheet-set/animation-sets/trees-set/trees-animation-set.js.map +1 -0
- package/dist/spritesheet-set/density-pick.d.ts +7 -0
- package/dist/spritesheet-set/density-pick.d.ts.map +1 -0
- package/dist/spritesheet-set/density-pick.js +21 -0
- package/dist/spritesheet-set/density-pick.js.map +1 -0
- package/dist/spritesheet-set/index.d.ts +9 -0
- package/dist/spritesheet-set/index.d.ts.map +1 -0
- package/dist/spritesheet-set/index.js +9 -0
- package/dist/spritesheet-set/index.js.map +1 -0
- package/dist/spritesheet-set/sets/decorations-set.d.ts +140 -0
- package/dist/spritesheet-set/sets/decorations-set.d.ts.map +1 -0
- package/dist/spritesheet-set/sets/decorations-set.js +143 -0
- package/dist/spritesheet-set/sets/decorations-set.js.map +1 -0
- package/dist/spritesheet-set/sets/stones-set.d.ts +21 -0
- package/dist/spritesheet-set/sets/stones-set.d.ts.map +1 -0
- package/dist/spritesheet-set/sets/stones-set.js +24 -0
- package/dist/spritesheet-set/sets/stones-set.js.map +1 -0
- package/dist/spritesheet-set/sets/tiles-set.d.ts +296 -0
- package/dist/spritesheet-set/sets/tiles-set.d.ts.map +1 -0
- package/dist/spritesheet-set/sets/tiles-set.js +401 -0
- package/dist/spritesheet-set/sets/tiles-set.js.map +1 -0
- package/dist/spritesheet-set/spritesheet-set.d.ts +13 -0
- package/dist/spritesheet-set/spritesheet-set.d.ts.map +1 -0
- package/dist/spritesheet-set/spritesheet-set.js +38 -0
- package/dist/spritesheet-set/spritesheet-set.js.map +1 -0
- package/dist/src/globals.d.ts +4 -0
- package/dist/types/animated-sprite.types.d.ts +15 -0
- package/dist/types/animated-sprite.types.d.ts.map +1 -0
- package/dist/types/animated-sprite.types.js +2 -0
- package/dist/types/animated-sprite.types.js.map +1 -0
- package/dist/types/common.types.d.ts +23 -0
- package/dist/types/common.types.d.ts.map +1 -0
- package/dist/types/common.types.js +2 -0
- package/dist/types/common.types.js.map +1 -0
- package/dist/types/grid-drawer.types.d.ts +27 -0
- package/dist/types/grid-drawer.types.d.ts.map +1 -0
- package/dist/types/grid-drawer.types.js +2 -0
- package/dist/types/grid-drawer.types.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/path.types.d.ts +13 -0
- package/dist/types/path.types.d.ts.map +1 -0
- package/dist/types/path.types.js +2 -0
- package/dist/types/path.types.js.map +1 -0
- package/dist/types/spritesheet-element.types.d.ts +13 -0
- package/dist/types/spritesheet-element.types.d.ts.map +1 -0
- package/dist/types/spritesheet-element.types.js +2 -0
- package/dist/types/spritesheet-element.types.js.map +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import { SpritesheetSet } from '../spritesheet-set';
|
|
2
|
+
const tileMeasures = {
|
|
3
|
+
width: 32,
|
|
4
|
+
height: 32,
|
|
5
|
+
};
|
|
6
|
+
const tilesSpreadsheetMap = {
|
|
7
|
+
'grass-full-tile': {
|
|
8
|
+
x: 0,
|
|
9
|
+
y: 0,
|
|
10
|
+
...tileMeasures,
|
|
11
|
+
},
|
|
12
|
+
'path-1': {
|
|
13
|
+
x: 32,
|
|
14
|
+
y: 0,
|
|
15
|
+
...tileMeasures,
|
|
16
|
+
},
|
|
17
|
+
'path-2': {
|
|
18
|
+
x: 64,
|
|
19
|
+
y: 0,
|
|
20
|
+
...tileMeasures,
|
|
21
|
+
},
|
|
22
|
+
'path-3': {
|
|
23
|
+
x: 96,
|
|
24
|
+
y: 0,
|
|
25
|
+
...tileMeasures,
|
|
26
|
+
},
|
|
27
|
+
'path-4': {
|
|
28
|
+
x: 128,
|
|
29
|
+
y: 0,
|
|
30
|
+
...tileMeasures,
|
|
31
|
+
},
|
|
32
|
+
'path-5': {
|
|
33
|
+
x: 160,
|
|
34
|
+
y: 0,
|
|
35
|
+
...tileMeasures,
|
|
36
|
+
},
|
|
37
|
+
'path-6': {
|
|
38
|
+
x: 192,
|
|
39
|
+
y: 0,
|
|
40
|
+
...tileMeasures,
|
|
41
|
+
},
|
|
42
|
+
// kinda useless
|
|
43
|
+
// 'path-7': {
|
|
44
|
+
// x: 224,
|
|
45
|
+
// y: 0,
|
|
46
|
+
// ...tileMeasures,
|
|
47
|
+
// },
|
|
48
|
+
'path-8': {
|
|
49
|
+
x: 256,
|
|
50
|
+
y: 0,
|
|
51
|
+
...tileMeasures,
|
|
52
|
+
},
|
|
53
|
+
'path-9': {
|
|
54
|
+
x: 288,
|
|
55
|
+
y: 0,
|
|
56
|
+
...tileMeasures,
|
|
57
|
+
},
|
|
58
|
+
'path-10': {
|
|
59
|
+
x: 320,
|
|
60
|
+
y: 0,
|
|
61
|
+
...tileMeasures,
|
|
62
|
+
},
|
|
63
|
+
'path-11': {
|
|
64
|
+
x: 352,
|
|
65
|
+
y: 0,
|
|
66
|
+
...tileMeasures,
|
|
67
|
+
},
|
|
68
|
+
'path-12': {
|
|
69
|
+
x: 384,
|
|
70
|
+
y: 0,
|
|
71
|
+
...tileMeasures,
|
|
72
|
+
},
|
|
73
|
+
'path-13': {
|
|
74
|
+
x: 416,
|
|
75
|
+
y: 0,
|
|
76
|
+
...tileMeasures,
|
|
77
|
+
},
|
|
78
|
+
'path-14': {
|
|
79
|
+
x: 448,
|
|
80
|
+
y: 0,
|
|
81
|
+
...tileMeasures,
|
|
82
|
+
},
|
|
83
|
+
'path-15': {
|
|
84
|
+
x: 480,
|
|
85
|
+
y: 0,
|
|
86
|
+
...tileMeasures,
|
|
87
|
+
},
|
|
88
|
+
'path-16': {
|
|
89
|
+
x: 512,
|
|
90
|
+
y: 0,
|
|
91
|
+
...tileMeasures,
|
|
92
|
+
},
|
|
93
|
+
'path-17': {
|
|
94
|
+
x: 544,
|
|
95
|
+
y: 0,
|
|
96
|
+
...tileMeasures,
|
|
97
|
+
},
|
|
98
|
+
'path-18': {
|
|
99
|
+
x: 576,
|
|
100
|
+
y: 0,
|
|
101
|
+
...tileMeasures,
|
|
102
|
+
},
|
|
103
|
+
'path-19': {
|
|
104
|
+
x: 608,
|
|
105
|
+
y: 0,
|
|
106
|
+
...tileMeasures,
|
|
107
|
+
},
|
|
108
|
+
'path-20': {
|
|
109
|
+
x: 640,
|
|
110
|
+
y: 0,
|
|
111
|
+
...tileMeasures,
|
|
112
|
+
},
|
|
113
|
+
'path-21': {
|
|
114
|
+
x: 672,
|
|
115
|
+
y: 0,
|
|
116
|
+
...tileMeasures,
|
|
117
|
+
},
|
|
118
|
+
'path-22': {
|
|
119
|
+
x: 704,
|
|
120
|
+
y: 0,
|
|
121
|
+
...tileMeasures,
|
|
122
|
+
},
|
|
123
|
+
'path-23': {
|
|
124
|
+
x: 736,
|
|
125
|
+
y: 0,
|
|
126
|
+
...tileMeasures,
|
|
127
|
+
},
|
|
128
|
+
'path-24': {
|
|
129
|
+
x: 768,
|
|
130
|
+
y: 0,
|
|
131
|
+
...tileMeasures,
|
|
132
|
+
},
|
|
133
|
+
'path-25': {
|
|
134
|
+
x: 800,
|
|
135
|
+
y: 0,
|
|
136
|
+
...tileMeasures,
|
|
137
|
+
},
|
|
138
|
+
'path-26': {
|
|
139
|
+
x: 832,
|
|
140
|
+
y: 0,
|
|
141
|
+
...tileMeasures,
|
|
142
|
+
},
|
|
143
|
+
'path-27': {
|
|
144
|
+
x: 864,
|
|
145
|
+
y: 0,
|
|
146
|
+
...tileMeasures,
|
|
147
|
+
},
|
|
148
|
+
'path-28': {
|
|
149
|
+
x: 896,
|
|
150
|
+
y: 0,
|
|
151
|
+
...tileMeasures,
|
|
152
|
+
},
|
|
153
|
+
'path-29': {
|
|
154
|
+
x: 928,
|
|
155
|
+
y: 0,
|
|
156
|
+
...tileMeasures,
|
|
157
|
+
},
|
|
158
|
+
// kinda useless
|
|
159
|
+
// 'path-30': {
|
|
160
|
+
// x: 960,
|
|
161
|
+
// y: 0,
|
|
162
|
+
// ...tileMeasures,
|
|
163
|
+
// },
|
|
164
|
+
'path-31': {
|
|
165
|
+
x: 992,
|
|
166
|
+
y: 0,
|
|
167
|
+
...tileMeasures,
|
|
168
|
+
},
|
|
169
|
+
'path-32': {
|
|
170
|
+
x: 1024,
|
|
171
|
+
y: 0,
|
|
172
|
+
...tileMeasures,
|
|
173
|
+
},
|
|
174
|
+
'path-33': {
|
|
175
|
+
x: 1056,
|
|
176
|
+
y: 0,
|
|
177
|
+
...tileMeasures,
|
|
178
|
+
},
|
|
179
|
+
'path-34': {
|
|
180
|
+
x: 1088,
|
|
181
|
+
y: 0,
|
|
182
|
+
...tileMeasures,
|
|
183
|
+
},
|
|
184
|
+
'path-35': {
|
|
185
|
+
x: 1120,
|
|
186
|
+
y: 0,
|
|
187
|
+
...tileMeasures,
|
|
188
|
+
},
|
|
189
|
+
'path-36': {
|
|
190
|
+
x: 1152,
|
|
191
|
+
y: 0,
|
|
192
|
+
...tileMeasures,
|
|
193
|
+
},
|
|
194
|
+
'path-37': {
|
|
195
|
+
x: 1184,
|
|
196
|
+
y: 0,
|
|
197
|
+
...tileMeasures,
|
|
198
|
+
},
|
|
199
|
+
'path-38': {
|
|
200
|
+
x: 1216,
|
|
201
|
+
y: 0,
|
|
202
|
+
...tileMeasures,
|
|
203
|
+
},
|
|
204
|
+
'path-39': {
|
|
205
|
+
x: 1248,
|
|
206
|
+
y: 0,
|
|
207
|
+
...tileMeasures,
|
|
208
|
+
},
|
|
209
|
+
'path-40': {
|
|
210
|
+
x: 1280,
|
|
211
|
+
y: 0,
|
|
212
|
+
...tileMeasures,
|
|
213
|
+
},
|
|
214
|
+
'path-41': {
|
|
215
|
+
x: 1312,
|
|
216
|
+
y: 0,
|
|
217
|
+
...tileMeasures,
|
|
218
|
+
},
|
|
219
|
+
'path-42': {
|
|
220
|
+
x: 1344,
|
|
221
|
+
y: 0,
|
|
222
|
+
...tileMeasures,
|
|
223
|
+
},
|
|
224
|
+
'path-43': {
|
|
225
|
+
x: 1376,
|
|
226
|
+
y: 0,
|
|
227
|
+
...tileMeasures,
|
|
228
|
+
},
|
|
229
|
+
'path-44': {
|
|
230
|
+
x: 1408,
|
|
231
|
+
y: 0,
|
|
232
|
+
...tileMeasures,
|
|
233
|
+
},
|
|
234
|
+
'path-45': {
|
|
235
|
+
x: 1440,
|
|
236
|
+
y: 0,
|
|
237
|
+
...tileMeasures,
|
|
238
|
+
},
|
|
239
|
+
'path-46': {
|
|
240
|
+
x: 1472,
|
|
241
|
+
y: 0,
|
|
242
|
+
...tileMeasures,
|
|
243
|
+
},
|
|
244
|
+
'path-47': {
|
|
245
|
+
x: 1504,
|
|
246
|
+
y: 0,
|
|
247
|
+
...tileMeasures,
|
|
248
|
+
},
|
|
249
|
+
'path-48': {
|
|
250
|
+
x: 1536,
|
|
251
|
+
y: 0,
|
|
252
|
+
...tileMeasures,
|
|
253
|
+
},
|
|
254
|
+
};
|
|
255
|
+
export const pathTilesDirections = {
|
|
256
|
+
top: [
|
|
257
|
+
'path-2',
|
|
258
|
+
'path-4',
|
|
259
|
+
'path-5',
|
|
260
|
+
'path-6',
|
|
261
|
+
'path-8',
|
|
262
|
+
'path-9',
|
|
263
|
+
'path-10',
|
|
264
|
+
'path-11',
|
|
265
|
+
'path-12',
|
|
266
|
+
'path-13',
|
|
267
|
+
'path-14',
|
|
268
|
+
'path-16',
|
|
269
|
+
'path-17',
|
|
270
|
+
'path-21',
|
|
271
|
+
'path-23',
|
|
272
|
+
'path-27',
|
|
273
|
+
'path-28',
|
|
274
|
+
'path-29',
|
|
275
|
+
'path-31',
|
|
276
|
+
'path-32',
|
|
277
|
+
'path-33',
|
|
278
|
+
'path-35',
|
|
279
|
+
'path-36',
|
|
280
|
+
'path-37',
|
|
281
|
+
'path-40',
|
|
282
|
+
'path-41',
|
|
283
|
+
'path-42',
|
|
284
|
+
'path-43',
|
|
285
|
+
'path-44',
|
|
286
|
+
'path-45',
|
|
287
|
+
'path-46',
|
|
288
|
+
'path-47',
|
|
289
|
+
],
|
|
290
|
+
right: [
|
|
291
|
+
'path-1',
|
|
292
|
+
'path-3',
|
|
293
|
+
'path-4',
|
|
294
|
+
'path-5',
|
|
295
|
+
'path-6',
|
|
296
|
+
'path-8',
|
|
297
|
+
'path-9',
|
|
298
|
+
'path-12',
|
|
299
|
+
'path-13',
|
|
300
|
+
'path-14',
|
|
301
|
+
'path-15',
|
|
302
|
+
'path-17',
|
|
303
|
+
'path-18',
|
|
304
|
+
'path-19',
|
|
305
|
+
'path-20',
|
|
306
|
+
'path-21',
|
|
307
|
+
'path-22',
|
|
308
|
+
'path-24',
|
|
309
|
+
'path-28',
|
|
310
|
+
'path-29',
|
|
311
|
+
'path-33',
|
|
312
|
+
'path-34',
|
|
313
|
+
'path-35',
|
|
314
|
+
'path-37',
|
|
315
|
+
'path-38',
|
|
316
|
+
'path-39',
|
|
317
|
+
'path-40',
|
|
318
|
+
'path-41',
|
|
319
|
+
'path-42',
|
|
320
|
+
'path-43',
|
|
321
|
+
'path-45',
|
|
322
|
+
'path-46',
|
|
323
|
+
'path-47',
|
|
324
|
+
],
|
|
325
|
+
bottom: [
|
|
326
|
+
'path-1',
|
|
327
|
+
'path-2',
|
|
328
|
+
'path-3',
|
|
329
|
+
'path-4',
|
|
330
|
+
'path-5',
|
|
331
|
+
'path-6',
|
|
332
|
+
'path-8',
|
|
333
|
+
'path-11',
|
|
334
|
+
'path-13',
|
|
335
|
+
'path-14',
|
|
336
|
+
'path-16',
|
|
337
|
+
'path-17',
|
|
338
|
+
'path-18',
|
|
339
|
+
'path-19',
|
|
340
|
+
'path-20',
|
|
341
|
+
'path-21',
|
|
342
|
+
'path-23',
|
|
343
|
+
'path-26',
|
|
344
|
+
'path-28',
|
|
345
|
+
'path-29',
|
|
346
|
+
'path-31',
|
|
347
|
+
'path-32',
|
|
348
|
+
'path-33',
|
|
349
|
+
'path-34',
|
|
350
|
+
'path-36',
|
|
351
|
+
'path-37',
|
|
352
|
+
'path-38',
|
|
353
|
+
'path-39',
|
|
354
|
+
'path-40',
|
|
355
|
+
'path-41',
|
|
356
|
+
'path-42',
|
|
357
|
+
'path-43',
|
|
358
|
+
'path-44',
|
|
359
|
+
'path-45',
|
|
360
|
+
],
|
|
361
|
+
left: [
|
|
362
|
+
'path-2',
|
|
363
|
+
'path-4',
|
|
364
|
+
'path-5',
|
|
365
|
+
'path-6',
|
|
366
|
+
'path-8',
|
|
367
|
+
'path-10',
|
|
368
|
+
'path-11',
|
|
369
|
+
'path-13',
|
|
370
|
+
'path-15',
|
|
371
|
+
'path-17',
|
|
372
|
+
'path-18',
|
|
373
|
+
'path-19',
|
|
374
|
+
'path-20',
|
|
375
|
+
'path-21',
|
|
376
|
+
'path-22',
|
|
377
|
+
'path-25',
|
|
378
|
+
'path-28',
|
|
379
|
+
'path-29',
|
|
380
|
+
'path-32',
|
|
381
|
+
'path-34',
|
|
382
|
+
'path-35',
|
|
383
|
+
'path-36',
|
|
384
|
+
'path-38',
|
|
385
|
+
'path-39',
|
|
386
|
+
'path-40',
|
|
387
|
+
'path-41',
|
|
388
|
+
'path-42',
|
|
389
|
+
'path-43',
|
|
390
|
+
'path-44',
|
|
391
|
+
'path-46',
|
|
392
|
+
'path-47',
|
|
393
|
+
],
|
|
394
|
+
};
|
|
395
|
+
const tilesSpritesheetSet = {
|
|
396
|
+
spritesheetKey: 'tiles-set',
|
|
397
|
+
spritesheetPath: 'tiles-spritesheet',
|
|
398
|
+
spritesheetMap: tilesSpreadsheetMap,
|
|
399
|
+
};
|
|
400
|
+
export const TilesSpritesheetSet = new SpritesheetSet(tilesSpritesheetSet);
|
|
401
|
+
//# sourceMappingURL=tiles-set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiles-set.js","sourceRoot":"","sources":["../../../src/spritesheet-set/sets/tiles-set.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,MAAM,YAAY,GAAiB;IACjC,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,EAAE;CACX,CAAC;AAEF,MAAM,mBAAmB,GAAG;IAC1B,iBAAiB,EAAE;QACjB,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,GAAG,YAAY;KAChB;IACD,QAAQ,EAAE;QACR,CAAC,EAAE,EAAE;QACL,CAAC,EAAE,CAAC;QACJ,GAAG,YAAY;KAChB;IACD,QAAQ,EAAE;QACR,CAAC,EAAE,E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AQ;QACR,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;KACV;IACD,IAAI,EAAE;QACJ,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;QACT,SAAS;KACV;CACwD,CAAC;AAE5D,MAAM,mBAAmB,GAA+C;IACtE,cAAc,EAAE,WAAW;IAC3B,eAAe,EAAE,mBAAmB;IACpC,cAAc,EAAE,mBAAmB;CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAC9B,IAAI,cAAc,CAA4B,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Nullable, WithId } from '../types';
|
|
2
|
+
import type { SpritesheetElement, SpritesheetInit, SpritesheetPath, SpritesheetSetKey } from '../types';
|
|
3
|
+
export declare class SpritesheetSet<Tile extends string> {
|
|
4
|
+
private map;
|
|
5
|
+
private readonly pth;
|
|
6
|
+
private readonly key;
|
|
7
|
+
constructor(init: SpritesheetInit<Tile>);
|
|
8
|
+
get path(): SpritesheetPath;
|
|
9
|
+
get id(): SpritesheetSetKey;
|
|
10
|
+
getElement(key: Tile): Nullable<WithId<SpritesheetElement>>;
|
|
11
|
+
getRandomElement(): WithId<SpritesheetElement>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=spritesheet-set.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spritesheet-set.d.ts","sourceRoot":"","sources":["../../src/spritesheet-set/spritesheet-set.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAGlB,qBAAa,cAAc,CAAC,IAAI,SAAS,MAAM;IAC7C,OAAO,CAAC,GAAG,CAGP;IACJ,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAkB;IACtC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAoB;gBAE5B,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC;IASvC,IAAI,IAAI,IAAI,eAAe,CAE1B;IAED,IAAI,EAAE,IAAI,iBAAiB,CAE1B;IAED,UAAU,CAAC,GAAG,EAAE,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAW3D,gBAAgB,IAAI,MAAM,CAAC,kBAAkB,CAAC;CAO/C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { densityPick } from './density-pick';
|
|
2
|
+
export class SpritesheetSet {
|
|
3
|
+
map = new Map();
|
|
4
|
+
pth;
|
|
5
|
+
key;
|
|
6
|
+
constructor(init) {
|
|
7
|
+
const { spritesheetMap, spritesheetPath } = init;
|
|
8
|
+
Object.entries(spritesheetMap).forEach(([key, element]) => {
|
|
9
|
+
this.map.set(key, element);
|
|
10
|
+
});
|
|
11
|
+
this.pth = spritesheetPath;
|
|
12
|
+
this.key = init.spritesheetKey;
|
|
13
|
+
}
|
|
14
|
+
get path() {
|
|
15
|
+
return this.pth;
|
|
16
|
+
}
|
|
17
|
+
get id() {
|
|
18
|
+
return this.key;
|
|
19
|
+
}
|
|
20
|
+
getElement(key) {
|
|
21
|
+
const el = this.map.get(key);
|
|
22
|
+
if (!el) {
|
|
23
|
+
return el;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
...el,
|
|
27
|
+
id: key,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
getRandomElement() {
|
|
31
|
+
const pick = densityPick(this.map);
|
|
32
|
+
return {
|
|
33
|
+
...pick.data,
|
|
34
|
+
id: pick.key,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=spritesheet-set.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spritesheet-set.js","sourceRoot":"","sources":["../../src/spritesheet-set/spritesheet-set.ts"],"names":[],"mappings":"AAOA,OAAO,EAAoB,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE/D,MAAM,OAAO,cAAc;IACjB,GAAG,GAAkC,IAAI,GAAG,EAGjD,CAAC;IACa,GAAG,CAAkB;IACrB,GAAG,CAAoB;IAExC,YAAY,IAA2B;QACrC,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE;YACxD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAW,EAAE,OAA6B,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,GAAG,eAAe,CAAC;QAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,cAAc,CAAC;IACjC,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAED,IAAI,EAAE;QACJ,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAED,UAAU,CAAC,GAAS;QAClB,MAAM,EAAE,GAAiC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC3D,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO;YACL,GAAG,EAAE;YACL,EAAE,EAAE,GAAG;SACR,CAAC;IACJ,CAAC;IAED,gBAAgB;QACd,MAAM,IAAI,GAAoC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpE,OAAO;YACL,GAAG,IAAI,CAAC,IAAI;YACZ,EAAE,EAAE,IAAI,CAAC,GAAG;SACb,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AnimatedSprite } from '../spritesheet-set';
|
|
2
|
+
import type { Cell, Coordinates, WithDensity } from './common.types';
|
|
3
|
+
export type AnimatedSpriteData<Tile extends string = string> = WithDensity<{
|
|
4
|
+
sprite: AnimatedSprite<Tile>;
|
|
5
|
+
}>;
|
|
6
|
+
export type AnimatedSpriteSetObject<Sprite extends string = string, Tile extends string = string> = Record<Sprite, AnimatedSpriteData<Tile>>;
|
|
7
|
+
export type AnimatedSpriteSetInit<Sprite extends string = string, Tile extends string = string> = {
|
|
8
|
+
animatedSpriteMap: AnimatedSpriteSetObject<Sprite, Tile>;
|
|
9
|
+
};
|
|
10
|
+
export type SpriteData = {
|
|
11
|
+
sprite: AnimatedSprite<string>;
|
|
12
|
+
cell: Cell;
|
|
13
|
+
coordinates?: Coordinates;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=animated-sprite.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animated-sprite.types.d.ts","sourceRoot":"","sources":["../../src/types/animated-sprite.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErE,MAAM,MAAM,kBAAkB,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,IAAI,WAAW,CAAC;IACzE,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC;CAC9B,CAAC,CAAC;AAEH,MAAM,MAAM,uBAAuB,CACjC,MAAM,SAAS,MAAM,GAAG,MAAM,EAC9B,IAAI,SAAS,MAAM,GAAG,MAAM,IAC1B,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;AAE7C,MAAM,MAAM,qBAAqB,CAC/B,MAAM,SAAS,MAAM,GAAG,MAAM,EAC9B,IAAI,SAAS,MAAM,GAAG,MAAM,IAC1B;IACF,iBAAiB,EAAE,uBAAuB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;CAC1D,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,EAAE,IAAI,CAAC;IACX,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animated-sprite.types.js","sourceRoot":"","sources":["../../src/types/animated-sprite.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type Nullable<T> = T | null | undefined;
|
|
2
|
+
export type Coordinates = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
export type SizeMeasures = {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
};
|
|
10
|
+
export type Cell = {
|
|
11
|
+
row: number;
|
|
12
|
+
column: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const directions: readonly ["top", "right", "bottom", "left"];
|
|
15
|
+
export type Direction = (typeof directions)[number];
|
|
16
|
+
export type Move = Direction | 'straight' | 'back';
|
|
17
|
+
export type WithDensity<T> = T & {
|
|
18
|
+
density?: number;
|
|
19
|
+
};
|
|
20
|
+
export type WithId<T> = T & {
|
|
21
|
+
id: string;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=common.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../src/types/common.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AAE/C,MAAM,MAAM,WAAW,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7D,MAAM,MAAM,IAAI,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,eAAO,MAAM,UAAU,6CAA8C,CAAC;AAEtE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;AAEnD,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtD,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.types.js","sourceRoot":"","sources":["../../src/types/common.types.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SpritesheetElement, SpritesheetPath } from './spritesheet-element.types';
|
|
2
|
+
import type { Cell, Coordinates, SizeMeasures, WithId } from './common.types';
|
|
3
|
+
import type { SpriteData } from './animated-sprite.types';
|
|
4
|
+
import type { GridConstants } from '../constants';
|
|
5
|
+
export type GridDrawerElement = {
|
|
6
|
+
spritesheetPath: SpritesheetPath;
|
|
7
|
+
element: SpritesheetElement;
|
|
8
|
+
cell: Cell;
|
|
9
|
+
innerCoordinates?: Coordinates;
|
|
10
|
+
sizes?: SizeMeasures;
|
|
11
|
+
index: number;
|
|
12
|
+
};
|
|
13
|
+
export type StaticDrawReport = {
|
|
14
|
+
report: string;
|
|
15
|
+
elements: WithId<GridDrawerElement>[];
|
|
16
|
+
};
|
|
17
|
+
export type GardenDrawData = {
|
|
18
|
+
tile: WithId<GridDrawerElement>[];
|
|
19
|
+
trees: SpriteData[];
|
|
20
|
+
bushes: SpriteData[];
|
|
21
|
+
stones: WithId<GridDrawerElement>[];
|
|
22
|
+
};
|
|
23
|
+
export type GardenGridConstants = {
|
|
24
|
+
gridConstants: GridConstants;
|
|
25
|
+
largeGridConstants: GridConstants;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=grid-drawer.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-drawer.types.d.ts","sourceRoot":"","sources":["../../src/types/grid-drawer.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,eAAe,CAAC;IACjC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAC/B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC;IAClC,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,aAAa,EAAE,aAAa,CAAC;IAC7B,kBAAkB,EAAE,aAAa,CAAC;CACnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-drawer.types.js","sourceRoot":"","sources":["../../src/types/grid-drawer.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { AnimatedSpriteData, SpriteData, AnimatedSpriteSetInit, AnimatedSpriteSetObject, } from './animated-sprite.types';
|
|
2
|
+
export type { Nullable, WithDensity, WithId, Coordinates, Move, Cell, SizeMeasures, Direction, } from './common.types';
|
|
3
|
+
export { directions } from './common.types';
|
|
4
|
+
export type { GardenDrawData, GardenGridConstants, StaticDrawReport, GridDrawerElement, } from './grid-drawer.types';
|
|
5
|
+
export type { PathMap, PathMapElement, GridPathElement } from './path.types';
|
|
6
|
+
export type { SpritesheetElement, SpritesheetSetKey, SpritesheetPath, SpritesheetInit, SpritesheetObject, } from './spritesheet-element.types';
|
|
7
|
+
export { isSpritesheetSetKey } from './spritesheet-element.types';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,UAAU,EACV,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,QAAQ,EACR,WAAW,EACX,MAAM,EACN,WAAW,EACX,IAAI,EACJ,IAAI,EACJ,YAAY,EACZ,SAAS,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC7E,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAe5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TilePathSpritesheetElementKey } from '../spritesheet-set';
|
|
2
|
+
import type { Cell, Direction } from './common.types';
|
|
3
|
+
export type PathMapElement = {
|
|
4
|
+
priority: number;
|
|
5
|
+
key: TilePathSpritesheetElementKey;
|
|
6
|
+
};
|
|
7
|
+
export type PathMap = Map<string, PathMapElement[]>;
|
|
8
|
+
export type GridPathElement = {
|
|
9
|
+
cell: Cell;
|
|
10
|
+
directions: Direction[];
|
|
11
|
+
index: number;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=path.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.types.d.ts","sourceRoot":"","sources":["../../src/types/path.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,6BAA6B,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.types.js","sourceRoot":"","sources":["../../src/types/path.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Coordinates, SizeMeasures, WithDensity } from './common.types.ts';
|
|
2
|
+
import type { SpritesheetAssetKey } from '../assets';
|
|
3
|
+
export type SpritesheetElement = WithDensity<Coordinates & SizeMeasures>;
|
|
4
|
+
export type SpritesheetObject<Tile extends string = string> = Record<Tile, SpritesheetElement>;
|
|
5
|
+
export type SpritesheetPath = SpritesheetAssetKey;
|
|
6
|
+
export type SpritesheetSetKey = `${string}-set`;
|
|
7
|
+
export declare const isSpritesheetSetKey: (key: string) => key is SpritesheetSetKey;
|
|
8
|
+
export type SpritesheetInit<Tile extends string = string> = {
|
|
9
|
+
spritesheetKey: SpritesheetSetKey;
|
|
10
|
+
spritesheetPath: SpritesheetPath;
|
|
11
|
+
spritesheetMap: SpritesheetObject<Tile>;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=spritesheet-element.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spritesheet-element.types.d.ts","sourceRoot":"","sources":["../../src/types/spritesheet-element.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,WAAW,GAAG,YAAY,CAAC,CAAC;AAEzE,MAAM,MAAM,iBAAiB,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,IAAI,MAAM,CAClE,IAAI,EACJ,kBAAkB,CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG,GAAG,MAAM,MAAM,CAAC;AAEhD,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,KAAG,GAAG,IAAI,iBACnC,CAAC;AAEvB,MAAM,MAAM,eAAe,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,IAAI;IAC1D,cAAc,EAAE,iBAAiB,CAAC;IAClC,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;CACzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spritesheet-element.types.js","sourceRoot":"","sources":["../../src/types/spritesheet-element.types.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,GAAW,EAA4B,EAAE,CAC3E,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC"}
|