@lightningjs/blits 1.32.0 → 1.32.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/components/Circle.js
CHANGED
|
@@ -50,16 +50,17 @@ export default () =>
|
|
|
50
50
|
},
|
|
51
51
|
effects: [
|
|
52
52
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
53
|
-
elms[0].set('color', component.color)
|
|
53
|
+
if (elms[0] !== undefined) elms[0].set('color', component.color)
|
|
54
54
|
},
|
|
55
55
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
56
|
-
elms[0].set('w', component.size)
|
|
56
|
+
if (elms[0] !== undefined) elms[0].set('w', component.size)
|
|
57
57
|
},
|
|
58
58
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
59
|
-
elms[0].set('h', component.size)
|
|
59
|
+
if (elms[0] !== undefined) elms[0].set('h', component.size)
|
|
60
60
|
},
|
|
61
61
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
62
|
-
elms[0]
|
|
62
|
+
if (elms[0] !== undefined)
|
|
63
|
+
elms[0].set('effects', [component.shader('radius', { radius: component.radius })])
|
|
63
64
|
},
|
|
64
65
|
],
|
|
65
66
|
context: {},
|
|
@@ -1366,84 +1366,84 @@ export default () =>
|
|
|
1366
1366
|
effects: [
|
|
1367
1367
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1368
1368
|
if (typeof skip6 === 'undefined' || skip6.indexOf('frame') === -1)
|
|
1369
|
-
elms[6].set('frame', component.fps[0])
|
|
1369
|
+
if (elms[6] !== undefined) elms[6].set('frame', component.fps[0])
|
|
1370
1370
|
},
|
|
1371
1371
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1372
1372
|
elms[7][Symbol.for('props')]['frame'] = component.fps[0]
|
|
1373
1373
|
},
|
|
1374
1374
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1375
1375
|
if (typeof skip8 === 'undefined' || skip8.indexOf('frame') === -1)
|
|
1376
|
-
elms[8].set('frame', component.fps[1])
|
|
1376
|
+
if (elms[8] !== undefined) elms[8].set('frame', component.fps[1])
|
|
1377
1377
|
},
|
|
1378
1378
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1379
1379
|
elms[9][Symbol.for('props')]['frame'] = component.fps[1]
|
|
1380
1380
|
},
|
|
1381
1381
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1382
1382
|
if (typeof skip10 === 'undefined' || skip10.indexOf('frame') === -1)
|
|
1383
|
-
elms[10].set('frame', component.fps[2])
|
|
1383
|
+
if (elms[10] !== undefined) elms[10].set('frame', component.fps[2])
|
|
1384
1384
|
},
|
|
1385
1385
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1386
1386
|
elms[11][Symbol.for('props')]['frame'] = component.fps[2]
|
|
1387
1387
|
},
|
|
1388
1388
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1389
1389
|
if (typeof skip16 === 'undefined' || skip16.indexOf('frame') === -1)
|
|
1390
|
-
elms[16].set('frame', component.avgFps[0])
|
|
1390
|
+
if (elms[16] !== undefined) elms[16].set('frame', component.avgFps[0])
|
|
1391
1391
|
},
|
|
1392
1392
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1393
1393
|
elms[17][Symbol.for('props')]['frame'] = component.avgFps[0]
|
|
1394
1394
|
},
|
|
1395
1395
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1396
1396
|
if (typeof skip18 === 'undefined' || skip18.indexOf('frame') === -1)
|
|
1397
|
-
elms[18].set('frame', component.avgFps[1])
|
|
1397
|
+
if (elms[18] !== undefined) elms[18].set('frame', component.avgFps[1])
|
|
1398
1398
|
},
|
|
1399
1399
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1400
1400
|
elms[19][Symbol.for('props')]['frame'] = component.avgFps[1]
|
|
1401
1401
|
},
|
|
1402
1402
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1403
1403
|
if (typeof skip20 === 'undefined' || skip20.indexOf('frame') === -1)
|
|
1404
|
-
elms[20].set('frame', component.avgFps[2])
|
|
1404
|
+
if (elms[20] !== undefined) elms[20].set('frame', component.avgFps[2])
|
|
1405
1405
|
},
|
|
1406
1406
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1407
1407
|
elms[21][Symbol.for('props')]['frame'] = component.avgFps[2]
|
|
1408
1408
|
},
|
|
1409
1409
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1410
1410
|
if (typeof skip26 === 'undefined' || skip26.indexOf('frame') === -1)
|
|
1411
|
-
elms[26].set('frame', component.minFps[0])
|
|
1411
|
+
if (elms[26] !== undefined) elms[26].set('frame', component.minFps[0])
|
|
1412
1412
|
},
|
|
1413
1413
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1414
1414
|
elms[27][Symbol.for('props')]['frame'] = component.minFps[0]
|
|
1415
1415
|
},
|
|
1416
1416
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1417
1417
|
if (typeof skip28 === 'undefined' || skip28.indexOf('frame') === -1)
|
|
1418
|
-
elms[28].set('frame', component.minFps[1])
|
|
1418
|
+
if (elms[28] !== undefined) elms[28].set('frame', component.minFps[1])
|
|
1419
1419
|
},
|
|
1420
1420
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1421
1421
|
elms[29][Symbol.for('props')]['frame'] = component.minFps[1]
|
|
1422
1422
|
},
|
|
1423
1423
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1424
1424
|
if (typeof skip30 === 'undefined' || skip30.indexOf('frame') === -1)
|
|
1425
|
-
elms[30].set('frame', component.minFps[2])
|
|
1425
|
+
if (elms[30] !== undefined) elms[30].set('frame', component.minFps[2])
|
|
1426
1426
|
},
|
|
1427
1427
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1428
1428
|
elms[31][Symbol.for('props')]['frame'] = component.minFps[2]
|
|
1429
1429
|
},
|
|
1430
1430
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1431
1431
|
if (typeof skip36 === 'undefined' || skip36.indexOf('frame') === -1)
|
|
1432
|
-
elms[36].set('frame', component.maxFps[0])
|
|
1432
|
+
if (elms[36] !== undefined) elms[36].set('frame', component.maxFps[0])
|
|
1433
1433
|
},
|
|
1434
1434
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1435
1435
|
elms[37][Symbol.for('props')]['frame'] = component.maxFps[0]
|
|
1436
1436
|
},
|
|
1437
1437
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1438
1438
|
if (typeof skip38 === 'undefined' || skip38.indexOf('frame') === -1)
|
|
1439
|
-
elms[38].set('frame', component.maxFps[1])
|
|
1439
|
+
if (elms[38] !== undefined) elms[38].set('frame', component.maxFps[1])
|
|
1440
1440
|
},
|
|
1441
1441
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1442
1442
|
elms[39][Symbol.for('props')]['frame'] = component.maxFps[1]
|
|
1443
1443
|
},
|
|
1444
1444
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1445
1445
|
if (typeof skip40 === 'undefined' || skip40.indexOf('frame') === -1)
|
|
1446
|
-
elms[40].set('frame', component.maxFps[2])
|
|
1446
|
+
if (elms[40] !== undefined) elms[40].set('frame', component.maxFps[2])
|
|
1447
1447
|
},
|
|
1448
1448
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
1449
1449
|
elms[41][Symbol.for('props')]['frame'] = component.maxFps[2]
|
package/src/components/Sprite.js
CHANGED
|
@@ -52,10 +52,10 @@ export default () =>
|
|
|
52
52
|
},
|
|
53
53
|
effects: [
|
|
54
54
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
55
|
-
elms[0].set('texture', component.texture)
|
|
55
|
+
if (elms[0] !== undefined) elms[0].set('texture', component.texture)
|
|
56
56
|
},
|
|
57
57
|
function anonymous(component, elms, context, components, rootComponent, effect) {
|
|
58
|
-
elms[0].set('color', component.color)
|
|
58
|
+
if (elms[0] !== undefined) elms[0].set('color', component.color)
|
|
59
59
|
},
|
|
60
60
|
],
|
|
61
61
|
context: {},
|
|
@@ -162,11 +162,14 @@ const generateElementCode = function (
|
|
|
162
162
|
this.effectsCode.push(`
|
|
163
163
|
if(typeof skip${counter} === 'undefined' ||
|
|
164
164
|
skip${counter}.indexOf('${key.substring(1)}') === -1)
|
|
165
|
-
${elm}.set('${key.substring(1)}', ${interpolate(
|
|
165
|
+
if(${elm} !== undefined) ${elm}.set('${key.substring(1)}', ${interpolate(
|
|
166
|
+
templateObject[key],
|
|
167
|
+
options.component
|
|
168
|
+
)})
|
|
166
169
|
`)
|
|
167
170
|
} else {
|
|
168
171
|
this.effectsCode.push(`
|
|
169
|
-
${elm}.set('${key.substring(1)}', ${interpolate(
|
|
172
|
+
if(${elm} !== undefined) ${elm}.set('${key.substring(1)}', ${interpolate(
|
|
170
173
|
templateObject[key],
|
|
171
174
|
options.component
|
|
172
175
|
)})
|