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

use Name on node when loading a gltf file #1183

Merged
merged 2 commits into from
Jan 1, 2021

Conversation

mockersf
Copy link
Member

@mockersf mockersf commented Jan 1, 2021

following #1020, use Name instead of Labels

also added Name to the prelude, and updated an example showing how to use it for a gltf file

@@ -21,3 +22,36 @@ fn setup(commands: &mut Commands, asset_server: Res<AssetServer>) {
..Default::default()
});
}

// When pressing spacebar, it will display only part of the model, rotating between the parts
fn display_only_parts(
Copy link
Member

Choose a reason for hiding this comment

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

While I like that this shows how to select based on name and running the app is fun, I'm a little hesitant to include it:

  1. Its a slightly roundabout way to "hide" things. Im assuming we can't use Visible::is_visible because the named nodes are "parents" that we don't actually draw. But toggling visibility would be a bit more self-documenting / idiomatic. As-is its hard to say that this is how people should solve the "hide by name" problem generically.
  2. It makes the example less minimal. In general I want each example to be a small and clear illustration of a single feature.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I agree but it was fun to play with... that's why I did it in a different commit, to be extra easy to remove...

Copy link
Member

Choose a reason for hiding this comment

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

thanks :)

@cart cart merged commit 228c3df into bevyengine:master Jan 1, 2021
@mockersf mockersf deleted the gltf-names branch April 27, 2021 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants