Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (343 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
There was a problem hiding this comment.
Pull request overview
This PR introduces two new base types, vecBase and matBase, to provide a more ergonomic way to write generic functions that work with any vector or matrix type using overloaded operators. These base types allow for more relaxed type checking compared to explicit union types like v2f | v3f | v4f.
Changes:
- Added
vecBaseinterface as a base type for all vector types - Added
matBaseinterface as a base type for all matrix types - Updated type constraints in
vecInfixNotationandmatInfixNotationto use the new base types - Modified helper types
vBaseForMatandmBaseForVecto work with the new base types - Exported the new types through the public API
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/typegpu/src/data/wgslTypes.ts | Added vecBase and matBase interfaces with documentation; updated type constraints for infix notation interfaces and helper types |
| packages/typegpu/src/data/index.ts | Exported new vecBase and matBase types to the public API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a532e67 to
391db07
Compare
391db07 to
61b0985
Compare
No description provided.