@lightningjs/blits 1.30.2 → 1.31.1

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.
Files changed (152) hide show
  1. package/CHANGELOG.md +1035 -1019
  2. package/LICENSE +202 -202
  3. package/NOTICE +12 -12
  4. package/README.md +33 -33
  5. package/bin/index.js +8 -8
  6. package/blits.d.ts +6 -6
  7. package/index.d.ts +1099 -1099
  8. package/index.js +28 -28
  9. package/package.json +57 -56
  10. package/public/assets/fps_sprite.base64.js +1 -1
  11. package/scripts/postpublish.js +59 -59
  12. package/scripts/prepublishOnly.js +84 -84
  13. package/scripts/prepush.js +78 -78
  14. package/src/announcer/announcer.js +162 -162
  15. package/src/announcer/speechSynthesis.js +107 -107
  16. package/src/application.js +100 -100
  17. package/src/component/base/announcer.js +27 -27
  18. package/src/component/base/events.js +69 -69
  19. package/src/component/base/index.js +33 -33
  20. package/src/component/base/methods.js +244 -244
  21. package/src/component/base/router.js +41 -41
  22. package/src/component/base/timeouts_intervals.js +99 -99
  23. package/src/component/base/utils.js +72 -72
  24. package/src/component/setup/computed.js +48 -48
  25. package/src/component/setup/index.js +62 -62
  26. package/src/component/setup/input.js +30 -30
  27. package/src/component/setup/methods.js +37 -37
  28. package/src/component/setup/props.js +62 -62
  29. package/src/component/setup/routes.js +42 -42
  30. package/src/component/setup/state.js +59 -59
  31. package/src/component/setup/watch.js +35 -35
  32. package/src/component.js +437 -437
  33. package/src/components/Circle.js +73 -73
  34. package/src/components/FPScounter.js +1510 -1510
  35. package/src/components/RouterView.js +81 -81
  36. package/src/components/Sprite.js +94 -94
  37. package/src/components/index.js +28 -28
  38. package/src/constants.js +21 -21
  39. package/src/engine.js +1 -1
  40. package/src/engines/L3/element.js +744 -744
  41. package/src/engines/L3/fontLoader.js +38 -38
  42. package/src/engines/L3/index.js +7 -7
  43. package/src/engines/L3/launch.js +123 -123
  44. package/src/engines/L3/shaderLoader.js +12 -12
  45. package/src/engines/index.js +1 -1
  46. package/src/focus.js +90 -90
  47. package/src/helpers/deepEqualArray.js +50 -50
  48. package/src/helpers/fetchJson.js +34 -34
  49. package/src/helpers/sequence.js +26 -26
  50. package/src/launch.js +123 -123
  51. package/src/lib/blitsfileconverter/blitsfileconverter.js +52 -52
  52. package/src/lib/codegenerator/generator.js +788 -788
  53. package/src/lib/colors/colors.js +92 -92
  54. package/src/lib/colors/htmlColors.js +168 -168
  55. package/src/lib/componentId.js +49 -49
  56. package/src/lib/eventListeners.js +123 -123
  57. package/src/lib/hooks.js +59 -59
  58. package/src/lib/lifecycle.js +85 -85
  59. package/src/lib/log.js +117 -117
  60. package/src/lib/precompiler/precompiler.js +73 -73
  61. package/src/lib/reactivity/effect.js +93 -93
  62. package/src/lib/reactivity/reactive.js +208 -208
  63. package/src/lib/reactivityguard/computedprops.js +218 -218
  64. package/src/lib/symbols.js +108 -108
  65. package/src/lib/templateparser/parser.js +386 -386
  66. package/src/lib/utils.js +27 -27
  67. package/src/plugin.js +27 -27
  68. package/src/plugins/appstate.js +26 -26
  69. package/src/plugins/index.js +20 -20
  70. package/src/plugins/language.js +152 -152
  71. package/src/plugins/log.js +25 -25
  72. package/src/plugins/theme.js +94 -94
  73. package/src/router/router.js +516 -514
  74. package/src/router/transitions/fadeIn.js +27 -27
  75. package/src/router/transitions/fadeInOut.js +33 -33
  76. package/src/router/transitions/index.js +21 -21
  77. package/src/router/transitions/slideIn.js +28 -28
  78. package/src/router/transitions/slideInOut.js +33 -33
  79. package/src/settings.js +40 -40
  80. package/vite/blitsFileConverter.js +67 -67
  81. package/vite/index.js +28 -28
  82. package/vite/msdfGenerator.js +269 -269
  83. package/vite/preCompiler.js +47 -42
  84. package/vite/reactivityGuard.js +45 -45
  85. package/vscode/data/template-attributes.json +589 -589
  86. package/.editorconfig +0 -7
  87. package/.eslintignore +0 -1
  88. package/.eslintrc.cjs +0 -65
  89. package/.github/workflows/comment-lint-results.yml +0 -125
  90. package/.github/workflows/comment-test-results.yml +0 -109
  91. package/.github/workflows/deploy-docs.yml +0 -27
  92. package/.github/workflows/run-blits-tests.yml +0 -142
  93. package/.github/workflows/run-lint.yml +0 -128
  94. package/.husky/pre-commit +0 -1
  95. package/.husky/pre-push +0 -1
  96. package/.vscode/extensions.json +0 -7
  97. package/.vscode/settings.json +0 -9
  98. package/COPYING +0 -1
  99. package/banner.png +0 -0
  100. package/docs/.nojekyll +0 -0
  101. package/docs/README.md +0 -19
  102. package/docs/_sidebar.md +0 -37
  103. package/docs/built-in/directives.md +0 -50
  104. package/docs/built-in/for-loop.md +0 -204
  105. package/docs/built-in/layout.md +0 -168
  106. package/docs/components/component_state.md +0 -90
  107. package/docs/components/computed_properties.md +0 -45
  108. package/docs/components/lifecycle_events.md +0 -42
  109. package/docs/components/methods.md +0 -45
  110. package/docs/components/props.md +0 -56
  111. package/docs/components/user_input.md +0 -186
  112. package/docs/components/utility_methods.md +0 -320
  113. package/docs/components/watchers.md +0 -34
  114. package/docs/essentials/application_root.md +0 -19
  115. package/docs/essentials/components.md +0 -68
  116. package/docs/essentials/displaying_images.md +0 -67
  117. package/docs/essentials/displaying_text.md +0 -135
  118. package/docs/essentials/element_attributes.md +0 -195
  119. package/docs/essentials/settings.md +0 -117
  120. package/docs/essentials/template_syntax.md +0 -83
  121. package/docs/getting_started/file_structure.md +0 -58
  122. package/docs/getting_started/getting_started.md +0 -45
  123. package/docs/getting_started/intro.md +0 -20
  124. package/docs/index.html +0 -47
  125. package/docs/performance/lazy-loading.md +0 -161
  126. package/docs/plugins/global_app_state.md +0 -98
  127. package/docs/plugins/language.md +0 -172
  128. package/docs/plugins/text-to-speech-announcer.md +0 -120
  129. package/docs/plugins/theme.md +0 -176
  130. package/docs/router/basics.md +0 -175
  131. package/docs/router/hooks.md +0 -70
  132. package/docs/router/transitions.md +0 -146
  133. package/docs/sidebar.json +0 -171
  134. package/docs/transitions_animations/transitions.md +0 -150
  135. package/jsconfig.json +0 -12
  136. package/src/component/setup/props.test.js +0 -238
  137. package/src/component.test.js +0 -388
  138. package/src/components/Circle.orig.js +0 -31
  139. package/src/components/FPScounter.orig.js +0 -121
  140. package/src/components/RouterView.orig.js +0 -54
  141. package/src/components/Sprite.orig.js +0 -58
  142. package/src/components/index.orig.js +0 -28
  143. package/src/engines/L3/element.test.js +0 -579
  144. package/src/helpers/deepEqualArray.test.js +0 -127
  145. package/src/lib/codegenerator/generator.test.js +0 -3801
  146. package/src/lib/colors/colors.test.js +0 -290
  147. package/src/lib/componentId.test.js +0 -84
  148. package/src/lib/eventListeners.test.js +0 -236
  149. package/src/lib/reactivity/effect.test.js +0 -35
  150. package/src/lib/reactivity/reactive.test.js +0 -27
  151. package/src/lib/templateparser/parser.test.js +0 -1411
  152. package/src/router/router.test.js +0 -473
