conditionalIfWGSL¶
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.