mirror of
https://github.com/eliasstepanik/big_space_with_trim.git
synced 2026-01-11 10:08:28 +00:00
Add missing component reflects, fix new lints
This commit is contained in:
parent
b2ebb025e7
commit
750a9a7398
@ -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,
|
||||
|
||||
@ -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>,
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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<
|
||||
|
||||
@ -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,
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user