You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in favor of using for loop variable position tracking, which is removed.
feat: Removal of no longer needed `warnVarUsage`
feat: If ternary returns void, use if statement in webgl
fix: Update documentation and clarify variable declarations
Officially support private functions - WOOHOO!
*[Declaring variables/functions within kernels](#declaring-variablesfunctions-within-kernels)
81
82
*[Creating and Running Functions](#creating-and-running-functions)
82
83
*[Debugging](#debugging)
83
84
*[Accepting Input](#accepting-input)
@@ -237,7 +238,6 @@ Settings are an object used to create a `kernel` or `kernelMap`. Example: `gpu.
237
238
*~~`immutable` or `kernel.setImmutable(boolean)`: boolean, default = `false`~~ Deprecated
238
239
*`strictIntegers` or `kernel.setStrictIntegers(boolean)`: boolean, default = `false` - allows undefined argumentTypes and function return values to use strict integer declarations.
239
240
*`useLegacyEncoder` or `kernel.setUseLegacyEncoder(boolean)`: boolean, default `false` - more info [here](https://github.com/gpujs/gpu.js/wiki/Encoder-details).
240
-
*`warnVarUsage` or `kernel.setWarnVarUsage(boolean)`: turn off var usage warnings, they can be irritating, and in transpiled environments, there is nothing we can do about it.
241
241
*`tactic` or `kernel.setTactic('speed' | 'balanced' | 'precision')`**New in V2!**: Set the kernel's tactic for compilation. Allows for compilation to better fit how GPU.js is being used (internally uses `lowp` for 'speed', `mediump` for 'balanced', and `highp` for 'precision'). Default is lowest resolution supported for output.
returnmyPrivateFunction(); // <-- type inherited here
379
+
}).setOutput([100]);
380
+
```
381
+
359
382
## Debugging
360
383
Debugging can be done in a variety of ways, and there are different levels of debugging.
361
384
* Debugging kernels with breakpoints can be done with `new GPU({ mode: 'dev' })`
@@ -1087,17 +1110,6 @@ Transpilation doesn't do the best job of keeping code beautiful. To aid in this
1087
1110
Here is a list of a few things that GPU.js does to fix transpilation:
1088
1111
1089
1112
* When a transpiler such as [Babel](https://babeljs.io/) changes `myCall()` to `(0, _myCall.myCall)`, it is gracefully handled.
1090
-
* Using `var` will have a lot of warnings by default, this can be irritating because sometimes there is nothing we can do about this in transpiled environment.
1091
-
To aid in the irritation, there is an option to alleviate the irritation.
1092
-
When `const` and `let` are converted to `var`, and you'r prefer not to see it, use the following:
0 commit comments