bevy/crates
Joona Aalto c6f45831e9
Add geometric primitives to bevy_math::prelude (#11432)
# Objective

Currently, the `primitives` module is inside of the prelude for
`bevy_math`, but the actual primitives are not. This requires either
importing the shapes everywhere that uses them, or adding the
`primitives::` prefix:

```rust
let rectangle = meshes.add(primitives::Rectangle::new(5.0, 2.5));
```

(Note: meshing isn't actually implemented yet, but it's in #11431)

The primitives are meant to be used for a variety of tasks across
several crates, like for meshing, bounding volumes, gizmos, colliders,
and so on, so I think having them in the prelude is justified. It would
make several common tasks a lot more ergonomic.

```rust
let rectangle = meshes.add(Rectangle::new(5.0, 2.5));
```

## Solution

Add `primitives::*` to `bevy_math::prelude`.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-01-20 20:15:38 +00:00
..
bevy_a11y resolve all internal ambiguities (#10411) 2024-01-09 19:08:15 +00:00
bevy_animation Skip alloc when updating animation path cache (#11330) 2024-01-13 19:33:11 +00:00
bevy_app resolve all internal ambiguities (#10411) 2024-01-09 19:08:15 +00:00
bevy_asset Added AssetLoadFailedEvent, UntypedAssetLoadFailedEvent (#11369) 2024-01-17 21:12:00 +00:00
bevy_audio Remove the ability to ignore global volume (#11092) 2024-01-15 15:31:54 +00:00
bevy_core Replace or document ignored doctests (#11040) 2024-01-01 16:50:56 +00:00
bevy_core_pipeline Implement minimal reflection probes (fixed macOS, iOS, and Android). (#11366) 2024-01-19 07:33:52 +00:00
bevy_derive Reexport winit::platform::android::activity::* in bevy_winit (#11011) 2023-12-19 20:15:03 +00:00
bevy_diagnostic Replace DiagnosticId by DiagnosticPath (#9266) 2024-01-20 15:42:51 +00:00
bevy_dylib Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_dynamic_plugin Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_ecs Optional state (#11417) 2024-01-19 21:38:04 +00:00
bevy_ecs_compile_fail_tests Dynamic queries and builder API (#9774) 2024-01-16 19:16:49 +00:00
bevy_encase_derive Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere (#10011) 2023-11-18 20:58:48 +00:00
bevy_gilrs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
bevy_gizmos Fix gizmos app new panic (#11420) 2024-01-19 06:03:27 +00:00
bevy_gltf Use glam for computing gLTF node transform (#11361) 2024-01-16 14:33:19 +00:00
bevy_hierarchy Inline trivial methods in bevy_hierarchy (#11332) 2024-01-13 22:20:50 +00:00
bevy_input Extend Touches with clear and reset methods (#10930) 2024-01-04 23:13:29 +00:00
bevy_internal Implement minimal reflection probes (fixed macOS, iOS, and Android). (#11366) 2024-01-19 07:33:52 +00:00
bevy_log move once from bevy_log to bevy_utils, to allow for it's use in bevy_ecs (#11419) 2024-01-19 06:07:41 +00:00
bevy_macro_utils Bump toml_edit in build-template-pages tool (#11342) 2024-01-16 05:23:18 +00:00
bevy_macros_compile_fail_tests Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
bevy_math Add geometric primitives to bevy_math::prelude (#11432) 2024-01-20 20:15:38 +00:00
bevy_mikktspace Update glam, encase and hexasphere (#11082) 2024-01-08 22:58:45 +00:00
bevy_pbr optimize batch_and_prepare_render_phase (#11323) 2024-01-20 09:30:44 +00:00
bevy_ptr Simplify equality assertions (#10988) 2023-12-16 23:58:41 +00:00
bevy_reflect Use static_assertions to check for trait impls (#11407) 2024-01-18 17:21:18 +00:00
bevy_reflect_compile_fail_tests Fix nested generics in Reflect derive (#10791) 2023-11-29 01:46:09 +00:00
bevy_render optimize batch_and_prepare_render_phase (#11323) 2024-01-20 09:30:44 +00:00
bevy_scene Add ReflectFromWorld and replace the FromWorld requirement on ReflectComponent and ReflectBundle with FromReflect (#9623) 2024-01-19 16:08:57 +00:00
bevy_sprite optimize batch_and_prepare_render_phase (#11323) 2024-01-20 09:30:44 +00:00
bevy_tasks Async channel v2 (#10692) 2024-01-15 19:23:00 +00:00
bevy_text Texture Atlas rework (#5103) 2024-01-16 13:59:08 +00:00
bevy_time Add paused run condition (#11313) 2024-01-12 22:18:57 +00:00
bevy_transform Rename "AddChild" to "PushChild" (#11194) 2024-01-04 16:06:14 +00:00
bevy_ui Fix panic on Text UI without Cameras (#11405) 2024-01-18 20:33:22 +00:00
bevy_utils move once from bevy_log to bevy_utils, to allow for it's use in bevy_ecs (#11419) 2024-01-19 06:07:41 +00:00
bevy_window Remove CanvasParentResizePlugin (#11057) 2023-12-21 20:01:22 +00:00
bevy_winit Winit update: fix suspend on Android (#11403) 2024-01-19 06:26:34 +00:00