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

Add links to the types on the documentation of GltfAssetLabel #17791

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions crates/bevy_gltf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,42 +492,43 @@ pub struct GltfMaterialName(pub String);
/// ```
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum GltfAssetLabel {
/// `Scene{}`: glTF Scene as a Bevy `Scene`
/// `Scene{}`: glTF Scene as a Bevy [`Scene`]
Scene(usize),
/// `Node{}`: glTF Node as a `GltfNode`
/// `Node{}`: glTF Node as a [`GltfNode`]
Node(usize),
/// `Mesh{}`: glTF Mesh as a `GltfMesh`
/// `Mesh{}`: glTF Mesh as a [`GltfMesh`]
Mesh(usize),
/// `Mesh{}/Primitive{}`: glTF Primitive as a Bevy `Mesh`
/// `Mesh{}/Primitive{}`: glTF Primitive as a Bevy [`Mesh`]
Primitive {
/// Index of the mesh for this primitive
mesh: usize,
/// Index of this primitive in its parent mesh
primitive: usize,
},
/// `Mesh{}/Primitive{}/MorphTargets`: Morph target animation data for a glTF Primitive
/// as a Bevy [`Image`](bevy_image::prelude::Image)
MorphTarget {
/// Index of the mesh for this primitive
mesh: usize,
/// Index of this primitive in its parent mesh
primitive: usize,
},
/// `Texture{}`: glTF Texture as a Bevy `Image`
/// `Texture{}`: glTF Texture as a Bevy [`Image`](bevy_image::prelude::Image)
Texture(usize),
/// `Material{}`: glTF Material as a Bevy `StandardMaterial`
/// `Material{}`: glTF Material as a Bevy [`StandardMaterial`]
Material {
/// Index of this material
index: usize,
/// Used to set the [`Face`](bevy_render::render_resource::Face) of the material, useful if it is used with negative scale
is_scale_inverted: bool,
},
/// `DefaultMaterial`: as above, if the glTF file contains a default material with no index
/// `DefaultMaterial`: glTF's default Material as a Bevy [`StandardMaterial`]
DefaultMaterial,
/// `Animation{}`: glTF Animation as Bevy `AnimationClip`
/// `Animation{}`: glTF Animation as Bevy [`AnimationClip`]
Animation(usize),
/// `Skin{}`: glTF mesh skin as `GltfSkin`
/// `Skin{}`: glTF mesh skin as [`GltfSkin`]
Skin(usize),
/// `Skin{}/InverseBindMatrices`: glTF mesh skin matrices as Bevy `SkinnedMeshInverseBindposes`
/// `Skin{}/InverseBindMatrices`: glTF mesh skin matrices as Bevy [`SkinnedMeshInverseBindposes`]
InverseBindMatrices(usize),
}

Expand Down