Skip to content

Commit

Permalink
TSL: Add vertexStage() function (#30173)
Browse files Browse the repository at this point in the history
* add vertexStage

* remove TODO

* Update TSLBase.js
  • Loading branch information
sunag authored Dec 20, 2024
1 parent 083f233 commit 3d26186
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/nodes/core/VaryingNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,14 @@ export default VaryingNode;
*/
export const varying = /*@__PURE__*/ nodeProxy( VaryingNode );

/**
* Computes a node in the vertex stage.
*
* @function
* @param {Node} node - The node which should be executed in the vertex stage.
* @returns {VaryingNode}
*/
export const vertexStage = ( node ) => varying( node );

addMethodChaining( 'varying', varying );
addMethodChaining( 'vertexStage', vertexStage );
2 changes: 1 addition & 1 deletion src/nodes/tsl/TSLBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export * from '../math/MathNode.js'; // abs(), floor(), ...
export * from '../math/ConditionalNode.js'; // select(), ...
export * from '../core/ContextNode.js'; // .context()
export * from '../core/VarNode.js'; // .var() -> TODO: Maybe rename .toVar() -> .var()
export * from '../core/VaryingNode.js'; // varying() -> TODO: Add vertexStage()
export * from '../core/VaryingNode.js'; // varying(), vertexStage()
export * from '../display/ColorSpaceNode.js'; // .toColorSpace()
export * from '../display/ToneMappingNode.js'; // .toToneMapping()
export * from '../accessors/BufferAttributeNode.js'; // .toAttribute()
Expand Down

0 comments on commit 3d26186

Please sign in to comment.