conditionalIfWGSL¶
Under Construction
This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/alpenglow/blob/main/js/webgpu/wgsl/gpu/conditionalIfWGSL.ts for the most up-to-date information.
Overview¶
Support for code where we sometimes want an if-statement, and sometimes we don't.
E.g. conditional_if( null, 'was_truthy();', 'was_falsy();' ) will return: was_truthy();
E.g. conditional_if( is_truthy, 'was_truthy()', 'was_falsy()' ) will return: if ( is_truthy ) { was_truthy() } else { was_falsy() }
@author Jonathan Olson <jonathan.olson@colorado.edu>
Source Code¶
See the source for conditionalIfWGSL.ts in the alpenglow repository.