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 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#[doc(inline)]
67pub use fyrox_autotile as autotile;
68
69#[doc(inline)]
70pub use fyrox_graphics as graphics;
71
72#[doc(inline)]
73pub use fyrox_graphics_gl as graphics_gl;
74
75#[macro_export]
77macro_rules! define_with {
78 ($(#[$attr:meta])* fn $name:ident($field:ident: $ty:ty)) => {
79 $(#[$attr])*
80 pub fn $name(mut self, value: $ty) -> Self {
81 self.$field = value;
82 self
83 }
84 };
85}
86
87#[cfg(test)]
88mod test {
89 use crate::scene::base::{Base, BaseBuilder};
90 use fyrox_core::reflect::Reflect;
91 use fyrox_core::ImmutableString;
92 use fyrox_sound::source::Status;
93 use fyrox_ui::widget::{Widget, WidgetBuilder};
94 use fyrox_ui::UserInterface;
95
96 #[test]
97 fn test_assembly_names() {
98 let mut ui = UserInterface::new(Default::default());
99 let var = ImmutableString::new("Foobar");
100 let base = BaseBuilder::new().build_base();
101 let widget = WidgetBuilder::new().build(&ui.build_ctx());
102 let status = Status::Stopped;
103
104 assert_eq!(var.assembly_name(), "fyrox-core");
105 assert_eq!(base.assembly_name(), "fyrox-impl");
106 assert_eq!(widget.assembly_name(), "fyrox-ui");
107 assert_eq!(status.assembly_name(), "fyrox-sound");
108
109 assert_eq!(ImmutableString::type_assembly_name(), "fyrox-core");
110 assert_eq!(Base::type_assembly_name(), "fyrox-impl");
111 assert_eq!(Widget::type_assembly_name(), "fyrox-ui");
112 assert_eq!(Status::type_assembly_name(), "fyrox-sound");
113 }
114}