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

Examples to demonstrate changing a sprite and texture #3130

Closed
alice-i-cecile opened this issue Nov 13, 2021 · 4 comments · Fixed by #15298
Closed

Examples to demonstrate changing a sprite and texture #3130

alice-i-cecile opened this issue Nov 13, 2021 · 4 comments · Fixed by #15298
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Examples An addition or correction to our examples D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@alice-i-cecile
Copy link
Member

How can Bevy's documentation be improved?

Newcomers are often a bit lost when trying to learn how to idiomatically work with assets and handles.

The most common stumbling block is "how do I change a sprite once loaded?".

We should add two sibling examples, one for sprites, and one for meshes:

  • show how to query for sprite / mesh handles, and change what they point to
  • show how to programatically change the properties of a sprite / mesh (e.g. color, reflectance, translucency or so on)
  • show how to mutate the underlying asset to e.g. add more vertexes
@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy C-Examples An addition or correction to our examples A-Assets Load files from disk to use for things like images, models, and sounds labels Nov 13, 2021
@richchurcher
Copy link
Contributor

This looks like good learning material for me, I'll pick this up.

@alice-i-cecile
Copy link
Member Author

Awesome. #15056 gets into the strategies a little bit, but it would be very nice to have a hands-on example or two.

@richchurcher
Copy link
Contributor

This is possibly an obvious question, but do we mean an example for Mesh2d or Mesh here?

@alice-i-cecile
Copy link
Member Author

Either is fine: I think Mesh is more common.

github-merge-queue bot pushed a commit that referenced this issue Sep 22, 2024
# Objective

Add examples for manipulating sprites and meshes by either mutating the
handle or direct manipulation of the asset, as described in #15056.

Closes #3130.

(The previous PR suffered a Git-tastrophe, and was unceremoniously
closed, sry! 😅 )

---------

Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Examples An addition or correction to our examples D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
2 participants