-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add cubemap reflection example, *breaking* - remove .populate
method
#1017
Conversation
dd3082e
to
ed717ee
Compare
pkg.pr.new packages
benchmark commit |
87b6bdf
to
0a168fd
Compare
f2836ee
to
55cda14
Compare
Could we move the cubemap to public/assets/cubemap-reflection, to match the other examples? Also, what's the source and license for that cubemap? |
The source is: https://www.humus.name/index.php?page=Textures&ID=132 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new cubemap reflection example while updating the internal API to use a unified Snippet type instead of Resource. Key changes include:
- Refactoring internal type definitions and function signatures from Resource to Snippet.
- Adding new packing/unpacking utilities and updating unstruct implementation.
- Integrating a new vector slider control component for improved UI in the docs example.
Reviewed Changes
Copilot reviewed 30 out of 32 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/typegpu/src/std/index.ts | Added new exports for packing/unpacking functions. |
packages/typegpu/src/smol/wgslGenerator.ts | Updated type signatures from Resource to Snippet. |
packages/typegpu/src/smol/generationHelpers.ts | Updated type usage to Snippet. |
packages/typegpu/src/shared/generators.ts | Adjusted generic type mappings to Snippet. |
packages/typegpu/src/resolutionCtx.ts | Replaced Resource with Snippet in context methods. |
packages/typegpu/src/data/unstruct.ts | Refactored unstruct implementation and updated return types. |
packages/typegpu/src/data/offsets.ts | Updated type constraint to include AnyUnstruct. |
packages/typegpu/src/data/index.ts | Added new export for AnyVecInstance. |
packages/typegpu/src/data/dataTypes.ts | Modified Unstruct interface with additional properties. |
packages/typegpu/src/core/vertexLayout/vertexAttribute.ts | Changed import to use AnyUnstruct. |
packages/typegpu/src/core/function/fnCore.ts | Updated function parameter and return types to Snippet. |
apps/typegpu-docs/src/utils/examples/exampleControlAtom.ts | Added new type for vector slider control (note potential naming inconsistency). |
apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/*.ts | New cubemap reflection example implementation and supporting helper functions. |
apps/typegpu-docs/src/components/design/VectorSlider.tsx | Added a new vector slider component for controlling vector parameters. |
apps/typegpu-docs/src/components/ControlPanel.tsx | Integrated the new vector slider control into the control panel. |
Files not reviewed (2)
- apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/index.html: Language not supported
- apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/meta.json: Language not supported
apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/index.ts
Outdated
Show resolved
Hide resolved
apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/index.ts
Show resolved
Hide resolved
apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/index.ts
Outdated
Show resolved
Hide resolved
apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/index.ts
Outdated
Show resolved
Hide resolved
apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/index.ts
Outdated
Show resolved
Hide resolved
apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/index.ts
Outdated
Show resolved
Hide resolved
apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/icosphere.ts
Outdated
Show resolved
Hide resolved
apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/icosphere.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REFLECT 🪩🪩🪩
apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/helpers.ts
Outdated
Show resolved
Hide resolved
apps/typegpu-docs/src/content/examples/rendering/cubemap-reflection/helpers.ts
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
.populate
method
closes #969
closes #745
Caution
This branch introduces a breaking change by removing the deprecated
.populate
method