Skip to content
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

Create a primitive sampling showcase example #13519

Merged
merged 13 commits into from
May 27, 2024
Merged

Create a primitive sampling showcase example #13519

merged 13 commits into from
May 27, 2024

Conversation

IQuick143
Copy link
Contributor

@IQuick143 IQuick143 commented May 26, 2024

Objective

  • Show + Visually Test that 3D primitive sampling works
  • Make an example that looks nice.

Solution

  • Added a sampling_primitives examples which shows all the 3D primitives being sampled, with a firefly aesthetic.

image

Testing

  • cargo run --example sampling_primitives
  • Haven't tested WASM.

Changelog

Added

  • Added a new example, sampling_primitives, to showcase all the 3D sampleable primitives.

Additional notes:

This example borrowed a bunch of code from the other sampling example, by @mweatherley.

In future updates this example should be updated with new 3D primitives as they become sampleable.

@Jondolf Jondolf added C-Examples An addition or correction to our examples A-Math Fundamental domain-agnostic mathematical operations X-Uncontroversial This work is generally agreed upon labels May 26, 2024
Copy link
Contributor

The generated examples/README.md is out of sync with the example metadata in Cargo.toml or the example readme template. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

@IQuick143
Copy link
Contributor Author

Please give suggestions on code quality, visual and performance improvements.

@alice-i-cecile alice-i-cecile added D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 26, 2024
@alice-i-cecile alice-i-cecile added this to the 0.14 milestone May 26, 2024
@BD103 BD103 self-requested a review May 27, 2024 13:26
Copy link
Contributor

@Jondolf Jondolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Might be almost too fancy for just demonstrating sampling, but it does showcase it well and is visually appealing :) A screenshot or video of this would be a great fit for the 0.14 release notes too!

Left just a few non-blocking consistency nits. Also the keyboard inputs for zooming are sort of flipped and/or partially broken like we discussed on Discord, and for example pressing the non-numpad version of the minus/hyphen doesn't work with my Nordic (Finnish) keyboard layout, but I probably wouldn't block over it

examples/math/sampling_primitives.rs Outdated Show resolved Hide resolved
examples/math/sampling_primitives.rs Outdated Show resolved Hide resolved
examples/math/sampling_primitives.rs Outdated Show resolved Hide resolved
examples/math/sampling_primitives.rs Outdated Show resolved Hide resolved
examples/math/sampling_primitives.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@Jondolf Jondolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! The input issue seems to just be that the physical keys (KeyCode) don't map to the correct logical keys with my keyboard layout, but I don't think we have a good clean approach to do it properly, and the other examples also just use key codes.

@Jondolf Jondolf added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 27, 2024
@alice-i-cecile alice-i-cecile enabled auto-merge May 27, 2024 16:35
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 27, 2024
Merged via the queue into bevyengine:main with commit f67ae29 May 27, 2024
31 checks passed
@IQuick143 IQuick143 deleted the sampling_showcase branch May 27, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Math Fundamental domain-agnostic mathematical operations C-Examples An addition or correction to our examples D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants