Skip to content

Commit

Permalink
convert to nodeObjects function call parameters and includes
Browse files Browse the repository at this point in the history
  • Loading branch information
sunag committed Aug 16, 2022
1 parent 7b40a3b commit 05208eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/jsm/nodes/shadernode/ShaderNodeBaseElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ export const bmat4 = new ConvertType( 'bmat4' );

// @TODO: ArrayUniformNode

export const func = ( code ) => {
export const func = ( code, includes ) => {

const node = nodeObject( new FunctionNode( code ) );
const node = nodeObject( new FunctionNode( code, includes ) );

const call = node.call.bind( node );
node.call = ( params ) => nodeObject( call( params ) );
node.call = ( ...params ) => nodeObject( call( params.length > 1 || params[ 0 ]?.isNode === true ? nodeArray( params ) : nodeObjects( params[ 0 ] ) ) );

return node;

Expand Down

0 comments on commit 05208eb

Please # to comment.