feat: introduce WebGL._replaceOutputTexture and WebGL._replaceSubOutputTextures to cut down on resource usage
feat: All supportable Math.methods added
fix: Safari not able to render texture arguments
feat: CPU gets a pipeline that acts like GPU with/without immutable
```
render = new GPU.GPU({ mode: "gpu" })
render(image.data, 14 * Math.sin(Date.now() / 400))
```
Since image data is of type Uint8ClampedArray & KernelVariable does not support the same hence gives type error
Ex: https://observablehq.com/@fil/image-to-gpu
Along with tests and documentation on which versions are affected. Sorry for the inconvenience!
feat: Add more advanced-typescript.ts
fix: Alter documentation mentioning v2
fix: Example of fluid.html, to use `immutable`
fix: Modulo negatives
fix: Modulo accuracy issue on OSX with `integerCorrectionModulo`
fix: Follow naming convention `div_with_int_check` to `divWithIntCheck`
fix: Member expression with function
fix: CPU variable assignment
fix: `gpu.addFunction` needed to be before createKernel and documentation
fix: mandelbulb.html from above .addFunction
This small change only allows single canvas elements as kernel input. They have
the exact same properties and use cases as html images, bit if you need to use
a canvas directly it is more efficient than converting it to an image first.
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!
fix: texture.renderRawOutput to use existing framebuffer, or make it so it can be deleted
fix: glKernelString to handle the framebuffer from texture.renderRawOutput
fix: WebGLKernelArray.checkSize so display error for all three scenarios
1. width too big
2. height too big
3. width and height too big
fix: Framebuffer loss after texture is deleted
fix: Split up array and primitive (index.js) types of KernelValues and introduce .setup()
* This was needed to handle .toArray() from the fix from #553
fix: Performance fix, define texture types in `kernelValue.setup()`, rather than on every `kernelValue.updateValue()`
fix: Slight memory leak, and loss of first kernel when switching kernels
fix: Feed `value.constructor` to `this.onUpdateValueMismatch()` where it was missing
...it kind of snowballed from some needs
Fixes#521 - If `tactic` is not set, check precision allowed from WebGL, and automatically change based off needs, otherwise use value from `tactic`.
Fixes#535 - Internally check if texture from argument is the same as output, if so, clone this texture, and then clean it up after the kernel runs.
Fixes#536 - Normalize all declarations to non-destructured, and then parse
Fixes#537 - Change logic
Fixes#538 - Found the GL script that would work, and reduced the methods to use it
Fixes#539 - Found a better way of testing random, and this gives me an error for 1 in 10 runs, acceptable
Some refactoring for less duplicate code and documentation