bevy/examples/2d
Chris Biscardi 1dd30a620a
Add docs to custom vertex attribute example (#17422)
# Objective

The gltf-json crate seems like it strips/adds an `_` when doing the name
comparison for custom vertex attributes.

* gltf-json
[add](88e719d5de/gltf-json/src/mesh.rs (L341))
* gltf-json
[strip](88e719d5de/gltf-json/src/mesh.rs (L298C12-L298C42))
* [bevy's
handling](b66c3ceb0e/crates/bevy_gltf/src/vertex_attributes.rs (L273-L276))
seems like it uses the non-underscore'd version.

The bevy example gltf:
[barycentric.gltf](b66c3ceb0e/assets/models/barycentric/barycentric.gltf),
includes two underscores: `__BARYCENTRIC` in the gltf file, resulting in
needing `_BARYCENTRIC` (one underscore) as the attribute name in Bevy.
This extra underscore is redundant and does not appear if exporting from
blender, which only requires a single underscore to trigger the
attribute export.

I'm not sure if we want to change the example itself (maybe there's a
reason it has two underscores, I couldn't find a reason), but a docs
comment would help.

## Solution

add docs detailing the behavior
2025-01-20 21:16:11 +00:00
..
2d_shapes.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
2d_viewport_to_world.rs simplify example, replace get_single to Single Query (#16187) 2024-11-01 18:25:42 +00:00
bloom_2d.rs Anamorphic Bloom (#17096) 2025-01-06 18:43:21 +00:00
bounding_2d.rs Reworked Segment types into their cartesian forms (#17404) 2025-01-19 03:54:45 +00:00
cpu_draw.rs Make some examples deterministic (#16488) 2024-11-23 18:28:47 +00:00
custom_gltf_vertex_attribute.rs Add docs to custom vertex attribute example (#17422) 2025-01-20 21:16:11 +00:00
mesh2d_alpha_mode.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
mesh2d_arcs.rs Implement From translation and rotation for isometries (#15733) 2024-10-08 16:09:28 +00:00
mesh2d_manual.rs Use multi_draw_indirect_count where available, in preparation for two-phase occlusion culling. (#17211) 2025-01-14 21:19:20 +00:00
mesh2d_vertex_color_texture.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
mesh2d.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
move_sprite.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
pixel_grid_snap.rs Refactor and simplify custom projections (#17063) 2025-01-01 20:44:24 +00:00
rotation.rs aligning public apis of Time,Timer and Stopwatch (#15962) 2024-10-16 21:09:32 +00:00
sprite_animation.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00
sprite_flipping.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
sprite_sheet.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
sprite_slice.rs BorderRect maintenance (#16727) 2024-12-12 04:33:44 +00:00
sprite_tile.rs Improved UiImage and Sprite scaling and slicing APIs (#16088) 2024-11-04 15:14:03 +00:00
sprite.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
text2d.rs Text 2d alignment fix (#17365) 2025-01-20 20:54:32 +00:00
texture_atlas.rs Prefer Display over Debug (#16112) 2024-12-27 00:40:06 +00:00
transparency_2d.rs Make some examples deterministic (#16488) 2024-11-23 18:28:47 +00:00
wireframe_2d.rs Merge Style properties into Node. Use ComputedNode for computed properties. (#15975) 2024-10-18 22:25:33 +00:00