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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! A collection of structures and functions useful across the entire amethyst project.
#![warn(
    missing_debug_implementations,
    missing_docs,
    rust_2018_idioms,
    rust_2018_compatibility
)]
#![warn(clippy::all)]
#![allow(clippy::new_without_default)]

#[cfg(all(target_os = "emscripten", not(no_threading)))]
compile_error!("the cfg flag \"no_threading\" is required when building for emscripten");

#[macro_use]
extern crate getset;
#[macro_use]
extern crate derive_new;

pub use alga;
pub use approx;
pub use nalgebra as math;
pub use num_traits as num;
pub use specs as ecs;
pub use specs::{shred, shrev};

use rayon;

use std::sync::Arc;

pub use crate::{
    bundle::SystemBundle,
    event::EventReader,
    system_ext::{Pausable, SystemExt},
    timing::*,
    transform::*,
};

pub use self::{
    axis::{Axis2, Axis3},
    hidden::{Hidden, HiddenPropagate},
    hide_system::HideHierarchySystem,
    named::{Named, WithNamed},
    system_desc::{RunNowDesc, SystemDesc},
};

pub mod bundle;
pub mod deferred_dispatcher_operation;
pub mod frame_limiter;
pub mod geometry;
pub mod timing;
pub mod transform;

mod axis;
mod event;
mod hidden;
mod hide_system;
mod named;
mod system_desc;
mod system_ext;

/// A rayon thread pool wrapped in an `Arc`. This should be used as resource in `World`.
pub type ArcThreadPool = Arc<rayon::ThreadPool>;