|
5 | 5 | * GPU Accelerated JavaScript
|
6 | 6 | *
|
7 | 7 | * @version 1.9.0
|
8 |
| - * @date Wed Oct 24 2018 14:09:46 GMT-0400 (EDT) |
| 8 | + * @date Wed Oct 24 2018 14:56:51 GMT-0400 (EDT) |
9 | 9 | *
|
10 | 10 | * @license MIT
|
11 | 11 | * The MIT License
|
@@ -2683,15 +2683,11 @@ module.exports = function (_FunctionNodeBase) {
|
2683 | 2683 | retArr.push('3.402823466e+38');
|
2684 | 2684 | break;
|
2685 | 2685 | default:
|
2686 |
| - if (this.constants && this.constants.hasOwnProperty(idtNode.name)) { |
2687 |
| - this.pushParameter(retArr, 'constants_' + idtNode.name); |
| 2686 | + var userParamName = this.getUserParamName(idtNode.name); |
| 2687 | + if (userParamName !== null) { |
| 2688 | + this.pushParameter(retArr, 'user_' + userParamName); |
2688 | 2689 | } else {
|
2689 |
| - var userParamName = this.getUserParamName(idtNode.name); |
2690 |
| - if (userParamName !== null) { |
2691 |
| - this.pushParameter(retArr, 'user_' + userParamName); |
2692 |
| - } else { |
2693 |
| - this.pushParameter(retArr, 'user_' + idtNode.name); |
2694 |
| - } |
| 2690 | + this.pushParameter(retArr, 'user_' + idtNode.name); |
2695 | 2691 | }
|
2696 | 2692 | }
|
2697 | 2693 |
|
@@ -3642,7 +3638,7 @@ module.exports = function (_KernelBase) {
|
3642 | 3638 | for (var p in this.constants) {
|
3643 | 3639 | var value = this.constants[p];
|
3644 | 3640 | var type = utils.getArgumentType(value);
|
3645 |
| - if (type === 'Decimal' || type === 'Integer') { |
| 3641 | + if (type === 'Float' || type === 'Integer') { |
3646 | 3642 | continue;
|
3647 | 3643 | }
|
3648 | 3644 | gl.useProgram(this.program);
|
@@ -4160,12 +4156,6 @@ module.exports = function (_KernelBase) {
|
4160 | 4156 | this.setUniform1i('constants_' + name, this.constantsLength);
|
4161 | 4157 | break;
|
4162 | 4158 | }
|
4163 |
| - case 'Integer': |
4164 |
| - case 'Float': |
4165 |
| - { |
4166 |
| - this.setUniform1f('constants_' + name, value); |
4167 |
| - break; |
4168 |
| - } |
4169 | 4159 | case 'Input':
|
4170 | 4160 | {
|
4171 | 4161 | var input = value;
|
@@ -4240,6 +4230,8 @@ module.exports = function (_KernelBase) {
|
4240 | 4230 | this.setUniform1i('constants_' + name, this.constantsLength);
|
4241 | 4231 | break;
|
4242 | 4232 | }
|
| 4233 | + case 'Integer': |
| 4234 | + case 'Float': |
4243 | 4235 | default:
|
4244 | 4236 | throw new Error('Input type not supported (WebGL): ' + value);
|
4245 | 4237 | }
|
@@ -4919,15 +4911,11 @@ module.exports = function (_WebGLFunctionNode) {
|
4919 | 4911 | retArr.push('intBitsToFloat(2139095039)');
|
4920 | 4912 | break;
|
4921 | 4913 | default:
|
4922 |
| - if (this.constants && this.constants.hasOwnProperty(idtNode.name)) { |
4923 |
| - this.pushParameter(retArr, 'constants_' + idtNode.name); |
| 4914 | + var userParamName = this.getUserParamName(idtNode.name); |
| 4915 | + if (userParamName !== null) { |
| 4916 | + this.pushParameter(retArr, 'user_' + userParamName); |
4924 | 4917 | } else {
|
4925 |
| - var userParamName = this.getUserParamName(idtNode.name); |
4926 |
| - if (userParamName !== null) { |
4927 |
| - this.pushParameter(retArr, 'user_' + userParamName); |
4928 |
| - } else { |
4929 |
| - this.pushParameter(retArr, 'user_' + idtNode.name); |
4930 |
| - } |
| 4918 | + this.pushParameter(retArr, 'user_' + idtNode.name); |
4931 | 4919 | }
|
4932 | 4920 | }
|
4933 | 4921 |
|
@@ -5417,12 +5405,6 @@ module.exports = function (_WebGLKernel) {
|
5417 | 5405 | this.setUniform1i('constants_' + name, this.constantsLength);
|
5418 | 5406 | break;
|
5419 | 5407 | }
|
5420 |
| - case 'Integer': |
5421 |
| - case 'Float': |
5422 |
| - { |
5423 |
| - this.setUniform1f('constants_' + name, value); |
5424 |
| - break; |
5425 |
| - } |
5426 | 5408 | case 'Input':
|
5427 | 5409 | {
|
5428 | 5410 | var input = value;
|
@@ -5528,6 +5510,8 @@ module.exports = function (_WebGLKernel) {
|
5528 | 5510 | this.setUniform1i('constants_' + name, this.constantsLength);
|
5529 | 5511 | break;
|
5530 | 5512 | }
|
| 5513 | + case 'Integer': |
| 5514 | + case 'Float': |
5531 | 5515 | default:
|
5532 | 5516 | throw new Error('Input type not supported (WebGL): ' + value);
|
5533 | 5517 | }
|
|
0 commit comments