@@ -1,1510 +1,1510 @@
1
- /*
2
- * Copyright 2023 Comcast Cable Communications Management, LLC
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- *
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software
10
- * distributed under the License is distributed on an "AS IS" BASIS,
11
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- * See the License for the specific language governing permissions and
13
- * limitations under the License.
14
- *
15
- * SPDX-License-Identifier: Apache-2.0
16
- */
17
-
18
- import Component from '../component.js'
19
- import { renderer } from '../launch.js'
20
- import fps_sprite from '../../public/assets/fps_sprite.base64.js'
21
-
22
- export default () =>
23
- Component('FPScounter', {
24
- /* eslint-disable no-unused-vars */
25
- code: {
26
- render: function anonymous(parent, component, context, components, effect, getRaw, Log) {
27
- const elms = []
28
- let componentType
29
- const rootComponent = component
30
- let propData
31
- let slotComponent
32
- let inSlot = false
33
- let slotChildCounter = 0
34
- const elementConfig0 = {}
35
-
36
- elms[0] = this.element(
37
- { parent: parent || 'root' },
38
- inSlot === true ? slotComponent : component
39
- )
40
-
41
- elms[0].populate(elementConfig0)
42
-
43
- if (inSlot === true) {
44
- slotChildCounter -= 1
45
- }
46
-
47
- parent = elms[0]
48
- const elementConfig1 = {}
49
-
50
- elms[1] = this.element(
51
- { parent: parent || 'root' },
52
- inSlot === true ? slotComponent : component
53
- )
54
-
55
- elementConfig1['y'] = 15
56
- elementConfig1['x'] = 20
57
- elms[1].populate(elementConfig1)
58
-
59
- if (inSlot === true) {
60
- slotChildCounter -= 1
61
- }
62
-
63
- parent = elms[1]
64
- const elementConfig2 = {}
65
-
66
- elms[2] = this.element(
67
- { parent: parent || 'root' },
68
- inSlot === true ? slotComponent : component
69
- )
70
-
71
- elms[2].populate(elementConfig2)
72
-
73
- if (inSlot === true) {
74
- slotChildCounter -= 1
75
- }
76
-
77
- const cmp3 = (context.components && context.components['Sprite']) || components['Sprite']
78
-
79
- parent = elms[2]
80
- const elementConfig3 = {}
81
-
82
- elms[3] = this.element(
83
- { parent: parent || 'root' },
84
- inSlot === true ? slotComponent : component
85
- )
86
-
87
- elementConfig3['image'] = component.image
88
- elementConfig3['w'] = 43
89
- elementConfig3['h'] = 25
90
- elementConfig3['map'] = component.sprite
91
- elementConfig3['frame'] = 'fps'
92
-
93
- const skip3 = []
94
- if (typeof cmp3 !== 'undefined') {
95
- for (let key in cmp3[Symbol.for('config')].props) {
96
- delete elementConfig3[cmp3[Symbol.for('config')].props[key]]
97
- skip3.push(cmp3[Symbol.for('config')].props[key])
98
- }
99
- }
100
-
101
- elms[3].populate(elementConfig3)
102
-
103
- if (inSlot === true) {
104
- slotChildCounter -= 1
105
- }
106
-
107
- parent = elms[3]
108
- const props4 = {}
109
- props4['image'] = component.image
110
- props4['w'] = 43
111
- props4['h'] = 25
112
- props4['map'] = component.sprite
113
- props4['frame'] = 'fps'
114
-
115
- componentType = props4['is'] || 'Sprite'
116
-
117
- let component4
118
- if (typeof componentType === 'string') {
119
- component4 =
120
- (context.components && context.components[componentType]) || components[componentType]
121
- if (!component4) {
122
- throw new Error('Component "Sprite" not found')
123
- }
124
- } else if (
125
- typeof componentType === 'function' &&
126
- componentType[Symbol.for('isComponent')] === true
127
- ) {
128
- component4 = componentType
129
- }
130
-
131
- elms[4] = component4.call(null, { props: props4 }, elms[3], component)
132
-
133
- if (elms[4][Symbol.for('slots')][0]) {
134
- parent = elms[4][Symbol.for('slots')][0]
135
- slotComponent = elms[4]
136
- inSlot = true
137
- } else {
138
- parent = elms[4][Symbol.for('children')][0]
139
- }
140
-
141
- if (inSlot === true && slotChildCounter === 0) {
142
- inSlot = false
143
- }
144
-
145
- parent = elms[2]
146
- const elementConfig5 = {}
147
-
148
- elms[5] = this.element(
149
- { parent: parent || 'root' },
150
- inSlot === true ? slotComponent : component
151
- )
152
-
153
- elementConfig5['x'] = 58
154
- elementConfig5['y'] = 2
155
- elms[5].populate(elementConfig5)
156
-
157
- if (inSlot === true) {
158
- slotChildCounter -= 1
159
- }
160
-
161
- const cmp6 = (context.components && context.components['Sprite']) || components['Sprite']
162
-
163
- parent = elms[5]
164
- const elementConfig6 = {}
165
-
166
- elms[6] = this.element(
167
- { parent: parent || 'root' },
168
- inSlot === true ? slotComponent : component
169
- )
170
-
171
- elementConfig6['image'] = component.image
172
- elementConfig6['x'] = 0
173
- elementConfig6['h'] = 20
174
- elementConfig6['w'] = 20
175
- elementConfig6['map'] = component.sprite
176
- elementConfig6['frame'] = component.fps[0]
177
-
178
- const skip6 = []
179
- if (typeof cmp6 !== 'undefined') {
180
- for (let key in cmp6[Symbol.for('config')].props) {
181
- delete elementConfig6[cmp6[Symbol.for('config')].props[key]]
182
- skip6.push(cmp6[Symbol.for('config')].props[key])
183
- }
184
- }
185
-
186
- elms[6].populate(elementConfig6)
187
-
188
- if (inSlot === true) {
189
- slotChildCounter -= 1
190
- }
191
-
192
- parent = elms[6]
193
- const props7 = {}
194
- props7['image'] = component.image
195
- props7['x'] = 0
196
- props7['h'] = 20
197
- props7['w'] = 20
198
- props7['map'] = component.sprite
199
-
200
- propData = component.fps[0]
201
- if (Array.isArray(propData) === true) {
202
- propData = getRaw(propData).slice(0)
203
- }
204
- props7['frame'] = propData
205
-
206
- componentType = props7['is'] || 'Sprite'
207
-
208
- let component7
209
- if (typeof componentType === 'string') {
210
- component7 =
211
- (context.components && context.components[componentType]) || components[componentType]
212
- if (!component7) {
213
- throw new Error('Component "Sprite" not found')
214
- }
215
- } else if (
216
- typeof componentType === 'function' &&
217
- componentType[Symbol.for('isComponent')] === true
218
- ) {
219
- component7 = componentType
220
- }
221
-
222
- elms[7] = component7.call(null, { props: props7 }, elms[6], component)
223
-
224
- if (elms[7][Symbol.for('slots')][0]) {
225
- parent = elms[7][Symbol.for('slots')][0]
226
- slotComponent = elms[7]
227
- inSlot = true
228
- } else {
229
- parent = elms[7][Symbol.for('children')][0]
230
- }
231
-
232
- if (inSlot === true && slotChildCounter === 0) {
233
- inSlot = false
234
- }
235
-
236
- const cmp8 = (context.components && context.components['Sprite']) || components['Sprite']
237
-
238
- parent = elms[5]
239
- const elementConfig8 = {}
240
-
241
- elms[8] = this.element(
242
- { parent: parent || 'root' },
243
- inSlot === true ? slotComponent : component
244
- )
245
-
246
- elementConfig8['image'] = component.image
247
- elementConfig8['x'] = 18
248
- elementConfig8['h'] = 20
249
- elementConfig8['w'] = 20
250
- elementConfig8['map'] = component.sprite
251
- elementConfig8['frame'] = component.fps[1]
252
-
253
- const skip8 = []
254
- if (typeof cmp8 !== 'undefined') {
255
- for (let key in cmp8[Symbol.for('config')].props) {
256
- delete elementConfig8[cmp8[Symbol.for('config')].props[key]]
257
- skip8.push(cmp8[Symbol.for('config')].props[key])
258
- }
259
- }
260
-
261
- elms[8].populate(elementConfig8)
262
-
263
- if (inSlot === true) {
264
- slotChildCounter -= 1
265
- }
266
-
267
- parent = elms[8]
268
- const props9 = {}
269
- props9['image'] = component.image
270
- props9['x'] = 18
271
- props9['h'] = 20
272
- props9['w'] = 20
273
- props9['map'] = component.sprite
274
-
275
- propData = component.fps[1]
276
- if (Array.isArray(propData) === true) {
277
- propData = getRaw(propData).slice(0)
278
- }
279
- props9['frame'] = propData
280
-
281
- componentType = props9['is'] || 'Sprite'
282
-
283
- let component9
284
- if (typeof componentType === 'string') {
285
- component9 =
286
- (context.components && context.components[componentType]) || components[componentType]
287
- if (!component9) {
288
- throw new Error('Component "Sprite" not found')
289
- }
290
- } else if (
291
- typeof componentType === 'function' &&
292
- componentType[Symbol.for('isComponent')] === true
293
- ) {
294
- component9 = componentType
295
- }
296
-
297
- elms[9] = component9.call(null, { props: props9 }, elms[8], component)
298
-
299
- if (elms[9][Symbol.for('slots')][0]) {
300
- parent = elms[9][Symbol.for('slots')][0]
301
- slotComponent = elms[9]
302
- inSlot = true
303
- } else {
304
- parent = elms[9][Symbol.for('children')][0]
305
- }
306
-
307
- if (inSlot === true && slotChildCounter === 0) {
308
- inSlot = false
309
- }
310
-
311
- const cmp10 = (context.components && context.components['Sprite']) || components['Sprite']
312
-
313
- parent = elms[5]
314
- const elementConfig10 = {}
315
-
316
- elms[10] = this.element(
317
- { parent: parent || 'root' },
318
- inSlot === true ? slotComponent : component
319
- )
320
-
321
- elementConfig10['image'] = component.image
322
- elementConfig10['x'] = 36
323
- elementConfig10['h'] = 20
324
- elementConfig10['w'] = 20
325
- elementConfig10['map'] = component.sprite
326
- elementConfig10['frame'] = component.fps[2]
327
-
328
- const skip10 = []
329
- if (typeof cmp10 !== 'undefined') {
330
- for (let key in cmp10[Symbol.for('config')].props) {
331
- delete elementConfig10[cmp10[Symbol.for('config')].props[key]]
332
- skip10.push(cmp10[Symbol.for('config')].props[key])
333
- }
334
- }
335
-
336
- elms[10].populate(elementConfig10)
337
-
338
- if (inSlot === true) {
339
- slotChildCounter -= 1
340
- }
341
-
342
- parent = elms[10]
343
- const props11 = {}
344
- props11['image'] = component.image
345
- props11['x'] = 36
346
- props11['h'] = 20
347
- props11['w'] = 20
348
- props11['map'] = component.sprite
349
-
350
- propData = component.fps[2]
351
- if (Array.isArray(propData) === true) {
352
- propData = getRaw(propData).slice(0)
353
- }
354
- props11['frame'] = propData
355
-
356
- componentType = props11['is'] || 'Sprite'
357
-
358
- let component11
359
- if (typeof componentType === 'string') {
360
- component11 =
361
- (context.components && context.components[componentType]) || components[componentType]
362
- if (!component11) {
363
- throw new Error('Component "Sprite" not found')
364
- }
365
- } else if (
366
- typeof componentType === 'function' &&
367
- componentType[Symbol.for('isComponent')] === true
368
- ) {
369
- component11 = componentType
370
- }
371
-
372
- elms[11] = component11.call(null, { props: props11 }, elms[10], component)
373
-
374
- if (elms[11][Symbol.for('slots')][0]) {
375
- parent = elms[11][Symbol.for('slots')][0]
376
- slotComponent = elms[11]
377
- inSlot = true
378
- } else {
379
- parent = elms[11][Symbol.for('children')][0]
380
- }
381
-
382
- if (inSlot === true && slotChildCounter === 0) {
383
- inSlot = false
384
- }
385
-
386
- parent = elms[1]
387
- const elementConfig12 = {}
388
-
389
- elms[12] = this.element(
390
- { parent: parent || 'root' },
391
- inSlot === true ? slotComponent : component
392
- )
393
-
394
- elementConfig12['x'] = 150
395
- elms[12].populate(elementConfig12)
396
-
397
- if (inSlot === true) {
398
- slotChildCounter -= 1
399
- }
400
-
401
- const cmp13 = (context.components && context.components['Sprite']) || components['Sprite']
402
-
403
- parent = elms[12]
404
- const elementConfig13 = {}
405
-
406
- elms[13] = this.element(
407
- { parent: parent || 'root' },
408
- inSlot === true ? slotComponent : component
409
- )
410
-
411
- elementConfig13['image'] = component.image
412
- elementConfig13['y'] = 2
413
- elementConfig13['w'] = 48
414
- elementConfig13['h'] = 25
415
- elementConfig13['map'] = component.sprite
416
- elementConfig13['frame'] = 'avg'
417
-
418
- const skip13 = []
419
- if (typeof cmp13 !== 'undefined') {
420
- for (let key in cmp13[Symbol.for('config')].props) {
421
- delete elementConfig13[cmp13[Symbol.for('config')].props[key]]
422
- skip13.push(cmp13[Symbol.for('config')].props[key])
423
- }
424
- }
425
-
426
- elms[13].populate(elementConfig13)
427
-
428
- if (inSlot === true) {
429
- slotChildCounter -= 1
430
- }
431
-
432
- parent = elms[13]
433
- const props14 = {}
434
- props14['image'] = component.image
435
- props14['y'] = 2
436
- props14['w'] = 48
437
- props14['h'] = 25
438
- props14['map'] = component.sprite
439
- props14['frame'] = 'avg'
440
-
441
- componentType = props14['is'] || 'Sprite'
442
-
443
- let component14
444
- if (typeof componentType === 'string') {
445
- component14 =
446
- (context.components && context.components[componentType]) || components[componentType]
447
- if (!component14) {
448
- throw new Error('Component "Sprite" not found')
449
- }
450
- } else if (
451
- typeof componentType === 'function' &&
452
- componentType[Symbol.for('isComponent')] === true
453
- ) {
454
- component14 = componentType
455
- }
456
-
457
- elms[14] = component14.call(null, { props: props14 }, elms[13], component)
458
-
459
- if (elms[14][Symbol.for('slots')][0]) {
460
- parent = elms[14][Symbol.for('slots')][0]
461
- slotComponent = elms[14]
462
- inSlot = true
463
- } else {
464
- parent = elms[14][Symbol.for('children')][0]
465
- }
466
-
467
- if (inSlot === true && slotChildCounter === 0) {
468
- inSlot = false
469
- }
470
-
471
- parent = elms[12]
472
- const elementConfig15 = {}
473
-
474
- elms[15] = this.element(
475
- { parent: parent || 'root' },
476
- inSlot === true ? slotComponent : component
477
- )
478
-
479
- elementConfig15['x'] = 63
480
- elementConfig15['y'] = 2
481
- elms[15].populate(elementConfig15)
482
-
483
- if (inSlot === true) {
484
- slotChildCounter -= 1
485
- }
486
-
487
- const cmp16 = (context.components && context.components['Sprite']) || components['Sprite']
488
-
489
- parent = elms[15]
490
- const elementConfig16 = {}
491
-
492
- elms[16] = this.element(
493
- { parent: parent || 'root' },
494
- inSlot === true ? slotComponent : component
495
- )
496
-
497
- elementConfig16['image'] = component.image
498
- elementConfig16['x'] = 0
499
- elementConfig16['h'] = 20
500
- elementConfig16['w'] = 20
501
- elementConfig16['map'] = component.sprite
502
- elementConfig16['frame'] = component.avgFps[0]
503
-
504
- const skip16 = []
505
- if (typeof cmp16 !== 'undefined') {
506
- for (let key in cmp16[Symbol.for('config')].props) {
507
- delete elementConfig16[cmp16[Symbol.for('config')].props[key]]
508
- skip16.push(cmp16[Symbol.for('config')].props[key])
509
- }
510
- }
511
-
512
- elms[16].populate(elementConfig16)
513
-
514
- if (inSlot === true) {
515
- slotChildCounter -= 1
516
- }
517
-
518
- parent = elms[16]
519
- const props17 = {}
520
- props17['image'] = component.image
521
- props17['x'] = 0
522
- props17['h'] = 20
523
- props17['w'] = 20
524
- props17['map'] = component.sprite
525
-
526
- propData = component.avgFps[0]
527
- if (Array.isArray(propData) === true) {
528
- propData = getRaw(propData).slice(0)
529
- }
530
- props17['frame'] = propData
531
-
532
- componentType = props17['is'] || 'Sprite'
533
-
534
- let component17
535
- if (typeof componentType === 'string') {
536
- component17 =
537
- (context.components && context.components[componentType]) || components[componentType]
538
- if (!component17) {
539
- throw new Error('Component "Sprite" not found')
540
- }
541
- } else if (
542
- typeof componentType === 'function' &&
543
- componentType[Symbol.for('isComponent')] === true
544
- ) {
545
- component17 = componentType
546
- }
547
-
548
- elms[17] = component17.call(null, { props: props17 }, elms[16], component)
549
-
550
- if (elms[17][Symbol.for('slots')][0]) {
551
- parent = elms[17][Symbol.for('slots')][0]
552
- slotComponent = elms[17]
553
- inSlot = true
554
- } else {
555
- parent = elms[17][Symbol.for('children')][0]
556
- }
557
-
558
- if (inSlot === true && slotChildCounter === 0) {
559
- inSlot = false
560
- }
561
-
562
- const cmp18 = (context.components && context.components['Sprite']) || components['Sprite']
563
-
564
- parent = elms[15]
565
- const elementConfig18 = {}
566
-
567
- elms[18] = this.element(
568
- { parent: parent || 'root' },
569
- inSlot === true ? slotComponent : component
570
- )
571
-
572
- elementConfig18['image'] = component.image
573
- elementConfig18['x'] = 18
574
- elementConfig18['h'] = 20
575
- elementConfig18['w'] = 20
576
- elementConfig18['map'] = component.sprite
577
- elementConfig18['frame'] = component.avgFps[1]
578
-
579
- const skip18 = []
580
- if (typeof cmp18 !== 'undefined') {
581
- for (let key in cmp18[Symbol.for('config')].props) {
582
- delete elementConfig18[cmp18[Symbol.for('config')].props[key]]
583
- skip18.push(cmp18[Symbol.for('config')].props[key])
584
- }
585
- }
586
-
587
- elms[18].populate(elementConfig18)
588
-
589
- if (inSlot === true) {
590
- slotChildCounter -= 1
591
- }
592
-
593
- parent = elms[18]
594
- const props19 = {}
595
- props19['image'] = component.image
596
- props19['x'] = 18
597
- props19['h'] = 20
598
- props19['w'] = 20
599
- props19['map'] = component.sprite
600
-
601
- propData = component.avgFps[1]
602
- if (Array.isArray(propData) === true) {
603
- propData = getRaw(propData).slice(0)
604
- }
605
- props19['frame'] = propData
606
-
607
- componentType = props19['is'] || 'Sprite'
608
-
609
- let component19
610
- if (typeof componentType === 'string') {
611
- component19 =
612
- (context.components && context.components[componentType]) || components[componentType]
613
- if (!component19) {
614
- throw new Error('Component "Sprite" not found')
615
- }
616
- } else if (
617
- typeof componentType === 'function' &&
618
- componentType[Symbol.for('isComponent')] === true
619
- ) {
620
- component19 = componentType
621
- }
622
-
623
- elms[19] = component19.call(null, { props: props19 }, elms[18], component)
624
-
625
- if (elms[19][Symbol.for('slots')][0]) {
626
- parent = elms[19][Symbol.for('slots')][0]
627
- slotComponent = elms[19]
628
- inSlot = true
629
- } else {
630
- parent = elms[19][Symbol.for('children')][0]
631
- }
632
-
633
- if (inSlot === true && slotChildCounter === 0) {
634
- inSlot = false
635
- }
636
-
637
- const cmp20 = (context.components && context.components['Sprite']) || components['Sprite']
638
-
639
- parent = elms[15]
640
- const elementConfig20 = {}
641
-
642
- elms[20] = this.element(
643
- { parent: parent || 'root' },
644
- inSlot === true ? slotComponent : component
645
- )
646
-
647
- elementConfig20['image'] = component.image
648
- elementConfig20['x'] = 36
649
- elementConfig20['h'] = 20
650
- elementConfig20['w'] = 20
651
- elementConfig20['map'] = component.sprite
652
- elementConfig20['frame'] = component.avgFps[2]
653
-
654
- const skip20 = []
655
- if (typeof cmp20 !== 'undefined') {
656
- for (let key in cmp20[Symbol.for('config')].props) {
657
- delete elementConfig20[cmp20[Symbol.for('config')].props[key]]
658
- skip20.push(cmp20[Symbol.for('config')].props[key])
659
- }
660
- }
661
-
662
- elms[20].populate(elementConfig20)
663
-
664
- if (inSlot === true) {
665
- slotChildCounter -= 1
666
- }
667
-
668
- parent = elms[20]
669
- const props21 = {}
670
- props21['image'] = component.image
671
- props21['x'] = 36
672
- props21['h'] = 20
673
- props21['w'] = 20
674
- props21['map'] = component.sprite
675
-
676
- propData = component.avgFps[2]
677
- if (Array.isArray(propData) === true) {
678
- propData = getRaw(propData).slice(0)
679
- }
680
- props21['frame'] = propData
681
-
682
- componentType = props21['is'] || 'Sprite'
683
-
684
- let component21
685
- if (typeof componentType === 'string') {
686
- component21 =
687
- (context.components && context.components[componentType]) || components[componentType]
688
- if (!component21) {
689
- throw new Error('Component "Sprite" not found')
690
- }
691
- } else if (
692
- typeof componentType === 'function' &&
693
- componentType[Symbol.for('isComponent')] === true
694
- ) {
695
- component21 = componentType
696
- }
697
-
698
- elms[21] = component21.call(null, { props: props21 }, elms[20], component)
699
-
700
- if (elms[21][Symbol.for('slots')][0]) {
701
- parent = elms[21][Symbol.for('slots')][0]
702
- slotComponent = elms[21]
703
- inSlot = true
704
- } else {
705
- parent = elms[21][Symbol.for('children')][0]
706
- }
707
-
708
- if (inSlot === true && slotChildCounter === 0) {
709
- inSlot = false
710
- }
711
-
712
- parent = elms[1]
713
- const elementConfig22 = {}
714
-
715
- elms[22] = this.element(
716
- { parent: parent || 'root' },
717
- inSlot === true ? slotComponent : component
718
- )
719
-
720
- elementConfig22['x'] = 0
721
- elementConfig22['y'] = 40
722
- elms[22].populate(elementConfig22)
723
-
724
- if (inSlot === true) {
725
- slotChildCounter -= 1
726
- }
727
-
728
- const cmp23 = (context.components && context.components['Sprite']) || components['Sprite']
729
-
730
- parent = elms[22]
731
- const elementConfig23 = {}
732
-
733
- elms[23] = this.element(
734
- { parent: parent || 'root' },
735
- inSlot === true ? slotComponent : component
736
- )
737
-
738
- elementConfig23['image'] = component.image
739
- elementConfig23['x'] = '-2'
740
- elementConfig23['w'] = 47
741
- elementConfig23['h'] = 25
742
- elementConfig23['map'] = component.sprite
743
- elementConfig23['frame'] = 'min'
744
-
745
- const skip23 = []
746
- if (typeof cmp23 !== 'undefined') {
747
- for (let key in cmp23[Symbol.for('config')].props) {
748
- delete elementConfig23[cmp23[Symbol.for('config')].props[key]]
749
- skip23.push(cmp23[Symbol.for('config')].props[key])
750
- }
751
- }
752
-
753
- elms[23].populate(elementConfig23)
754
-
755
- if (inSlot === true) {
756
- slotChildCounter -= 1
757
- }
758
-
759
- parent = elms[23]
760
- const props24 = {}
761
- props24['image'] = component.image
762
- props24['x'] = '-2'
763
- props24['w'] = 47
764
- props24['h'] = 25
765
- props24['map'] = component.sprite
766
- props24['frame'] = 'min'
767
-
768
- componentType = props24['is'] || 'Sprite'
769
-
770
- let component24
771
- if (typeof componentType === 'string') {
772
- component24 =
773
- (context.components && context.components[componentType]) || components[componentType]
774
- if (!component24) {
775
- throw new Error('Component "Sprite" not found')
776
- }
777
- } else if (
778
- typeof componentType === 'function' &&
779
- componentType[Symbol.for('isComponent')] === true
780
- ) {
781
- component24 = componentType
782
- }
783
-
784
- elms[24] = component24.call(null, { props: props24 }, elms[23], component)
785
-
786
- if (elms[24][Symbol.for('slots')][0]) {
787
- parent = elms[24][Symbol.for('slots')][0]
788
- slotComponent = elms[24]
789
- inSlot = true
790
- } else {
791
- parent = elms[24][Symbol.for('children')][0]
792
- }
793
-
794
- if (inSlot === true && slotChildCounter === 0) {
795
- inSlot = false
796
- }
797
-
798
- parent = elms[22]
799
- const elementConfig25 = {}
800
-
801
- elms[25] = this.element(
802
- { parent: parent || 'root' },
803
- inSlot === true ? slotComponent : component
804
- )
805
-
806
- elementConfig25['x'] = 58
807
- elementConfig25['y'] = 2
808
- elms[25].populate(elementConfig25)
809
-
810
- if (inSlot === true) {
811
- slotChildCounter -= 1
812
- }
813
-
814
- const cmp26 = (context.components && context.components['Sprite']) || components['Sprite']
815
-
816
- parent = elms[25]
817
- const elementConfig26 = {}
818
-
819
- elms[26] = this.element(
820
- { parent: parent || 'root' },
821
- inSlot === true ? slotComponent : component
822
- )
823
-
824
- elementConfig26['image'] = component.image
825
- elementConfig26['x'] = 0
826
- elementConfig26['h'] = 20
827
- elementConfig26['w'] = 20
828
- elementConfig26['map'] = component.sprite
829
- elementConfig26['frame'] = component.minFps[0]
830
-
831
- const skip26 = []
832
- if (typeof cmp26 !== 'undefined') {
833
- for (let key in cmp26[Symbol.for('config')].props) {
834
- delete elementConfig26[cmp26[Symbol.for('config')].props[key]]
835
- skip26.push(cmp26[Symbol.for('config')].props[key])
836
- }
837
- }
838
-
839
- elms[26].populate(elementConfig26)
840
-
841
- if (inSlot === true) {
842
- slotChildCounter -= 1
843
- }
844
-
845
- parent = elms[26]
846
- const props27 = {}
847
- props27['image'] = component.image
848
- props27['x'] = 0
849
- props27['h'] = 20
850
- props27['w'] = 20
851
- props27['map'] = component.sprite
852
-
853
- propData = component.minFps[0]
854
- if (Array.isArray(propData) === true) {
855
- propData = getRaw(propData).slice(0)
856
- }
857
- props27['frame'] = propData
858
-
859
- componentType = props27['is'] || 'Sprite'
860
-
861
- let component27
862
- if (typeof componentType === 'string') {
863
- component27 =
864
- (context.components && context.components[componentType]) || components[componentType]
865
- if (!component27) {
866
- throw new Error('Component "Sprite" not found')
867
- }
868
- } else if (
869
- typeof componentType === 'function' &&
870
- componentType[Symbol.for('isComponent')] === true
871
- ) {
872
- component27 = componentType
873
- }
874
-
875
- elms[27] = component27.call(null, { props: props27 }, elms[26], component)
876
-
877
- if (elms[27][Symbol.for('slots')][0]) {
878
- parent = elms[27][Symbol.for('slots')][0]
879
- slotComponent = elms[27]
880
- inSlot = true
881
- } else {
882
- parent = elms[27][Symbol.for('children')][0]
883
- }
884
-
885
- if (inSlot === true && slotChildCounter === 0) {
886
- inSlot = false
887
- }
888
-
889
- const cmp28 = (context.components && context.components['Sprite']) || components['Sprite']
890
-
891
- parent = elms[25]
892
- const elementConfig28 = {}
893
-
894
- elms[28] = this.element(
895
- { parent: parent || 'root' },
896
- inSlot === true ? slotComponent : component
897
- )
898
-
899
- elementConfig28['image'] = component.image
900
- elementConfig28['x'] = 18
901
- elementConfig28['h'] = 20
902
- elementConfig28['w'] = 20
903
- elementConfig28['map'] = component.sprite
904
- elementConfig28['frame'] = component.minFps[1]
905
-
906
- const skip28 = []
907
- if (typeof cmp28 !== 'undefined') {
908
- for (let key in cmp28[Symbol.for('config')].props) {
909
- delete elementConfig28[cmp28[Symbol.for('config')].props[key]]
910
- skip28.push(cmp28[Symbol.for('config')].props[key])
911
- }
912
- }
913
-
914
- elms[28].populate(elementConfig28)
915
-
916
- if (inSlot === true) {
917
- slotChildCounter -= 1
918
- }
919
-
920
- parent = elms[28]
921
- const props29 = {}
922
- props29['image'] = component.image
923
- props29['x'] = 18
924
- props29['h'] = 20
925
- props29['w'] = 20
926
- props29['map'] = component.sprite
927
-
928
- propData = component.minFps[1]
929
- if (Array.isArray(propData) === true) {
930
- propData = getRaw(propData).slice(0)
931
- }
932
- props29['frame'] = propData
933
-
934
- componentType = props29['is'] || 'Sprite'
935
-
936
- let component29
937
- if (typeof componentType === 'string') {
938
- component29 =
939
- (context.components && context.components[componentType]) || components[componentType]
940
- if (!component29) {
941
- throw new Error('Component "Sprite" not found')
942
- }
943
- } else if (
944
- typeof componentType === 'function' &&
945
- componentType[Symbol.for('isComponent')] === true
946
- ) {
947
- component29 = componentType
948
- }
949
-
950
- elms[29] = component29.call(null, { props: props29 }, elms[28], component)
951
-
952
- if (elms[29][Symbol.for('slots')][0]) {
953
- parent = elms[29][Symbol.for('slots')][0]
954
- slotComponent = elms[29]
955
- inSlot = true
956
- } else {
957
- parent = elms[29][Symbol.for('children')][0]
958
- }
959
-
960
- if (inSlot === true && slotChildCounter === 0) {
961
- inSlot = false
962
- }
963
-
964
- const cmp30 = (context.components && context.components['Sprite']) || components['Sprite']
965
-
966
- parent = elms[25]
967
- const elementConfig30 = {}
968
-
969
- elms[30] = this.element(
970
- { parent: parent || 'root' },
971
- inSlot === true ? slotComponent : component
972
- )
973
-
974
- elementConfig30['image'] = component.image
975
- elementConfig30['x'] = 36
976
- elementConfig30['h'] = 20
977
- elementConfig30['w'] = 20
978
- elementConfig30['map'] = component.sprite
979
- elementConfig30['frame'] = component.minFps[2]
980
-
981
- const skip30 = []
982
- if (typeof cmp30 !== 'undefined') {
983
- for (let key in cmp30[Symbol.for('config')].props) {
984
- delete elementConfig30[cmp30[Symbol.for('config')].props[key]]
985
- skip30.push(cmp30[Symbol.for('config')].props[key])
986
- }
987
- }
988
-
989
- elms[30].populate(elementConfig30)
990
-
991
- if (inSlot === true) {
992
- slotChildCounter -= 1
993
- }
994
-
995
- parent = elms[30]
996
- const props31 = {}
997
- props31['image'] = component.image
998
- props31['x'] = 36
999
- props31['h'] = 20
1000
- props31['w'] = 20
1001
- props31['map'] = component.sprite
1002
-
1003
- propData = component.minFps[2]
1004
- if (Array.isArray(propData) === true) {
1005
- propData = getRaw(propData).slice(0)
1006
- }
1007
- props31['frame'] = propData
1008
-
1009
- componentType = props31['is'] || 'Sprite'
1010
-
1011
- let component31
1012
- if (typeof componentType === 'string') {
1013
- component31 =
1014
- (context.components && context.components[componentType]) || components[componentType]
1015
- if (!component31) {
1016
- throw new Error('Component "Sprite" not found')
1017
- }
1018
- } else if (
1019
- typeof componentType === 'function' &&
1020
- componentType[Symbol.for('isComponent')] === true
1021
- ) {
1022
- component31 = componentType
1023
- }
1024
-
1025
- elms[31] = component31.call(null, { props: props31 }, elms[30], component)
1026
-
1027
- if (elms[31][Symbol.for('slots')][0]) {
1028
- parent = elms[31][Symbol.for('slots')][0]
1029
- slotComponent = elms[31]
1030
- inSlot = true
1031
- } else {
1032
- parent = elms[31][Symbol.for('children')][0]
1033
- }
1034
-
1035
- if (inSlot === true && slotChildCounter === 0) {
1036
- inSlot = false
1037
- }
1038
-
1039
- parent = elms[1]
1040
- const elementConfig32 = {}
1041
-
1042
- elms[32] = this.element(
1043
- { parent: parent || 'root' },
1044
- inSlot === true ? slotComponent : component
1045
- )
1046
-
1047
- elementConfig32['x'] = 150
1048
- elementConfig32['y'] = 40
1049
- elms[32].populate(elementConfig32)
1050
-
1051
- if (inSlot === true) {
1052
- slotChildCounter -= 1
1053
- }
1054
-
1055
- const cmp33 = (context.components && context.components['Sprite']) || components['Sprite']
1056
-
1057
- parent = elms[32]
1058
- const elementConfig33 = {}
1059
-
1060
- elms[33] = this.element(
1061
- { parent: parent || 'root' },
1062
- inSlot === true ? slotComponent : component
1063
- )
1064
-
1065
- elementConfig33['image'] = component.image
1066
- elementConfig33['w'] = 53
1067
- elementConfig33['h'] = 25
1068
- elementConfig33['map'] = component.sprite
1069
- elementConfig33['frame'] = 'max'
1070
-
1071
- const skip33 = []
1072
- if (typeof cmp33 !== 'undefined') {
1073
- for (let key in cmp33[Symbol.for('config')].props) {
1074
- delete elementConfig33[cmp33[Symbol.for('config')].props[key]]
1075
- skip33.push(cmp33[Symbol.for('config')].props[key])
1076
- }
1077
- }
1078
-
1079
- elms[33].populate(elementConfig33)
1080
-
1081
- if (inSlot === true) {
1082
- slotChildCounter -= 1
1083
- }
1084
-
1085
- parent = elms[33]
1086
- const props34 = {}
1087
- props34['image'] = component.image
1088
- props34['w'] = 53
1089
- props34['h'] = 25
1090
- props34['map'] = component.sprite
1091
- props34['frame'] = 'max'
1092
-
1093
- componentType = props34['is'] || 'Sprite'
1094
-
1095
- let component34
1096
- if (typeof componentType === 'string') {
1097
- component34 =
1098
- (context.components && context.components[componentType]) || components[componentType]
1099
- if (!component34) {
1100
- throw new Error('Component "Sprite" not found')
1101
- }
1102
- } else if (
1103
- typeof componentType === 'function' &&
1104
- componentType[Symbol.for('isComponent')] === true
1105
- ) {
1106
- component34 = componentType
1107
- }
1108
-
1109
- elms[34] = component34.call(null, { props: props34 }, elms[33], component)
1110
-
1111
- if (elms[34][Symbol.for('slots')][0]) {
1112
- parent = elms[34][Symbol.for('slots')][0]
1113
- slotComponent = elms[34]
1114
- inSlot = true
1115
- } else {
1116
- parent = elms[34][Symbol.for('children')][0]
1117
- }
1118
-
1119
- if (inSlot === true && slotChildCounter === 0) {
1120
- inSlot = false
1121
- }
1122
-
1123
- parent = elms[32]
1124
- const elementConfig35 = {}
1125
-
1126
- elms[35] = this.element(
1127
- { parent: parent || 'root' },
1128
- inSlot === true ? slotComponent : component
1129
- )
1130
-
1131
- elementConfig35['x'] = 63
1132
- elementConfig35['y'] = 2
1133
- elms[35].populate(elementConfig35)
1134
-
1135
- if (inSlot === true) {
1136
- slotChildCounter -= 1
1137
- }
1138
-
1139
- const cmp36 = (context.components && context.components['Sprite']) || components['Sprite']
1140
-
1141
- parent = elms[35]
1142
- const elementConfig36 = {}
1143
-
1144
- elms[36] = this.element(
1145
- { parent: parent || 'root' },
1146
- inSlot === true ? slotComponent : component
1147
- )
1148
-
1149
- elementConfig36['image'] = component.image
1150
- elementConfig36['x'] = 0
1151
- elementConfig36['h'] = 20
1152
- elementConfig36['w'] = 20
1153
- elementConfig36['map'] = component.sprite
1154
- elementConfig36['frame'] = component.maxFps[0]
1155
-
1156
- const skip36 = []
1157
- if (typeof cmp36 !== 'undefined') {
1158
- for (let key in cmp36[Symbol.for('config')].props) {
1159
- delete elementConfig36[cmp36[Symbol.for('config')].props[key]]
1160
- skip36.push(cmp36[Symbol.for('config')].props[key])
1161
- }
1162
- }
1163
-
1164
- elms[36].populate(elementConfig36)
1165
-
1166
- if (inSlot === true) {
1167
- slotChildCounter -= 1
1168
- }
1169
-
1170
- parent = elms[36]
1171
- const props37 = {}
1172
- props37['image'] = component.image
1173
- props37['x'] = 0
1174
- props37['h'] = 20
1175
- props37['w'] = 20
1176
- props37['map'] = component.sprite
1177
-
1178
- propData = component.maxFps[0]
1179
- if (Array.isArray(propData) === true) {
1180
- propData = getRaw(propData).slice(0)
1181
- }
1182
- props37['frame'] = propData
1183
-
1184
- componentType = props37['is'] || 'Sprite'
1185
-
1186
- let component37
1187
- if (typeof componentType === 'string') {
1188
- component37 =
1189
- (context.components && context.components[componentType]) || components[componentType]
1190
- if (!component37) {
1191
- throw new Error('Component "Sprite" not found')
1192
- }
1193
- } else if (
1194
- typeof componentType === 'function' &&
1195
- componentType[Symbol.for('isComponent')] === true
1196
- ) {
1197
- component37 = componentType
1198
- }
1199
-
1200
- elms[37] = component37.call(null, { props: props37 }, elms[36], component)
1201
-
1202
- if (elms[37][Symbol.for('slots')][0]) {
1203
- parent = elms[37][Symbol.for('slots')][0]
1204
- slotComponent = elms[37]
1205
- inSlot = true
1206
- } else {
1207
- parent = elms[37][Symbol.for('children')][0]
1208
- }
1209
-
1210
- if (inSlot === true && slotChildCounter === 0) {
1211
- inSlot = false
1212
- }
1213
-
1214
- const cmp38 = (context.components && context.components['Sprite']) || components['Sprite']
1215
-
1216
- parent = elms[35]
1217
- const elementConfig38 = {}
1218
-
1219
- elms[38] = this.element(
1220
- { parent: parent || 'root' },
1221
- inSlot === true ? slotComponent : component
1222
- )
1223
-
1224
- elementConfig38['image'] = component.image
1225
- elementConfig38['x'] = 18
1226
- elementConfig38['h'] = 20
1227
- elementConfig38['w'] = 20
1228
- elementConfig38['map'] = component.sprite
1229
- elementConfig38['frame'] = component.maxFps[1]
1230
-
1231
- const skip38 = []
1232
- if (typeof cmp38 !== 'undefined') {
1233
- for (let key in cmp38[Symbol.for('config')].props) {
1234
- delete elementConfig38[cmp38[Symbol.for('config')].props[key]]
1235
- skip38.push(cmp38[Symbol.for('config')].props[key])
1236
- }
1237
- }
1238
-
1239
- elms[38].populate(elementConfig38)
1240
-
1241
- if (inSlot === true) {
1242
- slotChildCounter -= 1
1243
- }
1244
-
1245
- parent = elms[38]
1246
- const props39 = {}
1247
- props39['image'] = component.image
1248
- props39['x'] = 18
1249
- props39['h'] = 20
1250
- props39['w'] = 20
1251
- props39['map'] = component.sprite
1252
-
1253
- propData = component.maxFps[1]
1254
- if (Array.isArray(propData) === true) {
1255
- propData = getRaw(propData).slice(0)
1256
- }
1257
- props39['frame'] = propData
1258
-
1259
- componentType = props39['is'] || 'Sprite'
1260
-
1261
- let component39
1262
- if (typeof componentType === 'string') {
1263
- component39 =
1264
- (context.components && context.components[componentType]) || components[componentType]
1265
- if (!component39) {
1266
- throw new Error('Component "Sprite" not found')
1267
- }
1268
- } else if (
1269
- typeof componentType === 'function' &&
1270
- componentType[Symbol.for('isComponent')] === true
1271
- ) {
1272
- component39 = componentType
1273
- }
1274
-
1275
- elms[39] = component39.call(null, { props: props39 }, elms[38], component)
1276
-
1277
- if (elms[39][Symbol.for('slots')][0]) {
1278
- parent = elms[39][Symbol.for('slots')][0]
1279
- slotComponent = elms[39]
1280
- inSlot = true
1281
- } else {
1282
- parent = elms[39][Symbol.for('children')][0]
1283
- }
1284
-
1285
- if (inSlot === true && slotChildCounter === 0) {
1286
- inSlot = false
1287
- }
1288
-
1289
- const cmp40 = (context.components && context.components['Sprite']) || components['Sprite']
1290
-
1291
- parent = elms[35]
1292
- const elementConfig40 = {}
1293
-
1294
- elms[40] = this.element(
1295
- { parent: parent || 'root' },
1296
- inSlot === true ? slotComponent : component
1297
- )
1298
-
1299
- elementConfig40['image'] = component.image
1300
- elementConfig40['x'] = 36
1301
- elementConfig40['h'] = 20
1302
- elementConfig40['w'] = 20
1303
- elementConfig40['map'] = component.sprite
1304
- elementConfig40['frame'] = component.maxFps[2]
1305
-
1306
- const skip40 = []
1307
- if (typeof cmp40 !== 'undefined') {
1308
- for (let key in cmp40[Symbol.for('config')].props) {
1309
- delete elementConfig40[cmp40[Symbol.for('config')].props[key]]
1310
- skip40.push(cmp40[Symbol.for('config')].props[key])
1311
- }
1312
- }
1313
-
1314
- elms[40].populate(elementConfig40)
1315
-
1316
- if (inSlot === true) {
1317
- slotChildCounter -= 1
1318
- }
1319
-
1320
- parent = elms[40]
1321
- const props41 = {}
1322
- props41['image'] = component.image
1323
- props41['x'] = 36
1324
- props41['h'] = 20
1325
- props41['w'] = 20
1326
- props41['map'] = component.sprite
1327
-
1328
- propData = component.maxFps[2]
1329
- if (Array.isArray(propData) === true) {
1330
- propData = getRaw(propData).slice(0)
1331
- }
1332
- props41['frame'] = propData
1333
-
1334
- componentType = props41['is'] || 'Sprite'
1335
-
1336
- let component41
1337
- if (typeof componentType === 'string') {
1338
- component41 =
1339
- (context.components && context.components[componentType]) || components[componentType]
1340
- if (!component41) {
1341
- throw new Error('Component "Sprite" not found')
1342
- }
1343
- } else if (
1344
- typeof componentType === 'function' &&
1345
- componentType[Symbol.for('isComponent')] === true
1346
- ) {
1347
- component41 = componentType
1348
- }
1349
-
1350
- elms[41] = component41.call(null, { props: props41 }, elms[40], component)
1351
-
1352
- if (elms[41][Symbol.for('slots')][0]) {
1353
- parent = elms[41][Symbol.for('slots')][0]
1354
- slotComponent = elms[41]
1355
- inSlot = true
1356
- } else {
1357
- parent = elms[41][Symbol.for('children')][0]
1358
- }
1359
-
1360
- if (inSlot === true && slotChildCounter === 0) {
1361
- inSlot = false
1362
- }
1363
-
1364
- return elms
1365
- },
1366
- effects: [
1367
- function anonymous(component, elms, context, components, rootComponent, effect) {
1368
- if (typeof skip6 === 'undefined' || skip6.indexOf('frame') === -1)
1369
- elms[6].set('frame', component.fps[0])
1370
- },
1371
- function anonymous(component, elms, context, components, rootComponent, effect) {
1372
- elms[7][Symbol.for('props')]['frame'] = component.fps[0]
1373
- },
1374
- function anonymous(component, elms, context, components, rootComponent, effect) {
1375
- if (typeof skip8 === 'undefined' || skip8.indexOf('frame') === -1)
1376
- elms[8].set('frame', component.fps[1])
1377
- },
1378
- function anonymous(component, elms, context, components, rootComponent, effect) {
1379
- elms[9][Symbol.for('props')]['frame'] = component.fps[1]
1380
- },
1381
- function anonymous(component, elms, context, components, rootComponent, effect) {
1382
- if (typeof skip10 === 'undefined' || skip10.indexOf('frame') === -1)
1383
- elms[10].set('frame', component.fps[2])
1384
- },
1385
- function anonymous(component, elms, context, components, rootComponent, effect) {
1386
- elms[11][Symbol.for('props')]['frame'] = component.fps[2]
1387
- },
1388
- function anonymous(component, elms, context, components, rootComponent, effect) {
1389
- if (typeof skip16 === 'undefined' || skip16.indexOf('frame') === -1)
1390
- elms[16].set('frame', component.avgFps[0])
1391
- },
1392
- function anonymous(component, elms, context, components, rootComponent, effect) {
1393
- elms[17][Symbol.for('props')]['frame'] = component.avgFps[0]
1394
- },
1395
- function anonymous(component, elms, context, components, rootComponent, effect) {
1396
- if (typeof skip18 === 'undefined' || skip18.indexOf('frame') === -1)
1397
- elms[18].set('frame', component.avgFps[1])
1398
- },
1399
- function anonymous(component, elms, context, components, rootComponent, effect) {
1400
- elms[19][Symbol.for('props')]['frame'] = component.avgFps[1]
1401
- },
1402
- function anonymous(component, elms, context, components, rootComponent, effect) {
1403
- if (typeof skip20 === 'undefined' || skip20.indexOf('frame') === -1)
1404
- elms[20].set('frame', component.avgFps[2])
1405
- },
1406
- function anonymous(component, elms, context, components, rootComponent, effect) {
1407
- elms[21][Symbol.for('props')]['frame'] = component.avgFps[2]
1408
- },
1409
- function anonymous(component, elms, context, components, rootComponent, effect) {
1410
- if (typeof skip26 === 'undefined' || skip26.indexOf('frame') === -1)
1411
- elms[26].set('frame', component.minFps[0])
1412
- },
1413
- function anonymous(component, elms, context, components, rootComponent, effect) {
1414
- elms[27][Symbol.for('props')]['frame'] = component.minFps[0]
1415
- },
1416
- function anonymous(component, elms, context, components, rootComponent, effect) {
1417
- if (typeof skip28 === 'undefined' || skip28.indexOf('frame') === -1)
1418
- elms[28].set('frame', component.minFps[1])
1419
- },
1420
- function anonymous(component, elms, context, components, rootComponent, effect) {
1421
- elms[29][Symbol.for('props')]['frame'] = component.minFps[1]
1422
- },
1423
- function anonymous(component, elms, context, components, rootComponent, effect) {
1424
- if (typeof skip30 === 'undefined' || skip30.indexOf('frame') === -1)
1425
- elms[30].set('frame', component.minFps[2])
1426
- },
1427
- function anonymous(component, elms, context, components, rootComponent, effect) {
1428
- elms[31][Symbol.for('props')]['frame'] = component.minFps[2]
1429
- },
1430
- function anonymous(component, elms, context, components, rootComponent, effect) {
1431
- if (typeof skip36 === 'undefined' || skip36.indexOf('frame') === -1)
1432
- elms[36].set('frame', component.maxFps[0])
1433
- },
1434
- function anonymous(component, elms, context, components, rootComponent, effect) {
1435
- elms[37][Symbol.for('props')]['frame'] = component.maxFps[0]
1436
- },
1437
- function anonymous(component, elms, context, components, rootComponent, effect) {
1438
- if (typeof skip38 === 'undefined' || skip38.indexOf('frame') === -1)
1439
- elms[38].set('frame', component.maxFps[1])
1440
- },
1441
- function anonymous(component, elms, context, components, rootComponent, effect) {
1442
- elms[39][Symbol.for('props')]['frame'] = component.maxFps[1]
1443
- },
1444
- function anonymous(component, elms, context, components, rootComponent, effect) {
1445
- if (typeof skip40 === 'undefined' || skip40.indexOf('frame') === -1)
1446
- elms[40].set('frame', component.maxFps[2])
1447
- },
1448
- function anonymous(component, elms, context, components, rootComponent, effect) {
1449
- elms[41][Symbol.for('props')]['frame'] = component.maxFps[2]
1450
- },
1451
- ],
1452
- context: {},
1453
- },
1454
- state() {
1455
- return {
1456
- image: fps_sprite,
1457
- sprite: {
1458
- defaults: {
1459
- y: 1,
1460
- w: 20,
1461
- h: 20,
1462
- },
1463
- frames: {
1464
- '-': { x: -1000 },
1465
- 0: { x: 1 },
1466
- 1: { x: 23 },
1467
- 2: { x: 45 },
1468
- 3: { x: 67 },
1469
- 4: { x: 89 },
1470
- 5: { x: 111 },
1471
- 6: { x: 133 },
1472
- 7: { x: 155 },
1473
- 8: { x: 177 },
1474
- 9: { x: 199 },
1475
- avg: { x: 221, w: 48, h: 25 },
1476
- fps: { x: 271, w: 43, h: 25 },
1477
- max: { x: 316, w: 53, h: 25 },
1478
- min: { x: 371, w: 47, h: 25 },
1479
- },
1480
- },
1481
- fps: '---',
1482
- avgFps: '---',
1483
- minFps: '---',
1484
- maxFps: '---',
1485
- }
1486
- },
1487
- hooks: {
1488
- ready() {
1489
- let minFps = 10000
1490
- let maxFps = 0
1491
- let avgFps = 0
1492
- let totalFps = 0
1493
- let fpsUpdateCounter = 0
1494
-
1495
- // This leaks - might be L3 SubTexture issue
1496
- // renderer.on('fpsUpdate', (rM, { fps }) => {
1497
- // minFps = Math.min(fps, minFps)
1498
- // maxFps = Math.max(fps, maxFps)
1499
- // totalFps += fps
1500
- // fpsUpdateCounter++
1501
- // avgFps = Math.round(totalFps / fpsUpdateCounter)
1502
-
1503
- // this.fps = fps.toString().padStart(3, '0')
1504
- // this.avgFps = avgFps.toString().padStart(3, '0')
1505
- // this.minFps = minFps.toString().padStart(3, '0')
1506
- // this.maxFps = maxFps.toString().padStart(3, '0')
1507
- // })
1508
- },
1509
- },
1510
- })
1
+ /*
2
+ * Copyright 2023 Comcast Cable Communications Management, LLC
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software
10
+ * distributed under the License is distributed on an "AS IS" BASIS,
11
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ * See the License for the specific language governing permissions and
13
+ * limitations under the License.
14
+ *
15
+ * SPDX-License-Identifier: Apache-2.0
16
+ */
17
+
18
+ import Component from '../component.js'
19
+ import { renderer } from '../launch.js'
20
+ import fps_sprite from '../../public/assets/fps_sprite.base64.js'
21
+
22
+ export default () =>
23
+ Component('FPScounter', {
24
+ /* eslint-disable no-unused-vars */
25
+ code: {
26
+ render: function anonymous(parent, component, context, components, effect, getRaw, Log) {
27
+ const elms = []
28
+ let componentType
29
+ const rootComponent = component
30
+ let propData
31
+ let slotComponent
32
+ let inSlot = false
33
+ let slotChildCounter = 0
34
+ const elementConfig0 = {}
35
+
36
+ elms[0] = this.element(
37
+ { parent: parent || 'root' },
38
+ inSlot === true ? slotComponent : component
39
+ )
40
+
41
+ elms[0].populate(elementConfig0)
42
+
43
+ if (inSlot === true) {
44
+ slotChildCounter -= 1
45
+ }
46
+
47
+ parent = elms[0]
48
+ const elementConfig1 = {}
49
+
50
+ elms[1] = this.element(
51
+ { parent: parent || 'root' },
52
+ inSlot === true ? slotComponent : component
53
+ )
54
+
55
+ elementConfig1['y'] = 15
56
+ elementConfig1['x'] = 20
57
+ elms[1].populate(elementConfig1)
58
+
59
+ if (inSlot === true) {
60
+ slotChildCounter -= 1
61
+ }
62
+
63
+ parent = elms[1]
64
+ const elementConfig2 = {}
65
+
66
+ elms[2] = this.element(
67
+ { parent: parent || 'root' },
68
+ inSlot === true ? slotComponent : component
69
+ )
70
+
71
+ elms[2].populate(elementConfig2)
72
+
73
+ if (inSlot === true) {
74
+ slotChildCounter -= 1
75
+ }
76
+
77
+ const cmp3 = (context.components && context.components['Sprite']) || components['Sprite']
78
+
79
+ parent = elms[2]
80
+ const elementConfig3 = {}
81
+
82
+ elms[3] = this.element(
83
+ { parent: parent || 'root' },
84
+ inSlot === true ? slotComponent : component
85
+ )
86
+
87
+ elementConfig3['image'] = component.image
88
+ elementConfig3['w'] = 43
89
+ elementConfig3['h'] = 25
90
+ elementConfig3['map'] = component.sprite
91
+ elementConfig3['frame'] = 'fps'
92
+
93
+ const skip3 = []
94
+ if (typeof cmp3 !== 'undefined') {
95
+ for (let key in cmp3[Symbol.for('config')].props) {
96
+ delete elementConfig3[cmp3[Symbol.for('config')].props[key]]
97
+ skip3.push(cmp3[Symbol.for('config')].props[key])
98
+ }
99
+ }
100
+
101
+ elms[3].populate(elementConfig3)
102
+
103
+ if (inSlot === true) {
104
+ slotChildCounter -= 1
105
+ }
106
+
107
+ parent = elms[3]
108
+ const props4 = {}
109
+ props4['image'] = component.image
110
+ props4['w'] = 43
111
+ props4['h'] = 25
112
+ props4['map'] = component.sprite
113
+ props4['frame'] = 'fps'
114
+
115
+ componentType = props4['is'] || 'Sprite'
116
+
117
+ let component4
118
+ if (typeof componentType === 'string') {
119
+ component4 =
120
+ (context.components && context.components[componentType]) || components[componentType]
121
+ if (!component4) {
122
+ throw new Error('Component "Sprite" not found')
123
+ }
124
+ } else if (
125
+ typeof componentType === 'function' &&
126
+ componentType[Symbol.for('isComponent')] === true
127
+ ) {
128
+ component4 = componentType
129
+ }
130
+
131
+ elms[4] = component4.call(null, { props: props4 }, elms[3], component)
132
+
133
+ if (elms[4][Symbol.for('slots')][0]) {
134
+ parent = elms[4][Symbol.for('slots')][0]
135
+ slotComponent = elms[4]
136
+ inSlot = true
137
+ } else {
138
+ parent = elms[4][Symbol.for('children')][0]
139
+ }
140
+
141
+ if (inSlot === true && slotChildCounter === 0) {
142
+ inSlot = false
143
+ }
144
+
145
+ parent = elms[2]
146
+ const elementConfig5 = {}
147
+
148
+ elms[5] = this.element(
149
+ { parent: parent || 'root' },
150
+ inSlot === true ? slotComponent : component
151
+ )
152
+
153
+ elementConfig5['x'] = 58
154
+ elementConfig5['y'] = 2
155
+ elms[5].populate(elementConfig5)
156
+
157
+ if (inSlot === true) {
158
+ slotChildCounter -= 1
159
+ }
160
+
161
+ const cmp6 = (context.components && context.components['Sprite']) || components['Sprite']
162
+
163
+ parent = elms[5]
164
+ const elementConfig6 = {}
165
+
166
+ elms[6] = this.element(
167
+ { parent: parent || 'root' },
168
+ inSlot === true ? slotComponent : component
169
+ )
170
+
171
+ elementConfig6['image'] = component.image
172
+ elementConfig6['x'] = 0
173
+ elementConfig6['h'] = 20
174
+ elementConfig6['w'] = 20
175
+ elementConfig6['map'] = component.sprite
176
+ elementConfig6['frame'] = component.fps[0]
177
+
178
+ const skip6 = []
179
+ if (typeof cmp6 !== 'undefined') {
180
+ for (let key in cmp6[Symbol.for('config')].props) {
181
+ delete elementConfig6[cmp6[Symbol.for('config')].props[key]]
182
+ skip6.push(cmp6[Symbol.for('config')].props[key])
183
+ }
184
+ }
185
+
186
+ elms[6].populate(elementConfig6)
187
+
188
+ if (inSlot === true) {
189
+ slotChildCounter -= 1
190
+ }
191
+
192
+ parent = elms[6]
193
+ const props7 = {}
194
+ props7['image'] = component.image
195
+ props7['x'] = 0
196
+ props7['h'] = 20
197
+ props7['w'] = 20
198
+ props7['map'] = component.sprite
199
+
200
+ propData = component.fps[0]
201
+ if (Array.isArray(propData) === true) {
202
+ propData = getRaw(propData).slice(0)
203
+ }
204
+ props7['frame'] = propData
205
+
206
+ componentType = props7['is'] || 'Sprite'
207
+
208
+ let component7
209
+ if (typeof componentType === 'string') {
210
+ component7 =
211
+ (context.components && context.components[componentType]) || components[componentType]
212
+ if (!component7) {
213
+ throw new Error('Component "Sprite" not found')
214
+ }
215
+ } else if (
216
+ typeof componentType === 'function' &&
217
+ componentType[Symbol.for('isComponent')] === true
218
+ ) {
219
+ component7 = componentType
220
+ }
221
+
222
+ elms[7] = component7.call(null, { props: props7 }, elms[6], component)
223
+
224
+ if (elms[7][Symbol.for('slots')][0]) {
225
+ parent = elms[7][Symbol.for('slots')][0]
226
+ slotComponent = elms[7]
227
+ inSlot = true
228
+ } else {
229
+ parent = elms[7][Symbol.for('children')][0]
230
+ }
231
+
232
+ if (inSlot === true && slotChildCounter === 0) {
233
+ inSlot = false
234
+ }
235
+
236
+ const cmp8 = (context.components && context.components['Sprite']) || components['Sprite']
237
+
238
+ parent = elms[5]
239
+ const elementConfig8 = {}
240
+
241
+ elms[8] = this.element(
242
+ { parent: parent || 'root' },
243
+ inSlot === true ? slotComponent : component
244
+ )
245
+
246
+ elementConfig8['image'] = component.image
247
+ elementConfig8['x'] = 18
248
+ elementConfig8['h'] = 20
249
+ elementConfig8['w'] = 20
250
+ elementConfig8['map'] = component.sprite
251
+ elementConfig8['frame'] = component.fps[1]
252
+
253
+ const skip8 = []
254
+ if (typeof cmp8 !== 'undefined') {
255
+ for (let key in cmp8[Symbol.for('config')].props) {
256
+ delete elementConfig8[cmp8[Symbol.for('config')].props[key]]
257
+ skip8.push(cmp8[Symbol.for('config')].props[key])
258
+ }
259
+ }
260
+
261
+ elms[8].populate(elementConfig8)
262
+
263
+ if (inSlot === true) {
264
+ slotChildCounter -= 1
265
+ }
266
+
267
+ parent = elms[8]
268
+ const props9 = {}
269
+ props9['image'] = component.image
270
+ props9['x'] = 18
271
+ props9['h'] = 20
272
+ props9['w'] = 20
273
+ props9['map'] = component.sprite
274
+
275
+ propData = component.fps[1]
276
+ if (Array.isArray(propData) === true) {
277
+ propData = getRaw(propData).slice(0)
278
+ }
279
+ props9['frame'] = propData
280
+
281
+ componentType = props9['is'] || 'Sprite'
282
+
283
+ let component9
284
+ if (typeof componentType === 'string') {
285
+ component9 =
286
+ (context.components && context.components[componentType]) || components[componentType]
287
+ if (!component9) {
288
+ throw new Error('Component "Sprite" not found')
289
+ }
290
+ } else if (
291
+ typeof componentType === 'function' &&
292
+ componentType[Symbol.for('isComponent')] === true
293
+ ) {
294
+ component9 = componentType
295
+ }
296
+
297
+ elms[9] = component9.call(null, { props: props9 }, elms[8], component)
298
+
299
+ if (elms[9][Symbol.for('slots')][0]) {
300
+ parent = elms[9][Symbol.for('slots')][0]
301
+ slotComponent = elms[9]
302
+ inSlot = true
303
+ } else {
304
+ parent = elms[9][Symbol.for('children')][0]
305
+ }
306
+
307
+ if (inSlot === true && slotChildCounter === 0) {
308
+ inSlot = false
309
+ }
310
+
311
+ const cmp10 = (context.components && context.components['Sprite']) || components['Sprite']
312
+
313
+ parent = elms[5]
314
+ const elementConfig10 = {}
315
+
316
+ elms[10] = this.element(
317
+ { parent: parent || 'root' },
318
+ inSlot === true ? slotComponent : component
319
+ )
320
+
321
+ elementConfig10['image'] = component.image
322
+ elementConfig10['x'] = 36
323
+ elementConfig10['h'] = 20
324
+ elementConfig10['w'] = 20
325
+ elementConfig10['map'] = component.sprite
326
+ elementConfig10['frame'] = component.fps[2]
327
+
328
+ const skip10 = []
329
+ if (typeof cmp10 !== 'undefined') {
330
+ for (let key in cmp10[Symbol.for('config')].props) {
331
+ delete elementConfig10[cmp10[Symbol.for('config')].props[key]]
332
+ skip10.push(cmp10[Symbol.for('config')].props[key])
333
+ }
334
+ }
335
+
336
+ elms[10].populate(elementConfig10)
337
+
338
+ if (inSlot === true) {
339
+ slotChildCounter -= 1
340
+ }
341
+
342
+ parent = elms[10]
343
+ const props11 = {}
344
+ props11['image'] = component.image
345
+ props11['x'] = 36
346
+ props11['h'] = 20
347
+ props11['w'] = 20
348
+ props11['map'] = component.sprite
349
+
350
+ propData = component.fps[2]
351
+ if (Array.isArray(propData) === true) {
352
+ propData = getRaw(propData).slice(0)
353
+ }
354
+ props11['frame'] = propData
355
+
356
+ componentType = props11['is'] || 'Sprite'
357
+
358
+ let component11
359
+ if (typeof componentType === 'string') {
360
+ component11 =
361
+ (context.components && context.components[componentType]) || components[componentType]
362
+ if (!component11) {
363
+ throw new Error('Component "Sprite" not found')
364
+ }
365
+ } else if (
366
+ typeof componentType === 'function' &&
367
+ componentType[Symbol.for('isComponent')] === true
368
+ ) {
369
+ component11 = componentType
370
+ }
371
+
372
+ elms[11] = component11.call(null, { props: props11 }, elms[10], component)
373
+
374
+ if (elms[11][Symbol.for('slots')][0]) {
375
+ parent = elms[11][Symbol.for('slots')][0]
376
+ slotComponent = elms[11]
377
+ inSlot = true
378
+ } else {
379
+ parent = elms[11][Symbol.for('children')][0]
380
+ }
381
+
382
+ if (inSlot === true && slotChildCounter === 0) {
383
+ inSlot = false
384
+ }
385
+
386
+ parent = elms[1]
387
+ const elementConfig12 = {}
388
+
389
+ elms[12] = this.element(
390
+ { parent: parent || 'root' },
391
+ inSlot === true ? slotComponent : component
392
+ )
393
+
394
+ elementConfig12['x'] = 150
395
+ elms[12].populate(elementConfig12)
396
+
397
+ if (inSlot === true) {
398
+ slotChildCounter -= 1
399
+ }
400
+
401
+ const cmp13 = (context.components && context.components['Sprite']) || components['Sprite']
402
+
403
+ parent = elms[12]
404
+ const elementConfig13 = {}
405
+
406
+ elms[13] = this.element(
407
+ { parent: parent || 'root' },
408
+ inSlot === true ? slotComponent : component
409
+ )
410
+
411
+ elementConfig13['image'] = component.image
412
+ elementConfig13['y'] = 2
413
+ elementConfig13['w'] = 48
414
+ elementConfig13['h'] = 25
415
+ elementConfig13['map'] = component.sprite
416
+ elementConfig13['frame'] = 'avg'
417
+
418
+ const skip13 = []
419
+ if (typeof cmp13 !== 'undefined') {
420
+ for (let key in cmp13[Symbol.for('config')].props) {
421
+ delete elementConfig13[cmp13[Symbol.for('config')].props[key]]
422
+ skip13.push(cmp13[Symbol.for('config')].props[key])
423
+ }
424
+ }
425
+
426
+ elms[13].populate(elementConfig13)
427
+
428
+ if (inSlot === true) {
429
+ slotChildCounter -= 1
430
+ }
431
+
432
+ parent = elms[13]
433
+ const props14 = {}
434
+ props14['image'] = component.image
435
+ props14['y'] = 2
436
+ props14['w'] = 48
437
+ props14['h'] = 25
438
+ props14['map'] = component.sprite
439
+ props14['frame'] = 'avg'
440
+
441
+ componentType = props14['is'] || 'Sprite'
442
+
443
+ let component14
444
+ if (typeof componentType === 'string') {
445
+ component14 =
446
+ (context.components && context.components[componentType]) || components[componentType]
447
+ if (!component14) {
448
+ throw new Error('Component "Sprite" not found')
449
+ }
450
+ } else if (
451
+ typeof componentType === 'function' &&
452
+ componentType[Symbol.for('isComponent')] === true
453
+ ) {
454
+ component14 = componentType
455
+ }
456
+
457
+ elms[14] = component14.call(null, { props: props14 }, elms[13], component)
458
+
459
+ if (elms[14][Symbol.for('slots')][0]) {
460
+ parent = elms[14][Symbol.for('slots')][0]
461
+ slotComponent = elms[14]
462
+ inSlot = true
463
+ } else {
464
+ parent = elms[14][Symbol.for('children')][0]
465
+ }
466
+
467
+ if (inSlot === true && slotChildCounter === 0) {
468
+ inSlot = false
469
+ }
470
+
471
+ parent = elms[12]
472
+ const elementConfig15 = {}
473
+
474
+ elms[15] = this.element(
475
+ { parent: parent || 'root' },
476
+ inSlot === true ? slotComponent : component
477
+ )
478
+
479
+ elementConfig15['x'] = 63
480
+ elementConfig15['y'] = 2
481
+ elms[15].populate(elementConfig15)
482
+
483
+ if (inSlot === true) {
484
+ slotChildCounter -= 1
485
+ }
486
+
487
+ const cmp16 = (context.components && context.components['Sprite']) || components['Sprite']
488
+
489
+ parent = elms[15]
490
+ const elementConfig16 = {}
491
+
492
+ elms[16] = this.element(
493
+ { parent: parent || 'root' },
494
+ inSlot === true ? slotComponent : component
495
+ )
496
+
497
+ elementConfig16['image'] = component.image
498
+ elementConfig16['x'] = 0
499
+ elementConfig16['h'] = 20
500
+ elementConfig16['w'] = 20
501
+ elementConfig16['map'] = component.sprite
502
+ elementConfig16['frame'] = component.avgFps[0]
503
+
504
+ const skip16 = []
505
+ if (typeof cmp16 !== 'undefined') {
506
+ for (let key in cmp16[Symbol.for('config')].props) {
507
+ delete elementConfig16[cmp16[Symbol.for('config')].props[key]]
508
+ skip16.push(cmp16[Symbol.for('config')].props[key])
509
+ }
510
+ }
511
+
512
+ elms[16].populate(elementConfig16)
513
+
514
+ if (inSlot === true) {
515
+ slotChildCounter -= 1
516
+ }
517
+
518
+ parent = elms[16]
519
+ const props17 = {}
520
+ props17['image'] = component.image
521
+ props17['x'] = 0
522
+ props17['h'] = 20
523
+ props17['w'] = 20
524
+ props17['map'] = component.sprite
525
+
526
+ propData = component.avgFps[0]
527
+ if (Array.isArray(propData) === true) {
528
+ propData = getRaw(propData).slice(0)
529
+ }
530
+ props17['frame'] = propData
531
+
532
+ componentType = props17['is'] || 'Sprite'
533
+
534
+ let component17
535
+ if (typeof componentType === 'string') {
536
+ component17 =
537
+ (context.components && context.components[componentType]) || components[componentType]
538
+ if (!component17) {
539
+ throw new Error('Component "Sprite" not found')
540
+ }
541
+ } else if (
542
+ typeof componentType === 'function' &&
543
+ componentType[Symbol.for('isComponent')] === true
544
+ ) {
545
+ component17 = componentType
546
+ }
547
+
548
+ elms[17] = component17.call(null, { props: props17 }, elms[16], component)
549
+
550
+ if (elms[17][Symbol.for('slots')][0]) {
551
+ parent = elms[17][Symbol.for('slots')][0]
552
+ slotComponent = elms[17]
553
+ inSlot = true
554
+ } else {
555
+ parent = elms[17][Symbol.for('children')][0]
556
+ }
557
+
558
+ if (inSlot === true && slotChildCounter === 0) {
559
+ inSlot = false
560
+ }
561
+
562
+ const cmp18 = (context.components && context.components['Sprite']) || components['Sprite']
563
+
564
+ parent = elms[15]
565
+ const elementConfig18 = {}
566
+
567
+ elms[18] = this.element(
568
+ { parent: parent || 'root' },
569
+ inSlot === true ? slotComponent : component
570
+ )
571
+
572
+ elementConfig18['image'] = component.image
573
+ elementConfig18['x'] = 18
574
+ elementConfig18['h'] = 20
575
+ elementConfig18['w'] = 20
576
+ elementConfig18['map'] = component.sprite
577
+ elementConfig18['frame'] = component.avgFps[1]
578
+
579
+ const skip18 = []
580
+ if (typeof cmp18 !== 'undefined') {
581
+ for (let key in cmp18[Symbol.for('config')].props) {
582
+ delete elementConfig18[cmp18[Symbol.for('config')].props[key]]
583
+ skip18.push(cmp18[Symbol.for('config')].props[key])
584
+ }
585
+ }
586
+
587
+ elms[18].populate(elementConfig18)
588
+
589
+ if (inSlot === true) {
590
+ slotChildCounter -= 1
591
+ }
592
+
593
+ parent = elms[18]
594
+ const props19 = {}
595
+ props19['image'] = component.image
596
+ props19['x'] = 18
597
+ props19['h'] = 20
598
+ props19['w'] = 20
599
+ props19['map'] = component.sprite
600
+
601
+ propData = component.avgFps[1]
602
+ if (Array.isArray(propData) === true) {
603
+ propData = getRaw(propData).slice(0)
604
+ }
605
+ props19['frame'] = propData
606
+
607
+ componentType = props19['is'] || 'Sprite'
608
+
609
+ let component19
610
+ if (typeof componentType === 'string') {
611
+ component19 =
612
+ (context.components && context.components[componentType]) || components[componentType]
613
+ if (!component19) {
614
+ throw new Error('Component "Sprite" not found')
615
+ }
616
+ } else if (
617
+ typeof componentType === 'function' &&
618
+ componentType[Symbol.for('isComponent')] === true
619
+ ) {
620
+ component19 = componentType
621
+ }
622
+
623
+ elms[19] = component19.call(null, { props: props19 }, elms[18], component)
624
+
625
+ if (elms[19][Symbol.for('slots')][0]) {
626
+ parent = elms[19][Symbol.for('slots')][0]
627
+ slotComponent = elms[19]
628
+ inSlot = true
629
+ } else {
630
+ parent = elms[19][Symbol.for('children')][0]
631
+ }
632
+
633
+ if (inSlot === true && slotChildCounter === 0) {
634
+ inSlot = false
635
+ }
636
+
637
+ const cmp20 = (context.components && context.components['Sprite']) || components['Sprite']
638
+
639
+ parent = elms[15]
640
+ const elementConfig20 = {}
641
+
642
+ elms[20] = this.element(
643
+ { parent: parent || 'root' },
644
+ inSlot === true ? slotComponent : component
645
+ )
646
+
647
+ elementConfig20['image'] = component.image
648
+ elementConfig20['x'] = 36
649
+ elementConfig20['h'] = 20
650
+ elementConfig20['w'] = 20
651
+ elementConfig20['map'] = component.sprite
652
+ elementConfig20['frame'] = component.avgFps[2]
653
+
654
+ const skip20 = []
655
+ if (typeof cmp20 !== 'undefined') {
656
+ for (let key in cmp20[Symbol.for('config')].props) {
657
+ delete elementConfig20[cmp20[Symbol.for('config')].props[key]]
658
+ skip20.push(cmp20[Symbol.for('config')].props[key])
659
+ }
660
+ }
661
+
662
+ elms[20].populate(elementConfig20)
663
+
664
+ if (inSlot === true) {
665
+ slotChildCounter -= 1
666
+ }
667
+
668
+ parent = elms[20]
669
+ const props21 = {}
670
+ props21['image'] = component.image
671
+ props21['x'] = 36
672
+ props21['h'] = 20
673
+ props21['w'] = 20
674
+ props21['map'] = component.sprite
675
+
676
+ propData = component.avgFps[2]
677
+ if (Array.isArray(propData) === true) {
678
+ propData = getRaw(propData).slice(0)
679
+ }
680
+ props21['frame'] = propData
681
+
682
+ componentType = props21['is'] || 'Sprite'
683
+
684
+ let component21
685
+ if (typeof componentType === 'string') {
686
+ component21 =
687
+ (context.components && context.components[componentType]) || components[componentType]
688
+ if (!component21) {
689
+ throw new Error('Component "Sprite" not found')
690
+ }
691
+ } else if (
692
+ typeof componentType === 'function' &&
693
+ componentType[Symbol.for('isComponent')] === true
694
+ ) {
695
+ component21 = componentType
696
+ }
697
+
698
+ elms[21] = component21.call(null, { props: props21 }, elms[20], component)
699
+
700
+ if (elms[21][Symbol.for('slots')][0]) {
701
+ parent = elms[21][Symbol.for('slots')][0]
702
+ slotComponent = elms[21]
703
+ inSlot = true
704
+ } else {
705
+ parent = elms[21][Symbol.for('children')][0]
706
+ }
707
+
708
+ if (inSlot === true && slotChildCounter === 0) {
709
+ inSlot = false
710
+ }
711
+
712
+ parent = elms[1]
713
+ const elementConfig22 = {}
714
+
715
+ elms[22] = this.element(
716
+ { parent: parent || 'root' },
717
+ inSlot === true ? slotComponent : component
718
+ )
719
+
720
+ elementConfig22['x'] = 0
721
+ elementConfig22['y'] = 40
722
+ elms[22].populate(elementConfig22)
723
+
724
+ if (inSlot === true) {
725
+ slotChildCounter -= 1
726
+ }
727
+
728
+ const cmp23 = (context.components && context.components['Sprite']) || components['Sprite']
729
+
730
+ parent = elms[22]
731
+ const elementConfig23 = {}
732
+
733
+ elms[23] = this.element(
734
+ { parent: parent || 'root' },
735
+ inSlot === true ? slotComponent : component
736
+ )
737
+
738
+ elementConfig23['image'] = component.image
739
+ elementConfig23['x'] = '-2'
740
+ elementConfig23['w'] = 47
741
+ elementConfig23['h'] = 25
742
+ elementConfig23['map'] = component.sprite
743
+ elementConfig23['frame'] = 'min'
744
+
745
+ const skip23 = []
746
+ if (typeof cmp23 !== 'undefined') {
747
+ for (let key in cmp23[Symbol.for('config')].props) {
748
+ delete elementConfig23[cmp23[Symbol.for('config')].props[key]]
749
+ skip23.push(cmp23[Symbol.for('config')].props[key])
750
+ }
751
+ }
752
+
753
+ elms[23].populate(elementConfig23)
754
+
755
+ if (inSlot === true) {
756
+ slotChildCounter -= 1
757
+ }
758
+
759
+ parent = elms[23]
760
+ const props24 = {}
761
+ props24['image'] = component.image
762
+ props24['x'] = '-2'
763
+ props24['w'] = 47
764
+ props24['h'] = 25
765
+ props24['map'] = component.sprite
766
+ props24['frame'] = 'min'
767
+
768
+ componentType = props24['is'] || 'Sprite'
769
+
770
+ let component24
771
+ if (typeof componentType === 'string') {
772
+ component24 =
773
+ (context.components && context.components[componentType]) || components[componentType]
774
+ if (!component24) {
775
+ throw new Error('Component "Sprite" not found')
776
+ }
777
+ } else if (
778
+ typeof componentType === 'function' &&
779
+ componentType[Symbol.for('isComponent')] === true
780
+ ) {
781
+ component24 = componentType
782
+ }
783
+
784
+ elms[24] = component24.call(null, { props: props24 }, elms[23], component)
785
+
786
+ if (elms[24][Symbol.for('slots')][0]) {
787
+ parent = elms[24][Symbol.for('slots')][0]
788
+ slotComponent = elms[24]
789
+ inSlot = true
790
+ } else {
791
+ parent = elms[24][Symbol.for('children')][0]
792
+ }
793
+
794
+ if (inSlot === true && slotChildCounter === 0) {
795
+ inSlot = false
796
+ }
797
+
798
+ parent = elms[22]
799
+ const elementConfig25 = {}
800
+
801
+ elms[25] = this.element(
802
+ { parent: parent || 'root' },
803
+ inSlot === true ? slotComponent : component
804
+ )
805
+
806
+ elementConfig25['x'] = 58
807
+ elementConfig25['y'] = 2
808
+ elms[25].populate(elementConfig25)
809
+
810
+ if (inSlot === true) {
811
+ slotChildCounter -= 1
812
+ }
813
+
814
+ const cmp26 = (context.components && context.components['Sprite']) || components['Sprite']
815
+
816
+ parent = elms[25]
817
+ const elementConfig26 = {}
818
+
819
+ elms[26] = this.element(
820
+ { parent: parent || 'root' },
821
+ inSlot === true ? slotComponent : component
822
+ )
823
+
824
+ elementConfig26['image'] = component.image
825
+ elementConfig26['x'] = 0
826
+ elementConfig26['h'] = 20
827
+ elementConfig26['w'] = 20
828
+ elementConfig26['map'] = component.sprite
829
+ elementConfig26['frame'] = component.minFps[0]
830
+
831
+ const skip26 = []
832
+ if (typeof cmp26 !== 'undefined') {
833
+ for (let key in cmp26[Symbol.for('config')].props) {
834
+ delete elementConfig26[cmp26[Symbol.for('config')].props[key]]
835
+ skip26.push(cmp26[Symbol.for('config')].props[key])
836
+ }
837
+ }
838
+
839
+ elms[26].populate(elementConfig26)
840
+
841
+ if (inSlot === true) {
842
+ slotChildCounter -= 1
843
+ }
844
+
845
+ parent = elms[26]
846
+ const props27 = {}
847
+ props27['image'] = component.image
848
+ props27['x'] = 0
849
+ props27['h'] = 20
850
+ props27['w'] = 20
851
+ props27['map'] = component.sprite
852
+
853
+ propData = component.minFps[0]
854
+ if (Array.isArray(propData) === true) {
855
+ propData = getRaw(propData).slice(0)
856
+ }
857
+ props27['frame'] = propData
858
+
859
+ componentType = props27['is'] || 'Sprite'
860
+
861
+ let component27
862
+ if (typeof componentType === 'string') {
863
+ component27 =
864
+ (context.components && context.components[componentType]) || components[componentType]
865
+ if (!component27) {
866
+ throw new Error('Component "Sprite" not found')
867
+ }
868
+ } else if (
869
+ typeof componentType === 'function' &&
870
+ componentType[Symbol.for('isComponent')] === true
871
+ ) {
872
+ component27 = componentType
873
+ }
874
+
875
+ elms[27] = component27.call(null, { props: props27 }, elms[26], component)
876
+
877
+ if (elms[27][Symbol.for('slots')][0]) {
878
+ parent = elms[27][Symbol.for('slots')][0]
879
+ slotComponent = elms[27]
880
+ inSlot = true
881
+ } else {
882
+ parent = elms[27][Symbol.for('children')][0]
883
+ }
884
+
885
+ if (inSlot === true && slotChildCounter === 0) {
886
+ inSlot = false
887
+ }
888
+
889
+ const cmp28 = (context.components && context.components['Sprite']) || components['Sprite']
890
+
891
+ parent = elms[25]
892
+ const elementConfig28 = {}
893
+
894
+ elms[28] = this.element(
895
+ { parent: parent || 'root' },
896
+ inSlot === true ? slotComponent : component
897
+ )
898
+
899
+ elementConfig28['image'] = component.image
900
+ elementConfig28['x'] = 18
901
+ elementConfig28['h'] = 20
902
+ elementConfig28['w'] = 20
903
+ elementConfig28['map'] = component.sprite
904
+ elementConfig28['frame'] = component.minFps[1]
905
+
906
+ const skip28 = []
907
+ if (typeof cmp28 !== 'undefined') {
908
+ for (let key in cmp28[Symbol.for('config')].props) {
909
+ delete elementConfig28[cmp28[Symbol.for('config')].props[key]]
910
+ skip28.push(cmp28[Symbol.for('config')].props[key])
911
+ }
912
+ }
913
+
914
+ elms[28].populate(elementConfig28)
915
+
916
+ if (inSlot === true) {
917
+ slotChildCounter -= 1
918
+ }
919
+
920
+ parent = elms[28]
921
+ const props29 = {}
922
+ props29['image'] = component.image
923
+ props29['x'] = 18
924
+ props29['h'] = 20
925
+ props29['w'] = 20
926
+ props29['map'] = component.sprite
927
+
928
+ propData = component.minFps[1]
929
+ if (Array.isArray(propData) === true) {
930
+ propData = getRaw(propData).slice(0)
931
+ }
932
+ props29['frame'] = propData
933
+
934
+ componentType = props29['is'] || 'Sprite'
935
+
936
+ let component29
937
+ if (typeof componentType === 'string') {
938
+ component29 =
939
+ (context.components && context.components[componentType]) || components[componentType]
940
+ if (!component29) {
941
+ throw new Error('Component "Sprite" not found')
942
+ }
943
+ } else if (
944
+ typeof componentType === 'function' &&
945
+ componentType[Symbol.for('isComponent')] === true
946
+ ) {
947
+ component29 = componentType
948
+ }
949
+
950
+ elms[29] = component29.call(null, { props: props29 }, elms[28], component)
951
+
952
+ if (elms[29][Symbol.for('slots')][0]) {
953
+ parent = elms[29][Symbol.for('slots')][0]
954
+ slotComponent = elms[29]
955
+ inSlot = true
956
+ } else {
957
+ parent = elms[29][Symbol.for('children')][0]
958
+ }
959
+
960
+ if (inSlot === true && slotChildCounter === 0) {
961
+ inSlot = false
962
+ }
963
+
964
+ const cmp30 = (context.components && context.components['Sprite']) || components['Sprite']
965
+
966
+ parent = elms[25]
967
+ const elementConfig30 = {}
968
+
969
+ elms[30] = this.element(
970
+ { parent: parent || 'root' },
971
+ inSlot === true ? slotComponent : component
972
+ )
973
+
974
+ elementConfig30['image'] = component.image
975
+ elementConfig30['x'] = 36
976
+ elementConfig30['h'] = 20
977
+ elementConfig30['w'] = 20
978
+ elementConfig30['map'] = component.sprite
979
+ elementConfig30['frame'] = component.minFps[2]
980
+
981
+ const skip30 = []
982
+ if (typeof cmp30 !== 'undefined') {
983
+ for (let key in cmp30[Symbol.for('config')].props) {
984
+ delete elementConfig30[cmp30[Symbol.for('config')].props[key]]
985
+ skip30.push(cmp30[Symbol.for('config')].props[key])
986
+ }
987
+ }
988
+
989
+ elms[30].populate(elementConfig30)
990
+
991
+ if (inSlot === true) {
992
+ slotChildCounter -= 1
993
+ }
994
+
995
+ parent = elms[30]
996
+ const props31 = {}
997
+ props31['image'] = component.image
998
+ props31['x'] = 36
999
+ props31['h'] = 20
1000
+ props31['w'] = 20
1001
+ props31['map'] = component.sprite
1002
+
1003
+ propData = component.minFps[2]
1004
+ if (Array.isArray(propData) === true) {
1005
+ propData = getRaw(propData).slice(0)
1006
+ }
1007
+ props31['frame'] = propData
1008
+
1009
+ componentType = props31['is'] || 'Sprite'
1010
+
1011
+ let component31
1012
+ if (typeof componentType === 'string') {
1013
+ component31 =
1014
+ (context.components && context.components[componentType]) || components[componentType]
1015
+ if (!component31) {
1016
+ throw new Error('Component "Sprite" not found')
1017
+ }
1018
+ } else if (
1019
+ typeof componentType === 'function' &&
1020
+ componentType[Symbol.for('isComponent')] === true
1021
+ ) {
1022
+ component31 = componentType
1023
+ }
1024
+
1025
+ elms[31] = component31.call(null, { props: props31 }, elms[30], component)
1026
+
1027
+ if (elms[31][Symbol.for('slots')][0]) {
1028
+ parent = elms[31][Symbol.for('slots')][0]
1029
+ slotComponent = elms[31]
1030
+ inSlot = true
1031
+ } else {
1032
+ parent = elms[31][Symbol.for('children')][0]
1033
+ }
1034
+
1035
+ if (inSlot === true && slotChildCounter === 0) {
1036
+ inSlot = false
1037
+ }
1038
+
1039
+ parent = elms[1]
1040
+ const elementConfig32 = {}
1041
+
1042
+ elms[32] = this.element(
1043
+ { parent: parent || 'root' },
1044
+ inSlot === true ? slotComponent : component
1045
+ )
1046
+
1047
+ elementConfig32['x'] = 150
1048
+ elementConfig32['y'] = 40
1049
+ elms[32].populate(elementConfig32)
1050
+
1051
+ if (inSlot === true) {
1052
+ slotChildCounter -= 1
1053
+ }
1054
+
1055
+ const cmp33 = (context.components && context.components['Sprite']) || components['Sprite']
1056
+
1057
+ parent = elms[32]
1058
+ const elementConfig33 = {}
1059
+
1060
+ elms[33] = this.element(
1061
+ { parent: parent || 'root' },
1062
+ inSlot === true ? slotComponent : component
1063
+ )
1064
+
1065
+ elementConfig33['image'] = component.image
1066
+ elementConfig33['w'] = 53
1067
+ elementConfig33['h'] = 25
1068
+ elementConfig33['map'] = component.sprite
1069
+ elementConfig33['frame'] = 'max'
1070
+
1071
+ const skip33 = []
1072
+ if (typeof cmp33 !== 'undefined') {
1073
+ for (let key in cmp33[Symbol.for('config')].props) {
1074
+ delete elementConfig33[cmp33[Symbol.for('config')].props[key]]
1075
+ skip33.push(cmp33[Symbol.for('config')].props[key])
1076
+ }
1077
+ }
1078
+
1079
+ elms[33].populate(elementConfig33)
1080
+
1081
+ if (inSlot === true) {
1082
+ slotChildCounter -= 1
1083
+ }
1084
+
1085
+ parent = elms[33]
1086
+ const props34 = {}
1087
+ props34['image'] = component.image
1088
+ props34['w'] = 53
1089
+ props34['h'] = 25
1090
+ props34['map'] = component.sprite
1091
+ props34['frame'] = 'max'
1092
+
1093
+ componentType = props34['is'] || 'Sprite'
1094
+
1095
+ let component34
1096
+ if (typeof componentType === 'string') {
1097
+ component34 =
1098
+ (context.components && context.components[componentType]) || components[componentType]
1099
+ if (!component34) {
1100
+ throw new Error('Component "Sprite" not found')
1101
+ }
1102
+ } else if (
1103
+ typeof componentType === 'function' &&
1104
+ componentType[Symbol.for('isComponent')] === true
1105
+ ) {
1106
+ component34 = componentType
1107
+ }
1108
+
1109
+ elms[34] = component34.call(null, { props: props34 }, elms[33], component)
1110
+
1111
+ if (elms[34][Symbol.for('slots')][0]) {
1112
+ parent = elms[34][Symbol.for('slots')][0]
1113
+ slotComponent = elms[34]
1114
+ inSlot = true
1115
+ } else {
1116
+ parent = elms[34][Symbol.for('children')][0]
1117
+ }
1118
+
1119
+ if (inSlot === true && slotChildCounter === 0) {
1120
+ inSlot = false
1121
+ }
1122
+
1123
+ parent = elms[32]
1124
+ const elementConfig35 = {}
1125
+
1126
+ elms[35] = this.element(
1127
+ { parent: parent || 'root' },
1128
+ inSlot === true ? slotComponent : component
1129
+ )
1130
+
1131
+ elementConfig35['x'] = 63
1132
+ elementConfig35['y'] = 2
1133
+ elms[35].populate(elementConfig35)
1134
+
1135
+ if (inSlot === true) {
1136
+ slotChildCounter -= 1
1137
+ }
1138
+
1139
+ const cmp36 = (context.components && context.components['Sprite']) || components['Sprite']
1140
+
1141
+ parent = elms[35]
1142
+ const elementConfig36 = {}
1143
+
1144
+ elms[36] = this.element(
1145
+ { parent: parent || 'root' },
1146
+ inSlot === true ? slotComponent : component
1147
+ )
1148
+
1149
+ elementConfig36['image'] = component.image
1150
+ elementConfig36['x'] = 0
1151
+ elementConfig36['h'] = 20
1152
+ elementConfig36['w'] = 20
1153
+ elementConfig36['map'] = component.sprite
1154
+ elementConfig36['frame'] = component.maxFps[0]
1155
+
1156
+ const skip36 = []
1157
+ if (typeof cmp36 !== 'undefined') {
1158
+ for (let key in cmp36[Symbol.for('config')].props) {
1159
+ delete elementConfig36[cmp36[Symbol.for('config')].props[key]]
1160
+ skip36.push(cmp36[Symbol.for('config')].props[key])
1161
+ }
1162
+ }
1163
+
1164
+ elms[36].populate(elementConfig36)
1165
+
1166
+ if (inSlot === true) {
1167
+ slotChildCounter -= 1
1168
+ }
1169
+
1170
+ parent = elms[36]
1171
+ const props37 = {}
1172
+ props37['image'] = component.image
1173
+ props37['x'] = 0
1174
+ props37['h'] = 20
1175
+ props37['w'] = 20
1176
+ props37['map'] = component.sprite
1177
+
1178
+ propData = component.maxFps[0]
1179
+ if (Array.isArray(propData) === true) {
1180
+ propData = getRaw(propData).slice(0)
1181
+ }
1182
+ props37['frame'] = propData
1183
+
1184
+ componentType = props37['is'] || 'Sprite'
1185
+
1186
+ let component37
1187
+ if (typeof componentType === 'string') {
1188
+ component37 =
1189
+ (context.components && context.components[componentType]) || components[componentType]
1190
+ if (!component37) {
1191
+ throw new Error('Component "Sprite" not found')
1192
+ }
1193
+ } else if (
1194
+ typeof componentType === 'function' &&
1195
+ componentType[Symbol.for('isComponent')] === true
1196
+ ) {
1197
+ component37 = componentType
1198
+ }
1199
+
1200
+ elms[37] = component37.call(null, { props: props37 }, elms[36], component)
1201
+
1202
+ if (elms[37][Symbol.for('slots')][0]) {
1203
+ parent = elms[37][Symbol.for('slots')][0]
1204
+ slotComponent = elms[37]
1205
+ inSlot = true
1206
+ } else {
1207
+ parent = elms[37][Symbol.for('children')][0]
1208
+ }
1209
+
1210
+ if (inSlot === true && slotChildCounter === 0) {
1211
+ inSlot = false
1212
+ }
1213
+
1214
+ const cmp38 = (context.components && context.components['Sprite']) || components['Sprite']
1215
+
1216
+ parent = elms[35]
1217
+ const elementConfig38 = {}
1218
+
1219
+ elms[38] = this.element(
1220
+ { parent: parent || 'root' },
1221
+ inSlot === true ? slotComponent : component
1222
+ )
1223
+
1224
+ elementConfig38['image'] = component.image
1225
+ elementConfig38['x'] = 18
1226
+ elementConfig38['h'] = 20
1227
+ elementConfig38['w'] = 20
1228
+ elementConfig38['map'] = component.sprite
1229
+ elementConfig38['frame'] = component.maxFps[1]
1230
+
1231
+ const skip38 = []
1232
+ if (typeof cmp38 !== 'undefined') {
1233
+ for (let key in cmp38[Symbol.for('config')].props) {
1234
+ delete elementConfig38[cmp38[Symbol.for('config')].props[key]]
1235
+ skip38.push(cmp38[Symbol.for('config')].props[key])
1236
+ }
1237
+ }
1238
+
1239
+ elms[38].populate(elementConfig38)
1240
+
1241
+ if (inSlot === true) {
1242
+ slotChildCounter -= 1
1243
+ }
1244
+
1245
+ parent = elms[38]
1246
+ const props39 = {}
1247
+ props39['image'] = component.image
1248
+ props39['x'] = 18
1249
+ props39['h'] = 20
1250
+ props39['w'] = 20
1251
+ props39['map'] = component.sprite
1252
+
1253
+ propData = component.maxFps[1]
1254
+ if (Array.isArray(propData) === true) {
1255
+ propData = getRaw(propData).slice(0)
1256
+ }
1257
+ props39['frame'] = propData
1258
+
1259
+ componentType = props39['is'] || 'Sprite'
1260
+
1261
+ let component39
1262
+ if (typeof componentType === 'string') {
1263
+ component39 =
1264
+ (context.components && context.components[componentType]) || components[componentType]
1265
+ if (!component39) {
1266
+ throw new Error('Component "Sprite" not found')
1267
+ }
1268
+ } else if (
1269
+ typeof componentType === 'function' &&
1270
+ componentType[Symbol.for('isComponent')] === true
1271
+ ) {
1272
+ component39 = componentType
1273
+ }
1274
+
1275
+ elms[39] = component39.call(null, { props: props39 }, elms[38], component)
1276
+
1277
+ if (elms[39][Symbol.for('slots')][0]) {
1278
+ parent = elms[39][Symbol.for('slots')][0]
1279
+ slotComponent = elms[39]
1280
+ inSlot = true
1281
+ } else {
1282
+ parent = elms[39][Symbol.for('children')][0]
1283
+ }
1284
+
1285
+ if (inSlot === true && slotChildCounter === 0) {
1286
+ inSlot = false
1287
+ }
1288
+
1289
+ const cmp40 = (context.components && context.components['Sprite']) || components['Sprite']
1290
+
1291
+ parent = elms[35]
1292
+ const elementConfig40 = {}
1293
+
1294
+ elms[40] = this.element(
1295
+ { parent: parent || 'root' },
1296
+ inSlot === true ? slotComponent : component
1297
+ )
1298
+
1299
+ elementConfig40['image'] = component.image
1300
+ elementConfig40['x'] = 36
1301
+ elementConfig40['h'] = 20
1302
+ elementConfig40['w'] = 20
1303
+ elementConfig40['map'] = component.sprite
1304
+ elementConfig40['frame'] = component.maxFps[2]
1305
+
1306
+ const skip40 = []
1307
+ if (typeof cmp40 !== 'undefined') {
1308
+ for (let key in cmp40[Symbol.for('config')].props) {
1309
+ delete elementConfig40[cmp40[Symbol.for('config')].props[key]]
1310
+ skip40.push(cmp40[Symbol.for('config')].props[key])
1311
+ }
1312
+ }
1313
+
1314
+ elms[40].populate(elementConfig40)
1315
+
1316
+ if (inSlot === true) {
1317
+ slotChildCounter -= 1
1318
+ }
1319
+
1320
+ parent = elms[40]
1321
+ const props41 = {}
1322
+ props41['image'] = component.image
1323
+ props41['x'] = 36
1324
+ props41['h'] = 20
1325
+ props41['w'] = 20
1326
+ props41['map'] = component.sprite
1327
+
1328
+ propData = component.maxFps[2]
1329
+ if (Array.isArray(propData) === true) {
1330
+ propData = getRaw(propData).slice(0)
1331
+ }
1332
+ props41['frame'] = propData
1333
+
1334
+ componentType = props41['is'] || 'Sprite'
1335
+
1336
+ let component41
1337
+ if (typeof componentType === 'string') {
1338
+ component41 =
1339
+ (context.components && context.components[componentType]) || components[componentType]
1340
+ if (!component41) {
1341
+ throw new Error('Component "Sprite" not found')
1342
+ }
1343
+ } else if (
1344
+ typeof componentType === 'function' &&
1345
+ componentType[Symbol.for('isComponent')] === true
1346
+ ) {
1347
+ component41 = componentType
1348
+ }
1349
+
1350
+ elms[41] = component41.call(null, { props: props41 }, elms[40], component)
1351
+
1352
+ if (elms[41][Symbol.for('slots')][0]) {
1353
+ parent = elms[41][Symbol.for('slots')][0]
1354
+ slotComponent = elms[41]
1355
+ inSlot = true
1356
+ } else {
1357
+ parent = elms[41][Symbol.for('children')][0]
1358
+ }
1359
+
1360
+ if (inSlot === true && slotChildCounter === 0) {
1361
+ inSlot = false
1362
+ }
1363
+
1364
+ return elms
1365
+ },
1366
+ effects: [
1367
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1368
+ if (typeof skip6 === 'undefined' || skip6.indexOf('frame') === -1)
1369
+ elms[6].set('frame', component.fps[0])
1370
+ },
1371
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1372
+ elms[7][Symbol.for('props')]['frame'] = component.fps[0]
1373
+ },
1374
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1375
+ if (typeof skip8 === 'undefined' || skip8.indexOf('frame') === -1)
1376
+ elms[8].set('frame', component.fps[1])
1377
+ },
1378
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1379
+ elms[9][Symbol.for('props')]['frame'] = component.fps[1]
1380
+ },
1381
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1382
+ if (typeof skip10 === 'undefined' || skip10.indexOf('frame') === -1)
1383
+ elms[10].set('frame', component.fps[2])
1384
+ },
1385
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1386
+ elms[11][Symbol.for('props')]['frame'] = component.fps[2]
1387
+ },
1388
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1389
+ if (typeof skip16 === 'undefined' || skip16.indexOf('frame') === -1)
1390
+ elms[16].set('frame', component.avgFps[0])
1391
+ },
1392
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1393
+ elms[17][Symbol.for('props')]['frame'] = component.avgFps[0]
1394
+ },
1395
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1396
+ if (typeof skip18 === 'undefined' || skip18.indexOf('frame') === -1)
1397
+ elms[18].set('frame', component.avgFps[1])
1398
+ },
1399
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1400
+ elms[19][Symbol.for('props')]['frame'] = component.avgFps[1]
1401
+ },
1402
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1403
+ if (typeof skip20 === 'undefined' || skip20.indexOf('frame') === -1)
1404
+ elms[20].set('frame', component.avgFps[2])
1405
+ },
1406
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1407
+ elms[21][Symbol.for('props')]['frame'] = component.avgFps[2]
1408
+ },
1409
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1410
+ if (typeof skip26 === 'undefined' || skip26.indexOf('frame') === -1)
1411
+ elms[26].set('frame', component.minFps[0])
1412
+ },
1413
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1414
+ elms[27][Symbol.for('props')]['frame'] = component.minFps[0]
1415
+ },
1416
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1417
+ if (typeof skip28 === 'undefined' || skip28.indexOf('frame') === -1)
1418
+ elms[28].set('frame', component.minFps[1])
1419
+ },
1420
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1421
+ elms[29][Symbol.for('props')]['frame'] = component.minFps[1]
1422
+ },
1423
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1424
+ if (typeof skip30 === 'undefined' || skip30.indexOf('frame') === -1)
1425
+ elms[30].set('frame', component.minFps[2])
1426
+ },
1427
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1428
+ elms[31][Symbol.for('props')]['frame'] = component.minFps[2]
1429
+ },
1430
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1431
+ if (typeof skip36 === 'undefined' || skip36.indexOf('frame') === -1)
1432
+ elms[36].set('frame', component.maxFps[0])
1433
+ },
1434
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1435
+ elms[37][Symbol.for('props')]['frame'] = component.maxFps[0]
1436
+ },
1437
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1438
+ if (typeof skip38 === 'undefined' || skip38.indexOf('frame') === -1)
1439
+ elms[38].set('frame', component.maxFps[1])
1440
+ },
1441
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1442
+ elms[39][Symbol.for('props')]['frame'] = component.maxFps[1]
1443
+ },
1444
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1445
+ if (typeof skip40 === 'undefined' || skip40.indexOf('frame') === -1)
1446
+ elms[40].set('frame', component.maxFps[2])
1447
+ },
1448
+ function anonymous(component, elms, context, components, rootComponent, effect) {
1449
+ elms[41][Symbol.for('props')]['frame'] = component.maxFps[2]
1450
+ },
1451
+ ],
1452
+ context: {},
1453
+ },
1454
+ state() {
1455
+ return {
1456
+ image: fps_sprite,
1457
+ sprite: {
1458
+ defaults: {
1459
+ y: 1,
1460
+ w: 20,
1461
+ h: 20,
1462
+ },
1463
+ frames: {
1464
+ '-': { x: -1000 },
1465
+ 0: { x: 1 },
1466
+ 1: { x: 23 },
1467
+ 2: { x: 45 },
1468
+ 3: { x: 67 },
1469
+ 4: { x: 89 },
1470
+ 5: { x: 111 },
1471
+ 6: { x: 133 },
1472
+ 7: { x: 155 },
1473
+ 8: { x: 177 },
1474
+ 9: { x: 199 },
1475
+ avg: { x: 221, w: 48, h: 25 },
1476
+ fps: { x: 271, w: 43, h: 25 },
1477
+ max: { x: 316, w: 53, h: 25 },
1478
+ min: { x: 371, w: 47, h: 25 },
1479
+ },
1480
+ },
1481
+ fps: '---',
1482
+ avgFps: '---',
1483
+ minFps: '---',
1484
+ maxFps: '---',
1485
+ }
1486
+ },
1487
+ hooks: {
1488
+ ready() {
1489
+ let minFps = 10000
1490
+ let maxFps = 0
1491
+ let avgFps = 0
1492
+ let totalFps = 0
1493
+ let fpsUpdateCounter = 0
1494
+
1495
+ // This leaks - might be L3 SubTexture issue
1496
+ // renderer.on('fpsUpdate', (rM, { fps }) => {
1497
+ // minFps = Math.min(fps, minFps)
1498
+ // maxFps = Math.max(fps, maxFps)
1499
+ // totalFps += fps
1500
+ // fpsUpdateCounter++
1501
+ // avgFps = Math.round(totalFps / fpsUpdateCounter)
1502
+
1503
+ // this.fps = fps.toString().padStart(3, '0')
1504
+ // this.avgFps = avgFps.toString().padStart(3, '0')
1505
+ // this.minFps = minFps.toString().padStart(3, '0')
1506
+ // this.maxFps = maxFps.toString().padStart(3, '0')
1507
+ // })
1508
+ },
1509
+ },
1510
+ })