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 (349 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 stabilizes the texture and sampler creation APIs by promoting createTexture, createSampler, and createComparisonSampler from the experimental root['~unstable'] interface to the main stable TgpuRoot interface. This is a major API stabilization that removes the need for the unstable accessor when creating textures and samplers.
Changes:
- Added stable
createTexture,createSampler, andcreateComparisonSamplermethod signatures to the mainTgpuRootinterface - Added deprecation notices to the experimental versions in
ExperimentalTgpuRoot - Updated all 40+ example files throughout the codebase to use the stable API
- Updated all test files to use the stable API
- Updated all documentation to reflect the stable API usage
Reviewed changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/typegpu/src/core/root/rootTypes.ts | Added stable method signatures to TgpuRoot and deprecation notices to ExperimentalTgpuRoot |
| packages/typegpu/tests/unplugin/autoname.test.ts | Updated to use stable root.createTexture, root.createSampler, root.createComparisonSampler |
| packages/typegpu/tests/std/texture/textureSample.test.ts | Updated texture creation to use stable API |
| packages/typegpu/tests/std/texture/textureLoad.test.ts | Updated texture creation to use stable API |
| packages/typegpu/tests/bindGroupLayout.test.ts | Updated sampler and texture creation to use stable API |
| apps/typegpu-docs/src/examples/* | 30+ example files updated to use stable texture and sampler creation APIs |
| apps/typegpu-docs/src/content/docs/fundamentals/textures.mdx | Updated documentation examples and descriptions to use stable APIs |
| apps/typegpu-docs/src/content/docs/fundamentals/data-schemas.mdx | Updated texture creation examples |
| apps/typegpu-docs/src/content/docs/fundamentals/accessors.mdx | Updated accessor examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| export function createBackgroundCubemap(root: TgpuRoot): BackgroundCubemap { | ||
| const texture = root['~unstable'] | ||
| const texture = root |
There was a problem hiding this comment.
Don’t we prefer the formatting to change in those cases (with .createTexture immediately after root)?
No description provided.