Skip to content

Conversation

@haxiomic
Copy link

@haxiomic haxiomic commented Mar 19, 2025

I've been using this for years in my own projects where I use custom shaders often. Typing uniforms makes working with these classes much nicer

let shader = new ShaderMaterial({ uniforms: { example: new Uniform(3), ... }, ... });

// typed correctly!
shader.uniforms.example.value = 4

This does not change the behaviour of existing code because uniform types default to any

@haxiomic
Copy link
Author

I'll add Defines types before this is complete

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