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