@lightningjs/blits 2.4.1 → 2.6.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/CHANGELOG.md +17 -0
- package/index.d.ts +100 -11
- package/package.json +10 -2
- package/src/announcer/announcer.js +2 -1
- package/src/announcer/speechSynthesis.js +12 -2
- package/src/application.js +40 -20
- package/src/component/base/methods.js +6 -1
- package/src/component.js +7 -0
- package/src/components/Circle.js +3 -0
- package/src/components/FPScounter.js +206 -1330
- package/src/components/RouterView.js +13 -2
- package/src/components/index.js +0 -2
- package/src/engines/L3/element.js +134 -9
- package/src/engines/L3/launch.js +9 -5
- package/src/engines/L3/spriteTexture.js +71 -0
- package/src/focus/focus.js +7 -4
- package/src/launch.js +23 -0
- package/src/lib/codegenerator/generator.js +12 -2
- package/src/lib/reactivityguard/computedprops.js +6 -2
- package/src/lib/symbols.js +4 -0
- package/src/platform.js +117 -0
- package/src/platforms.d.ts +1 -0
- package/src/platforms.js +23 -0
- package/src/plugins/storage/localCookie.js +15 -12
- package/src/router/router.js +4 -2
- package/src/testing/index.d.ts +58 -0
- package/src/testing/index.js +20 -0
- package/src/testing/nodePlatform.js +116 -0
- package/src/testing/renderComponent.js +346 -0
- package/src/components/Sprite.js +0 -256
|
@@ -37,6 +37,9 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
37
37
|
'color',
|
|
38
38
|
'src',
|
|
39
39
|
'texture',
|
|
40
|
+
'image',
|
|
41
|
+
'map',
|
|
42
|
+
'frame',
|
|
40
43
|
'fit',
|
|
41
44
|
'rtt',
|
|
42
45
|
'mount',
|
|
@@ -122,8 +125,6 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
122
125
|
slotChildCounter -= 1
|
|
123
126
|
}
|
|
124
127
|
|
|
125
|
-
cmps[3] = (context.components && context.components['Sprite']) || components['Sprite']
|
|
126
|
-
|
|
127
128
|
parent = elms[2]
|
|
128
129
|
elementConfigs[3] = {}
|
|
129
130
|
|
|
@@ -132,71 +133,35 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
132
133
|
inSlot === true ? slotComponent : component
|
|
133
134
|
)
|
|
134
135
|
|
|
135
|
-
elementConfigs[3]['
|
|
136
|
+
elementConfigs[3][Symbol.for('isSprite')] = true
|
|
136
137
|
elementConfigs[3]['image'] = component.image
|
|
137
138
|
elementConfigs[3]['w'] = 43
|
|
138
139
|
elementConfigs[3]['h'] = 25
|
|
139
140
|
elementConfigs[3]['map'] = component.sprite
|
|
140
141
|
elementConfigs[3]['frame'] = 'fps'
|
|
141
|
-
|
|
142
|
-
skips[3] = []
|
|
143
|
-
if (typeof cmps[3] !== 'undefined' && cmps[3][Symbol.for('config')].props !== undefined) {
|
|
144
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
145
|
-
let props = cmps[3][Symbol.for('config')].props
|
|
146
|
-
if (Array.isArray(props) === false) props = Object.keys(cmps[3][Symbol.for('config')].props)
|
|
147
|
-
for (let k = 0; k < props.length; k++) {
|
|
148
|
-
const key = props[k]
|
|
149
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
150
|
-
delete elementConfigs[3][key]
|
|
151
|
-
skips[3].push(key)
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
142
|
elms[3].populate(elementConfigs[3])
|
|
156
143
|
|
|
157
144
|
if (inSlot === true) {
|
|
158
145
|
slotChildCounter -= 1
|
|
159
146
|
}
|
|
160
147
|
|
|
161
|
-
parent = elms[
|
|
162
|
-
|
|
163
|
-
props[4]['image'] = component.image
|
|
164
|
-
props[4]['w'] = 43
|
|
165
|
-
props[4]['h'] = 25
|
|
166
|
-
props[4]['map'] = component.sprite
|
|
167
|
-
props[4]['frame'] = 'fps'
|
|
168
|
-
|
|
169
|
-
componentType = props[4]['is'] || 'Sprite'
|
|
170
|
-
|
|
171
|
-
components[4]
|
|
172
|
-
if (typeof componentType === 'string') {
|
|
173
|
-
components[4] =
|
|
174
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
175
|
-
if (!components[4]) {
|
|
176
|
-
throw new Error('Component "Sprite" not found')
|
|
177
|
-
}
|
|
178
|
-
} else if (
|
|
179
|
-
typeof componentType === 'function' &&
|
|
180
|
-
componentType[Symbol.for('isComponent')] === true
|
|
181
|
-
) {
|
|
182
|
-
components[4] = componentType
|
|
183
|
-
}
|
|
148
|
+
parent = elms[2]
|
|
149
|
+
elementConfigs[4] = {}
|
|
184
150
|
|
|
185
|
-
elms[4] =
|
|
151
|
+
elms[4] = this.element(
|
|
152
|
+
{ parent: parent || 'root' },
|
|
153
|
+
inSlot === true ? slotComponent : component
|
|
154
|
+
)
|
|
186
155
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
inSlot = true
|
|
191
|
-
} else {
|
|
192
|
-
parent = elms[4][Symbol.for('children')][0]
|
|
193
|
-
}
|
|
156
|
+
elementConfigs[4]['x'] = 58
|
|
157
|
+
elementConfigs[4]['y'] = 2
|
|
158
|
+
elms[4].populate(elementConfigs[4])
|
|
194
159
|
|
|
195
|
-
if (inSlot === true
|
|
196
|
-
|
|
160
|
+
if (inSlot === true) {
|
|
161
|
+
slotChildCounter -= 1
|
|
197
162
|
}
|
|
198
163
|
|
|
199
|
-
parent = elms[
|
|
164
|
+
parent = elms[4]
|
|
200
165
|
elementConfigs[5] = {}
|
|
201
166
|
|
|
202
167
|
elms[5] = this.element(
|
|
@@ -204,17 +169,20 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
204
169
|
inSlot === true ? slotComponent : component
|
|
205
170
|
)
|
|
206
171
|
|
|
207
|
-
elementConfigs[5]['
|
|
208
|
-
elementConfigs[5]['
|
|
172
|
+
elementConfigs[5][Symbol.for('isSprite')] = true
|
|
173
|
+
elementConfigs[5]['image'] = component.image
|
|
174
|
+
elementConfigs[5]['x'] = 0
|
|
175
|
+
elementConfigs[5]['h'] = 20
|
|
176
|
+
elementConfigs[5]['w'] = 20
|
|
177
|
+
elementConfigs[5]['map'] = component.sprite
|
|
178
|
+
elementConfigs[5]['frame'] = component.fps[0]
|
|
209
179
|
elms[5].populate(elementConfigs[5])
|
|
210
180
|
|
|
211
181
|
if (inSlot === true) {
|
|
212
182
|
slotChildCounter -= 1
|
|
213
183
|
}
|
|
214
184
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
parent = elms[5]
|
|
185
|
+
parent = elms[4]
|
|
218
186
|
elementConfigs[6] = {}
|
|
219
187
|
|
|
220
188
|
elms[6] = this.element(
|
|
@@ -222,80 +190,41 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
222
190
|
inSlot === true ? slotComponent : component
|
|
223
191
|
)
|
|
224
192
|
|
|
225
|
-
elementConfigs[6]['
|
|
193
|
+
elementConfigs[6][Symbol.for('isSprite')] = true
|
|
226
194
|
elementConfigs[6]['image'] = component.image
|
|
227
|
-
elementConfigs[6]['x'] =
|
|
195
|
+
elementConfigs[6]['x'] = 18
|
|
228
196
|
elementConfigs[6]['h'] = 20
|
|
229
197
|
elementConfigs[6]['w'] = 20
|
|
230
198
|
elementConfigs[6]['map'] = component.sprite
|
|
231
|
-
elementConfigs[6]['frame'] = component.fps[
|
|
232
|
-
|
|
233
|
-
skips[6] = []
|
|
234
|
-
if (typeof cmps[6] !== 'undefined' && cmps[6][Symbol.for('config')].props !== undefined) {
|
|
235
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
236
|
-
let props = cmps[6][Symbol.for('config')].props
|
|
237
|
-
if (Array.isArray(props) === false) props = Object.keys(cmps[6][Symbol.for('config')].props)
|
|
238
|
-
for (let k = 0; k < props.length; k++) {
|
|
239
|
-
const key = props[k]
|
|
240
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
241
|
-
delete elementConfigs[6][key]
|
|
242
|
-
skips[6].push(key)
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
199
|
+
elementConfigs[6]['frame'] = component.fps[1]
|
|
246
200
|
elms[6].populate(elementConfigs[6])
|
|
247
201
|
|
|
248
202
|
if (inSlot === true) {
|
|
249
203
|
slotChildCounter -= 1
|
|
250
204
|
}
|
|
251
205
|
|
|
252
|
-
parent = elms[
|
|
253
|
-
|
|
254
|
-
props[7]['image'] = component.image
|
|
255
|
-
props[7]['x'] = 0
|
|
256
|
-
props[7]['h'] = 20
|
|
257
|
-
props[7]['w'] = 20
|
|
258
|
-
props[7]['map'] = component.sprite
|
|
259
|
-
|
|
260
|
-
propData = component.fps[0]
|
|
261
|
-
if (Array.isArray(propData) === true) {
|
|
262
|
-
propData = getRaw(propData).slice(0)
|
|
263
|
-
}
|
|
264
|
-
props[7]['frame'] = propData
|
|
265
|
-
|
|
266
|
-
componentType = props[7]['is'] || 'Sprite'
|
|
267
|
-
|
|
268
|
-
components[7]
|
|
269
|
-
if (typeof componentType === 'string') {
|
|
270
|
-
components[7] =
|
|
271
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
272
|
-
if (!components[7]) {
|
|
273
|
-
throw new Error('Component "Sprite" not found')
|
|
274
|
-
}
|
|
275
|
-
} else if (
|
|
276
|
-
typeof componentType === 'function' &&
|
|
277
|
-
componentType[Symbol.for('isComponent')] === true
|
|
278
|
-
) {
|
|
279
|
-
components[7] = componentType
|
|
280
|
-
}
|
|
206
|
+
parent = elms[4]
|
|
207
|
+
elementConfigs[7] = {}
|
|
281
208
|
|
|
282
|
-
elms[7] =
|
|
209
|
+
elms[7] = this.element(
|
|
210
|
+
{ parent: parent || 'root' },
|
|
211
|
+
inSlot === true ? slotComponent : component
|
|
212
|
+
)
|
|
283
213
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
214
|
+
elementConfigs[7][Symbol.for('isSprite')] = true
|
|
215
|
+
elementConfigs[7]['image'] = component.image
|
|
216
|
+
elementConfigs[7]['x'] = 36
|
|
217
|
+
elementConfigs[7]['h'] = 20
|
|
218
|
+
elementConfigs[7]['w'] = 20
|
|
219
|
+
elementConfigs[7]['map'] = component.sprite
|
|
220
|
+
elementConfigs[7]['frame'] = component.fps[2]
|
|
221
|
+
elms[7].populate(elementConfigs[7])
|
|
291
222
|
|
|
292
|
-
if (inSlot === true
|
|
293
|
-
|
|
223
|
+
if (inSlot === true) {
|
|
224
|
+
slotChildCounter -= 1
|
|
294
225
|
}
|
|
295
226
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
parent = elms[5]
|
|
227
|
+
parent = elms[1]
|
|
299
228
|
elementConfigs[8] = {}
|
|
300
229
|
|
|
301
230
|
elms[8] = this.element(
|
|
@@ -303,27 +232,7 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
303
232
|
inSlot === true ? slotComponent : component
|
|
304
233
|
)
|
|
305
234
|
|
|
306
|
-
elementConfigs[8]['
|
|
307
|
-
elementConfigs[8]['image'] = component.image
|
|
308
|
-
elementConfigs[8]['x'] = 18
|
|
309
|
-
elementConfigs[8]['h'] = 20
|
|
310
|
-
elementConfigs[8]['w'] = 20
|
|
311
|
-
elementConfigs[8]['map'] = component.sprite
|
|
312
|
-
elementConfigs[8]['frame'] = component.fps[1]
|
|
313
|
-
|
|
314
|
-
skips[8] = []
|
|
315
|
-
if (typeof cmps[8] !== 'undefined' && cmps[8][Symbol.for('config')].props !== undefined) {
|
|
316
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
317
|
-
let props = cmps[8][Symbol.for('config')].props
|
|
318
|
-
if (Array.isArray(props) === false) props = Object.keys(cmps[8][Symbol.for('config')].props)
|
|
319
|
-
for (let k = 0; k < props.length; k++) {
|
|
320
|
-
const key = props[k]
|
|
321
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
322
|
-
delete elementConfigs[8][key]
|
|
323
|
-
skips[8].push(key)
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
235
|
+
elementConfigs[8]['x'] = 150
|
|
327
236
|
elms[8].populate(elementConfigs[8])
|
|
328
237
|
|
|
329
238
|
if (inSlot === true) {
|
|
@@ -331,52 +240,27 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
331
240
|
}
|
|
332
241
|
|
|
333
242
|
parent = elms[8]
|
|
334
|
-
|
|
335
|
-
props[9]['image'] = component.image
|
|
336
|
-
props[9]['x'] = 18
|
|
337
|
-
props[9]['h'] = 20
|
|
338
|
-
props[9]['w'] = 20
|
|
339
|
-
props[9]['map'] = component.sprite
|
|
340
|
-
|
|
341
|
-
propData = component.fps[1]
|
|
342
|
-
if (Array.isArray(propData) === true) {
|
|
343
|
-
propData = getRaw(propData).slice(0)
|
|
344
|
-
}
|
|
345
|
-
props[9]['frame'] = propData
|
|
346
|
-
|
|
347
|
-
componentType = props[9]['is'] || 'Sprite'
|
|
348
|
-
|
|
349
|
-
components[9]
|
|
350
|
-
if (typeof componentType === 'string') {
|
|
351
|
-
components[9] =
|
|
352
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
353
|
-
if (!components[9]) {
|
|
354
|
-
throw new Error('Component "Sprite" not found')
|
|
355
|
-
}
|
|
356
|
-
} else if (
|
|
357
|
-
typeof componentType === 'function' &&
|
|
358
|
-
componentType[Symbol.for('isComponent')] === true
|
|
359
|
-
) {
|
|
360
|
-
components[9] = componentType
|
|
361
|
-
}
|
|
243
|
+
elementConfigs[9] = {}
|
|
362
244
|
|
|
363
|
-
elms[9] =
|
|
245
|
+
elms[9] = this.element(
|
|
246
|
+
{ parent: parent || 'root' },
|
|
247
|
+
inSlot === true ? slotComponent : component
|
|
248
|
+
)
|
|
364
249
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
250
|
+
elementConfigs[9][Symbol.for('isSprite')] = true
|
|
251
|
+
elementConfigs[9]['image'] = component.image
|
|
252
|
+
elementConfigs[9]['y'] = 2
|
|
253
|
+
elementConfigs[9]['w'] = 48
|
|
254
|
+
elementConfigs[9]['h'] = 25
|
|
255
|
+
elementConfigs[9]['map'] = component.sprite
|
|
256
|
+
elementConfigs[9]['frame'] = 'avg'
|
|
257
|
+
elms[9].populate(elementConfigs[9])
|
|
372
258
|
|
|
373
|
-
if (inSlot === true
|
|
374
|
-
|
|
259
|
+
if (inSlot === true) {
|
|
260
|
+
slotChildCounter -= 1
|
|
375
261
|
}
|
|
376
262
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
parent = elms[5]
|
|
263
|
+
parent = elms[8]
|
|
380
264
|
elementConfigs[10] = {}
|
|
381
265
|
|
|
382
266
|
elms[10] = this.element(
|
|
@@ -384,28 +268,8 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
384
268
|
inSlot === true ? slotComponent : component
|
|
385
269
|
)
|
|
386
270
|
|
|
387
|
-
elementConfigs[10]['
|
|
388
|
-
elementConfigs[10]['
|
|
389
|
-
elementConfigs[10]['x'] = 36
|
|
390
|
-
elementConfigs[10]['h'] = 20
|
|
391
|
-
elementConfigs[10]['w'] = 20
|
|
392
|
-
elementConfigs[10]['map'] = component.sprite
|
|
393
|
-
elementConfigs[10]['frame'] = component.fps[2]
|
|
394
|
-
|
|
395
|
-
skips[10] = []
|
|
396
|
-
if (typeof cmps[10] !== 'undefined' && cmps[10][Symbol.for('config')].props !== undefined) {
|
|
397
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
398
|
-
let props = cmps[10][Symbol.for('config')].props
|
|
399
|
-
if (Array.isArray(props) === false)
|
|
400
|
-
props = Object.keys(cmps[10][Symbol.for('config')].props)
|
|
401
|
-
for (let k = 0; k < props.length; k++) {
|
|
402
|
-
const key = props[k]
|
|
403
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
404
|
-
delete elementConfigs[10][key]
|
|
405
|
-
skips[10].push(key)
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
271
|
+
elementConfigs[10]['x'] = 63
|
|
272
|
+
elementConfigs[10]['y'] = 2
|
|
409
273
|
elms[10].populate(elementConfigs[10])
|
|
410
274
|
|
|
411
275
|
if (inSlot === true) {
|
|
@@ -413,50 +277,27 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
413
277
|
}
|
|
414
278
|
|
|
415
279
|
parent = elms[10]
|
|
416
|
-
|
|
417
|
-
props[11]['image'] = component.image
|
|
418
|
-
props[11]['x'] = 36
|
|
419
|
-
props[11]['h'] = 20
|
|
420
|
-
props[11]['w'] = 20
|
|
421
|
-
props[11]['map'] = component.sprite
|
|
422
|
-
|
|
423
|
-
propData = component.fps[2]
|
|
424
|
-
if (Array.isArray(propData) === true) {
|
|
425
|
-
propData = getRaw(propData).slice(0)
|
|
426
|
-
}
|
|
427
|
-
props[11]['frame'] = propData
|
|
428
|
-
|
|
429
|
-
componentType = props[11]['is'] || 'Sprite'
|
|
430
|
-
|
|
431
|
-
components[11]
|
|
432
|
-
if (typeof componentType === 'string') {
|
|
433
|
-
components[11] =
|
|
434
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
435
|
-
if (!components[11]) {
|
|
436
|
-
throw new Error('Component "Sprite" not found')
|
|
437
|
-
}
|
|
438
|
-
} else if (
|
|
439
|
-
typeof componentType === 'function' &&
|
|
440
|
-
componentType[Symbol.for('isComponent')] === true
|
|
441
|
-
) {
|
|
442
|
-
components[11] = componentType
|
|
443
|
-
}
|
|
280
|
+
elementConfigs[11] = {}
|
|
444
281
|
|
|
445
|
-
elms[11] =
|
|
282
|
+
elms[11] = this.element(
|
|
283
|
+
{ parent: parent || 'root' },
|
|
284
|
+
inSlot === true ? slotComponent : component
|
|
285
|
+
)
|
|
446
286
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
287
|
+
elementConfigs[11][Symbol.for('isSprite')] = true
|
|
288
|
+
elementConfigs[11]['image'] = component.image
|
|
289
|
+
elementConfigs[11]['x'] = 0
|
|
290
|
+
elementConfigs[11]['h'] = 20
|
|
291
|
+
elementConfigs[11]['w'] = 20
|
|
292
|
+
elementConfigs[11]['map'] = component.sprite
|
|
293
|
+
elementConfigs[11]['frame'] = component.avgFps[0]
|
|
294
|
+
elms[11].populate(elementConfigs[11])
|
|
454
295
|
|
|
455
|
-
if (inSlot === true
|
|
456
|
-
|
|
296
|
+
if (inSlot === true) {
|
|
297
|
+
slotChildCounter -= 1
|
|
457
298
|
}
|
|
458
299
|
|
|
459
|
-
parent = elms[
|
|
300
|
+
parent = elms[10]
|
|
460
301
|
elementConfigs[12] = {}
|
|
461
302
|
|
|
462
303
|
elms[12] = this.element(
|
|
@@ -464,16 +305,20 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
464
305
|
inSlot === true ? slotComponent : component
|
|
465
306
|
)
|
|
466
307
|
|
|
467
|
-
elementConfigs[12]['
|
|
308
|
+
elementConfigs[12][Symbol.for('isSprite')] = true
|
|
309
|
+
elementConfigs[12]['image'] = component.image
|
|
310
|
+
elementConfigs[12]['x'] = 18
|
|
311
|
+
elementConfigs[12]['h'] = 20
|
|
312
|
+
elementConfigs[12]['w'] = 20
|
|
313
|
+
elementConfigs[12]['map'] = component.sprite
|
|
314
|
+
elementConfigs[12]['frame'] = component.avgFps[1]
|
|
468
315
|
elms[12].populate(elementConfigs[12])
|
|
469
316
|
|
|
470
317
|
if (inSlot === true) {
|
|
471
318
|
slotChildCounter -= 1
|
|
472
319
|
}
|
|
473
320
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
parent = elms[12]
|
|
321
|
+
parent = elms[10]
|
|
477
322
|
elementConfigs[13] = {}
|
|
478
323
|
|
|
479
324
|
elms[13] = this.element(
|
|
@@ -481,74 +326,36 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
481
326
|
inSlot === true ? slotComponent : component
|
|
482
327
|
)
|
|
483
328
|
|
|
484
|
-
elementConfigs[13]['
|
|
329
|
+
elementConfigs[13][Symbol.for('isSprite')] = true
|
|
485
330
|
elementConfigs[13]['image'] = component.image
|
|
486
|
-
elementConfigs[13]['
|
|
487
|
-
elementConfigs[13]['
|
|
488
|
-
elementConfigs[13]['
|
|
331
|
+
elementConfigs[13]['x'] = 36
|
|
332
|
+
elementConfigs[13]['h'] = 20
|
|
333
|
+
elementConfigs[13]['w'] = 20
|
|
489
334
|
elementConfigs[13]['map'] = component.sprite
|
|
490
|
-
elementConfigs[13]['frame'] =
|
|
491
|
-
|
|
492
|
-
skips[13] = []
|
|
493
|
-
if (typeof cmps[13] !== 'undefined' && cmps[13][Symbol.for('config')].props !== undefined) {
|
|
494
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
495
|
-
let props = cmps[13][Symbol.for('config')].props
|
|
496
|
-
if (Array.isArray(props) === false)
|
|
497
|
-
props = Object.keys(cmps[13][Symbol.for('config')].props)
|
|
498
|
-
for (let k = 0; k < props.length; k++) {
|
|
499
|
-
const key = props[k]
|
|
500
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
501
|
-
delete elementConfigs[13][key]
|
|
502
|
-
skips[13].push(key)
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
|
|
335
|
+
elementConfigs[13]['frame'] = component.avgFps[2]
|
|
506
336
|
elms[13].populate(elementConfigs[13])
|
|
507
337
|
|
|
508
338
|
if (inSlot === true) {
|
|
509
339
|
slotChildCounter -= 1
|
|
510
340
|
}
|
|
511
341
|
|
|
512
|
-
parent = elms[
|
|
513
|
-
|
|
514
|
-
props[14]['image'] = component.image
|
|
515
|
-
props[14]['y'] = 2
|
|
516
|
-
props[14]['w'] = 48
|
|
517
|
-
props[14]['h'] = 25
|
|
518
|
-
props[14]['map'] = component.sprite
|
|
519
|
-
props[14]['frame'] = 'avg'
|
|
520
|
-
|
|
521
|
-
componentType = props[14]['is'] || 'Sprite'
|
|
522
|
-
|
|
523
|
-
components[14]
|
|
524
|
-
if (typeof componentType === 'string') {
|
|
525
|
-
components[14] =
|
|
526
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
527
|
-
if (!components[14]) {
|
|
528
|
-
throw new Error('Component "Sprite" not found')
|
|
529
|
-
}
|
|
530
|
-
} else if (
|
|
531
|
-
typeof componentType === 'function' &&
|
|
532
|
-
componentType[Symbol.for('isComponent')] === true
|
|
533
|
-
) {
|
|
534
|
-
components[14] = componentType
|
|
535
|
-
}
|
|
342
|
+
parent = elms[1]
|
|
343
|
+
elementConfigs[14] = {}
|
|
536
344
|
|
|
537
|
-
elms[14] =
|
|
345
|
+
elms[14] = this.element(
|
|
346
|
+
{ parent: parent || 'root' },
|
|
347
|
+
inSlot === true ? slotComponent : component
|
|
348
|
+
)
|
|
538
349
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
inSlot = true
|
|
543
|
-
} else {
|
|
544
|
-
parent = elms[14][Symbol.for('children')][0]
|
|
545
|
-
}
|
|
350
|
+
elementConfigs[14]['x'] = 0
|
|
351
|
+
elementConfigs[14]['y'] = 40
|
|
352
|
+
elms[14].populate(elementConfigs[14])
|
|
546
353
|
|
|
547
|
-
if (inSlot === true
|
|
548
|
-
|
|
354
|
+
if (inSlot === true) {
|
|
355
|
+
slotChildCounter -= 1
|
|
549
356
|
}
|
|
550
357
|
|
|
551
|
-
parent = elms[
|
|
358
|
+
parent = elms[14]
|
|
552
359
|
elementConfigs[15] = {}
|
|
553
360
|
|
|
554
361
|
elms[15] = this.element(
|
|
@@ -556,17 +363,20 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
556
363
|
inSlot === true ? slotComponent : component
|
|
557
364
|
)
|
|
558
365
|
|
|
559
|
-
elementConfigs[15]['
|
|
560
|
-
elementConfigs[15]['
|
|
366
|
+
elementConfigs[15][Symbol.for('isSprite')] = true
|
|
367
|
+
elementConfigs[15]['image'] = component.image
|
|
368
|
+
elementConfigs[15]['x'] = '-2'
|
|
369
|
+
elementConfigs[15]['w'] = 47
|
|
370
|
+
elementConfigs[15]['h'] = 25
|
|
371
|
+
elementConfigs[15]['map'] = component.sprite
|
|
372
|
+
elementConfigs[15]['frame'] = 'min'
|
|
561
373
|
elms[15].populate(elementConfigs[15])
|
|
562
374
|
|
|
563
375
|
if (inSlot === true) {
|
|
564
376
|
slotChildCounter -= 1
|
|
565
377
|
}
|
|
566
378
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
parent = elms[15]
|
|
379
|
+
parent = elms[14]
|
|
570
380
|
elementConfigs[16] = {}
|
|
571
381
|
|
|
572
382
|
elms[16] = this.element(
|
|
@@ -574,28 +384,8 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
574
384
|
inSlot === true ? slotComponent : component
|
|
575
385
|
)
|
|
576
386
|
|
|
577
|
-
elementConfigs[16]['
|
|
578
|
-
elementConfigs[16]['
|
|
579
|
-
elementConfigs[16]['x'] = 0
|
|
580
|
-
elementConfigs[16]['h'] = 20
|
|
581
|
-
elementConfigs[16]['w'] = 20
|
|
582
|
-
elementConfigs[16]['map'] = component.sprite
|
|
583
|
-
elementConfigs[16]['frame'] = component.avgFps[0]
|
|
584
|
-
|
|
585
|
-
skips[16] = []
|
|
586
|
-
if (typeof cmps[16] !== 'undefined' && cmps[16][Symbol.for('config')].props !== undefined) {
|
|
587
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
588
|
-
let props = cmps[16][Symbol.for('config')].props
|
|
589
|
-
if (Array.isArray(props) === false)
|
|
590
|
-
props = Object.keys(cmps[16][Symbol.for('config')].props)
|
|
591
|
-
for (let k = 0; k < props.length; k++) {
|
|
592
|
-
const key = props[k]
|
|
593
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
594
|
-
delete elementConfigs[16][key]
|
|
595
|
-
skips[16].push(key)
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
|
|
387
|
+
elementConfigs[16]['x'] = 58
|
|
388
|
+
elementConfigs[16]['y'] = 2
|
|
599
389
|
elms[16].populate(elementConfigs[16])
|
|
600
390
|
|
|
601
391
|
if (inSlot === true) {
|
|
@@ -603,52 +393,27 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
603
393
|
}
|
|
604
394
|
|
|
605
395
|
parent = elms[16]
|
|
606
|
-
|
|
607
|
-
props[17]['image'] = component.image
|
|
608
|
-
props[17]['x'] = 0
|
|
609
|
-
props[17]['h'] = 20
|
|
610
|
-
props[17]['w'] = 20
|
|
611
|
-
props[17]['map'] = component.sprite
|
|
612
|
-
|
|
613
|
-
propData = component.avgFps[0]
|
|
614
|
-
if (Array.isArray(propData) === true) {
|
|
615
|
-
propData = getRaw(propData).slice(0)
|
|
616
|
-
}
|
|
617
|
-
props[17]['frame'] = propData
|
|
618
|
-
|
|
619
|
-
componentType = props[17]['is'] || 'Sprite'
|
|
620
|
-
|
|
621
|
-
components[17]
|
|
622
|
-
if (typeof componentType === 'string') {
|
|
623
|
-
components[17] =
|
|
624
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
625
|
-
if (!components[17]) {
|
|
626
|
-
throw new Error('Component "Sprite" not found')
|
|
627
|
-
}
|
|
628
|
-
} else if (
|
|
629
|
-
typeof componentType === 'function' &&
|
|
630
|
-
componentType[Symbol.for('isComponent')] === true
|
|
631
|
-
) {
|
|
632
|
-
components[17] = componentType
|
|
633
|
-
}
|
|
396
|
+
elementConfigs[17] = {}
|
|
634
397
|
|
|
635
|
-
elms[17] =
|
|
398
|
+
elms[17] = this.element(
|
|
399
|
+
{ parent: parent || 'root' },
|
|
400
|
+
inSlot === true ? slotComponent : component
|
|
401
|
+
)
|
|
636
402
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
403
|
+
elementConfigs[17][Symbol.for('isSprite')] = true
|
|
404
|
+
elementConfigs[17]['image'] = component.image
|
|
405
|
+
elementConfigs[17]['x'] = 0
|
|
406
|
+
elementConfigs[17]['h'] = 20
|
|
407
|
+
elementConfigs[17]['w'] = 20
|
|
408
|
+
elementConfigs[17]['map'] = component.sprite
|
|
409
|
+
elementConfigs[17]['frame'] = component.minFps[0]
|
|
410
|
+
elms[17].populate(elementConfigs[17])
|
|
644
411
|
|
|
645
|
-
if (inSlot === true
|
|
646
|
-
|
|
412
|
+
if (inSlot === true) {
|
|
413
|
+
slotChildCounter -= 1
|
|
647
414
|
}
|
|
648
415
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
parent = elms[15]
|
|
416
|
+
parent = elms[16]
|
|
652
417
|
elementConfigs[18] = {}
|
|
653
418
|
|
|
654
419
|
elms[18] = this.element(
|
|
@@ -656,81 +421,41 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
656
421
|
inSlot === true ? slotComponent : component
|
|
657
422
|
)
|
|
658
423
|
|
|
659
|
-
elementConfigs[18]['
|
|
424
|
+
elementConfigs[18][Symbol.for('isSprite')] = true
|
|
660
425
|
elementConfigs[18]['image'] = component.image
|
|
661
426
|
elementConfigs[18]['x'] = 18
|
|
662
427
|
elementConfigs[18]['h'] = 20
|
|
663
428
|
elementConfigs[18]['w'] = 20
|
|
664
429
|
elementConfigs[18]['map'] = component.sprite
|
|
665
|
-
elementConfigs[18]['frame'] = component.
|
|
666
|
-
|
|
667
|
-
skips[18] = []
|
|
668
|
-
if (typeof cmps[18] !== 'undefined' && cmps[18][Symbol.for('config')].props !== undefined) {
|
|
669
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
670
|
-
let props = cmps[18][Symbol.for('config')].props
|
|
671
|
-
if (Array.isArray(props) === false)
|
|
672
|
-
props = Object.keys(cmps[18][Symbol.for('config')].props)
|
|
673
|
-
for (let k = 0; k < props.length; k++) {
|
|
674
|
-
const key = props[k]
|
|
675
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
676
|
-
delete elementConfigs[18][key]
|
|
677
|
-
skips[18].push(key)
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
|
|
430
|
+
elementConfigs[18]['frame'] = component.minFps[1]
|
|
681
431
|
elms[18].populate(elementConfigs[18])
|
|
682
432
|
|
|
683
433
|
if (inSlot === true) {
|
|
684
434
|
slotChildCounter -= 1
|
|
685
435
|
}
|
|
686
436
|
|
|
687
|
-
parent = elms[
|
|
688
|
-
|
|
689
|
-
props[19]['image'] = component.image
|
|
690
|
-
props[19]['x'] = 18
|
|
691
|
-
props[19]['h'] = 20
|
|
692
|
-
props[19]['w'] = 20
|
|
693
|
-
props[19]['map'] = component.sprite
|
|
694
|
-
|
|
695
|
-
propData = component.avgFps[1]
|
|
696
|
-
if (Array.isArray(propData) === true) {
|
|
697
|
-
propData = getRaw(propData).slice(0)
|
|
698
|
-
}
|
|
699
|
-
props[19]['frame'] = propData
|
|
700
|
-
|
|
701
|
-
componentType = props[19]['is'] || 'Sprite'
|
|
702
|
-
|
|
703
|
-
components[19]
|
|
704
|
-
if (typeof componentType === 'string') {
|
|
705
|
-
components[19] =
|
|
706
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
707
|
-
if (!components[19]) {
|
|
708
|
-
throw new Error('Component "Sprite" not found')
|
|
709
|
-
}
|
|
710
|
-
} else if (
|
|
711
|
-
typeof componentType === 'function' &&
|
|
712
|
-
componentType[Symbol.for('isComponent')] === true
|
|
713
|
-
) {
|
|
714
|
-
components[19] = componentType
|
|
715
|
-
}
|
|
437
|
+
parent = elms[16]
|
|
438
|
+
elementConfigs[19] = {}
|
|
716
439
|
|
|
717
|
-
elms[19] =
|
|
440
|
+
elms[19] = this.element(
|
|
441
|
+
{ parent: parent || 'root' },
|
|
442
|
+
inSlot === true ? slotComponent : component
|
|
443
|
+
)
|
|
718
444
|
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
445
|
+
elementConfigs[19][Symbol.for('isSprite')] = true
|
|
446
|
+
elementConfigs[19]['image'] = component.image
|
|
447
|
+
elementConfigs[19]['x'] = 36
|
|
448
|
+
elementConfigs[19]['h'] = 20
|
|
449
|
+
elementConfigs[19]['w'] = 20
|
|
450
|
+
elementConfigs[19]['map'] = component.sprite
|
|
451
|
+
elementConfigs[19]['frame'] = component.minFps[2]
|
|
452
|
+
elms[19].populate(elementConfigs[19])
|
|
726
453
|
|
|
727
|
-
if (inSlot === true
|
|
728
|
-
|
|
454
|
+
if (inSlot === true) {
|
|
455
|
+
slotChildCounter -= 1
|
|
729
456
|
}
|
|
730
457
|
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
parent = elms[15]
|
|
458
|
+
parent = elms[1]
|
|
734
459
|
elementConfigs[20] = {}
|
|
735
460
|
|
|
736
461
|
elms[20] = this.element(
|
|
@@ -738,28 +463,8 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
738
463
|
inSlot === true ? slotComponent : component
|
|
739
464
|
)
|
|
740
465
|
|
|
741
|
-
elementConfigs[20]['
|
|
742
|
-
elementConfigs[20]['
|
|
743
|
-
elementConfigs[20]['x'] = 36
|
|
744
|
-
elementConfigs[20]['h'] = 20
|
|
745
|
-
elementConfigs[20]['w'] = 20
|
|
746
|
-
elementConfigs[20]['map'] = component.sprite
|
|
747
|
-
elementConfigs[20]['frame'] = component.avgFps[2]
|
|
748
|
-
|
|
749
|
-
skips[20] = []
|
|
750
|
-
if (typeof cmps[20] !== 'undefined' && cmps[20][Symbol.for('config')].props !== undefined) {
|
|
751
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
752
|
-
let props = cmps[20][Symbol.for('config')].props
|
|
753
|
-
if (Array.isArray(props) === false)
|
|
754
|
-
props = Object.keys(cmps[20][Symbol.for('config')].props)
|
|
755
|
-
for (let k = 0; k < props.length; k++) {
|
|
756
|
-
const key = props[k]
|
|
757
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
758
|
-
delete elementConfigs[20][key]
|
|
759
|
-
skips[20].push(key)
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
|
|
466
|
+
elementConfigs[20]['x'] = 150
|
|
467
|
+
elementConfigs[20]['y'] = 40
|
|
763
468
|
elms[20].populate(elementConfigs[20])
|
|
764
469
|
|
|
765
470
|
if (inSlot === true) {
|
|
@@ -767,50 +472,26 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
767
472
|
}
|
|
768
473
|
|
|
769
474
|
parent = elms[20]
|
|
770
|
-
|
|
771
|
-
props[21]['image'] = component.image
|
|
772
|
-
props[21]['x'] = 36
|
|
773
|
-
props[21]['h'] = 20
|
|
774
|
-
props[21]['w'] = 20
|
|
775
|
-
props[21]['map'] = component.sprite
|
|
776
|
-
|
|
777
|
-
propData = component.avgFps[2]
|
|
778
|
-
if (Array.isArray(propData) === true) {
|
|
779
|
-
propData = getRaw(propData).slice(0)
|
|
780
|
-
}
|
|
781
|
-
props[21]['frame'] = propData
|
|
782
|
-
|
|
783
|
-
componentType = props[21]['is'] || 'Sprite'
|
|
784
|
-
|
|
785
|
-
components[21]
|
|
786
|
-
if (typeof componentType === 'string') {
|
|
787
|
-
components[21] =
|
|
788
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
789
|
-
if (!components[21]) {
|
|
790
|
-
throw new Error('Component "Sprite" not found')
|
|
791
|
-
}
|
|
792
|
-
} else if (
|
|
793
|
-
typeof componentType === 'function' &&
|
|
794
|
-
componentType[Symbol.for('isComponent')] === true
|
|
795
|
-
) {
|
|
796
|
-
components[21] = componentType
|
|
797
|
-
}
|
|
475
|
+
elementConfigs[21] = {}
|
|
798
476
|
|
|
799
|
-
elms[21] =
|
|
477
|
+
elms[21] = this.element(
|
|
478
|
+
{ parent: parent || 'root' },
|
|
479
|
+
inSlot === true ? slotComponent : component
|
|
480
|
+
)
|
|
800
481
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
482
|
+
elementConfigs[21][Symbol.for('isSprite')] = true
|
|
483
|
+
elementConfigs[21]['image'] = component.image
|
|
484
|
+
elementConfigs[21]['w'] = 53
|
|
485
|
+
elementConfigs[21]['h'] = 25
|
|
486
|
+
elementConfigs[21]['map'] = component.sprite
|
|
487
|
+
elementConfigs[21]['frame'] = 'max'
|
|
488
|
+
elms[21].populate(elementConfigs[21])
|
|
808
489
|
|
|
809
|
-
if (inSlot === true
|
|
810
|
-
|
|
490
|
+
if (inSlot === true) {
|
|
491
|
+
slotChildCounter -= 1
|
|
811
492
|
}
|
|
812
493
|
|
|
813
|
-
parent = elms[
|
|
494
|
+
parent = elms[20]
|
|
814
495
|
elementConfigs[22] = {}
|
|
815
496
|
|
|
816
497
|
elms[22] = this.element(
|
|
@@ -818,16 +499,14 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
818
499
|
inSlot === true ? slotComponent : component
|
|
819
500
|
)
|
|
820
501
|
|
|
821
|
-
elementConfigs[22]['x'] =
|
|
822
|
-
elementConfigs[22]['y'] =
|
|
502
|
+
elementConfigs[22]['x'] = 63
|
|
503
|
+
elementConfigs[22]['y'] = 2
|
|
823
504
|
elms[22].populate(elementConfigs[22])
|
|
824
505
|
|
|
825
506
|
if (inSlot === true) {
|
|
826
507
|
slotChildCounter -= 1
|
|
827
508
|
}
|
|
828
509
|
|
|
829
|
-
cmps[23] = (context.components && context.components['Sprite']) || components['Sprite']
|
|
830
|
-
|
|
831
510
|
parent = elms[22]
|
|
832
511
|
elementConfigs[23] = {}
|
|
833
512
|
|
|
@@ -836,688 +515,61 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
836
515
|
inSlot === true ? slotComponent : component
|
|
837
516
|
)
|
|
838
517
|
|
|
839
|
-
elementConfigs[23]['
|
|
518
|
+
elementConfigs[23][Symbol.for('isSprite')] = true
|
|
840
519
|
elementConfigs[23]['image'] = component.image
|
|
841
|
-
elementConfigs[23]['x'] =
|
|
842
|
-
elementConfigs[23]['
|
|
843
|
-
elementConfigs[23]['
|
|
520
|
+
elementConfigs[23]['x'] = 0
|
|
521
|
+
elementConfigs[23]['h'] = 20
|
|
522
|
+
elementConfigs[23]['w'] = 20
|
|
844
523
|
elementConfigs[23]['map'] = component.sprite
|
|
845
|
-
elementConfigs[23]['frame'] =
|
|
846
|
-
|
|
847
|
-
skips[23] = []
|
|
848
|
-
if (typeof cmps[23] !== 'undefined' && cmps[23][Symbol.for('config')].props !== undefined) {
|
|
849
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
850
|
-
let props = cmps[23][Symbol.for('config')].props
|
|
851
|
-
if (Array.isArray(props) === false)
|
|
852
|
-
props = Object.keys(cmps[23][Symbol.for('config')].props)
|
|
853
|
-
for (let k = 0; k < props.length; k++) {
|
|
854
|
-
const key = props[k]
|
|
855
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
856
|
-
delete elementConfigs[23][key]
|
|
857
|
-
skips[23].push(key)
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
|
|
524
|
+
elementConfigs[23]['frame'] = component.maxFps[0]
|
|
861
525
|
elms[23].populate(elementConfigs[23])
|
|
862
526
|
|
|
863
527
|
if (inSlot === true) {
|
|
864
528
|
slotChildCounter -= 1
|
|
865
529
|
}
|
|
866
530
|
|
|
867
|
-
parent = elms[23]
|
|
868
|
-
props[24] = {}
|
|
869
|
-
props[24]['image'] = component.image
|
|
870
|
-
props[24]['x'] = '-2'
|
|
871
|
-
props[24]['w'] = 47
|
|
872
|
-
props[24]['h'] = 25
|
|
873
|
-
props[24]['map'] = component.sprite
|
|
874
|
-
props[24]['frame'] = 'min'
|
|
875
|
-
|
|
876
|
-
componentType = props[24]['is'] || 'Sprite'
|
|
877
|
-
|
|
878
|
-
components[24]
|
|
879
|
-
if (typeof componentType === 'string') {
|
|
880
|
-
components[24] =
|
|
881
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
882
|
-
if (!components[24]) {
|
|
883
|
-
throw new Error('Component "Sprite" not found')
|
|
884
|
-
}
|
|
885
|
-
} else if (
|
|
886
|
-
typeof componentType === 'function' &&
|
|
887
|
-
componentType[Symbol.for('isComponent')] === true
|
|
888
|
-
) {
|
|
889
|
-
components[24] = componentType
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
elms[24] = components[24].call(null, { props: props[24] }, elms[23], component)
|
|
893
|
-
|
|
894
|
-
if (elms[24][Symbol.for('slots')][0]) {
|
|
895
|
-
parent = elms[24][Symbol.for('slots')][0]
|
|
896
|
-
slotComponent = elms[24]
|
|
897
|
-
inSlot = true
|
|
898
|
-
} else {
|
|
899
|
-
parent = elms[24][Symbol.for('children')][0]
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
if (inSlot === true && slotChildCounter === 0) {
|
|
903
|
-
inSlot = false
|
|
904
|
-
}
|
|
905
|
-
|
|
906
531
|
parent = elms[22]
|
|
907
|
-
elementConfigs[
|
|
908
|
-
|
|
909
|
-
elms[25] = this.element(
|
|
910
|
-
{ parent: parent || 'root' },
|
|
911
|
-
inSlot === true ? slotComponent : component
|
|
912
|
-
)
|
|
913
|
-
|
|
914
|
-
elementConfigs[25]['x'] = 58
|
|
915
|
-
elementConfigs[25]['y'] = 2
|
|
916
|
-
elms[25].populate(elementConfigs[25])
|
|
917
|
-
|
|
918
|
-
if (inSlot === true) {
|
|
919
|
-
slotChildCounter -= 1
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
cmps[26] = (context.components && context.components['Sprite']) || components['Sprite']
|
|
923
|
-
|
|
924
|
-
parent = elms[25]
|
|
925
|
-
elementConfigs[26] = {}
|
|
926
|
-
|
|
927
|
-
elms[26] = this.element(
|
|
928
|
-
{ parent: parent || 'root' },
|
|
929
|
-
inSlot === true ? slotComponent : component
|
|
930
|
-
)
|
|
931
|
-
|
|
932
|
-
elementConfigs[26]['holder'] = true
|
|
933
|
-
elementConfigs[26]['image'] = component.image
|
|
934
|
-
elementConfigs[26]['x'] = 0
|
|
935
|
-
elementConfigs[26]['h'] = 20
|
|
936
|
-
elementConfigs[26]['w'] = 20
|
|
937
|
-
elementConfigs[26]['map'] = component.sprite
|
|
938
|
-
elementConfigs[26]['frame'] = component.minFps[0]
|
|
939
|
-
|
|
940
|
-
skips[26] = []
|
|
941
|
-
if (typeof cmps[26] !== 'undefined' && cmps[26][Symbol.for('config')].props !== undefined) {
|
|
942
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
943
|
-
let props = cmps[26][Symbol.for('config')].props
|
|
944
|
-
if (Array.isArray(props) === false)
|
|
945
|
-
props = Object.keys(cmps[26][Symbol.for('config')].props)
|
|
946
|
-
for (let k = 0; k < props.length; k++) {
|
|
947
|
-
const key = props[k]
|
|
948
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
949
|
-
delete elementConfigs[26][key]
|
|
950
|
-
skips[26].push(key)
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
elms[26].populate(elementConfigs[26])
|
|
955
|
-
|
|
956
|
-
if (inSlot === true) {
|
|
957
|
-
slotChildCounter -= 1
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
parent = elms[26]
|
|
961
|
-
props[27] = {}
|
|
962
|
-
props[27]['image'] = component.image
|
|
963
|
-
props[27]['x'] = 0
|
|
964
|
-
props[27]['h'] = 20
|
|
965
|
-
props[27]['w'] = 20
|
|
966
|
-
props[27]['map'] = component.sprite
|
|
967
|
-
|
|
968
|
-
propData = component.minFps[0]
|
|
969
|
-
if (Array.isArray(propData) === true) {
|
|
970
|
-
propData = getRaw(propData).slice(0)
|
|
971
|
-
}
|
|
972
|
-
props[27]['frame'] = propData
|
|
973
|
-
|
|
974
|
-
componentType = props[27]['is'] || 'Sprite'
|
|
975
|
-
|
|
976
|
-
components[27]
|
|
977
|
-
if (typeof componentType === 'string') {
|
|
978
|
-
components[27] =
|
|
979
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
980
|
-
if (!components[27]) {
|
|
981
|
-
throw new Error('Component "Sprite" not found')
|
|
982
|
-
}
|
|
983
|
-
} else if (
|
|
984
|
-
typeof componentType === 'function' &&
|
|
985
|
-
componentType[Symbol.for('isComponent')] === true
|
|
986
|
-
) {
|
|
987
|
-
components[27] = componentType
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
elms[27] = components[27].call(null, { props: props[27] }, elms[26], component)
|
|
991
|
-
|
|
992
|
-
if (elms[27][Symbol.for('slots')][0]) {
|
|
993
|
-
parent = elms[27][Symbol.for('slots')][0]
|
|
994
|
-
slotComponent = elms[27]
|
|
995
|
-
inSlot = true
|
|
996
|
-
} else {
|
|
997
|
-
parent = elms[27][Symbol.for('children')][0]
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
if (inSlot === true && slotChildCounter === 0) {
|
|
1001
|
-
inSlot = false
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
cmps[28] = (context.components && context.components['Sprite']) || components['Sprite']
|
|
1005
|
-
|
|
1006
|
-
parent = elms[25]
|
|
1007
|
-
elementConfigs[28] = {}
|
|
1008
|
-
|
|
1009
|
-
elms[28] = this.element(
|
|
1010
|
-
{ parent: parent || 'root' },
|
|
1011
|
-
inSlot === true ? slotComponent : component
|
|
1012
|
-
)
|
|
1013
|
-
|
|
1014
|
-
elementConfigs[28]['holder'] = true
|
|
1015
|
-
elementConfigs[28]['image'] = component.image
|
|
1016
|
-
elementConfigs[28]['x'] = 18
|
|
1017
|
-
elementConfigs[28]['h'] = 20
|
|
1018
|
-
elementConfigs[28]['w'] = 20
|
|
1019
|
-
elementConfigs[28]['map'] = component.sprite
|
|
1020
|
-
elementConfigs[28]['frame'] = component.minFps[1]
|
|
1021
|
-
|
|
1022
|
-
skips[28] = []
|
|
1023
|
-
if (typeof cmps[28] !== 'undefined' && cmps[28][Symbol.for('config')].props !== undefined) {
|
|
1024
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
1025
|
-
let props = cmps[28][Symbol.for('config')].props
|
|
1026
|
-
if (Array.isArray(props) === false)
|
|
1027
|
-
props = Object.keys(cmps[28][Symbol.for('config')].props)
|
|
1028
|
-
for (let k = 0; k < props.length; k++) {
|
|
1029
|
-
const key = props[k]
|
|
1030
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
1031
|
-
delete elementConfigs[28][key]
|
|
1032
|
-
skips[28].push(key)
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
elms[28].populate(elementConfigs[28])
|
|
1037
|
-
|
|
1038
|
-
if (inSlot === true) {
|
|
1039
|
-
slotChildCounter -= 1
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
parent = elms[28]
|
|
1043
|
-
props[29] = {}
|
|
1044
|
-
props[29]['image'] = component.image
|
|
1045
|
-
props[29]['x'] = 18
|
|
1046
|
-
props[29]['h'] = 20
|
|
1047
|
-
props[29]['w'] = 20
|
|
1048
|
-
props[29]['map'] = component.sprite
|
|
1049
|
-
|
|
1050
|
-
propData = component.minFps[1]
|
|
1051
|
-
if (Array.isArray(propData) === true) {
|
|
1052
|
-
propData = getRaw(propData).slice(0)
|
|
1053
|
-
}
|
|
1054
|
-
props[29]['frame'] = propData
|
|
1055
|
-
|
|
1056
|
-
componentType = props[29]['is'] || 'Sprite'
|
|
1057
|
-
|
|
1058
|
-
components[29]
|
|
1059
|
-
if (typeof componentType === 'string') {
|
|
1060
|
-
components[29] =
|
|
1061
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
1062
|
-
if (!components[29]) {
|
|
1063
|
-
throw new Error('Component "Sprite" not found')
|
|
1064
|
-
}
|
|
1065
|
-
} else if (
|
|
1066
|
-
typeof componentType === 'function' &&
|
|
1067
|
-
componentType[Symbol.for('isComponent')] === true
|
|
1068
|
-
) {
|
|
1069
|
-
components[29] = componentType
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
elms[29] = components[29].call(null, { props: props[29] }, elms[28], component)
|
|
1073
|
-
|
|
1074
|
-
if (elms[29][Symbol.for('slots')][0]) {
|
|
1075
|
-
parent = elms[29][Symbol.for('slots')][0]
|
|
1076
|
-
slotComponent = elms[29]
|
|
1077
|
-
inSlot = true
|
|
1078
|
-
} else {
|
|
1079
|
-
parent = elms[29][Symbol.for('children')][0]
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
if (inSlot === true && slotChildCounter === 0) {
|
|
1083
|
-
inSlot = false
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
cmps[30] = (context.components && context.components['Sprite']) || components['Sprite']
|
|
532
|
+
elementConfigs[24] = {}
|
|
1087
533
|
|
|
1088
|
-
|
|
1089
|
-
elementConfigs[30] = {}
|
|
1090
|
-
|
|
1091
|
-
elms[30] = this.element(
|
|
1092
|
-
{ parent: parent || 'root' },
|
|
1093
|
-
inSlot === true ? slotComponent : component
|
|
1094
|
-
)
|
|
1095
|
-
|
|
1096
|
-
elementConfigs[30]['holder'] = true
|
|
1097
|
-
elementConfigs[30]['image'] = component.image
|
|
1098
|
-
elementConfigs[30]['x'] = 36
|
|
1099
|
-
elementConfigs[30]['h'] = 20
|
|
1100
|
-
elementConfigs[30]['w'] = 20
|
|
1101
|
-
elementConfigs[30]['map'] = component.sprite
|
|
1102
|
-
elementConfigs[30]['frame'] = component.minFps[2]
|
|
1103
|
-
|
|
1104
|
-
skips[30] = []
|
|
1105
|
-
if (typeof cmps[30] !== 'undefined' && cmps[30][Symbol.for('config')].props !== undefined) {
|
|
1106
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
1107
|
-
let props = cmps[30][Symbol.for('config')].props
|
|
1108
|
-
if (Array.isArray(props) === false)
|
|
1109
|
-
props = Object.keys(cmps[30][Symbol.for('config')].props)
|
|
1110
|
-
for (let k = 0; k < props.length; k++) {
|
|
1111
|
-
const key = props[k]
|
|
1112
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
1113
|
-
delete elementConfigs[30][key]
|
|
1114
|
-
skips[30].push(key)
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
elms[30].populate(elementConfigs[30])
|
|
1119
|
-
|
|
1120
|
-
if (inSlot === true) {
|
|
1121
|
-
slotChildCounter -= 1
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
parent = elms[30]
|
|
1125
|
-
props[31] = {}
|
|
1126
|
-
props[31]['image'] = component.image
|
|
1127
|
-
props[31]['x'] = 36
|
|
1128
|
-
props[31]['h'] = 20
|
|
1129
|
-
props[31]['w'] = 20
|
|
1130
|
-
props[31]['map'] = component.sprite
|
|
1131
|
-
|
|
1132
|
-
propData = component.minFps[2]
|
|
1133
|
-
if (Array.isArray(propData) === true) {
|
|
1134
|
-
propData = getRaw(propData).slice(0)
|
|
1135
|
-
}
|
|
1136
|
-
props[31]['frame'] = propData
|
|
1137
|
-
|
|
1138
|
-
componentType = props[31]['is'] || 'Sprite'
|
|
1139
|
-
|
|
1140
|
-
components[31]
|
|
1141
|
-
if (typeof componentType === 'string') {
|
|
1142
|
-
components[31] =
|
|
1143
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
1144
|
-
if (!components[31]) {
|
|
1145
|
-
throw new Error('Component "Sprite" not found')
|
|
1146
|
-
}
|
|
1147
|
-
} else if (
|
|
1148
|
-
typeof componentType === 'function' &&
|
|
1149
|
-
componentType[Symbol.for('isComponent')] === true
|
|
1150
|
-
) {
|
|
1151
|
-
components[31] = componentType
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
elms[31] = components[31].call(null, { props: props[31] }, elms[30], component)
|
|
1155
|
-
|
|
1156
|
-
if (elms[31][Symbol.for('slots')][0]) {
|
|
1157
|
-
parent = elms[31][Symbol.for('slots')][0]
|
|
1158
|
-
slotComponent = elms[31]
|
|
1159
|
-
inSlot = true
|
|
1160
|
-
} else {
|
|
1161
|
-
parent = elms[31][Symbol.for('children')][0]
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
if (inSlot === true && slotChildCounter === 0) {
|
|
1165
|
-
inSlot = false
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
parent = elms[1]
|
|
1169
|
-
elementConfigs[32] = {}
|
|
1170
|
-
|
|
1171
|
-
elms[32] = this.element(
|
|
534
|
+
elms[24] = this.element(
|
|
1172
535
|
{ parent: parent || 'root' },
|
|
1173
536
|
inSlot === true ? slotComponent : component
|
|
1174
537
|
)
|
|
1175
538
|
|
|
1176
|
-
elementConfigs[
|
|
1177
|
-
elementConfigs[
|
|
1178
|
-
|
|
539
|
+
elementConfigs[24][Symbol.for('isSprite')] = true
|
|
540
|
+
elementConfigs[24]['image'] = component.image
|
|
541
|
+
elementConfigs[24]['x'] = 18
|
|
542
|
+
elementConfigs[24]['h'] = 20
|
|
543
|
+
elementConfigs[24]['w'] = 20
|
|
544
|
+
elementConfigs[24]['map'] = component.sprite
|
|
545
|
+
elementConfigs[24]['frame'] = component.maxFps[1]
|
|
546
|
+
elms[24].populate(elementConfigs[24])
|
|
1179
547
|
|
|
1180
548
|
if (inSlot === true) {
|
|
1181
549
|
slotChildCounter -= 1
|
|
1182
550
|
}
|
|
1183
551
|
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
parent = elms[32]
|
|
1187
|
-
elementConfigs[33] = {}
|
|
1188
|
-
|
|
1189
|
-
elms[33] = this.element(
|
|
1190
|
-
{ parent: parent || 'root' },
|
|
1191
|
-
inSlot === true ? slotComponent : component
|
|
1192
|
-
)
|
|
1193
|
-
|
|
1194
|
-
elementConfigs[33]['holder'] = true
|
|
1195
|
-
elementConfigs[33]['image'] = component.image
|
|
1196
|
-
elementConfigs[33]['w'] = 53
|
|
1197
|
-
elementConfigs[33]['h'] = 25
|
|
1198
|
-
elementConfigs[33]['map'] = component.sprite
|
|
1199
|
-
elementConfigs[33]['frame'] = 'max'
|
|
1200
|
-
|
|
1201
|
-
skips[33] = []
|
|
1202
|
-
if (typeof cmps[33] !== 'undefined' && cmps[33][Symbol.for('config')].props !== undefined) {
|
|
1203
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
1204
|
-
let props = cmps[33][Symbol.for('config')].props
|
|
1205
|
-
if (Array.isArray(props) === false)
|
|
1206
|
-
props = Object.keys(cmps[33][Symbol.for('config')].props)
|
|
1207
|
-
for (let k = 0; k < props.length; k++) {
|
|
1208
|
-
const key = props[k]
|
|
1209
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
1210
|
-
delete elementConfigs[33][key]
|
|
1211
|
-
skips[33].push(key)
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
elms[33].populate(elementConfigs[33])
|
|
1216
|
-
|
|
1217
|
-
if (inSlot === true) {
|
|
1218
|
-
slotChildCounter -= 1
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
parent = elms[33]
|
|
1222
|
-
props[34] = {}
|
|
1223
|
-
props[34]['image'] = component.image
|
|
1224
|
-
props[34]['w'] = 53
|
|
1225
|
-
props[34]['h'] = 25
|
|
1226
|
-
props[34]['map'] = component.sprite
|
|
1227
|
-
props[34]['frame'] = 'max'
|
|
1228
|
-
|
|
1229
|
-
componentType = props[34]['is'] || 'Sprite'
|
|
1230
|
-
|
|
1231
|
-
components[34]
|
|
1232
|
-
if (typeof componentType === 'string') {
|
|
1233
|
-
components[34] =
|
|
1234
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
1235
|
-
if (!components[34]) {
|
|
1236
|
-
throw new Error('Component "Sprite" not found')
|
|
1237
|
-
}
|
|
1238
|
-
} else if (
|
|
1239
|
-
typeof componentType === 'function' &&
|
|
1240
|
-
componentType[Symbol.for('isComponent')] === true
|
|
1241
|
-
) {
|
|
1242
|
-
components[34] = componentType
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
elms[34] = components[34].call(null, { props: props[34] }, elms[33], component)
|
|
1246
|
-
|
|
1247
|
-
if (elms[34][Symbol.for('slots')][0]) {
|
|
1248
|
-
parent = elms[34][Symbol.for('slots')][0]
|
|
1249
|
-
slotComponent = elms[34]
|
|
1250
|
-
inSlot = true
|
|
1251
|
-
} else {
|
|
1252
|
-
parent = elms[34][Symbol.for('children')][0]
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
if (inSlot === true && slotChildCounter === 0) {
|
|
1256
|
-
inSlot = false
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
parent = elms[32]
|
|
1260
|
-
elementConfigs[35] = {}
|
|
1261
|
-
|
|
1262
|
-
elms[35] = this.element(
|
|
1263
|
-
{ parent: parent || 'root' },
|
|
1264
|
-
inSlot === true ? slotComponent : component
|
|
1265
|
-
)
|
|
1266
|
-
|
|
1267
|
-
elementConfigs[35]['x'] = 63
|
|
1268
|
-
elementConfigs[35]['y'] = 2
|
|
1269
|
-
elms[35].populate(elementConfigs[35])
|
|
1270
|
-
|
|
1271
|
-
if (inSlot === true) {
|
|
1272
|
-
slotChildCounter -= 1
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
cmps[36] = (context.components && context.components['Sprite']) || components['Sprite']
|
|
1276
|
-
|
|
1277
|
-
parent = elms[35]
|
|
1278
|
-
elementConfigs[36] = {}
|
|
1279
|
-
|
|
1280
|
-
elms[36] = this.element(
|
|
1281
|
-
{ parent: parent || 'root' },
|
|
1282
|
-
inSlot === true ? slotComponent : component
|
|
1283
|
-
)
|
|
1284
|
-
|
|
1285
|
-
elementConfigs[36]['holder'] = true
|
|
1286
|
-
elementConfigs[36]['image'] = component.image
|
|
1287
|
-
elementConfigs[36]['x'] = 0
|
|
1288
|
-
elementConfigs[36]['h'] = 20
|
|
1289
|
-
elementConfigs[36]['w'] = 20
|
|
1290
|
-
elementConfigs[36]['map'] = component.sprite
|
|
1291
|
-
elementConfigs[36]['frame'] = component.maxFps[0]
|
|
1292
|
-
|
|
1293
|
-
skips[36] = []
|
|
1294
|
-
if (typeof cmps[36] !== 'undefined' && cmps[36][Symbol.for('config')].props !== undefined) {
|
|
1295
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
1296
|
-
let props = cmps[36][Symbol.for('config')].props
|
|
1297
|
-
if (Array.isArray(props) === false)
|
|
1298
|
-
props = Object.keys(cmps[36][Symbol.for('config')].props)
|
|
1299
|
-
for (let k = 0; k < props.length; k++) {
|
|
1300
|
-
const key = props[k]
|
|
1301
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
1302
|
-
delete elementConfigs[36][key]
|
|
1303
|
-
skips[36].push(key)
|
|
1304
|
-
}
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
elms[36].populate(elementConfigs[36])
|
|
1308
|
-
|
|
1309
|
-
if (inSlot === true) {
|
|
1310
|
-
slotChildCounter -= 1
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
parent = elms[36]
|
|
1314
|
-
props[37] = {}
|
|
1315
|
-
props[37]['image'] = component.image
|
|
1316
|
-
props[37]['x'] = 0
|
|
1317
|
-
props[37]['h'] = 20
|
|
1318
|
-
props[37]['w'] = 20
|
|
1319
|
-
props[37]['map'] = component.sprite
|
|
1320
|
-
|
|
1321
|
-
propData = component.maxFps[0]
|
|
1322
|
-
if (Array.isArray(propData) === true) {
|
|
1323
|
-
propData = getRaw(propData).slice(0)
|
|
1324
|
-
}
|
|
1325
|
-
props[37]['frame'] = propData
|
|
1326
|
-
|
|
1327
|
-
componentType = props[37]['is'] || 'Sprite'
|
|
1328
|
-
|
|
1329
|
-
components[37]
|
|
1330
|
-
if (typeof componentType === 'string') {
|
|
1331
|
-
components[37] =
|
|
1332
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
1333
|
-
if (!components[37]) {
|
|
1334
|
-
throw new Error('Component "Sprite" not found')
|
|
1335
|
-
}
|
|
1336
|
-
} else if (
|
|
1337
|
-
typeof componentType === 'function' &&
|
|
1338
|
-
componentType[Symbol.for('isComponent')] === true
|
|
1339
|
-
) {
|
|
1340
|
-
components[37] = componentType
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
elms[37] = components[37].call(null, { props: props[37] }, elms[36], component)
|
|
1344
|
-
|
|
1345
|
-
if (elms[37][Symbol.for('slots')][0]) {
|
|
1346
|
-
parent = elms[37][Symbol.for('slots')][0]
|
|
1347
|
-
slotComponent = elms[37]
|
|
1348
|
-
inSlot = true
|
|
1349
|
-
} else {
|
|
1350
|
-
parent = elms[37][Symbol.for('children')][0]
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
if (inSlot === true && slotChildCounter === 0) {
|
|
1354
|
-
inSlot = false
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
cmps[38] = (context.components && context.components['Sprite']) || components['Sprite']
|
|
1358
|
-
|
|
1359
|
-
parent = elms[35]
|
|
1360
|
-
elementConfigs[38] = {}
|
|
1361
|
-
|
|
1362
|
-
elms[38] = this.element(
|
|
1363
|
-
{ parent: parent || 'root' },
|
|
1364
|
-
inSlot === true ? slotComponent : component
|
|
1365
|
-
)
|
|
1366
|
-
|
|
1367
|
-
elementConfigs[38]['holder'] = true
|
|
1368
|
-
elementConfigs[38]['image'] = component.image
|
|
1369
|
-
elementConfigs[38]['x'] = 18
|
|
1370
|
-
elementConfigs[38]['h'] = 20
|
|
1371
|
-
elementConfigs[38]['w'] = 20
|
|
1372
|
-
elementConfigs[38]['map'] = component.sprite
|
|
1373
|
-
elementConfigs[38]['frame'] = component.maxFps[1]
|
|
1374
|
-
|
|
1375
|
-
skips[38] = []
|
|
1376
|
-
if (typeof cmps[38] !== 'undefined' && cmps[38][Symbol.for('config')].props !== undefined) {
|
|
1377
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
1378
|
-
let props = cmps[38][Symbol.for('config')].props
|
|
1379
|
-
if (Array.isArray(props) === false)
|
|
1380
|
-
props = Object.keys(cmps[38][Symbol.for('config')].props)
|
|
1381
|
-
for (let k = 0; k < props.length; k++) {
|
|
1382
|
-
const key = props[k]
|
|
1383
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
1384
|
-
delete elementConfigs[38][key]
|
|
1385
|
-
skips[38].push(key)
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
elms[38].populate(elementConfigs[38])
|
|
1390
|
-
|
|
1391
|
-
if (inSlot === true) {
|
|
1392
|
-
slotChildCounter -= 1
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
parent = elms[38]
|
|
1396
|
-
props[39] = {}
|
|
1397
|
-
props[39]['image'] = component.image
|
|
1398
|
-
props[39]['x'] = 18
|
|
1399
|
-
props[39]['h'] = 20
|
|
1400
|
-
props[39]['w'] = 20
|
|
1401
|
-
props[39]['map'] = component.sprite
|
|
1402
|
-
|
|
1403
|
-
propData = component.maxFps[1]
|
|
1404
|
-
if (Array.isArray(propData) === true) {
|
|
1405
|
-
propData = getRaw(propData).slice(0)
|
|
1406
|
-
}
|
|
1407
|
-
props[39]['frame'] = propData
|
|
1408
|
-
|
|
1409
|
-
componentType = props[39]['is'] || 'Sprite'
|
|
1410
|
-
|
|
1411
|
-
components[39]
|
|
1412
|
-
if (typeof componentType === 'string') {
|
|
1413
|
-
components[39] =
|
|
1414
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
1415
|
-
if (!components[39]) {
|
|
1416
|
-
throw new Error('Component "Sprite" not found')
|
|
1417
|
-
}
|
|
1418
|
-
} else if (
|
|
1419
|
-
typeof componentType === 'function' &&
|
|
1420
|
-
componentType[Symbol.for('isComponent')] === true
|
|
1421
|
-
) {
|
|
1422
|
-
components[39] = componentType
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
elms[39] = components[39].call(null, { props: props[39] }, elms[38], component)
|
|
1426
|
-
|
|
1427
|
-
if (elms[39][Symbol.for('slots')][0]) {
|
|
1428
|
-
parent = elms[39][Symbol.for('slots')][0]
|
|
1429
|
-
slotComponent = elms[39]
|
|
1430
|
-
inSlot = true
|
|
1431
|
-
} else {
|
|
1432
|
-
parent = elms[39][Symbol.for('children')][0]
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
if (inSlot === true && slotChildCounter === 0) {
|
|
1436
|
-
inSlot = false
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
cmps[40] = (context.components && context.components['Sprite']) || components['Sprite']
|
|
1440
|
-
|
|
1441
|
-
parent = elms[35]
|
|
1442
|
-
elementConfigs[40] = {}
|
|
552
|
+
parent = elms[22]
|
|
553
|
+
elementConfigs[25] = {}
|
|
1443
554
|
|
|
1444
|
-
elms[
|
|
555
|
+
elms[25] = this.element(
|
|
1445
556
|
{ parent: parent || 'root' },
|
|
1446
557
|
inSlot === true ? slotComponent : component
|
|
1447
558
|
)
|
|
1448
559
|
|
|
1449
|
-
elementConfigs[
|
|
1450
|
-
elementConfigs[
|
|
1451
|
-
elementConfigs[
|
|
1452
|
-
elementConfigs[
|
|
1453
|
-
elementConfigs[
|
|
1454
|
-
elementConfigs[
|
|
1455
|
-
elementConfigs[
|
|
1456
|
-
|
|
1457
|
-
skips[40] = []
|
|
1458
|
-
if (typeof cmps[40] !== 'undefined' && cmps[40][Symbol.for('config')].props !== undefined) {
|
|
1459
|
-
// attributes that are a prop should be removed from element config (even if it's a know element prop)
|
|
1460
|
-
let props = cmps[40][Symbol.for('config')].props
|
|
1461
|
-
if (Array.isArray(props) === false)
|
|
1462
|
-
props = Object.keys(cmps[40][Symbol.for('config')].props)
|
|
1463
|
-
for (let k = 0; k < props.length; k++) {
|
|
1464
|
-
const key = props[k]
|
|
1465
|
-
if (validAttributes.indexOf(key) !== -1) continue
|
|
1466
|
-
delete elementConfigs[40][key]
|
|
1467
|
-
skips[40].push(key)
|
|
1468
|
-
}
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
|
-
elms[40].populate(elementConfigs[40])
|
|
560
|
+
elementConfigs[25][Symbol.for('isSprite')] = true
|
|
561
|
+
elementConfigs[25]['image'] = component.image
|
|
562
|
+
elementConfigs[25]['x'] = 36
|
|
563
|
+
elementConfigs[25]['h'] = 20
|
|
564
|
+
elementConfigs[25]['w'] = 20
|
|
565
|
+
elementConfigs[25]['map'] = component.sprite
|
|
566
|
+
elementConfigs[25]['frame'] = component.maxFps[2]
|
|
567
|
+
elms[25].populate(elementConfigs[25])
|
|
1472
568
|
|
|
1473
569
|
if (inSlot === true) {
|
|
1474
570
|
slotChildCounter -= 1
|
|
1475
571
|
}
|
|
1476
572
|
|
|
1477
|
-
parent = elms[40]
|
|
1478
|
-
props[41] = {}
|
|
1479
|
-
props[41]['image'] = component.image
|
|
1480
|
-
props[41]['x'] = 36
|
|
1481
|
-
props[41]['h'] = 20
|
|
1482
|
-
props[41]['w'] = 20
|
|
1483
|
-
props[41]['map'] = component.sprite
|
|
1484
|
-
|
|
1485
|
-
propData = component.maxFps[2]
|
|
1486
|
-
if (Array.isArray(propData) === true) {
|
|
1487
|
-
propData = getRaw(propData).slice(0)
|
|
1488
|
-
}
|
|
1489
|
-
props[41]['frame'] = propData
|
|
1490
|
-
|
|
1491
|
-
componentType = props[41]['is'] || 'Sprite'
|
|
1492
|
-
|
|
1493
|
-
components[41]
|
|
1494
|
-
if (typeof componentType === 'string') {
|
|
1495
|
-
components[41] =
|
|
1496
|
-
(context.components && context.components[componentType]) || components[componentType]
|
|
1497
|
-
if (!components[41]) {
|
|
1498
|
-
throw new Error('Component "Sprite" not found')
|
|
1499
|
-
}
|
|
1500
|
-
} else if (
|
|
1501
|
-
typeof componentType === 'function' &&
|
|
1502
|
-
componentType[Symbol.for('isComponent')] === true
|
|
1503
|
-
) {
|
|
1504
|
-
components[41] = componentType
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
elms[41] = components[41].call(null, { props: props[41] }, elms[40], component)
|
|
1508
|
-
|
|
1509
|
-
if (elms[41][Symbol.for('slots')][0]) {
|
|
1510
|
-
parent = elms[41][Symbol.for('slots')][0]
|
|
1511
|
-
slotComponent = elms[41]
|
|
1512
|
-
inSlot = true
|
|
1513
|
-
} else {
|
|
1514
|
-
parent = elms[41][Symbol.for('children')][0]
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
if (inSlot === true && slotChildCounter === 0) {
|
|
1518
|
-
inSlot = false
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
573
|
return {
|
|
1522
574
|
elms,
|
|
1523
575
|
cleanup: () => {
|
|
@@ -1525,86 +577,6 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
1525
577
|
propData = null
|
|
1526
578
|
slotComponent = null
|
|
1527
579
|
parent = null
|
|
1528
|
-
|
|
1529
|
-
cmps[3] = null
|
|
1530
|
-
|
|
1531
|
-
props[4] = null
|
|
1532
|
-
components[4] = null
|
|
1533
|
-
|
|
1534
|
-
cmps[6] = null
|
|
1535
|
-
|
|
1536
|
-
props[7] = null
|
|
1537
|
-
components[7] = null
|
|
1538
|
-
|
|
1539
|
-
cmps[8] = null
|
|
1540
|
-
|
|
1541
|
-
props[9] = null
|
|
1542
|
-
components[9] = null
|
|
1543
|
-
|
|
1544
|
-
cmps[10] = null
|
|
1545
|
-
|
|
1546
|
-
props[11] = null
|
|
1547
|
-
components[11] = null
|
|
1548
|
-
|
|
1549
|
-
cmps[13] = null
|
|
1550
|
-
|
|
1551
|
-
props[14] = null
|
|
1552
|
-
components[14] = null
|
|
1553
|
-
|
|
1554
|
-
cmps[16] = null
|
|
1555
|
-
|
|
1556
|
-
props[17] = null
|
|
1557
|
-
components[17] = null
|
|
1558
|
-
|
|
1559
|
-
cmps[18] = null
|
|
1560
|
-
|
|
1561
|
-
props[19] = null
|
|
1562
|
-
components[19] = null
|
|
1563
|
-
|
|
1564
|
-
cmps[20] = null
|
|
1565
|
-
|
|
1566
|
-
props[21] = null
|
|
1567
|
-
components[21] = null
|
|
1568
|
-
|
|
1569
|
-
cmps[23] = null
|
|
1570
|
-
|
|
1571
|
-
props[24] = null
|
|
1572
|
-
components[24] = null
|
|
1573
|
-
|
|
1574
|
-
cmps[26] = null
|
|
1575
|
-
|
|
1576
|
-
props[27] = null
|
|
1577
|
-
components[27] = null
|
|
1578
|
-
|
|
1579
|
-
cmps[28] = null
|
|
1580
|
-
|
|
1581
|
-
props[29] = null
|
|
1582
|
-
components[29] = null
|
|
1583
|
-
|
|
1584
|
-
cmps[30] = null
|
|
1585
|
-
|
|
1586
|
-
props[31] = null
|
|
1587
|
-
components[31] = null
|
|
1588
|
-
|
|
1589
|
-
cmps[33] = null
|
|
1590
|
-
|
|
1591
|
-
props[34] = null
|
|
1592
|
-
components[34] = null
|
|
1593
|
-
|
|
1594
|
-
cmps[36] = null
|
|
1595
|
-
|
|
1596
|
-
props[37] = null
|
|
1597
|
-
components[37] = null
|
|
1598
|
-
|
|
1599
|
-
cmps[38] = null
|
|
1600
|
-
|
|
1601
|
-
props[39] = null
|
|
1602
|
-
components[39] = null
|
|
1603
|
-
|
|
1604
|
-
cmps[40] = null
|
|
1605
|
-
|
|
1606
|
-
props[41] = null
|
|
1607
|
-
components[41] = null
|
|
1608
580
|
component = null
|
|
1609
581
|
cmps.length = 0
|
|
1610
582
|
elms.length = 0
|
|
@@ -1619,136 +591,40 @@ export const FPScounter = Blits.Component('FPScounter', {
|
|
|
1619
591
|
},
|
|
1620
592
|
effects: [
|
|
1621
593
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1622
|
-
|
|
1623
|
-
typeof skips === 'undefined' ||
|
|
1624
|
-
typeof skips[6] === 'undefined' ||
|
|
1625
|
-
skips[6].indexOf('frame') === -1
|
|
1626
|
-
)
|
|
1627
|
-
elms[6].set('frame', component.fps[0])
|
|
1628
|
-
},
|
|
1629
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1630
|
-
elms[7][Symbol.for('props')]['frame'] = component.fps[0]
|
|
1631
|
-
},
|
|
1632
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1633
|
-
if (
|
|
1634
|
-
typeof skips === 'undefined' ||
|
|
1635
|
-
typeof skips[8] === 'undefined' ||
|
|
1636
|
-
skips[8].indexOf('frame') === -1
|
|
1637
|
-
)
|
|
1638
|
-
elms[8].set('frame', component.fps[1])
|
|
1639
|
-
},
|
|
1640
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1641
|
-
elms[9][Symbol.for('props')]['frame'] = component.fps[1]
|
|
1642
|
-
},
|
|
1643
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1644
|
-
if (
|
|
1645
|
-
typeof skips === 'undefined' ||
|
|
1646
|
-
typeof skips[10] === 'undefined' ||
|
|
1647
|
-
skips[10].indexOf('frame') === -1
|
|
1648
|
-
)
|
|
1649
|
-
elms[10].set('frame', component.fps[2])
|
|
1650
|
-
},
|
|
1651
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1652
|
-
elms[11][Symbol.for('props')]['frame'] = component.fps[2]
|
|
1653
|
-
},
|
|
1654
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1655
|
-
if (
|
|
1656
|
-
typeof skips === 'undefined' ||
|
|
1657
|
-
typeof skips[16] === 'undefined' ||
|
|
1658
|
-
skips[16].indexOf('frame') === -1
|
|
1659
|
-
)
|
|
1660
|
-
elms[16].set('frame', component.avgFps[0])
|
|
1661
|
-
},
|
|
1662
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1663
|
-
elms[17][Symbol.for('props')]['frame'] = component.avgFps[0]
|
|
1664
|
-
},
|
|
1665
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1666
|
-
if (
|
|
1667
|
-
typeof skips === 'undefined' ||
|
|
1668
|
-
typeof skips[18] === 'undefined' ||
|
|
1669
|
-
skips[18].indexOf('frame') === -1
|
|
1670
|
-
)
|
|
1671
|
-
elms[18].set('frame', component.avgFps[1])
|
|
1672
|
-
},
|
|
1673
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1674
|
-
elms[19][Symbol.for('props')]['frame'] = component.avgFps[1]
|
|
1675
|
-
},
|
|
1676
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1677
|
-
if (
|
|
1678
|
-
typeof skips === 'undefined' ||
|
|
1679
|
-
typeof skips[20] === 'undefined' ||
|
|
1680
|
-
skips[20].indexOf('frame') === -1
|
|
1681
|
-
)
|
|
1682
|
-
elms[20].set('frame', component.avgFps[2])
|
|
1683
|
-
},
|
|
1684
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1685
|
-
elms[21][Symbol.for('props')]['frame'] = component.avgFps[2]
|
|
1686
|
-
},
|
|
1687
|
-
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1688
|
-
if (
|
|
1689
|
-
typeof skips === 'undefined' ||
|
|
1690
|
-
typeof skips[26] === 'undefined' ||
|
|
1691
|
-
skips[26].indexOf('frame') === -1
|
|
1692
|
-
)
|
|
1693
|
-
elms[26].set('frame', component.minFps[0])
|
|
594
|
+
elms[5].set('frame', component.fps[0])
|
|
1694
595
|
},
|
|
1695
596
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1696
|
-
elms[
|
|
597
|
+
elms[6].set('frame', component.fps[1])
|
|
1697
598
|
},
|
|
1698
599
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1699
|
-
|
|
1700
|
-
typeof skips === 'undefined' ||
|
|
1701
|
-
typeof skips[28] === 'undefined' ||
|
|
1702
|
-
skips[28].indexOf('frame') === -1
|
|
1703
|
-
)
|
|
1704
|
-
elms[28].set('frame', component.minFps[1])
|
|
600
|
+
elms[7].set('frame', component.fps[2])
|
|
1705
601
|
},
|
|
1706
602
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1707
|
-
elms[
|
|
603
|
+
elms[11].set('frame', component.avgFps[0])
|
|
1708
604
|
},
|
|
1709
605
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1710
|
-
|
|
1711
|
-
typeof skips === 'undefined' ||
|
|
1712
|
-
typeof skips[30] === 'undefined' ||
|
|
1713
|
-
skips[30].indexOf('frame') === -1
|
|
1714
|
-
)
|
|
1715
|
-
elms[30].set('frame', component.minFps[2])
|
|
606
|
+
elms[12].set('frame', component.avgFps[1])
|
|
1716
607
|
},
|
|
1717
608
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1718
|
-
elms[
|
|
609
|
+
elms[13].set('frame', component.avgFps[2])
|
|
1719
610
|
},
|
|
1720
611
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1721
|
-
|
|
1722
|
-
typeof skips === 'undefined' ||
|
|
1723
|
-
typeof skips[36] === 'undefined' ||
|
|
1724
|
-
skips[36].indexOf('frame') === -1
|
|
1725
|
-
)
|
|
1726
|
-
elms[36].set('frame', component.maxFps[0])
|
|
612
|
+
elms[17].set('frame', component.minFps[0])
|
|
1727
613
|
},
|
|
1728
614
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1729
|
-
elms[
|
|
615
|
+
elms[18].set('frame', component.minFps[1])
|
|
1730
616
|
},
|
|
1731
617
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1732
|
-
|
|
1733
|
-
typeof skips === 'undefined' ||
|
|
1734
|
-
typeof skips[38] === 'undefined' ||
|
|
1735
|
-
skips[38].indexOf('frame') === -1
|
|
1736
|
-
)
|
|
1737
|
-
elms[38].set('frame', component.maxFps[1])
|
|
618
|
+
elms[19].set('frame', component.minFps[2])
|
|
1738
619
|
},
|
|
1739
620
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1740
|
-
elms[
|
|
621
|
+
elms[23].set('frame', component.maxFps[0])
|
|
1741
622
|
},
|
|
1742
623
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1743
|
-
|
|
1744
|
-
typeof skips === 'undefined' ||
|
|
1745
|
-
typeof skips[40] === 'undefined' ||
|
|
1746
|
-
skips[40].indexOf('frame') === -1
|
|
1747
|
-
)
|
|
1748
|
-
elms[40].set('frame', component.maxFps[2])
|
|
624
|
+
elms[24].set('frame', component.maxFps[1])
|
|
1749
625
|
},
|
|
1750
626
|
function anonymous(component, elms, context, components, rootComponent, skips, effect) {
|
|
1751
|
-
elms[
|
|
627
|
+
elms[25].set('frame', component.maxFps[2])
|
|
1752
628
|
},
|
|
1753
629
|
],
|
|
1754
630
|
context: {},
|