1#![doc(
26 html_logo_url = "https://fyrox.rs/assets/logos/logo.png",
27 html_favicon_url = "https://fyrox.rs/assets/logos/logo.png"
28)]
29#![allow(clippy::too_many_arguments)]
30#![allow(clippy::upper_case_acronyms)]
31#![allow(clippy::from_over_into)]
32#![allow(clippy::approx_constant)]
33#![allow(clippy::doc_lazy_continuation)]
34#![allow(clippy::mutable_key_type)]
35#![allow(mismatched_lifetime_syntaxes)]
36
37pub mod engine;
38pub mod material;
39pub mod plugin;
40pub mod renderer;
41pub mod resource;
42pub mod scene;
43pub mod script;
44pub mod utils;
45
46pub use crate::core::rand;
47pub use fxhash;
48pub use lazy_static;
49pub use walkdir;
50pub use winit::*;
51
52#[doc(inline)]
53pub use fyrox_animation as generic_animation;
54
55#[doc(inline)]
56pub use fyrox_graph as graph;
57
58#[doc(inline)]
59pub use fyrox_core as core;
60
61#[doc(inline)]
62pub use fyrox_resource as asset;
63
64#[doc(inline)]
65pub use fyrox_ui as gui;
66
67#[doc(inline)]
68pub use fyrox_autotile as autotile;
69
70#[doc(inline)]
71pub use fyrox_graphics as graphics;
72
73#[doc(inline)]
74pub use fyrox_graphics_gl as graphics_gl;
75
76#[macro_export]
78macro_rules! define_with {
79 ($(#[$attr:meta])* fn $name:ident($field:ident: $ty:ty)) => {
80 $(#[$attr])*
81 pub fn $name(mut self, value: $ty) -> Self {
82 self.$field = value;
83 self
84 }
85 };
86}
87
88#[cfg(test)]
89mod test {
90 use crate::scene::base::{Base, BaseBuilder};
91 use fyrox_core::reflect::Reflect;
92 use fyrox_core::ImmutableString;
93 use fyrox_sound::source::Status;
94 use fyrox_ui::widget::{Widget, WidgetBuilder};
95 use fyrox_ui::UserInterface;
96
97 #[test]
98 fn test_assembly_names() {
99 let mut ui = UserInterface::new(Default::default());
100 let var = ImmutableString::new("Foobar");
101 let base = BaseBuilder::new().build_base();
102 let widget = WidgetBuilder::new().build(&ui.build_ctx());
103 let status = Status::Stopped;
104
105 assert_eq!(var.assembly_name(), "fyrox-core");
106 assert_eq!(base.assembly_name(), "fyrox-impl");
107 assert_eq!(widget.assembly_name(), "fyrox-ui");
108 assert_eq!(status.assembly_name(), "fyrox-sound");
109
110 assert_eq!(ImmutableString::type_assembly_name(), "fyrox-core");
111 assert_eq!(Base::type_assembly_name(), "fyrox-impl");
112 assert_eq!(Widget::type_assembly_name(), "fyrox-ui");
113 assert_eq!(Status::type_assembly_name(), "fyrox-sound");
114 }
115}