bevy/crates/bevy_render/src/texture
Han Damin 29c632b524
Add common aspect ratio constants and improve documentation (#15091)
Hello,

I'd like to contribute to this project by adding some useful constants
and improving the documentation for the AspectRatio struct. Here's a
summary of the changes I've made:

1. Added new constants for common aspect ratios:
   - SIXTEEN_NINE (16:9)
   - FOUR_THREE (4:3)
   - ULTRAWIDE (21:9)

2. Enhanced the overall documentation:
   - Improved module-level documentation with an overview and use cases
   - Expanded explanation of the AspectRatio struct with examples
- Added detailed descriptions and examples for all methods (both
existing and new)
   - Included explanations for the newly introduced constant values
   - Added clarifications for From trait implementations

These changes aim to make the AspectRatio API more user-friendly and
easier to understand. The new constants provide convenient access to
commonly used aspect ratios, which I believe will be helpful in many
scenarios.

---------

Co-authored-by: Gonçalo Rica Pais da Silva <bluefinger@gmail.com>
Co-authored-by: Lixou <82600264+DasLixou@users.noreply.github.com>
2024-09-09 16:04:41 +00:00
..
basis.rs Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
compressed_image_saver.rs Use async-fn in traits rather than BoxedFuture (#12550) 2024-03-18 17:56:57 +00:00
dds.rs Add feature requirement info to image loading docs (#13712) 2024-08-16 23:43:20 +00:00
exr_texture_loader.rs Add feature requirement info to image loading docs (#13712) 2024-08-16 23:43:20 +00:00
fallback_image.rs Apply unused_qualifications lint (#14828) 2024-08-21 12:29:33 +00:00
hdr_texture_loader.rs Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
image_loader.rs Optimize common usages of AssetReader (#14082) 2024-07-01 19:59:42 +00:00
image_texture_conversion.rs Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
image.rs Add common aspect ratio constants and improve documentation (#15091) 2024-09-09 16:04:41 +00:00
ktx2.rs Add feature requirement info to image loading docs (#13712) 2024-08-16 23:43:20 +00:00
mod.rs Depreciate LoadAndSave Asset Processor (#15090) 2024-09-09 16:01:14 +00:00
texture_attachment.rs Allow mix of hdr and non-hdr cameras to same render target (#13419) 2024-06-06 20:55:05 +00:00
texture_cache.rs Fix TextureCache memory leak and add is_empty() method (#14480) 2024-07-27 13:16:27 +00:00