Skip to content

Commit 2c78215

Browse files
fix: Build
1 parent 1c5a73e commit 2c78215

File tree

5 files changed

+64
-96
lines changed

5 files changed

+64
-96
lines changed

bin/gpu-browser-core.js

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* GPU Accelerated JavaScript
66
*
77
* @version 2.0.0-rc.6
8-
* @date Tue Apr 16 2019 08:31:58 GMT-0400 (Eastern Daylight Time)
8+
* @date Tue Apr 16 2019 20:43:45 GMT-0400 (Eastern Daylight Time)
99
*
1010
* @license MIT
1111
* The MIT License
@@ -1197,7 +1197,6 @@ class CPUKernel extends Kernel {
11971197
module.exports = {
11981198
CPUKernel
11991199
};
1200-
12011200
},{"../../utils":28,"../function-builder":7,"../kernel":11,"./function-node":4,"./kernel-string":5}],7:[function(require,module,exports){
12021201
class FunctionBuilder {
12031202
static fromKernel(kernel, FunctionNode, extraNodeOptions) {
@@ -3566,7 +3565,6 @@ module.exports = {
35663565
GLKernel,
35673566
renderStrategy
35683567
};
3569-
35703568
},{"../texture":27,"../utils":28,"./kernel":11}],10:[function(require,module,exports){
35713569
const getContext = require('gl');
35723570
const {
@@ -3977,7 +3975,6 @@ class Kernel {
39773975
module.exports = {
39783976
Kernel
39793977
};
3980-
39813978
},{"../input":24,"../utils":28}],12:[function(require,module,exports){
39823979
const fragmentShader = `__HEADER__;
39833980
precision highp float;
@@ -4173,7 +4170,6 @@ void main(void) {
41734170
module.exports = {
41744171
fragmentShader
41754172
};
4176-
41774173
},{}],13:[function(require,module,exports){
41784174
const {
41794175
FunctionNode
@@ -5223,6 +5219,7 @@ const typeMap = {
52235219
'Input': 'sampler2D',
52245220
'Integer': 'int',
52255221
'Number': 'float',
5222+
'LiteralInteger': 'float',
52265223
'NumberTexture': 'sampler2D',
52275224
'MemoryOptimizedNumberTexture': 'sampler2D',
52285225
'ArrayTexture(1)': 'sampler2D',
@@ -5375,7 +5372,6 @@ function webGLKernelString(gpuKernel, name) {
53755372
module.exports = {
53765373
webGLKernelString
53775374
};
5378-
53795375
},{"../../kernel-run-shortcut":25,"../../utils":28}],15:[function(require,module,exports){
53805376
const {
53815377
GLKernel
@@ -7170,7 +7166,6 @@ class WebGLKernel extends GLKernel {
71707166
module.exports = {
71717167
WebGLKernel
71727168
};
7173-
71747169
},{"../../plugins/triangle-noise":26,"../../texture":27,"../../utils":28,"../function-builder":7,"../gl-kernel":9,"./fragment-shader":12,"./function-node":13,"./kernel-string":14,"./vertex-shader":16}],16:[function(require,module,exports){
71757170
const vertexShader = `precision highp float;
71767171
precision highp int;
@@ -7389,7 +7384,6 @@ void main(void) {
73897384
module.exports = {
73907385
fragmentShader
73917386
};
7392-
73937387
},{}],18:[function(require,module,exports){
73947388
const {
73957389
WebGLFunctionNode
@@ -8699,7 +8693,6 @@ class WebGL2Kernel extends WebGLKernel {
86998693
module.exports = {
87008694
WebGL2Kernel
87018695
};
8702-
87038696
},{"../../texture":27,"../../utils":28,"../function-builder":7,"../web-gl/kernel":15,"./fragment-shader":17,"./function-node":18,"./vertex-shader":20}],20:[function(require,module,exports){
87048697
const vertexShader = `#version 300 es
87058698
precision highp float;
@@ -9428,7 +9421,7 @@ const utils = {
94289421

94299422
dimToTexSize(opt, dimensions, output) {
94309423
let [w, h, d] = dimensions;
9431-
let numTexels = (w||1) * (h||1) * (d||1);
9424+
let numTexels = (w || 1) * (h || 1) * (d || 1);
94329425

94339426
if (opt.floatTextures && (!output || opt.floatOutput)) {
94349427
w = numTexels * 4;
@@ -9440,20 +9433,20 @@ const utils = {
94409433
return utils.closestSquareDimensions(numTexels);
94419434
},
94429435

9443-
closestSquareDimensions(length) {
9444-
const sqrt = Math.sqrt(length);
9445-
let high = Math.ceil(sqrt);
9446-
let low = Math.floor(sqrt);
9447-
while (high * low < length) {
9448-
high--;
9449-
low = Math.ceil(length / high);
9450-
}
9451-
return [low, Math.ceil(length / low)];
9452-
},
9436+
closestSquareDimensions(length) {
9437+
const sqrt = Math.sqrt(length);
9438+
let high = Math.ceil(sqrt);
9439+
let low = Math.floor(sqrt);
9440+
while (high * low < length) {
9441+
high--;
9442+
low = Math.ceil(length / high);
9443+
}
9444+
return [low, Math.ceil(length / low)];
9445+
},
94539446

94549447
getMemoryOptimizedFloatTextureSize(dimensions) {
9455-
let [w,h,d] = dimensions;
9456-
let totalArea = utils.roundTo((w||1) * (h||1) * (d||1), 4);
9448+
let [w, h, d] = dimensions;
9449+
let totalArea = utils.roundTo((w || 1) * (h || 1) * (d || 1), 4);
94579450

94589451
const texelCount = totalArea / 4;
94599452

@@ -9566,5 +9559,4 @@ const _systemEndianness = utils.getSystemEndianness();
95669559
module.exports = {
95679560
utils
95689561
};
9569-
95709562
},{"./input":24,"./texture":27}]},{},[21]);

bin/gpu-browser-core.min.js

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* GPU Accelerated JavaScript
66
*
77
* @version 2.0.0-rc.6
8-
* @date Tue Apr 16 2019 08:32:00 GMT-0400 (Eastern Daylight Time)
8+
* @date Tue Apr 16 2019 20:43:47 GMT-0400 (Eastern Daylight Time)
99
*
1010
* @license MIT
1111
* The MIT License
@@ -18,7 +18,7 @@
1818
* GPU Accelerated JavaScript
1919
*
2020
* @version 2.0.0-rc.6
21-
* @date Tue Apr 16 2019 08:31:58 GMT-0400 (Eastern Daylight Time)
21+
* @date Tue Apr 16 2019 20:43:45 GMT-0400 (Eastern Daylight Time)
2222
*
2323
* @license MIT
2424
* The MIT License
@@ -1210,7 +1210,6 @@ class CPUKernel extends Kernel {
12101210
module.exports = {
12111211
CPUKernel
12121212
};
1213-
12141213
},{"../../utils":28,"../function-builder":7,"../kernel":11,"./function-node":4,"./kernel-string":5}],7:[function(require,module,exports){
12151214
class FunctionBuilder {
12161215
static fromKernel(kernel, FunctionNode, extraNodeOptions) {
@@ -3579,7 +3578,6 @@ module.exports = {
35793578
GLKernel,
35803579
renderStrategy
35813580
};
3582-
35833581
},{"../texture":27,"../utils":28,"./kernel":11}],10:[function(require,module,exports){
35843582
const getContext = require('gl');
35853583
const {
@@ -3990,7 +3988,6 @@ class Kernel {
39903988
module.exports = {
39913989
Kernel
39923990
};
3993-
39943991
},{"../input":24,"../utils":28}],12:[function(require,module,exports){
39953992
const fragmentShader = `__HEADER__;
39963993
precision highp float;
@@ -4186,7 +4183,6 @@ void main(void) {
41864183
module.exports = {
41874184
fragmentShader
41884185
};
4189-
41904186
},{}],13:[function(require,module,exports){
41914187
const {
41924188
FunctionNode
@@ -5236,6 +5232,7 @@ const typeMap = {
52365232
'Input': 'sampler2D',
52375233
'Integer': 'int',
52385234
'Number': 'float',
5235+
'LiteralInteger': 'float',
52395236
'NumberTexture': 'sampler2D',
52405237
'MemoryOptimizedNumberTexture': 'sampler2D',
52415238
'ArrayTexture(1)': 'sampler2D',
@@ -5388,7 +5385,6 @@ function webGLKernelString(gpuKernel, name) {
53885385
module.exports = {
53895386
webGLKernelString
53905387
};
5391-
53925388
},{"../../kernel-run-shortcut":25,"../../utils":28}],15:[function(require,module,exports){
53935389
const {
53945390
GLKernel
@@ -7183,7 +7179,6 @@ class WebGLKernel extends GLKernel {
71837179
module.exports = {
71847180
WebGLKernel
71857181
};
7186-
71877182
},{"../../plugins/triangle-noise":26,"../../texture":27,"../../utils":28,"../function-builder":7,"../gl-kernel":9,"./fragment-shader":12,"./function-node":13,"./kernel-string":14,"./vertex-shader":16}],16:[function(require,module,exports){
71887183
const vertexShader = `precision highp float;
71897184
precision highp int;
@@ -7402,7 +7397,6 @@ void main(void) {
74027397
module.exports = {
74037398
fragmentShader
74047399
};
7405-
74067400
},{}],18:[function(require,module,exports){
74077401
const {
74087402
WebGLFunctionNode
@@ -8712,7 +8706,6 @@ class WebGL2Kernel extends WebGLKernel {
87128706
module.exports = {
87138707
WebGL2Kernel
87148708
};
8715-
87168709
},{"../../texture":27,"../../utils":28,"../function-builder":7,"../web-gl/kernel":15,"./fragment-shader":17,"./function-node":18,"./vertex-shader":20}],20:[function(require,module,exports){
87178710
const vertexShader = `#version 300 es
87188711
precision highp float;
@@ -9441,7 +9434,7 @@ const utils = {
94419434

94429435
dimToTexSize(opt, dimensions, output) {
94439436
let [w, h, d] = dimensions;
9444-
let numTexels = (w||1) * (h||1) * (d||1);
9437+
let numTexels = (w || 1) * (h || 1) * (d || 1);
94459438

94469439
if (opt.floatTextures && (!output || opt.floatOutput)) {
94479440
w = numTexels * 4;
@@ -9453,20 +9446,20 @@ const utils = {
94539446
return utils.closestSquareDimensions(numTexels);
94549447
},
94559448

9456-
closestSquareDimensions(length) {
9457-
const sqrt = Math.sqrt(length);
9458-
let high = Math.ceil(sqrt);
9459-
let low = Math.floor(sqrt);
9460-
while (high * low < length) {
9461-
high--;
9462-
low = Math.ceil(length / high);
9463-
}
9464-
return [low, Math.ceil(length / low)];
9465-
},
9449+
closestSquareDimensions(length) {
9450+
const sqrt = Math.sqrt(length);
9451+
let high = Math.ceil(sqrt);
9452+
let low = Math.floor(sqrt);
9453+
while (high * low < length) {
9454+
high--;
9455+
low = Math.ceil(length / high);
9456+
}
9457+
return [low, Math.ceil(length / low)];
9458+
},
94669459

94679460
getMemoryOptimizedFloatTextureSize(dimensions) {
9468-
let [w,h,d] = dimensions;
9469-
let totalArea = utils.roundTo((w||1) * (h||1) * (d||1), 4);
9461+
let [w, h, d] = dimensions;
9462+
let totalArea = utils.roundTo((w || 1) * (h || 1) * (d || 1), 4);
94709463

94719464
const texelCount = totalArea / 4;
94729465

@@ -9579,5 +9572,4 @@ const _systemEndianness = utils.getSystemEndianness();
95799572
module.exports = {
95809573
utils
95819574
};
9582-
95839575
},{"./input":24,"./texture":27}]},{},[21]);

bin/gpu-browser.js

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* GPU Accelerated JavaScript
66
*
77
* @version 2.0.0-rc.6
8-
* @date Tue Apr 16 2019 08:31:58 GMT-0400 (Eastern Daylight Time)
8+
* @date Tue Apr 16 2019 20:43:45 GMT-0400 (Eastern Daylight Time)
99
*
1010
* @license MIT
1111
* The MIT License
@@ -5961,7 +5961,6 @@ class CPUKernel extends Kernel {
59615961
module.exports = {
59625962
CPUKernel
59635963
};
5964-
59655964
},{"../../utils":29,"../function-builder":8,"../kernel":12,"./function-node":5,"./kernel-string":6}],8:[function(require,module,exports){
59665965
class FunctionBuilder {
59675966
static fromKernel(kernel, FunctionNode, extraNodeOptions) {
@@ -8330,7 +8329,6 @@ module.exports = {
83308329
GLKernel,
83318330
renderStrategy
83328331
};
8333-
83348332
},{"../texture":28,"../utils":29,"./kernel":12}],11:[function(require,module,exports){
83358333
const getContext = require('gl');
83368334
const {
@@ -8741,7 +8739,6 @@ class Kernel {
87418739
module.exports = {
87428740
Kernel
87438741
};
8744-
87458742
},{"../input":25,"../utils":29}],13:[function(require,module,exports){
87468743
const fragmentShader = `__HEADER__;
87478744
precision highp float;
@@ -8937,7 +8934,6 @@ void main(void) {
89378934
module.exports = {
89388935
fragmentShader
89398936
};
8940-
89418937
},{}],14:[function(require,module,exports){
89428938
const {
89438939
FunctionNode
@@ -9987,6 +9983,7 @@ const typeMap = {
99879983
'Input': 'sampler2D',
99889984
'Integer': 'int',
99899985
'Number': 'float',
9986+
'LiteralInteger': 'float',
99909987
'NumberTexture': 'sampler2D',
99919988
'MemoryOptimizedNumberTexture': 'sampler2D',
99929989
'ArrayTexture(1)': 'sampler2D',
@@ -10139,7 +10136,6 @@ function webGLKernelString(gpuKernel, name) {
1013910136
module.exports = {
1014010137
webGLKernelString
1014110138
};
10142-
1014310139
},{"../../kernel-run-shortcut":26,"../../utils":29}],16:[function(require,module,exports){
1014410140
const {
1014510141
GLKernel
@@ -11934,7 +11930,6 @@ class WebGLKernel extends GLKernel {
1193411930
module.exports = {
1193511931
WebGLKernel
1193611932
};
11937-
1193811933
},{"../../plugins/triangle-noise":27,"../../texture":28,"../../utils":29,"../function-builder":8,"../gl-kernel":10,"./fragment-shader":13,"./function-node":14,"./kernel-string":15,"./vertex-shader":17}],17:[function(require,module,exports){
1193911934
const vertexShader = `precision highp float;
1194011935
precision highp int;
@@ -12153,7 +12148,6 @@ void main(void) {
1215312148
module.exports = {
1215412149
fragmentShader
1215512150
};
12156-
1215712151
},{}],19:[function(require,module,exports){
1215812152
const {
1215912153
WebGLFunctionNode
@@ -13463,7 +13457,6 @@ class WebGL2Kernel extends WebGLKernel {
1346313457
module.exports = {
1346413458
WebGL2Kernel
1346513459
};
13466-
1346713460
},{"../../texture":28,"../../utils":29,"../function-builder":8,"../web-gl/kernel":16,"./fragment-shader":18,"./function-node":19,"./vertex-shader":21}],21:[function(require,module,exports){
1346813461
const vertexShader = `#version 300 es
1346913462
precision highp float;
@@ -14192,7 +14185,7 @@ const utils = {
1419214185

1419314186
dimToTexSize(opt, dimensions, output) {
1419414187
let [w, h, d] = dimensions;
14195-
let numTexels = (w||1) * (h||1) * (d||1);
14188+
let numTexels = (w || 1) * (h || 1) * (d || 1);
1419614189

1419714190
if (opt.floatTextures && (!output || opt.floatOutput)) {
1419814191
w = numTexels * 4;
@@ -14204,20 +14197,20 @@ const utils = {
1420414197
return utils.closestSquareDimensions(numTexels);
1420514198
},
1420614199

14207-
closestSquareDimensions(length) {
14208-
const sqrt = Math.sqrt(length);
14209-
let high = Math.ceil(sqrt);
14210-
let low = Math.floor(sqrt);
14211-
while (high * low < length) {
14212-
high--;
14213-
low = Math.ceil(length / high);
14214-
}
14215-
return [low, Math.ceil(length / low)];
14216-
},
14200+
closestSquareDimensions(length) {
14201+
const sqrt = Math.sqrt(length);
14202+
let high = Math.ceil(sqrt);
14203+
let low = Math.floor(sqrt);
14204+
while (high * low < length) {
14205+
high--;
14206+
low = Math.ceil(length / high);
14207+
}
14208+
return [low, Math.ceil(length / low)];
14209+
},
1421714210

1421814211
getMemoryOptimizedFloatTextureSize(dimensions) {
14219-
let [w,h,d] = dimensions;
14220-
let totalArea = utils.roundTo((w||1) * (h||1) * (d||1), 4);
14212+
let [w, h, d] = dimensions;
14213+
let totalArea = utils.roundTo((w || 1) * (h || 1) * (d || 1), 4);
1422114214

1422214215
const texelCount = totalArea / 4;
1422314216

@@ -14330,5 +14323,4 @@ const _systemEndianness = utils.getSystemEndianness();
1433014323
module.exports = {
1433114324
utils
1433214325
};
14333-
1433414326
},{"./input":25,"./texture":28}]},{},[22]);

0 commit comments

Comments
 (0)