Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSL: Add vertexStage() function #30173

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading