30 Commits

Author SHA1 Message Date
Robert Plummer
29309e0200 fix: Update documentation 2020-09-18 15:46:54 -04:00
Robert Plummer
d5212d3887 fix: Making typescript play more nice 2020-09-17 12:51:21 -04:00
Robert Plummer
61dfe8a46a fix: #572 excessive calls, reuse textures
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
2020-03-22 17:29:26 -04:00
Robert Plummer
f88d92cc40 feat: Bring back kernel.immutable and kernel.setImmutable() with defaults to false
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`
2020-03-11 07:36:50 -04:00
Robert Plummer
db54434166 fix: Modulo performance and simplify tests
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
2020-01-21 07:37:48 -05:00
Robert Plummer
254b06791f feat: Handle ++ in function-tracer.js
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!
2020-01-14 07:01:23 -05:00
Robert Plummer
6e2f1dacde feat: Cleanup and bring texture recycling to webgl2, and add unit test 2019-12-22 17:41:29 -05:00
Robert Plummer
ed1cd94448 feat: Added features and fixes for the following issues:
...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
2019-11-26 10:55:28 -05:00
Robert Plummer
90292bba6e fix: Upgrade fluid simulation to use just GPU and no round trip and
fix: Upgrade controls UI to use HTML in favor of canvas for visuals
     to get clearer understanding of GPU load
2019-10-08 10:31:30 -04:00
Robert Plummer
80a000e287 fix: #500 remove ArgumentSynonym "feature", and simply pass around bit ratio 2019-09-24 10:14:59 -04:00
Robert Plummer
2bc76ad82d feat: Video input, injectNative, tests.
v2.0.0 Cosmic Jellyfish
2019-09-17 10:51:53 -04:00
Robert Plummer
80f1ec009c fix: Remove duplicate code sample, and fix vertex artifacts in webgl2
feat: use speed tactic in fluid dynamics
2019-08-23 10:30:50 -04:00
Robert Plummer
21b9e3b759 fix: Shorten up kernelRunShortcut
fix: Update typescript definitions
fix: `GPU.createKernel`'s `onRequestFallback` to switch kernels entirely so the fallback doesn't continue to happen over and over
fix: `GPU.createKernel`'s `onRequestFallback` to use `argumentTypes`
fix: Minification
fix: examples to use minification
fix: Fix kernel string to support `Array1D(2|3|4)` and `Array3D(2|3|4)`
fix: `lookupKernelValueType` to as well get type, to make lookup easier for `Texture`s
fix: `Kernel` to properly build `this.kernelArguments` and `this.kernelConstants`
fix: `KernelValue` to get its type from `value.type` if it exists
fix: `@returns` keyword in favor of `@return` in some places
fix: DoxDox documentation issue
fix: Remove old reference to "Automatically-built Documentation", no longer applicable
fix: Bump and build
2019-07-26 14:57:36 -04:00
Robert Plummer
86af54efef fix: Node support for v8+
fix: Move `make` cli command to gulp so it runs in parallel
fix: Add official support for `Array1D(2|3|4)`, `Array2D(2|3|4)`, and `Array3D(2|3|4)` and unit tests
fix: Add offical support for `Array(2)`, `Array(3)`, and `Array(4)` and unit tests
fix: Mandelbulb constant used a constant, so moved to appropriate location
fix: Failing unit test for Safari
fix: When not falling back in HeadlessGL, call `STACKGL_resize_drawingbuffer`
fix: Remove `xyz` variable from glsl
fix: Add `uniform4fv` and `uniform4iv` to WebGL implementation
fix: Check for kernel settings `constantTypes` and `argumentTypes`
fix: Inherit type from kernel in KernelValue constructors
fix: Add some typescript details for `GPUVariableType`, `IKernelSettings`, and `ITypesList`
fix: Add support for 4d array in `utils.getMemoryOptimizedFloatTextureSize` for the special use case of `Array3D(2|3|4)`
fix: Add `utils.flatten4dArrayTo` for the special use case of `Array3D(2|3|4)`
fix: Add support for 4d array in `utils.flattenTo`
fix: Bump and build
2019-07-24 12:56:05 -04:00
Robert Plummer
e9bdc31a18 fix: Examples file reference
fix: move `GLKernel.fixIntegerDivisionAccuracy` to `Kernel.fixIntegerDivisionAccuracy` as it has to do with typing
fix: FunctionTracer 'ConditionalExpression' needed `ast.test`
test: Add test for FunctionTracer 'ConditionalExpression' `ast.test` usage
fix: division type handling with `Kernel.fixIntegerDivisionAccuracy` true
test: Add test for division handling with and without `Kernel.fixIntegerDivisionAccuracy` true
2019-06-29 10:07:29 -04:00
Robert Plummer
7bcfbed234 feat: Pre type check with FunctionTracer
feat: Add cat demo
feat: Type check even on CPU
fix: ArrayTexture support as arguments for internal arrays
fix: Typo from "Interger" to "Integer"
feat: Bump and build version number
2019-06-17 18:00:36 -04:00
Robert Plummer
3361ec8235 feat: Another example as a visual end to end test 2019-06-04 19:45:17 -04:00
Robert Plummer
a0a92586c0 fix: #378 unit test, showing the issue resolved
fix: Random demo, when webgl or webgl2 not available, use try to keep demo running
2019-05-22 09:43:44 -04:00
Robert Plummer
f59c8ddaf4 fix: Remove comments from example 2019-04-22 17:09:16 -04:00
Robert Plummer
ee7baf70ba fix: Array handling (2,3,4) for webgl2 & webgl1 (headlessgl next)
fix: Float handling
feat: added `optimizeFloatMemory` to better exemplify what it does and replace `floatTextures` and its voodoo in webgl2
feat: end to end strong type detection
Note: added a bunch of TODO's this is just a good resting point.
2019-04-11 19:41:58 -04:00
Robert Plummer
1e60084020 feat: Full type inference (this is a HUGE feature)
feat: Add mandelbulb.html example
fix: Bump and build
2019-03-19 19:51:03 -04:00
Robert Plummer
d9bee09037 fix: Double check newest changes work for https://github.com/gpujs/gpu.js/issues/443
And added it as an example, it is pretty.
2019-03-17 22:21:22 -04:00
Robert Plummer
4aa08ca393 fix: Casting for all non-float arguments used with Math.fn()
fix: Greater than, less than evaluation when comparing an integer with a literal that is a float, try not to cast left, but rather cast left to right
fix: Constants that do not have a type defined should fail
fix: Don't prevent "random" as a native function name
fix: Allow Texture constructor to inherit instance of GPU for easy .toArray()
fix: Texture constructor as settings object for easier understanding of order input
fix: Typescript corrections for Texture
fix: Bump headless-gl version to that of Multiple Render Targets
2019-03-17 22:12:09 -04:00
Robert Plummer
5f59354219 fix: this.thread, and this.output type handling, and block statements 2019-02-18 10:55:30 -05:00
Robert Plummer
cf5a358422 fix: Got 100% unit tests in chrome, ff, safari, and node. 2019-02-07 19:08:19 -05:00
Robert Plummer
734eddc585 feat: Add json example 2019-02-04 19:55:19 -05:00
Robert Plummer
630bd94ead feat: Completely new type checking system, and refined state management 2019-02-04 19:46:55 -05:00
Robert Plummer
82e4966551 feat: v2.0.0rc1
Cleanup and add random support (seeded by... Math.random()!)
I went through api and cleaned it up considerably
2019-01-31 18:24:25 -05:00
Robert Plummer
d57f49faba feat: Add simple javascript version of the typescript 2019-01-29 21:44:43 -05:00
Robert Plummer
8bf362ad9a feat: No failing tests locally, only skipping and passing
Also:
feat: Typescript typings
feat: api cleanup and exports
feat: removal of building for node, only browser
2019-01-29 21:41:21 -05:00