bevy/crates
Alice Cecile a304fd9a99 Split bevy_hierarchy out from bevy_transform (#4168)
# Objective

- Hierarchy tools are not just used for `Transform`: they are also used for scenes.
- In the future there's interest in using them for other features, such as visiibility inheritance.
- The fact that these tools are found in `bevy_transform` causes a great deal of user and developer confusion
- Fixes #2758.

## Solution

- Split `bevy_transform` into two!
- Make everything work again.

Note that this is a very tightly scoped PR: I *know* there are code quality and docs issues that existed in bevy_transform that I've just moved around. We should fix those in a seperate PR and try to merge this ASAP to reduce the bitrot involved in splitting an entire crate.

## Frustrations

The API around `GlobalTransform` is a mess: we have massive code and docs duplication, no link between the two types and no clear way to extend this to other forms of inheritance.

In the medium-term, I feel pretty strongly that `GlobalTransform` should be replaced by something like `Inherited<Transform>`, which lives in `bevy_hierarchy`:

- avoids code duplication
- makes the inheritance pattern extensible
- links the types at the type-level
- allows us to remove all references to inheritance from `bevy_transform`, making it more useful as a standalone crate and cleaning up its docs

## Additional context

- double-blessed by @cart in https://github.com/bevyengine/bevy/issues/4141#issuecomment-1063592414 and https://github.com/bevyengine/bevy/issues/2758#issuecomment-913810963
- preparation for more advanced / cleaner hierarchy tools: go read https://github.com/bevyengine/rfcs/pull/53 !
- originally attempted by @finegeometer in #2789. It was a great idea, just needed more discussion!

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2022-03-15 01:54:05 +00:00
..
bevy_app remove Events from bevy_app, they now live in bevy_ecs (#4066) 2022-03-01 19:33:56 +00:00
bevy_asset iter_mut on Assets: send modified event only when asset is iterated over (#3565) 2022-03-05 21:25:30 +00:00
bevy_audio Audio control - play, pause, volume, speed, loop (#3948) 2022-03-01 01:12:11 +00:00
bevy_core export TaskPoolThreadAssignmentPolicy (#4145) 2022-03-08 01:54:36 +00:00
bevy_core_pipeline use marker components for cameras instead of name strings (#3635) 2022-03-12 00:41:06 +00:00
bevy_crevice Don't panic in macro shape validation (#3647) 2022-01-15 22:14:43 +00:00
bevy_derive small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
bevy_diagnostic small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
bevy_dylib Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_dynamic_plugin Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_ecs Add clear_schedule (#3941) 2022-03-05 21:53:17 +00:00
bevy_ecs_compile_fail_tests Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_gilrs remove Events from bevy_app, they now live in bevy_ecs (#4066) 2022-03-01 19:33:56 +00:00
bevy_gltf Split bevy_hierarchy out from bevy_transform (#4168) 2022-03-15 01:54:05 +00:00
bevy_hierarchy Split bevy_hierarchy out from bevy_transform (#4168) 2022-03-15 01:54:05 +00:00
bevy_input remove Events from bevy_app, they now live in bevy_ecs (#4066) 2022-03-01 19:33:56 +00:00
bevy_internal Split bevy_hierarchy out from bevy_transform (#4168) 2022-03-15 01:54:05 +00:00
bevy_log Example of module-level log usage and RUST_LOG usage in main doc (#3919) 2022-03-05 03:00:31 +00:00
bevy_macro_utils small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
bevy_math Release 0.6.0 (#3587) 2022-01-08 10:18:22 +00:00
bevy_pbr fix cluster tiling calculations (#4148) 2022-03-10 01:14:21 +00:00
bevy_reflect Add Reflect support for DMat3, DMat4, DQuat (#4128) 2022-03-08 00:14:21 +00:00
bevy_render Split bevy_hierarchy out from bevy_transform (#4168) 2022-03-15 01:54:05 +00:00
bevy_scene Split bevy_hierarchy out from bevy_transform (#4168) 2022-03-15 01:54:05 +00:00
bevy_sprite Make get_resource (and friends) infallible (#4047) 2022-02-27 22:37:18 +00:00
bevy_tasks small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
bevy_text Add docs and common helper functions to Windows (#4107) 2022-03-08 00:46:04 +00:00
bevy_transform Split bevy_hierarchy out from bevy_transform (#4168) 2022-03-15 01:54:05 +00:00
bevy_ui Split bevy_hierarchy out from bevy_transform (#4168) 2022-03-15 01:54:05 +00:00
bevy_utils default() shorthand (#4071) 2022-03-01 20:52:09 +00:00
bevy_window Add docs and common helper functions to Windows (#4107) 2022-03-08 00:46:04 +00:00
bevy_winit Add docs and common helper functions to Windows (#4107) 2022-03-08 00:46:04 +00:00