Skip to content

Add missing types to UniformNode#2115

Open
shotamatsuda wants to merge 3 commits intothree-types:masterfrom
shotamatsuda:feat/uniform-node-types
Open

Add missing types to UniformNode#2115
shotamatsuda wants to merge 3 commits intothree-types:masterfrom
shotamatsuda:feat/uniform-node-types

Conversation

@shotamatsuda
Copy link
Copy Markdown
Contributor

@shotamatsuda shotamatsuda commented Apr 11, 2026

This PR adds missing types to UniformNode. They are undocumented but commonly used throughout TSL code in Three.js.

  1. Factory function with a type name:
const node = uniform('vec3') // UniformNode<'vec3', Vector3>
  1. this as the last parameter of callbacks passed to onUpdate-related functions.
declare const matrix: Matrix4
const node = uniform('vec3').onRenderUpdate(
  (_, { value }) => value.setFromMatrixPosition(matrix)
)

@shotamatsuda
Copy link
Copy Markdown
Contributor Author

@Methuselah96 Just to confirm, am I correct that the JSDoc tests are intended to detect suspicious changes and potential incompatibilities made by changes in Three.js, or should I update JSDocs as part of PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant