diff --git a/src/nodes/core/VaryingNode.js b/src/nodes/core/VaryingNode.js index caf4ab7f54ad8f..937fc973511416 100644 --- a/src/nodes/core/VaryingNode.js +++ b/src/nodes/core/VaryingNode.js @@ -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 ); diff --git a/src/nodes/tsl/TSLBase.js b/src/nodes/tsl/TSLBase.js index 4985ab6426e393..8fb44ae7df9bc0 100644 --- a/src/nodes/tsl/TSLBase.js +++ b/src/nodes/tsl/TSLBase.js @@ -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()