Skip to content

Commit c2b7536

Browse files
Merge pull request #665 from evanakm/remove-trailing-commas
Remove trailing commas
2 parents 22604e9 + c3db335 commit c2b7536

File tree

5 files changed

+63
-63
lines changed

5 files changed

+63
-63
lines changed

dist/gpu-browser-core.js

+20-20
Original file line numberDiff line numberDiff line change
@@ -11229,7 +11229,7 @@ float integerCorrectionModulo(float number, float divisor) {
1122911229
result.push(
1123011230
' threadId = indexTo3D(index, uOutputDim)',
1123111231
' kernel()',
11232-
` gl_FragData[0].${channel} = kernelResult`,
11232+
` gl_FragData[0].${channel} = kernelResult`
1123311233
);
1123411234
}
1123511235

@@ -11239,11 +11239,11 @@ float integerCorrectionModulo(float number, float divisor) {
1123911239
const subKernel = this.subKernels[i];
1124011240
if (subKernel.returnType === 'Integer') {
1124111241
result.push(
11242-
` gl_FragData[${i + 1}].${channel} = float(subKernelResult_${this.subKernels[i].name})`,
11242+
` gl_FragData[${i + 1}].${channel} = float(subKernelResult_${this.subKernels[i].name})`
1124311243
);
1124411244
} else {
1124511245
result.push(
11246-
` gl_FragData[${i + 1}].${channel} = subKernelResult_${this.subKernels[i].name}`,
11246+
` gl_FragData[${i + 1}].${channel} = subKernelResult_${this.subKernels[i].name}`
1124711247
);
1124811248
}
1124911249
}
@@ -11264,11 +11264,11 @@ float integerCorrectionModulo(float number, float divisor) {
1126411264
const subKernel = this.subKernels[i];
1126511265
if (subKernel.returnType === 'Integer') {
1126611266
result.push(
11267-
` gl_FragData[${i + 1}][0] = float(subKernelResult_${subKernel.name})`,
11267+
` gl_FragData[${i + 1}][0] = float(subKernelResult_${subKernel.name})`
1126811268
);
1126911269
} else {
1127011270
result.push(
11271-
` gl_FragData[${i + 1}][0] = subKernelResult_${subKernel.name}`,
11271+
` gl_FragData[${i + 1}][0] = subKernelResult_${subKernel.name}`
1127211272
);
1127311273
}
1127411274
}
@@ -11290,7 +11290,7 @@ float integerCorrectionModulo(float number, float divisor) {
1129011290
for (let i = 0; i < this.subKernels.length; ++i) {
1129111291
result.push(
1129211292
` gl_FragData[${i + 1}][0] = subKernelResult_${this.subKernels[i].name}[0]`,
11293-
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`,
11293+
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`
1129411294
);
1129511295
}
1129611296
return result;
@@ -11313,7 +11313,7 @@ float integerCorrectionModulo(float number, float divisor) {
1131311313
result.push(
1131411314
` gl_FragData[${i + 1}][0] = subKernelResult_${this.subKernels[i].name}[0]`,
1131511315
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`,
11316-
` gl_FragData[${i + 1}][2] = subKernelResult_${this.subKernels[i].name}[2]`,
11316+
` gl_FragData[${i + 1}][2] = subKernelResult_${this.subKernels[i].name}[2]`
1131711317
);
1131811318
}
1131911319
return result;
@@ -11338,11 +11338,11 @@ float integerCorrectionModulo(float number, float divisor) {
1133811338
const subKernel = this.subKernels[i];
1133911339
if (subKernel.returnType === 'Integer') {
1134011340
result.push(
11341-
` gl_FragData[${i + 1}] = float(subKernelResult_${this.subKernels[i].name})`,
11341+
` gl_FragData[${i + 1}] = float(subKernelResult_${this.subKernels[i].name})`
1134211342
);
1134311343
} else {
1134411344
result.push(
11345-
` gl_FragData[${i + 1}] = subKernelResult_${this.subKernels[i].name}`,
11345+
` gl_FragData[${i + 1}] = subKernelResult_${this.subKernels[i].name}`
1134611346
);
1134711347
}
1134811348
}
@@ -11351,7 +11351,7 @@ float integerCorrectionModulo(float number, float divisor) {
1135111351
for (let i = 0; i < this.subKernels.length; ++i) {
1135211352
result.push(
1135311353
` gl_FragData[${i + 1}][0] = subKernelResult_${this.subKernels[i].name}[0]`,
11354-
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`,
11354+
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`
1135511355
);
1135611356
}
1135711357
break;
@@ -11360,7 +11360,7 @@ float integerCorrectionModulo(float number, float divisor) {
1136011360
result.push(
1136111361
` gl_FragData[${i + 1}][0] = subKernelResult_${this.subKernels[i].name}[0]`,
1136211362
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`,
11363-
` gl_FragData[${i + 1}][2] = subKernelResult_${this.subKernels[i].name}[2]`,
11363+
` gl_FragData[${i + 1}][2] = subKernelResult_${this.subKernels[i].name}[2]`
1136411364
);
1136511365
}
1136611366
break;
@@ -11370,7 +11370,7 @@ float integerCorrectionModulo(float number, float divisor) {
1137011370
` gl_FragData[${i + 1}][0] = subKernelResult_${this.subKernels[i].name}[0]`,
1137111371
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`,
1137211372
` gl_FragData[${i + 1}][2] = subKernelResult_${this.subKernels[i].name}[2]`,
11373-
` gl_FragData[${i + 1}][3] = subKernelResult_${this.subKernels[i].name}[3]`,
11373+
` gl_FragData[${i + 1}][3] = subKernelResult_${this.subKernels[i].name}[3]`
1137411374
);
1137511375
}
1137611376
break;
@@ -13283,7 +13283,7 @@ class WebGL2Kernel extends WebGLKernel {
1328313283
result.push(
1328413284
' threadId = indexTo3D(index, uOutputDim)',
1328513285
' kernel()',
13286-
` data0.${channel} = kernelResult`,
13286+
` data0.${channel} = kernelResult`
1328713287
);
1328813288
}
1328913289

@@ -13293,11 +13293,11 @@ class WebGL2Kernel extends WebGLKernel {
1329313293
const subKernel = this.subKernels[i];
1329413294
if (subKernel.returnType === 'Integer') {
1329513295
result.push(
13296-
` data${i + 1}.${channel} = float(subKernelResult_${subKernel.name})`,
13296+
` data${i + 1}.${channel} = float(subKernelResult_${subKernel.name})`
1329713297
);
1329813298
} else {
1329913299
result.push(
13300-
` data${i + 1}.${channel} = subKernelResult_${subKernel.name}`,
13300+
` data${i + 1}.${channel} = subKernelResult_${subKernel.name}`
1330113301
);
1330213302
}
1330313303
}
@@ -13318,11 +13318,11 @@ class WebGL2Kernel extends WebGLKernel {
1331813318
const subKernel = this.subKernels[i];
1331913319
if (subKernel.returnType === 'Integer') {
1332013320
result.push(
13321-
` data${i + 1}[0] = float(subKernelResult_${subKernel.name})`,
13321+
` data${i + 1}[0] = float(subKernelResult_${subKernel.name})`
1332213322
);
1332313323
} else {
1332413324
result.push(
13325-
` data${i + 1}[0] = subKernelResult_${subKernel.name}`,
13325+
` data${i + 1}[0] = subKernelResult_${subKernel.name}`
1332613326
);
1332713327
}
1332813328
}
@@ -13345,7 +13345,7 @@ class WebGL2Kernel extends WebGLKernel {
1334513345
const subKernel = this.subKernels[i];
1334613346
result.push(
1334713347
` data${i + 1}[0] = subKernelResult_${subKernel.name}[0]`,
13348-
` data${i + 1}[1] = subKernelResult_${subKernel.name}[1]`,
13348+
` data${i + 1}[1] = subKernelResult_${subKernel.name}[1]`
1334913349
);
1335013350
}
1335113351
return result;
@@ -13369,7 +13369,7 @@ class WebGL2Kernel extends WebGLKernel {
1336913369
result.push(
1337013370
` data${i + 1}[0] = subKernelResult_${subKernel.name}[0]`,
1337113371
` data${i + 1}[1] = subKernelResult_${subKernel.name}[1]`,
13372-
` data${i + 1}[2] = subKernelResult_${subKernel.name}[2]`,
13372+
` data${i + 1}[2] = subKernelResult_${subKernel.name}[2]`
1337313373
);
1337413374
}
1337513375
return result;
@@ -13388,7 +13388,7 @@ class WebGL2Kernel extends WebGLKernel {
1338813388
if (!this.subKernels) return result;
1338913389
for (let i = 0; i < this.subKernels.length; ++i) {
1339013390
result.push(
13391-
` data${i + 1} = subKernelResult_${this.subKernels[i].name}`,
13391+
` data${i + 1} = subKernelResult_${this.subKernels[i].name}`
1339213392
);
1339313393
}
1339413394
return result;

dist/gpu-browser.js

+20-20
Original file line numberDiff line numberDiff line change
@@ -15838,7 +15838,7 @@ float integerCorrectionModulo(float number, float divisor) {
1583815838
result.push(
1583915839
' threadId = indexTo3D(index, uOutputDim)',
1584015840
' kernel()',
15841-
` gl_FragData[0].${channel} = kernelResult`,
15841+
` gl_FragData[0].${channel} = kernelResult`
1584215842
);
1584315843
}
1584415844

@@ -15848,11 +15848,11 @@ float integerCorrectionModulo(float number, float divisor) {
1584815848
const subKernel = this.subKernels[i];
1584915849
if (subKernel.returnType === 'Integer') {
1585015850
result.push(
15851-
` gl_FragData[${i + 1}].${channel} = float(subKernelResult_${this.subKernels[i].name})`,
15851+
` gl_FragData[${i + 1}].${channel} = float(subKernelResult_${this.subKernels[i].name})`
1585215852
);
1585315853
} else {
1585415854
result.push(
15855-
` gl_FragData[${i + 1}].${channel} = subKernelResult_${this.subKernels[i].name}`,
15855+
` gl_FragData[${i + 1}].${channel} = subKernelResult_${this.subKernels[i].name}`
1585615856
);
1585715857
}
1585815858
}
@@ -15873,11 +15873,11 @@ float integerCorrectionModulo(float number, float divisor) {
1587315873
const subKernel = this.subKernels[i];
1587415874
if (subKernel.returnType === 'Integer') {
1587515875
result.push(
15876-
` gl_FragData[${i + 1}][0] = float(subKernelResult_${subKernel.name})`,
15876+
` gl_FragData[${i + 1}][0] = float(subKernelResult_${subKernel.name})`
1587715877
);
1587815878
} else {
1587915879
result.push(
15880-
` gl_FragData[${i + 1}][0] = subKernelResult_${subKernel.name}`,
15880+
` gl_FragData[${i + 1}][0] = subKernelResult_${subKernel.name}`
1588115881
);
1588215882
}
1588315883
}
@@ -15899,7 +15899,7 @@ float integerCorrectionModulo(float number, float divisor) {
1589915899
for (let i = 0; i < this.subKernels.length; ++i) {
1590015900
result.push(
1590115901
` gl_FragData[${i + 1}][0] = subKernelResult_${this.subKernels[i].name}[0]`,
15902-
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`,
15902+
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`
1590315903
);
1590415904
}
1590515905
return result;
@@ -15922,7 +15922,7 @@ float integerCorrectionModulo(float number, float divisor) {
1592215922
result.push(
1592315923
` gl_FragData[${i + 1}][0] = subKernelResult_${this.subKernels[i].name}[0]`,
1592415924
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`,
15925-
` gl_FragData[${i + 1}][2] = subKernelResult_${this.subKernels[i].name}[2]`,
15925+
` gl_FragData[${i + 1}][2] = subKernelResult_${this.subKernels[i].name}[2]`
1592615926
);
1592715927
}
1592815928
return result;
@@ -15947,11 +15947,11 @@ float integerCorrectionModulo(float number, float divisor) {
1594715947
const subKernel = this.subKernels[i];
1594815948
if (subKernel.returnType === 'Integer') {
1594915949
result.push(
15950-
` gl_FragData[${i + 1}] = float(subKernelResult_${this.subKernels[i].name})`,
15950+
` gl_FragData[${i + 1}] = float(subKernelResult_${this.subKernels[i].name})`
1595115951
);
1595215952
} else {
1595315953
result.push(
15954-
` gl_FragData[${i + 1}] = subKernelResult_${this.subKernels[i].name}`,
15954+
` gl_FragData[${i + 1}] = subKernelResult_${this.subKernels[i].name}`
1595515955
);
1595615956
}
1595715957
}
@@ -15960,7 +15960,7 @@ float integerCorrectionModulo(float number, float divisor) {
1596015960
for (let i = 0; i < this.subKernels.length; ++i) {
1596115961
result.push(
1596215962
` gl_FragData[${i + 1}][0] = subKernelResult_${this.subKernels[i].name}[0]`,
15963-
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`,
15963+
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`
1596415964
);
1596515965
}
1596615966
break;
@@ -15969,7 +15969,7 @@ float integerCorrectionModulo(float number, float divisor) {
1596915969
result.push(
1597015970
` gl_FragData[${i + 1}][0] = subKernelResult_${this.subKernels[i].name}[0]`,
1597115971
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`,
15972-
` gl_FragData[${i + 1}][2] = subKernelResult_${this.subKernels[i].name}[2]`,
15972+
` gl_FragData[${i + 1}][2] = subKernelResult_${this.subKernels[i].name}[2]`
1597315973
);
1597415974
}
1597515975
break;
@@ -15979,7 +15979,7 @@ float integerCorrectionModulo(float number, float divisor) {
1597915979
` gl_FragData[${i + 1}][0] = subKernelResult_${this.subKernels[i].name}[0]`,
1598015980
` gl_FragData[${i + 1}][1] = subKernelResult_${this.subKernels[i].name}[1]`,
1598115981
` gl_FragData[${i + 1}][2] = subKernelResult_${this.subKernels[i].name}[2]`,
15982-
` gl_FragData[${i + 1}][3] = subKernelResult_${this.subKernels[i].name}[3]`,
15982+
` gl_FragData[${i + 1}][3] = subKernelResult_${this.subKernels[i].name}[3]`
1598315983
);
1598415984
}
1598515985
break;
@@ -17892,7 +17892,7 @@ class WebGL2Kernel extends WebGLKernel {
1789217892
result.push(
1789317893
' threadId = indexTo3D(index, uOutputDim)',
1789417894
' kernel()',
17895-
` data0.${channel} = kernelResult`,
17895+
` data0.${channel} = kernelResult`
1789617896
);
1789717897
}
1789817898

@@ -17902,11 +17902,11 @@ class WebGL2Kernel extends WebGLKernel {
1790217902
const subKernel = this.subKernels[i];
1790317903
if (subKernel.returnType === 'Integer') {
1790417904
result.push(
17905-
` data${i + 1}.${channel} = float(subKernelResult_${subKernel.name})`,
17905+
` data${i + 1}.${channel} = float(subKernelResult_${subKernel.name})`
1790617906
);
1790717907
} else {
1790817908
result.push(
17909-
` data${i + 1}.${channel} = subKernelResult_${subKernel.name}`,
17909+
` data${i + 1}.${channel} = subKernelResult_${subKernel.name}`
1791017910
);
1791117911
}
1791217912
}
@@ -17927,11 +17927,11 @@ class WebGL2Kernel extends WebGLKernel {
1792717927
const subKernel = this.subKernels[i];
1792817928
if (subKernel.returnType === 'Integer') {
1792917929
result.push(
17930-
` data${i + 1}[0] = float(subKernelResult_${subKernel.name})`,
17930+
` data${i + 1}[0] = float(subKernelResult_${subKernel.name})`
1793117931
);
1793217932
} else {
1793317933
result.push(
17934-
` data${i + 1}[0] = subKernelResult_${subKernel.name}`,
17934+
` data${i + 1}[0] = subKernelResult_${subKernel.name}`
1793517935
);
1793617936
}
1793717937
}
@@ -17954,7 +17954,7 @@ class WebGL2Kernel extends WebGLKernel {
1795417954
const subKernel = this.subKernels[i];
1795517955
result.push(
1795617956
` data${i + 1}[0] = subKernelResult_${subKernel.name}[0]`,
17957-
` data${i + 1}[1] = subKernelResult_${subKernel.name}[1]`,
17957+
` data${i + 1}[1] = subKernelResult_${subKernel.name}[1]`
1795817958
);
1795917959
}
1796017960
return result;
@@ -17978,7 +17978,7 @@ class WebGL2Kernel extends WebGLKernel {
1797817978
result.push(
1797917979
` data${i + 1}[0] = subKernelResult_${subKernel.name}[0]`,
1798017980
` data${i + 1}[1] = subKernelResult_${subKernel.name}[1]`,
17981-
` data${i + 1}[2] = subKernelResult_${subKernel.name}[2]`,
17981+
` data${i + 1}[2] = subKernelResult_${subKernel.name}[2]`
1798217982
);
1798317983
}
1798417984
return result;
@@ -17997,7 +17997,7 @@ class WebGL2Kernel extends WebGLKernel {
1799717997
if (!this.subKernels) return result;
1799817998
for (let i = 0; i < this.subKernels.length; ++i) {
1799917999
result.push(
18000-
` data${i + 1} = subKernelResult_${this.subKernels[i].name}`,
18000+
` data${i + 1} = subKernelResult_${this.subKernels[i].name}`
1800118001
);
1800218002
}
1800318003
return result;

src/backend/cpu/kernel-string.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ function cpuKernelString(cpuKernel, name) {
3737
' const { context, canvas, constants: incomingConstants } = settings;',
3838
` const output = new Int32Array(${JSON.stringify(Array.from(cpuKernel.output))});`,
3939
` const _constantTypes = ${JSON.stringify(cpuKernel.constantTypes)};`,
40-
` const _constants = ${constantsToString(cpuKernel.constants, cpuKernel.constantTypes)};`,
40+
` const _constants = ${constantsToString(cpuKernel.constants, cpuKernel.constantTypes)};`
4141
);
4242

4343
thisProperties.push(
4444
' constants: _constants,',
4545
' context,',
4646
' output,',
47-
' thread: {x: 0, y: 0, z: 0},',
47+
' thread: {x: 0, y: 0, z: 0},'
4848
);
4949

5050
if (cpuKernel.graphical) {
@@ -92,7 +92,7 @@ function cpuKernelString(cpuKernel, name) {
9292
thisProperties.push(
9393
' _imageData,',
9494
' _colorData,',
95-
` color: ${colorFn},`,
95+
` color: ${colorFn},`
9696
);
9797

9898
beforeReturn.push(

0 commit comments

Comments
 (0)