1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use bars::BarsPlugin;
pub use bars::{UpdateBarValueEvent, UpdateBarVisibilityEvent};
use bevy::{app::PluginGroupBuilder, prelude::*};
use line::LinePlugin;
pub use line::{
    LineLocation, UpdateLineEndEvent, UpdateLineLocationEvent, UpdateLineVisibilityEvent,
};
use markers::MarkersPlugin;
use pole::PolePlugin;
pub use pole::{UpdatePoleLocationEvent, UpdatePoleVisibilityEvent};

mod bars;
mod line;
mod markers;
mod pole;

/// The 3D signs are not displayed if further than this from the camera.
const MAX_VISIBILITY_DISTANCE: f32 = 140.;
const DISTANCE_FLAG_BIT: u32 = 0;
const UPDATE_TIMER_FLAG_BIT: u32 = 2;

pub struct SignsPluginGroup;

impl PluginGroup for SignsPluginGroup {
    fn build(self) -> PluginGroupBuilder {
        PluginGroupBuilder::start::<Self>()
            .add(BarsPlugin)
            .add(MarkersPlugin)
            .add(PolePlugin)
            .add(LinePlugin)
    }
}