bevy/crates
Aztro eef7dbefe8
Add single-f32 constructors for a few (very few) primitives (#11934)
# Objective

- I hated having to do `Cuboid::new(1.0, 1.0, 1.0)` or
`Cuboid::from_size(Vec3::splat(1.0))` when there should be a much easier
way to do this.

## Solution

- Implemented a `from_length()` method that only takes in a single
float, and constructs a primitive of equal size in all directions.
- Ex:
  ```rs
  // These:
  Cuboid::new(1.0, 1.0, 1.0);
  Cuboid::from_size(Vec3::splat(1.0));
  // Are equivalent to this:
  Cuboid::from_length(1.0);
  ```
 - For the rest of the changed primitives:
    ```rs
    Rectangle::from_length(1.0);
    Plane3d::default().mesh().from_length(1.0);
    ```
2024-02-18 07:43:45 +00:00
..
bevy_a11y Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_animation Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_app Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_asset Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_audio Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_core Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_core_pipeline Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_derive Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_diagnostic Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_dylib Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_dynamic_plugin Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_ecs Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_ecs_compile_fail_tests Deprecated Various Component Methods from Query and QueryState (#9920) 2024-02-04 01:01:59 +00:00
bevy_encase_derive Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_gilrs Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_gizmos Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_gltf Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_hierarchy Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_input Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_internal Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_log Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_macro_utils Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_macros_compile_fail_tests Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
bevy_math Add single-f32 constructors for a few (very few) primitives (#11934) 2024-02-18 07:43:45 +00:00
bevy_mikktspace Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_pbr Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_ptr Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_reflect Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_reflect_compile_fail_tests bevy_reflect_derive: Clean up attribute logic (#11777) 2024-02-12 15:16:27 +00:00
bevy_render Add single-f32 constructors for a few (very few) primitives (#11934) 2024-02-18 07:43:45 +00:00
bevy_scene Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_sprite Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_tasks Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_text Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_time Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_transform Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_ui Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_utils Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_window Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_winit Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00