Skip to content

Commit 5e9da92

Browse files
authored
Add links to the types on the documentation of GltfAssetLabel (#17791)
# Objective Allow quick jump to definition of types of GlTFs labeled assets. ## Solution Add links to the types refered on the docs of `GltfAssetLabel` ## Testing Ran `cargo run -p ci`
1 parent 575f665 commit 5e9da92

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

crates/bevy_gltf/src/lib.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -492,42 +492,43 @@ pub struct GltfMaterialName(pub String);
492492
/// ```
493493
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
494494
pub enum GltfAssetLabel {
495-
/// `Scene{}`: glTF Scene as a Bevy `Scene`
495+
/// `Scene{}`: glTF Scene as a Bevy [`Scene`]
496496
Scene(usize),
497-
/// `Node{}`: glTF Node as a `GltfNode`
497+
/// `Node{}`: glTF Node as a [`GltfNode`]
498498
Node(usize),
499-
/// `Mesh{}`: glTF Mesh as a `GltfMesh`
499+
/// `Mesh{}`: glTF Mesh as a [`GltfMesh`]
500500
Mesh(usize),
501-
/// `Mesh{}/Primitive{}`: glTF Primitive as a Bevy `Mesh`
501+
/// `Mesh{}/Primitive{}`: glTF Primitive as a Bevy [`Mesh`]
502502
Primitive {
503503
/// Index of the mesh for this primitive
504504
mesh: usize,
505505
/// Index of this primitive in its parent mesh
506506
primitive: usize,
507507
},
508508
/// `Mesh{}/Primitive{}/MorphTargets`: Morph target animation data for a glTF Primitive
509+
/// as a Bevy [`Image`](bevy_image::prelude::Image)
509510
MorphTarget {
510511
/// Index of the mesh for this primitive
511512
mesh: usize,
512513
/// Index of this primitive in its parent mesh
513514
primitive: usize,
514515
},
515-
/// `Texture{}`: glTF Texture as a Bevy `Image`
516+
/// `Texture{}`: glTF Texture as a Bevy [`Image`](bevy_image::prelude::Image)
516517
Texture(usize),
517-
/// `Material{}`: glTF Material as a Bevy `StandardMaterial`
518+
/// `Material{}`: glTF Material as a Bevy [`StandardMaterial`]
518519
Material {
519520
/// Index of this material
520521
index: usize,
521522
/// Used to set the [`Face`](bevy_render::render_resource::Face) of the material, useful if it is used with negative scale
522523
is_scale_inverted: bool,
523524
},
524-
/// `DefaultMaterial`: as above, if the glTF file contains a default material with no index
525+
/// `DefaultMaterial`: glTF's default Material as a Bevy [`StandardMaterial`]
525526
DefaultMaterial,
526-
/// `Animation{}`: glTF Animation as Bevy `AnimationClip`
527+
/// `Animation{}`: glTF Animation as Bevy [`AnimationClip`]
527528
Animation(usize),
528-
/// `Skin{}`: glTF mesh skin as `GltfSkin`
529+
/// `Skin{}`: glTF mesh skin as [`GltfSkin`]
529530
Skin(usize),
530-
/// `Skin{}/InverseBindMatrices`: glTF mesh skin matrices as Bevy `SkinnedMeshInverseBindposes`
531+
/// `Skin{}/InverseBindMatrices`: glTF mesh skin matrices as Bevy [`SkinnedMeshInverseBindposes`]
531532
InverseBindMatrices(usize),
532533
}
533534

0 commit comments

Comments
 (0)