Add missing component reflects, fix new lints

This commit is contained in:
Aevyrie 2024-11-30 09:47:38 -08:00
parent b2ebb025e7
commit 750a9a7398
No known key found for this signature in database
GPG Key ID: 6BBB78EF9FF0883A
5 changed files with 9 additions and 5 deletions

View File

@ -41,6 +41,7 @@ impl<P: GridPrecision> Plugin for CameraControllerPlugin<P> {
/// Per-camera settings for the `big_space` floating origin camera controller.
#[derive(Clone, Debug, Reflect, Component)]
#[reflect(Component)]
pub struct CameraController {
/// Smoothness of translation, from `0.0` to `1.0`.
pub smoothness: f64,

View File

@ -12,6 +12,7 @@ use bevy_utils::HashMap;
/// [`BigSpace`] will be computed relative to this floating origin. There should always be exactly
/// one entity marked with this component within a [`BigSpace`].
#[derive(Component, Reflect)]
#[reflect(Component)]
pub struct FloatingOrigin;
/// A "big space" is a hierarchy of high precision reference frames, rendered with a floating
@ -27,6 +28,7 @@ pub struct FloatingOrigin;
/// [`GlobalTransform`](bevy_transform::components::GlobalTransform) of all spatial entities within
/// that `BigSpace`.
#[derive(Debug, Default, Component, Reflect)]
#[reflect(Component)]
pub struct BigSpace {
/// Set the entity to use as the floating origin within this high precision hierarchy.
pub floating_origin: Option<Entity>,

View File

@ -34,6 +34,7 @@ pub mod propagation;
/// the same rotating reference frame, instead of moving rapidly through space around a star, or
/// worse, around the center of the galaxy.
#[derive(Debug, Clone, Reflect, Component)]
#[reflect(Component)]
pub struct ReferenceFrame<P: GridPrecision + Reflect> {
/// The high-precision position of the floating origin's current grid cell local to this
/// reference frame.

View File

@ -102,10 +102,10 @@ impl<P: GridPrecision> ReferenceFrame<P> {
///
/// # Safety
///
/// - While this function is running, `transform_query` must not have any fetches for `entity`, nor
/// any of its descendants.
/// - The caller must ensure that the hierarchy leading to `entity` is well-formed and must remain
/// as a tree or a forest. Each entity must have at most one parent.
/// - While this function is running, `transform_query` must not have any fetches for `entity`,
/// nor any of its descendants.
/// - The caller must ensure that the hierarchy leading to `entity` is well-formed and must
/// remain as a tree or a forest. Each entity must have at most one parent.
unsafe fn propagate_recursive(
parent: &GlobalTransform,
transform_query: &Query<

View File

@ -130,7 +130,7 @@ pub(super) mod sealed {
fn clone_box(&self) -> Box<dyn ValidHierarchyNode>;
}
impl<T: ?Sized> CloneHierarchy for T
impl<T> CloneHierarchy for T
where
T: 'static + ValidHierarchyNode + Clone,
{