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
36pub mod engine;
37pub mod material;
38pub mod plugin;
39pub mod renderer;
40pub mod resource;
41pub mod scene;
42pub mod script;
43pub mod utils;
44
45pub use crate::core::rand;
46pub use fxhash;
47pub use lazy_static;
48pub use walkdir;
49pub use winit::*;
50
51#[doc(inline)]
52pub use fyrox_animation as generic_animation;
53
54#[doc(inline)]
55pub use fyrox_graph as graph;
56
57#[doc(inline)]
58pub use fyrox_core as core;
59
60#[doc(inline)]
61pub use fyrox_resource as asset;
62
63#[doc(inline)]
64pub use fyrox_ui as gui;
65
66#[macro_export]
68macro_rules! define_with {
69 ($(#[$attr:meta])* fn $name:ident($field:ident: $ty:ty)) => {
70 $(#[$attr])*
71 pub fn $name(mut self, value: $ty) -> Self {
72 self.$field = value;
73 self
74 }
75 };
76}
77
78#[cfg(test)]
79mod test {
80 use crate::scene::base::{Base, BaseBuilder};
81 use fyrox_core::reflect::Reflect;
82 use fyrox_core::ImmutableString;
83 use fyrox_sound::source::Status;
84 use fyrox_ui::widget::{Widget, WidgetBuilder};
85 use fyrox_ui::UserInterface;
86
87 #[test]
88 fn test_assembly_names() {
89 let mut ui = UserInterface::new(Default::default());
90 let var = ImmutableString::new("Foobar");
91 let base = BaseBuilder::new().build_base();
92 let widget = WidgetBuilder::new().build(&ui.build_ctx());
93 let status = Status::Stopped;
94
95 assert_eq!(var.assembly_name(), "fyrox-core");
96 assert_eq!(base.assembly_name(), "fyrox-impl");
97 assert_eq!(widget.assembly_name(), "fyrox-ui");
98 assert_eq!(status.assembly_name(), "fyrox-sound");
99
100 assert_eq!(ImmutableString::type_assembly_name(), "fyrox-core");
101 assert_eq!(Base::type_assembly_name(), "fyrox-impl");
102 assert_eq!(Widget::type_assembly_name(), "fyrox-ui");
103 assert_eq!(Status::type_assembly_name(), "fyrox-sound");
104 }
105}