Skip to content

Commit

Permalink
TSL: Add Return Expression (#28595)
Browse files Browse the repository at this point in the history
  • Loading branch information
RenaudRohlinger authored Jun 10, 2024
1 parent 0da2945 commit ab34d2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/jsm/nodes/Nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export { triNoise3D } from './math/TriNoise3D.js';
// utils
export { default as ArrayElementNode } from './utils/ArrayElementNode.js';
export { default as ConvertNode } from './utils/ConvertNode.js';
export { default as DiscardNode, discard } from './utils/DiscardNode.js';
export { default as DiscardNode, discard, Return } from './utils/DiscardNode.js';
export { default as EquirectUVNode, equirectUV } from './utils/EquirectUVNode.js';
export { default as FunctionOverloadingNode, overloadingFn } from './utils/FunctionOverloadingNode.js';
export { default as JoinNode } from './utils/JoinNode.js';
Expand Down
1 change: 1 addition & 0 deletions examples/jsm/nodes/utils/DiscardNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default DiscardNode;

export const inlineDiscard = nodeProxy( DiscardNode );
export const discard = ( condNode ) => inlineDiscard( condNode ).append();
export const Return = () => expression( 'return' ).append();

addNodeElement( 'discard', discard ); // @TODO: Check... this cause a little confusing using in chaining

Expand Down

0 comments on commit ab34d2b

Please sign in to comment.