diff --git a/.gitignore b/.gitignore index d05449d9d..ffb67156a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,9 +7,9 @@ /examples/data/lightmaps /save.bin /examples/data/lightmap_scene.rgs -/rg3d-core/test.bin -/rg3d-core/test.txt -/rg3d-core-derive/test_output +/fyrox-core/test.bin +/fyrox-core/test.txt +/fyrox-core-derive/test_output /test_output history.bin settings.ron diff --git a/.idea/rg3d-core.iml b/.idea/rg3d-core.iml index 1e8b26cbf..987957e60 100644 --- a/.idea/rg3d-core.iml +++ b/.idea/rg3d-core.iml @@ -19,6 +19,13 @@ + + + + + + + diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 5bf42ffaa..8788f0fa5 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -2,29 +2,29 @@ ** WORK IN PROGRESS ** -This document describes high-level architecture and basic concepts of rg3d. It should help you to understand +This document describes high-level architecture and basic concepts of Fyrox. It should help you to understand basics of the engine's architecture and find a right place for your modifications. ## Overview -rg3d is a monolithic game engine with very few replaceable parts. This means that rg3d itself has relatively +Fyrox is a monolithic game engine with very few replaceable parts. This means that Fyrox itself has relatively strong coupling between modules. However, some of its parts can be used as standalone crates - core, UI and sound are independent of the engine. Internal coupling is one-way in most of the places, this means that, for instance, a renderer **is** dependent on a scene, but scene does **not** know anything about the renderer. This fact makes changes in the engine very easy even for beginners. -rg3d consists of the four crates - rg3d-core, rg3d-sound, rg3d-ui, and rg3d itself. rg3d-core, rg3d-sound and -rg3d-ui are **standalone** crates and can be used separately, the only place where these three are meet is the -rg3d. Previously each crate had a separate repository, but then I decided to put everything in single repository +Fyrox consists of the four crates - fyrox-core, fyrox-sound, fyrox-ui, and Fyrox itself. fyrox-core, fyrox-sound and +fyrox-ui are **standalone** crates and can be used separately, the only place where these three are meet is the +Fyrox. Previously each crate had a separate repository, but then I decided to put everything in single repository because it was too much of a pain to build any project that uses the engine. -Another important fact is that rg3d **does not** use ECS, instead it uses generational arenas (pools in rg3d's +Another important fact is that Fyrox **does not** use ECS, instead it uses generational arenas (pools in Fyrox's terminology) for efficient memory management (fast allocation/deallocation, CPU cache efficiency). This means that you are working with good old structures which are placed in contiguous memory block (pool). Once an object was placed in a pool, you get a handle to the object which can be used to access (borrow) the object when you need. Such approach allows you to make any relations between the objects - handle is just a pair of numbers, it won't cause issues with borrow checker. For more info check -[pool.rs](https://github.com/mrDIMAS/rg3d/blob/master/rg3d-core/src/pool.rs). +[pool.rs](https://github.com/mrDIMAS/rg3d/blob/master/fyrox-core/src/pool.rs). ### Core @@ -34,14 +34,14 @@ It contains linear algebra, accelerating structures, color-space functions, etc. ### Renderer -rg3d uses a combination of deferred + forward renderers. The deferred renderer is used to render opaque objects, +Fyrox uses a combination of deferred + forward renderers. The deferred renderer is used to render opaque objects, when the forward renderer is used to render transparent objects. The renderer provides lots of very common graphical effects. The renderer is suitable for most of the needs, however it is not flexible enough yet and there is no way of using custom shaders yet. ### User Interface -rg3d uses custom user interface library. It is node-based, has very powerful layout system, uses messages +Fyrox uses custom user interface library. It is node-based, has very powerful layout system, uses messages to communicate between widgets, supports styling. The library has 30+ widgets (including docking manager, windows, file browsers, etc). Please keep in mind that the library does not render anything, instead it just prepares a set of drawing commands which can be used with any kind of renderer - a software (GDI for @@ -49,7 +49,7 @@ instance) or a hardware (OpenGL, DirectX, Vulkan, Metal, etc.). ### Sound -rg3d uses software sound engine [rg3d-sound](https://github.com/mrDIMAS/rg3d/tree/master/rg3d-sound). +Fyrox uses software sound engine [fyrox-sound](https://github.com/mrDIMAS/rg3d/tree/master/fyrox-sound). The sound engine provides support for binaural sound rendering using HRTF, which gives excellent sound spatialization. @@ -58,19 +58,19 @@ spatialization. Code map should help you find a right place for your modifications. This is the most boring part of the document, here is the table of contents for your comfort: -- [rg3d-core](#rg3d-core) +- [fyrox-core](#fyrox-core) - [math](#mathmodrs) -- [rg3d-ui](#rg3d-ui) +- [fyrox-ui](#fyrox-ui) - [widgets](#borderrs) -- [rg3d-sound](#rg3d-sound) +- [fyrox-sound](#fyrox-sound) - [buffer](#buffermodrs) - [decoder](#decodermodrs) - [device](#devicemodrs) -- [rg3d](#rg3d) +- [Fyrox](#fyrox) -### rg3d-core +### fyrox-core -As it was already said up above, rg3d-core is just a set of useful algorithms. If you want to add a thing +As it was already said up above, fyrox-core is just a set of useful algorithms. If you want to add a thing that will be used in dependent crates then you're in the right place. Here is the very brief description of each module. @@ -152,9 +152,9 @@ The module contains node-based serializer/deserializer (visitor). Everything in this serializer. It supports serialization of basic types, many std types (including Rc/Arc) and user-defined types. -### rg3d-ui +### fyrox-ui -rg3d-ui is a standalone, graphics API-agnostic, node-based, general-purpose user interface library. +fyrox-ui is a standalone, graphics API-agnostic, node-based, general-purpose user interface library. #### lib.rs @@ -287,9 +287,9 @@ The module contains all supported messages for every widget in the library. #### wrap_panel.rs -### rg3d-sound +### fyrox-sound -rg3d-sound is a standalone sound engine with multiple renderers and high-quality sound. The sound engine +fyrox-sound is a standalone sound engine with multiple renderers and high-quality sound. The sound engine provides support for binaural sound rendering using HRTF, which gives excellent sound spatialization. #### buffer/mod.rs @@ -314,7 +314,7 @@ provides support for binaural sound rendering using HRTF, which gives excellent #### device/dummy.rs -### rg3d +### Fyrox The engine itself. It has: a renderer, resource manager, animations, scenes, and various utilities like lightmapper, uv-mapper, navigation mesh, logger, pathfinder. diff --git a/CHANGELOG.md b/CHANGELOG.md index aa9dc9d1a..2d6a0f2f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ previously it was possible to have rigid bodies attached only on root scene node - New `Inspector` widget + tons of built-in property editors (with the ability to add custom editors) - `Inspect` trait + proc macro for lightweight reflection - UI now using dynamic dispatch allowing you to add custom nodes and messages easily -- rg3d-sound optimizations (30% faster) +- fyrox-sound optimizations (30% faster) - Linear interpolation for sound samples when sampling rate != 1.0 (much better quality than before) - Color fields in material editor now editable - Window client area is now correctly filled by the renderer on every OS, not just Windows. @@ -151,7 +151,7 @@ This section will help you to migrate to new physics. Rigid body and colliders now can be created like so: ```rust -use rg3d::{ +use fyrox::{ core::{algebra::Vector3, pool::Handle}, scene::{ base::BaseBuilder, diff --git a/Cargo.toml b/Cargo.toml index 149f78c9a..a85938111 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rg3d" +name = "fyrox" version = "0.25.0" authors = ["Dmitry Stepanov "] edition = "2021" @@ -17,11 +17,11 @@ rust-version = "1.56" [workspace] members = [ - "rg3d-core-derive", - "rg3d-core", - "rg3d-sound", - "rg3d-ui", - "rg3d-resource", + "fyrox-core-derive", + "fyrox-core", + "fyrox-sound", + "fyrox-ui", + "fyrox-resource", "examples/wasm", "editor" ] @@ -34,10 +34,10 @@ opt-level = 3 debug = true [dependencies] -rg3d-core = { path = "rg3d-core", version = "0.19.0", features = ["serde"] } -rg3d-sound = { path = "rg3d-sound", version = "0.26.0" } -rg3d-ui = { path = "rg3d-ui", version = "0.15.0" } -rg3d-resource = { path = "rg3d-resource", version = "0.3.0" } +fyrox-core = { path = "fyrox-core", version = "0.19.0", features = ["serde"] } +fyrox-sound = { path = "fyrox-sound", version = "0.26.0" } +fyrox-ui = { path = "fyrox-ui", version = "0.15.0" } +fyrox-resource = { path = "fyrox-resource", version = "0.3.0" } rapier2d = "0.11.1" rapier3d = "0.11.1" image = { version = "0.23.13", default-features = false, features = ["gif", "jpeg", "png", "tga", "tiff", "bmp"] } @@ -57,7 +57,7 @@ strum = "0.23.0" strum_macros = "0.23.1" [features] -enable_profiler = ["rg3d-core/enable_profiler"] +enable_profiler = ["fyrox-core/enable_profiler"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies] glutin = {version = "0.28.0", features = ["serde"] } diff --git a/README.md b/README.md index 743040d9a..6bb9a9ffd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
- RG3D + Fyrox

Rust Game engine 3D (and 2D)

@@ -30,7 +30,7 @@ use my savings to drive development forward, I'm looking for any financial suppo ## [Learning materials](https://rg3d-book.github.io) -[Read the official rg3d book here.](https://rg3d-book.github.io) It is in early development stage, but it should +[Read the official Fyrox book here.](https://rg3d-book.github.io) It is in early development stage, but it should help you start using the engine, also the book contains a series of tutorials that should help you to create your first game. @@ -105,7 +105,7 @@ first game. ### Sound -- [High quality binaural sound with HRTF support](https://github.com/rg3dengine/rg3d/tree/master/rg3d-sound). +- [High quality binaural sound with HRTF support](https://github.com/rg3dengine/rg3d/tree/master/fyrox-sound). - Generic and spatial sound sources. - Built-in streaming for large sounds. - Raw samples playback support. @@ -141,7 +141,7 @@ first game. ### User Interface (UI) -- [Advanced node-based UI](https://github.com/mrDIMAS/rg3d/tree/master/rg3d-ui) with lots of widgets. +- [Advanced node-based UI](https://github.com/mrDIMAS/rg3d/tree/master/fyrox-ui) with lots of widgets. - More than 32 widgets - Powerful layout system. - Full TTF/OTF fonts support. diff --git a/editor/Cargo.toml b/editor/Cargo.toml index 10bf7ae2f..e45326448 100644 --- a/editor/Cargo.toml +++ b/editor/Cargo.toml @@ -1,20 +1,20 @@ [package] -name = "rusty-editor" +name = "fyroxed" license = "MIT" version = "0.12.0" authors = ["Dmitry Stepanov "] edition = "2021" rust-version = "1.56" -description = "A scene editor for rg3d game engine" +description = "A scene editor for Fyrox game engine" documentation = "https://github.com/rg3dengine/rusty-editor" homepage = "https://github.com/rg3dengine/rusty-editor" -keywords = ["rg3d", "editor", "rust"] +keywords = ["fyrox", "editor", "rust"] repository = "https://github.com/rg3dengine/rusty-editor" readme = "README.md" include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md", "/resources/**/*"] [dependencies] -rg3d = { version = "0.25", path = ".." } +fyrox = { version = "0.25", path = ".." } lazy_static = "1.4.0" ron = "0.7.0" serde = "^1.0.0" @@ -25,7 +25,7 @@ strum_macros = "0.23.1" [package.metadata.deb] maintainer = "Voodlaz " -copyright = "2021, rg3dengine developers." +copyright = "2021, Fyroxengine developers." license-file = ["LICENSE", "2"] # description probably would be bigger in future, so we use a file @@ -53,4 +53,4 @@ assets = [ ] [features] -enable_profiler = ["rg3d/enable_profiler"] +enable_profiler = ["fyrox/enable_profiler"] diff --git a/editor/README.md b/editor/README.md index a7bae0dfd..2b6e79542 100644 --- a/editor/README.md +++ b/editor/README.md @@ -1,6 +1,6 @@ # rusty editor -Scene editor for [rg3d engine](https://github.com/rg3dengine/rg3d). +Scene editor for [Fyrox engine](https://github.com/rg3dengine/rg3d). ## Limitations diff --git a/editor/os-installation/general-description.txt b/editor/os-installation/general-description.txt index a0f362aa3..fcb072907 100644 --- a/editor/os-installation/general-description.txt +++ b/editor/os-installation/general-description.txt @@ -1,5 +1,5 @@ -A scene editor for rg3d game engine. +A scene editor for Fyrox game engine. -rg3d is a feature rich game engine made in rust, which allows +Fyrox is a feature rich game engine made in rust, which allows you to build shooters, platfomers, sandboxes and more in advanced 3D and 2D! diff --git a/editor/os-installation/linux/deb/deb-pack-description.txt b/editor/os-installation/linux/deb/deb-pack-description.txt index 3b73d8cf1..9407ca49b 100644 --- a/editor/os-installation/linux/deb/deb-pack-description.txt +++ b/editor/os-installation/linux/deb/deb-pack-description.txt @@ -1 +1 @@ -A scene editor for rg3d game engine +A scene editor for Fyrox game engine diff --git a/editor/resources/embed/shaders/gizmo.shader b/editor/resources/embed/shaders/gizmo.shader index 066c2a6bb..a06218b99 100644 --- a/editor/resources/embed/shaders/gizmo.shader +++ b/editor/resources/embed/shaders/gizmo.shader @@ -37,11 +37,11 @@ r#" layout(location = 0) in vec3 vertexPosition; - uniform mat4 rg3d_worldViewProjection; + uniform mat4 fyrox_worldViewProjection; void main() { - gl_Position = rg3d_worldViewProjection * vec4(vertexPosition, 1.0); + gl_Position = fyrox_worldViewProjection * vec4(vertexPosition, 1.0); } "#, diff --git a/editor/src/asset/inspector/handlers/mod.rs b/editor/src/asset/inspector/handlers/mod.rs index 48f8f1c9a..6774609d9 100644 --- a/editor/src/asset/inspector/handlers/mod.rs +++ b/editor/src/asset/inspector/handlers/mod.rs @@ -1,4 +1,4 @@ -use rg3d::{ +use fyrox::{ core::inspect::Inspect, engine::resource_manager::ResourceManager, gui::inspector::PropertyChanged, }; diff --git a/editor/src/asset/inspector/handlers/model.rs b/editor/src/asset/inspector/handlers/model.rs index eb1be3611..0f6e06bed 100644 --- a/editor/src/asset/inspector/handlers/model.rs +++ b/editor/src/asset/inspector/handlers/model.rs @@ -1,5 +1,5 @@ use crate::asset::inspector::handlers::ImportOptionsHandler; -use rg3d::{ +use fyrox::{ core::{append_extension, futures::executor::block_on, inspect::Inspect}, engine::resource_manager::{try_get_import_settings, ImportOptions, ResourceManager}, gui::inspector::{FieldKind, PropertyChanged}, diff --git a/editor/src/asset/inspector/handlers/texture.rs b/editor/src/asset/inspector/handlers/texture.rs index 49070e247..27ce60fc5 100644 --- a/editor/src/asset/inspector/handlers/texture.rs +++ b/editor/src/asset/inspector/handlers/texture.rs @@ -1,5 +1,5 @@ use crate::asset::inspector::handlers::ImportOptionsHandler; -use rg3d::{ +use fyrox::{ core::{append_extension, futures::executor::block_on, inspect::Inspect}, engine::resource_manager::{try_get_import_settings, ImportOptions, ResourceManager}, gui::inspector::{FieldKind, PropertyChanged}, diff --git a/editor/src/asset/inspector/mod.rs b/editor/src/asset/inspector/mod.rs index 18273dd93..d9c8d66e2 100644 --- a/editor/src/asset/inspector/mod.rs +++ b/editor/src/asset/inspector/mod.rs @@ -2,7 +2,7 @@ use crate::{ asset::inspector::handlers::ImportOptionsHandler, inspector::editors::make_property_editors_container, Message, MSG_SYNC_FLAG, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, engine::Engine, gui::{ diff --git a/editor/src/asset/item.rs b/editor/src/asset/item.rs index b644691fe..6d63e8b49 100644 --- a/editor/src/asset/item.rs +++ b/editor/src/asset/item.rs @@ -1,17 +1,17 @@ use crate::gui::AssetItemMessage; use crate::load_image; -use rg3d::core::color::Color; -use rg3d::core::pool::Handle; -use rg3d::engine::resource_manager::ResourceManager; -use rg3d::gui::brush::Brush; -use rg3d::gui::draw::{CommandTexture, Draw, DrawingContext}; -use rg3d::gui::grid::{Column, GridBuilder, Row}; -use rg3d::gui::image::ImageBuilder; -use rg3d::gui::message::{MessageDirection, UiMessage}; -use rg3d::gui::text::TextBuilder; -use rg3d::gui::widget::{Widget, WidgetBuilder, WidgetMessage}; -use rg3d::gui::{BuildContext, Control, HorizontalAlignment, Thickness, UiNode, UserInterface}; -use rg3d::utils::into_gui_texture; +use fyrox::core::color::Color; +use fyrox::core::pool::Handle; +use fyrox::engine::resource_manager::ResourceManager; +use fyrox::gui::brush::Brush; +use fyrox::gui::draw::{CommandTexture, Draw, DrawingContext}; +use fyrox::gui::grid::{Column, GridBuilder, Row}; +use fyrox::gui::image::ImageBuilder; +use fyrox::gui::message::{MessageDirection, UiMessage}; +use fyrox::gui::text::TextBuilder; +use fyrox::gui::widget::{Widget, WidgetBuilder, WidgetMessage}; +use fyrox::gui::{BuildContext, Control, HorizontalAlignment, Thickness, UiNode, UserInterface}; +use fyrox::utils::into_gui_texture; use std::any::{Any, TypeId}; use std::ops::{Deref, DerefMut}; use std::path::{Path, PathBuf}; diff --git a/editor/src/asset/mod.rs b/editor/src/asset/mod.rs index 825b1032a..de56762c4 100644 --- a/editor/src/asset/mod.rs +++ b/editor/src/asset/mod.rs @@ -11,7 +11,7 @@ use crate::{ preview::PreviewPanel, AssetItem, AssetKind, GameEngine, Message, }; -use rg3d::{ +use fyrox::{ core::{color::Color, futures::executor::block_on, pool::Handle, scope_profile}, gui::{ border::BorderBuilder, diff --git a/editor/src/camera.rs b/editor/src/camera.rs index f4356b3b7..9efe13e53 100644 --- a/editor/src/camera.rs +++ b/editor/src/camera.rs @@ -1,5 +1,5 @@ -use crate::rg3d::core::math::Matrix4Ext; -use rg3d::{ +use crate::fyrox::core::math::Matrix4Ext; +use fyrox::{ core::{ algebra::{Matrix4, Point3, UnitQuaternion, Vector2, Vector3}, math::{aabb::AxisAlignedBoundingBox, plane::Plane}, diff --git a/editor/src/command/panel.rs b/editor/src/command/panel.rs index 23217ef4e..fe9994bd0 100644 --- a/editor/src/command/panel.rs +++ b/editor/src/command/panel.rs @@ -1,7 +1,7 @@ use crate::{ command::CommandStack, load_image, scene::commands::SceneContext, send_sync_message, Message, }; -use rg3d::{ +use fyrox::{ core::{color::Color, pool::Handle, scope_profile}, gui::{ brush::Brush, diff --git a/editor/src/configurator.rs b/editor/src/configurator.rs index d81d15ff7..a8e59834f 100644 --- a/editor/src/configurator.rs +++ b/editor/src/configurator.rs @@ -1,5 +1,5 @@ use crate::{GameEngine, Message, CONFIG_DIR}; -use rg3d::{ +use fyrox::{ core::{ algebra::Vector2, pool::Handle, @@ -95,7 +95,7 @@ impl Configurator { // Load history. let mut history: Vec = Vec::new(); - if let Ok(mut visitor) = rg3d::core::futures::executor::block_on(Visitor::load_binary( + if let Ok(mut visitor) = fyrox::core::futures::executor::block_on(Visitor::load_binary( CONFIG_DIR.lock().join(HISTORY_PATH), )) { history.visit("History", &mut visitor).unwrap(); diff --git a/editor/src/curve_editor.rs b/editor/src/curve_editor.rs index d42b74a55..c7d3b70fa 100644 --- a/editor/src/curve_editor.rs +++ b/editor/src/curve_editor.rs @@ -1,7 +1,7 @@ use crate::{ define_command_stack, send_sync_message, MessageBoxButtons, MessageBoxMessage, MSG_SYNC_FLAG, }; -use rg3d::{ +use fyrox::{ asset::{Resource, ResourceData, ResourceState}, core::{ color::Color, curve::Curve, futures::executor::block_on, pool::Handle, visitor::prelude::*, diff --git a/editor/src/gui.rs b/editor/src/gui.rs index f6bb87eb3..66a26cab7 100644 --- a/editor/src/gui.rs +++ b/editor/src/gui.rs @@ -1,4 +1,4 @@ -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{ border::BorderBuilder, diff --git a/editor/src/inspector/editors/handle.rs b/editor/src/inspector/editors/handle.rs index 3946edde6..b2465e8e8 100644 --- a/editor/src/inspector/editors/handle.rs +++ b/editor/src/inspector/editors/handle.rs @@ -1,8 +1,8 @@ use crate::{ world::graph::item::SceneItem, Message, UiMessage, UiNode, UserInterface, VerticalAlignment, }; -use rg3d::gui::button::ButtonMessage; -use rg3d::{ +use fyrox::gui::button::ButtonMessage; +use fyrox::{ core::pool::Handle, gui::{ button::ButtonBuilder, diff --git a/editor/src/inspector/editors/material.rs b/editor/src/inspector/editors/material.rs index 4ae9fcd25..20c94ebff 100644 --- a/editor/src/inspector/editors/material.rs +++ b/editor/src/inspector/editors/material.rs @@ -1,5 +1,5 @@ use crate::Message; -use rg3d::{ +use fyrox::{ asset::core::pool::Handle, core::parking_lot::Mutex, gui::{ diff --git a/editor/src/inspector/editors/mod.rs b/editor/src/inspector/editors/mod.rs index 3a3eb75db..117c79146 100644 --- a/editor/src/inspector/editors/mod.rs +++ b/editor/src/inspector/editors/mod.rs @@ -9,8 +9,8 @@ use crate::{ }, Message, }; -use rg3d::resource::model::MaterialSearchOptions; -use rg3d::{ +use fyrox::resource::model::MaterialSearchOptions; +use fyrox::{ core::{parking_lot::Mutex, pool::ErasedHandle, pool::Handle}, gui::inspector::editors::{ array::ArrayPropertyEditorDefinition, collection::VecCollectionPropertyEditorDefinition, diff --git a/editor/src/inspector/editors/resource.rs b/editor/src/inspector/editors/resource.rs index 5f3737465..e3233f39c 100644 --- a/editor/src/inspector/editors/resource.rs +++ b/editor/src/inspector/editors/resource.rs @@ -1,5 +1,5 @@ use crate::{asset::item::AssetItem, inspector::EditorEnvironment, load_image, make_relative_path}; -use rg3d::{ +use fyrox::{ asset::{Resource, ResourceData, ResourceLoadError}, core::{futures::executor::block_on, pool::Handle}, engine::resource_manager::ResourceManager, diff --git a/editor/src/inspector/editors/texture.rs b/editor/src/inspector/editors/texture.rs index 8422b518c..2005d2f62 100644 --- a/editor/src/inspector/editors/texture.rs +++ b/editor/src/inspector/editors/texture.rs @@ -1,5 +1,5 @@ use crate::{asset::item::AssetItem, inspector::EditorEnvironment, make_relative_path}; -use rg3d::{ +use fyrox::{ asset::core::pool::Handle, engine::resource_manager::ResourceManager, gui::{ diff --git a/editor/src/inspector/handlers/node/base.rs b/editor/src/inspector/handlers/node/base.rs index 36ab4e11f..30e1dd548 100644 --- a/editor/src/inspector/handlers/node/base.rs +++ b/editor/src/inspector/handlers/node/base.rs @@ -4,8 +4,8 @@ use crate::{ scene::commands::{graph::*, lod::*}, SceneCommand, }; -use rg3d::scene::base::{LodControlledObject, LodGroup}; -use rg3d::{ +use fyrox::scene::base::{LodControlledObject, LodGroup}; +use fyrox::{ core::pool::Handle, gui::inspector::{CollectionChanged, FieldKind, PropertyChanged}, scene::{ diff --git a/editor/src/inspector/handlers/node/camera.rs b/editor/src/inspector/handlers/node/camera.rs index 09b110896..60354ea8a 100644 --- a/editor/src/inspector/handlers/node/camera.rs +++ b/editor/src/inspector/handlers/node/camera.rs @@ -3,7 +3,7 @@ use crate::{ inspector::handlers::node::base::handle_base_property_changed, scene::commands::camera::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::{futures::executor::block_on, pool::Handle}, gui::inspector::{FieldKind, PropertyChanged}, resource::texture::{Texture, TextureWrapMode}, diff --git a/editor/src/inspector/handlers/node/collider.rs b/editor/src/inspector/handlers/node/collider.rs index e5dffcef6..d415e4187 100644 --- a/editor/src/inspector/handlers/node/collider.rs +++ b/editor/src/inspector/handlers/node/collider.rs @@ -3,7 +3,7 @@ use crate::{ inspector::handlers::node::base::handle_base_property_changed, scene::commands::collider::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{CollectionChanged, FieldKind, PropertyChanged}, scene::{ diff --git a/editor/src/inspector/handlers/node/collider2d.rs b/editor/src/inspector/handlers/node/collider2d.rs index 632af7d03..af4fec462 100644 --- a/editor/src/inspector/handlers/node/collider2d.rs +++ b/editor/src/inspector/handlers/node/collider2d.rs @@ -3,7 +3,7 @@ use crate::{ inspector::handlers::node::base::handle_base_property_changed, scene::commands::collider2d::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{FieldKind, PropertyChanged}, scene::{ diff --git a/editor/src/inspector/handlers/node/decal.rs b/editor/src/inspector/handlers/node/decal.rs index 7aed4bffe..3d7d4768d 100644 --- a/editor/src/inspector/handlers/node/decal.rs +++ b/editor/src/inspector/handlers/node/decal.rs @@ -2,7 +2,7 @@ use crate::{ handle_properties, inspector::handlers::node::base::handle_base_property_changed, scene::commands::decal::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{FieldKind, PropertyChanged}, scene::{decal::Decal, node::Node}, diff --git a/editor/src/inspector/handlers/node/joint.rs b/editor/src/inspector/handlers/node/joint.rs index ae6d999a3..cf059887e 100644 --- a/editor/src/inspector/handlers/node/joint.rs +++ b/editor/src/inspector/handlers/node/joint.rs @@ -3,7 +3,7 @@ use crate::{ inspector::handlers::node::base::handle_base_property_changed, scene::commands::joint::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{FieldKind, PropertyChanged}, scene::{joint::*, node::Node}, diff --git a/editor/src/inspector/handlers/node/joint2d.rs b/editor/src/inspector/handlers/node/joint2d.rs index 42aee62ef..d818dd298 100644 --- a/editor/src/inspector/handlers/node/joint2d.rs +++ b/editor/src/inspector/handlers/node/joint2d.rs @@ -3,7 +3,7 @@ use crate::{ inspector::handlers::node::base::handle_base_property_changed, scene::commands::joint2d::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{FieldKind, PropertyChanged}, scene::{dim2::joint::*, node::Node}, diff --git a/editor/src/inspector/handlers/node/light.rs b/editor/src/inspector/handlers/node/light.rs index 81feac91c..6446e388e 100644 --- a/editor/src/inspector/handlers/node/light.rs +++ b/editor/src/inspector/handlers/node/light.rs @@ -2,7 +2,7 @@ use crate::{ handle_properties, inspector::handlers::node::base::handle_base_property_changed, scene::commands::light::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{CollectionChanged, FieldKind, PropertyChanged}, scene::{ diff --git a/editor/src/inspector/handlers/node/mesh.rs b/editor/src/inspector/handlers/node/mesh.rs index 576ff2d50..2d9f544ec 100644 --- a/editor/src/inspector/handlers/node/mesh.rs +++ b/editor/src/inspector/handlers/node/mesh.rs @@ -2,7 +2,7 @@ use crate::{ handle_properties, inspector::handlers::node::base::handle_base_property_changed, scene::commands::mesh::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{CollectionChanged, FieldKind, PropertyChanged}, scene::{mesh::Mesh, node::Node}, diff --git a/editor/src/inspector/handlers/node/mod.rs b/editor/src/inspector/handlers/node/mod.rs index 256809f1c..472b33169 100644 --- a/editor/src/inspector/handlers/node/mod.rs +++ b/editor/src/inspector/handlers/node/mod.rs @@ -13,7 +13,7 @@ use crate::{ }, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{inspector::PropertyChanged, UserInterface}, scene::{ diff --git a/editor/src/inspector/handlers/node/particle_system.rs b/editor/src/inspector/handlers/node/particle_system.rs index bf58ff66f..08bbe5388 100644 --- a/editor/src/inspector/handlers/node/particle_system.rs +++ b/editor/src/inspector/handlers/node/particle_system.rs @@ -2,7 +2,7 @@ use crate::{ handle_properties, inspector::handlers::node::base::handle_base_property_changed, scene::commands::particle_system::*, GraphSelection, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{ button::{ButtonBuilder, ButtonMessage}, diff --git a/editor/src/inspector/handlers/node/rectangle.rs b/editor/src/inspector/handlers/node/rectangle.rs index 48d582c49..b21fe41b6 100644 --- a/editor/src/inspector/handlers/node/rectangle.rs +++ b/editor/src/inspector/handlers/node/rectangle.rs @@ -2,7 +2,7 @@ use crate::{ inspector::handlers::node::base::handle_base_property_changed, make_command, scene::commands::rectangle::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{FieldKind, PropertyChanged}, scene::{dim2::rectangle::Rectangle, node::Node}, diff --git a/editor/src/inspector/handlers/node/rigid_body.rs b/editor/src/inspector/handlers/node/rigid_body.rs index b91daee38..458d00f8b 100644 --- a/editor/src/inspector/handlers/node/rigid_body.rs +++ b/editor/src/inspector/handlers/node/rigid_body.rs @@ -2,7 +2,7 @@ use crate::{ handle_properties, inspector::handlers::node::base::handle_base_property_changed, scene::commands::rigidbody::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{FieldKind, PropertyChanged}, scene::{node::Node, rigidbody::RigidBody}, diff --git a/editor/src/inspector/handlers/node/rigid_body2d.rs b/editor/src/inspector/handlers/node/rigid_body2d.rs index bbc50c5de..1f0e1ac80 100644 --- a/editor/src/inspector/handlers/node/rigid_body2d.rs +++ b/editor/src/inspector/handlers/node/rigid_body2d.rs @@ -2,7 +2,7 @@ use crate::{ handle_properties, inspector::handlers::node::base::handle_base_property_changed, scene::commands::rigidbody2d::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{FieldKind, PropertyChanged}, scene::{dim2::rigidbody::RigidBody, node::Node}, diff --git a/editor/src/inspector/handlers/node/sprite.rs b/editor/src/inspector/handlers/node/sprite.rs index a7ec26f2f..3b860cd37 100644 --- a/editor/src/inspector/handlers/node/sprite.rs +++ b/editor/src/inspector/handlers/node/sprite.rs @@ -2,7 +2,7 @@ use crate::{ handle_properties, inspector::handlers::node::base::handle_base_property_changed, scene::commands::sprite::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{FieldKind, PropertyChanged}, scene::{node::Node, sprite::Sprite}, diff --git a/editor/src/inspector/handlers/node/terrain.rs b/editor/src/inspector/handlers/node/terrain.rs index 7a5b1ba3d..e84d6f572 100644 --- a/editor/src/inspector/handlers/node/terrain.rs +++ b/editor/src/inspector/handlers/node/terrain.rs @@ -2,7 +2,7 @@ use crate::{ inspector::handlers::node::base::handle_base_property_changed, make_command, scene::commands::terrain::*, SceneCommand, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{CollectionChanged, FieldKind, PropertyChanged}, scene::{graph::Graph, node::Node, terrain::Layer, terrain::Terrain}, diff --git a/editor/src/inspector/handlers/node/transform.rs b/editor/src/inspector/handlers/node/transform.rs index d0429246f..11cba8512 100644 --- a/editor/src/inspector/handlers/node/transform.rs +++ b/editor/src/inspector/handlers/node/transform.rs @@ -1,6 +1,6 @@ use crate::{make_command, scene::commands::graph::*, SceneCommand}; -use rg3d::scene::base::Base; -use rg3d::{ +use fyrox::scene::base::Base; +use fyrox::{ core::pool::Handle, gui::inspector::{FieldKind, PropertyChanged}, scene::node::Node, diff --git a/editor/src/inspector/handlers/sound.rs b/editor/src/inspector/handlers/sound.rs index 8820342b8..8f1fbfdd5 100644 --- a/editor/src/inspector/handlers/sound.rs +++ b/editor/src/inspector/handlers/sound.rs @@ -1,5 +1,5 @@ use crate::{make_command, scene::commands::sound::*, SceneCommand}; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::inspector::{FieldKind, PropertyChanged}, sound::source::{generic::GenericSource, spatial::SpatialSource, SoundSource}, diff --git a/editor/src/inspector/mod.rs b/editor/src/inspector/mod.rs index 2900dfba7..4e1e9f5cd 100644 --- a/editor/src/inspector/mod.rs +++ b/editor/src/inspector/mod.rs @@ -9,7 +9,7 @@ use crate::{ scene::{EditorScene, Selection}, Brush, CommandGroup, GameEngine, Message, WidgetMessage, WrapMode, MSG_SYNC_FLAG, }; -use rg3d::{ +use fyrox::{ core::{color::Color, inspect::Inspect, pool::Handle}, engine::resource_manager::ResourceManager, gui::{ @@ -158,7 +158,7 @@ impl Inspector { fn sync_to(&mut self, obj: &dyn Inspect, ui: &mut UserInterface) { let ctx = ui .node(self.inspector) - .cast::() + .cast::() .unwrap() .context() .clone(); diff --git a/editor/src/interaction/gizmo/move_gizmo.rs b/editor/src/interaction/gizmo/move_gizmo.rs index 80168d85d..24b769ee3 100644 --- a/editor/src/interaction/gizmo/move_gizmo.rs +++ b/editor/src/interaction/gizmo/move_gizmo.rs @@ -4,8 +4,8 @@ use crate::{ scene::{EditorScene, Selection}, set_mesh_diffuse_color, GameEngine, }; -use rg3d::scene::transform::Transform; -use rg3d::{ +use fyrox::scene::transform::Transform; +use fyrox::{ core::{ algebra::{Matrix4, UnitQuaternion, Vector2, Vector3}, color::Color, diff --git a/editor/src/interaction/gizmo/rotate_gizmo.rs b/editor/src/interaction/gizmo/rotate_gizmo.rs index ffc21a563..8b8396103 100644 --- a/editor/src/interaction/gizmo/rotate_gizmo.rs +++ b/editor/src/interaction/gizmo/rotate_gizmo.rs @@ -2,7 +2,7 @@ use crate::{ make_color_material, scene::EditorScene, set_mesh_diffuse_color, world::graph::selection::GraphSelection, GameEngine, }; -use rg3d::{ +use fyrox::{ core::{ algebra::{Matrix4, UnitQuaternion, Vector2, Vector3}, color::Color, diff --git a/editor/src/interaction/gizmo/scale_gizmo.rs b/editor/src/interaction/gizmo/scale_gizmo.rs index b8a85cd2c..f15fdc2f2 100644 --- a/editor/src/interaction/gizmo/scale_gizmo.rs +++ b/editor/src/interaction/gizmo/scale_gizmo.rs @@ -2,7 +2,7 @@ use crate::{ make_color_material, scene::EditorScene, set_mesh_diffuse_color, world::graph::selection::GraphSelection, GameEngine, }; -use rg3d::{ +use fyrox::{ core::{ algebra::{Matrix4, UnitQuaternion, Vector2, Vector3}, color::Color, diff --git a/editor/src/interaction/mod.rs b/editor/src/interaction/mod.rs index da19ca69f..9e2593fde 100644 --- a/editor/src/interaction/mod.rs +++ b/editor/src/interaction/mod.rs @@ -1,6 +1,6 @@ use crate::{scene::EditorScene, settings::Settings, GameEngine}; -use rg3d::scene::camera::Projection; -use rg3d::{ +use fyrox::scene::camera::Projection; +use fyrox::{ core::{ algebra::{Vector2, Vector3}, pool::Handle, diff --git a/editor/src/interaction/move_mode.rs b/editor/src/interaction/move_mode.rs index cf2c568cd..aa305b467 100644 --- a/editor/src/interaction/move_mode.rs +++ b/editor/src/interaction/move_mode.rs @@ -15,7 +15,7 @@ use crate::{ world::{graph::selection::GraphSelection, sound::selection::SoundSelection}, GameEngine, Message, }; -use rg3d::{ +use fyrox::{ core::{ algebra::{Matrix4, Point3, Vector2, Vector3}, math::plane::Plane, diff --git a/editor/src/interaction/navmesh/data_model.rs b/editor/src/interaction/navmesh/data_model.rs index 263436203..6b51fe078 100644 --- a/editor/src/interaction/navmesh/data_model.rs +++ b/editor/src/interaction/navmesh/data_model.rs @@ -1,5 +1,5 @@ -use rg3d::core::algebra::Vector3; -use rg3d::core::pool::{Handle, Pool}; +use fyrox::core::algebra::Vector3; +use fyrox::core::pool::{Handle, Pool}; #[derive(Debug, Clone)] pub struct NavmeshVertex { diff --git a/editor/src/interaction/navmesh/mod.rs b/editor/src/interaction/navmesh/mod.rs index 013cff333..99d6ce7f2 100644 --- a/editor/src/interaction/navmesh/mod.rs +++ b/editor/src/interaction/navmesh/mod.rs @@ -23,7 +23,7 @@ use crate::{ settings::Settings, GameEngine, Message, MSG_SYNC_FLAG, }; -use rg3d::{ +use fyrox::{ core::{ algebra::{Vector2, Vector3}, color::Color, @@ -623,7 +623,7 @@ impl InteractionMode for EditNavmeshMode { for triangle in navmesh.triangles.iter() { for edge in &triangle.edges() { - scene.drawing_context.add_line(rg3d::scene::debug::Line { + scene.drawing_context.add_line(fyrox::scene::debug::Line { begin: navmesh.vertices[edge.begin].position, end: navmesh.vertices[edge.end].position, color: if navmesh_selection.contains_edge(*edge) { @@ -656,14 +656,14 @@ impl InteractionMode for EditNavmeshMode { let oe = navmesh.vertices[opposite_edge.end].position; let ne = vertices[1].position; - scene.drawing_context.add_line(rg3d::scene::debug::Line { + scene.drawing_context.add_line(fyrox::scene::debug::Line { begin: nb, end: ne, color: Color::RED, }); for &(begin, end) in &[(ob, oe), (ob, nb), (nb, oe), (oe, ne)] { - scene.drawing_context.add_line(rg3d::scene::debug::Line { + scene.drawing_context.add_line(fyrox::scene::debug::Line { begin, end, color: Color::GREEN, diff --git a/editor/src/interaction/navmesh/selection.rs b/editor/src/interaction/navmesh/selection.rs index 76c875e41..7fcabcfb8 100644 --- a/editor/src/interaction/navmesh/selection.rs +++ b/editor/src/interaction/navmesh/selection.rs @@ -1,6 +1,6 @@ use crate::interaction::navmesh::data_model::{Navmesh, NavmeshEdge}; use crate::interaction::navmesh::{NavmeshEntity, NavmeshVertex}; -use rg3d::core::pool::Handle; +use fyrox::core::pool::Handle; use std::collections::HashSet; #[derive(PartialEq, Clone, Debug, Eq)] diff --git a/editor/src/interaction/plane.rs b/editor/src/interaction/plane.rs index f49540c2a..1c1fdf46f 100644 --- a/editor/src/interaction/plane.rs +++ b/editor/src/interaction/plane.rs @@ -1,4 +1,4 @@ -use rg3d::core::{algebra::Vector3, math::plane::Plane}; +use fyrox::core::{algebra::Vector3, math::plane::Plane}; #[derive(Copy, Clone, Debug)] pub enum PlaneKind { diff --git a/editor/src/interaction/rotate_mode.rs b/editor/src/interaction/rotate_mode.rs index c73d8a367..abdc46442 100644 --- a/editor/src/interaction/rotate_mode.rs +++ b/editor/src/interaction/rotate_mode.rs @@ -10,8 +10,8 @@ use crate::{ world::graph::selection::GraphSelection, GameEngine, Message, }; -use rg3d::core::math::round_to_step; -use rg3d::{ +use fyrox::core::math::round_to_step; +use fyrox::{ core::{ algebra::{UnitQuaternion, Vector2}, pool::Handle, diff --git a/editor/src/interaction/scale_mode.rs b/editor/src/interaction/scale_mode.rs index 4a1d9f030..f024f4249 100644 --- a/editor/src/interaction/scale_mode.rs +++ b/editor/src/interaction/scale_mode.rs @@ -11,7 +11,7 @@ use crate::{ settings::Settings, GameEngine, Message, }; -use rg3d::{ +use fyrox::{ core::{ algebra::{Vector2, Vector3}, pool::Handle, diff --git a/editor/src/interaction/select_mode.rs b/editor/src/interaction/select_mode.rs index f90692188..6993fc821 100644 --- a/editor/src/interaction/select_mode.rs +++ b/editor/src/interaction/select_mode.rs @@ -5,7 +5,7 @@ use crate::{ world::graph::selection::GraphSelection, GameEngine, Message, }; -use rg3d::{ +use fyrox::{ core::{algebra::Vector2, pool::Handle}, gui::{message::MessageDirection, widget::WidgetMessage, UiNode}, scene::node::Node, diff --git a/editor/src/interaction/terrain.rs b/editor/src/interaction/terrain.rs index 6402ffda9..583831323 100644 --- a/editor/src/interaction/terrain.rs +++ b/editor/src/interaction/terrain.rs @@ -8,7 +8,7 @@ use crate::{ settings::Settings, GameEngine, Message, MSG_SYNC_FLAG, }; -use rg3d::{ +use fyrox::{ core::{ algebra::{Matrix4, Point3, Vector2, Vector3}, arrayvec::ArrayVec, diff --git a/editor/src/light.rs b/editor/src/light.rs index af58e15e8..ad126ed30 100644 --- a/editor/src/light.rs +++ b/editor/src/light.rs @@ -1,5 +1,5 @@ use crate::{scene::EditorScene, GameEngine}; -use rg3d::{ +use fyrox::{ core::{pool::Handle, scope_profile}, gui::{ button::{ButtonBuilder, ButtonMessage}, diff --git a/editor/src/log.rs b/editor/src/log.rs index c0e805e25..46307f6d4 100644 --- a/editor/src/log.rs +++ b/editor/src/log.rs @@ -1,5 +1,5 @@ use crate::{GameEngine, Message}; -use rg3d::{ +use fyrox::{ core::{algebra::Vector2, pool::Handle, scope_profile}, gui::{ button::{ButtonBuilder, ButtonMessage}, diff --git a/editor/src/main.rs b/editor/src/main.rs index bc53b633d..1b115a9d0 100644 --- a/editor/src/main.rs +++ b/editor/src/main.rs @@ -7,7 +7,7 @@ #![allow(clippy::upper_case_acronyms)] #![allow(clippy::inconsistent_struct_constructor)] -extern crate rg3d; +extern crate fyrox; #[macro_use] extern crate lazy_static; extern crate directories; @@ -67,7 +67,7 @@ use crate::{ utils::path_fixer::PathFixer, world::{graph::selection::GraphSelection, WorldViewer}, }; -use rg3d::{ +use fyrox::{ core::{ algebra::{Point3, Vector2}, color::Color, @@ -130,7 +130,7 @@ pub fn send_sync_message(ui: &UserInterface, mut msg: UiMessage) { ui.send_message(msg); } -type GameEngine = rg3d::engine::Engine; +type GameEngine = fyrox::engine::Engine; lazy_static! { // This checks release.toml debug handle and at @@ -232,7 +232,7 @@ pub fn make_relative_path>(path: P) -> PathBuf { .unwrap() .to_owned(); - rg3d::core::replace_slashes(relative_path) + fyrox::core::replace_slashes(relative_path) } #[derive(Debug)] @@ -332,7 +332,7 @@ impl Editor { fn new(engine: &mut GameEngine) -> Self { let (message_sender, message_receiver) = mpsc::channel(); - *rg3d::gui::DEFAULT_FONT.0.lock().unwrap() = Font::from_memory( + *fyrox::gui::DEFAULT_FONT.0.lock().unwrap() = Font::from_memory( include_bytes!("../resources/embed/arial.ttf").to_vec(), 14.0, Font::default_char_set(), @@ -913,7 +913,7 @@ impl Editor { AssetKind::Model => { // No model was loaded yet, do it. if let Ok(model) = - rg3d::core::futures::executor::block_on( + fyrox::core::futures::executor::block_on( engine .resource_manager .request_model(&item.path), @@ -1210,7 +1210,7 @@ impl Editor { } Message::LoadScene(scene_path) => { let result = { - rg3d::core::futures::executor::block_on(Scene::from_file( + fyrox::core::futures::executor::block_on(Scene::from_file( &scene_path, engine.resource_manager.clone(), )) @@ -1567,7 +1567,7 @@ fn main() { LogicalSize::new(1024.0, 768.0) }; - let window_builder = rg3d::window::WindowBuilder::new() + let window_builder = fyrox::window::WindowBuilder::new() .with_inner_size(inner_size) .with_title("rusty editor") .with_resizable(true); @@ -1609,7 +1609,7 @@ fn main() { } WindowEvent::Resized(size) => { if let Err(e) = engine.set_frame_size(size.into()) { - rg3d::utils::log::Log::writeln( + fyrox::utils::log::Log::writeln( MessageKind::Error, format!("Failed to set renderer size! Reason: {:?}", e), ); @@ -1633,7 +1633,7 @@ fn main() { } } Event::LoopDestroyed => { - if let Ok(profiling_results) = rg3d::core::profiler::print() { + if let Ok(profiling_results) = fyrox::core::profiler::print() { if let Ok(mut file) = fs::File::create(project_dirs::working_data_dir("profiling.log")) { diff --git a/editor/src/material.rs b/editor/src/material.rs index c38a40ceb..2e6a36066 100644 --- a/editor/src/material.rs +++ b/editor/src/material.rs @@ -6,7 +6,7 @@ use crate::{ scene::commands::material::{SetMaterialPropertyValueCommand, SetMaterialShaderCommand}, send_sync_message, GameEngine, Message, }; -use rg3d::{ +use fyrox::{ core::{ algebra::{Matrix4, Vector2, Vector3, Vector4}, futures::executor::block_on, @@ -330,7 +330,7 @@ impl MaterialEditor { self.shaders_list .extend_from_slice(&Shader::standard_shaders()); - for dir in rg3d::walkdir::WalkDir::new(".").into_iter().flatten() { + for dir in fyrox::walkdir::WalkDir::new(".").into_iter().flatten() { let path = dir.path(); if let Some(extension) = path.extension() { if extension == "shader" { @@ -341,7 +341,7 @@ impl MaterialEditor { } // Wait all shaders to load. - block_on(rg3d::core::futures::future::join_all( + block_on(fyrox::core::futures::future::join_all( self.shaders_list.iter().cloned(), )); } diff --git a/editor/src/menu/create.rs b/editor/src/menu/create.rs index 8c4c3b81d..f538d5872 100644 --- a/editor/src/menu/create.rs +++ b/editor/src/menu/create.rs @@ -6,7 +6,7 @@ use crate::{ scene::commands::{graph::AddNodeCommand, sound::AddSoundSourceCommand}, Message, }; -use rg3d::{ +use fyrox::{ core::{algebra::Matrix4, parking_lot::Mutex, pool::Handle}, gui::{menu::MenuItemMessage, message::UiMessage, BuildContext, UiNode}, scene::{ diff --git a/editor/src/menu/dim2.rs b/editor/src/menu/dim2.rs index bd4c5c54e..507c17bf1 100644 --- a/editor/src/menu/dim2.rs +++ b/editor/src/menu/dim2.rs @@ -1,5 +1,5 @@ use crate::{menu::create_menu_item, scene::commands::graph::AddNodeCommand, Message}; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{menu::MenuItemMessage, message::UiMessage, BuildContext, UiNode}, scene::{base::BaseBuilder, dim2::rectangle::RectangleBuilder, node::Node}, diff --git a/editor/src/menu/edit.rs b/editor/src/menu/edit.rs index 9864ad1e8..6c354d569 100644 --- a/editor/src/menu/edit.rs +++ b/editor/src/menu/edit.rs @@ -3,7 +3,7 @@ use crate::{ scene::{commands::PasteCommand, EditorScene, Selection}, GameEngine, Message, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{menu::MenuItemMessage, message::UiMessage, BuildContext, UiNode}, }; diff --git a/editor/src/menu/file.rs b/editor/src/menu/file.rs index d9b435b73..3f626c0cb 100644 --- a/editor/src/menu/file.rs +++ b/editor/src/menu/file.rs @@ -5,7 +5,7 @@ use crate::{ settings::{Settings, SettingsWindow}, GameEngine, Message, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{ file_browser::{FileSelectorBuilder, FileSelectorMessage}, diff --git a/editor/src/menu/mod.rs b/editor/src/menu/mod.rs index eede9a7ac..0b56e42d5 100644 --- a/editor/src/menu/mod.rs +++ b/editor/src/menu/mod.rs @@ -8,7 +8,7 @@ use crate::{ settings::Settings, CurveEditorWindow, GameEngine, Message, }; -use rg3d::{ +use fyrox::{ core::{algebra::Vector2, pool::Handle, scope_profile}, gui::{ menu::{MenuBuilder, MenuItemBuilder, MenuItemContent}, diff --git a/editor/src/menu/physics.rs b/editor/src/menu/physics.rs index 5c480473e..0ed1fb46a 100644 --- a/editor/src/menu/physics.rs +++ b/editor/src/menu/physics.rs @@ -1,5 +1,5 @@ use crate::{menu::create_menu_item, scene::commands::graph::AddNodeCommand, Message}; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{menu::MenuItemMessage, message::UiMessage, BuildContext, UiNode}, scene::{base::BaseBuilder, collider::*, joint::*, node::Node, rigidbody::RigidBodyBuilder}, diff --git a/editor/src/menu/physics2d.rs b/editor/src/menu/physics2d.rs index 8a19f3336..bf98ff219 100644 --- a/editor/src/menu/physics2d.rs +++ b/editor/src/menu/physics2d.rs @@ -1,5 +1,5 @@ use crate::{menu::create_menu_item, scene::commands::graph::AddNodeCommand, Message}; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{menu::MenuItemMessage, message::UiMessage, BuildContext, UiNode}, scene::{ diff --git a/editor/src/menu/utils.rs b/editor/src/menu/utils.rs index 0a842417c..fc6ee1548 100644 --- a/editor/src/menu/utils.rs +++ b/editor/src/menu/utils.rs @@ -1,5 +1,5 @@ use crate::menu::{create_menu_item, create_root_menu_item, Panels}; -use rg3d::{ +use fyrox::{ asset::core::pool::Handle, gui::{ menu::MenuItemMessage, diff --git a/editor/src/menu/view.rs b/editor/src/menu/view.rs index 55db89633..d9f52664e 100644 --- a/editor/src/menu/view.rs +++ b/editor/src/menu/view.rs @@ -1,5 +1,5 @@ use crate::menu::{create_menu_item, create_root_menu_item, Panels}; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{ menu::MenuItemMessage, diff --git a/editor/src/overlay.rs b/editor/src/overlay.rs index 8ed12e283..2579c763f 100644 --- a/editor/src/overlay.rs +++ b/editor/src/overlay.rs @@ -1,7 +1,7 @@ -use rg3d::core::sstorage::ImmutableString; -use rg3d::renderer::framework::geometry_buffer::{GeometryBuffer, GeometryBufferKind}; -use rg3d::renderer::framework::state::{BlendFactor, BlendFunc}; -use rg3d::{ +use fyrox::core::sstorage::ImmutableString; +use fyrox::renderer::framework::geometry_buffer::{GeometryBuffer, GeometryBufferKind}; +use fyrox::renderer::framework::state::{BlendFactor, BlendFunc}; +use fyrox::{ core::{algebra::Matrix4, math::Matrix4Ext}, renderer::{ framework::{ diff --git a/editor/src/preview.rs b/editor/src/preview.rs index 11ae3cea8..e7cb1e2da 100644 --- a/editor/src/preview.rs +++ b/editor/src/preview.rs @@ -1,5 +1,5 @@ use crate::GameEngine; -use rg3d::{ +use fyrox::{ core::{ algebra::{UnitQuaternion, Vector2, Vector3}, color::Color, diff --git a/editor/src/scene/clipboard.rs b/editor/src/scene/clipboard.rs index b45b4fae5..9d4905d5c 100644 --- a/editor/src/scene/clipboard.rs +++ b/editor/src/scene/clipboard.rs @@ -1,5 +1,5 @@ use crate::{scene::GraphSelection, GameEngine}; -use rg3d::{ +use fyrox::{ core::pool::Handle, scene::{graph::Graph, node::Node, Scene}, }; diff --git a/editor/src/scene/commands/camera.rs b/editor/src/scene/commands/camera.rs index 18228c41d..3dc8b1e51 100644 --- a/editor/src/scene/commands/camera.rs +++ b/editor/src/scene/commands/camera.rs @@ -2,8 +2,8 @@ use crate::{ define_node_command, get_set_swap, scene::commands::{Command, SceneContext}, }; -use rg3d::scene::camera::Projection; -use rg3d::{ +use fyrox::scene::camera::Projection; +use fyrox::{ core::{math::Rect, pool::Handle}, resource::texture::Texture, scene::{ diff --git a/editor/src/scene/commands/collider.rs b/editor/src/scene/commands/collider.rs index bc85a1103..e59342248 100644 --- a/editor/src/scene/commands/collider.rs +++ b/editor/src/scene/commands/collider.rs @@ -1,5 +1,5 @@ use crate::{command::Command, define_node_command, get_set_swap, scene::commands::SceneContext}; -use rg3d::{ +use fyrox::{ core::{algebra::Vector3, pool::Handle}, scene::{collider::*, graph::Graph, node::Node}, }; diff --git a/editor/src/scene/commands/collider2d.rs b/editor/src/scene/commands/collider2d.rs index 11e37eccc..553b745f6 100644 --- a/editor/src/scene/commands/collider2d.rs +++ b/editor/src/scene/commands/collider2d.rs @@ -1,5 +1,5 @@ use crate::{command::Command, define_node_command, get_set_swap, scene::commands::SceneContext}; -use rg3d::{ +use fyrox::{ core::{algebra::Vector2, pool::Handle}, scene::{collider::InteractionGroups, dim2::collider::*, graph::Graph, node::Node}, }; diff --git a/editor/src/scene/commands/decal.rs b/editor/src/scene/commands/decal.rs index 12bd5b929..d9396c32b 100644 --- a/editor/src/scene/commands/decal.rs +++ b/editor/src/scene/commands/decal.rs @@ -2,7 +2,7 @@ use crate::{ define_node_command, get_set_swap, scene::commands::{Command, SceneContext}, }; -use rg3d::{ +use fyrox::{ core::{color::Color, pool::Handle}, resource::texture::Texture, scene::{graph::Graph, node::Node}, diff --git a/editor/src/scene/commands/graph.rs b/editor/src/scene/commands/graph.rs index 077a7d89d..310cee4ab 100644 --- a/editor/src/scene/commands/graph.rs +++ b/editor/src/scene/commands/graph.rs @@ -1,6 +1,6 @@ use crate::{command::Command, define_node_command, get_set_swap, scene::commands::SceneContext}; -use rg3d::scene::base::{Property, PropertyValue}; -use rg3d::{ +use fyrox::scene::base::{Property, PropertyValue}; +use fyrox::{ animation::Animation, core::{ algebra::{UnitQuaternion, Vector3}, diff --git a/editor/src/scene/commands/joint.rs b/editor/src/scene/commands/joint.rs index e7674df98..e8e33a867 100644 --- a/editor/src/scene/commands/joint.rs +++ b/editor/src/scene/commands/joint.rs @@ -1,5 +1,5 @@ use crate::{command::Command, define_node_command, get_set_swap, scene::commands::SceneContext}; -use rg3d::{ +use fyrox::{ core::{ algebra::{UnitQuaternion, Vector3}, pool::Handle, diff --git a/editor/src/scene/commands/joint2d.rs b/editor/src/scene/commands/joint2d.rs index 135955dec..5e71733cd 100644 --- a/editor/src/scene/commands/joint2d.rs +++ b/editor/src/scene/commands/joint2d.rs @@ -1,5 +1,5 @@ use crate::{command::Command, define_node_command, get_set_swap, scene::commands::SceneContext}; -use rg3d::{ +use fyrox::{ core::{ algebra::{UnitQuaternion, Vector3}, pool::Handle, diff --git a/editor/src/scene/commands/light.rs b/editor/src/scene/commands/light.rs index 5b9fdd265..4edeb0c1b 100644 --- a/editor/src/scene/commands/light.rs +++ b/editor/src/scene/commands/light.rs @@ -2,7 +2,7 @@ use crate::{ define_node_command, get_set_swap, scene::commands::{Command, SceneContext}, }; -use rg3d::{ +use fyrox::{ core::{algebra::Vector3, color::Color, pool::Handle}, resource::texture::Texture, scene::{graph::Graph, node::Node}, diff --git a/editor/src/scene/commands/lod.rs b/editor/src/scene/commands/lod.rs index 825cc728e..ce6b20cba 100644 --- a/editor/src/scene/commands/lod.rs +++ b/editor/src/scene/commands/lod.rs @@ -1,5 +1,5 @@ use crate::{command::Command, define_node_command, get_set_swap, scene::commands::SceneContext}; -use rg3d::{ +use fyrox::{ core::pool::Handle, scene::{ base::{LevelOfDetail, LodControlledObject, LodGroup}, diff --git a/editor/src/scene/commands/material.rs b/editor/src/scene/commands/material.rs index 060dcac44..0885d5157 100644 --- a/editor/src/scene/commands/material.rs +++ b/editor/src/scene/commands/material.rs @@ -1,6 +1,6 @@ use crate::{command::Command, scene::commands::SceneContext}; -use rg3d::core::sstorage::ImmutableString; -use rg3d::{ +use fyrox::core::sstorage::ImmutableString; +use fyrox::{ core::parking_lot::Mutex, material::{shader::Shader, Material, PropertyValue}, }; diff --git a/editor/src/scene/commands/mesh.rs b/editor/src/scene/commands/mesh.rs index d25d57bb8..b07504fbd 100644 --- a/editor/src/scene/commands/mesh.rs +++ b/editor/src/scene/commands/mesh.rs @@ -1,8 +1,8 @@ use crate::{command::Command, define_node_command, get_set_swap, scene::commands::SceneContext}; -use rg3d::core::sstorage::ImmutableString; -use rg3d::material::shader::SamplerFallback; -use rg3d::material::PropertyValue; -use rg3d::{ +use fyrox::core::sstorage::ImmutableString; +use fyrox::material::shader::SamplerFallback; +use fyrox::material::PropertyValue; +use fyrox::{ core::pool::Handle, resource::texture::Texture, scene::{ diff --git a/editor/src/scene/commands/mod.rs b/editor/src/scene/commands/mod.rs index 93d1f567f..210932315 100644 --- a/editor/src/scene/commands/mod.rs +++ b/editor/src/scene/commands/mod.rs @@ -6,7 +6,7 @@ use crate::{ }, GameEngine, Message, }; -use rg3d::{ +use fyrox::{ engine::resource_manager::ResourceManager, scene::{graph::SubGraph, Scene}, }; diff --git a/editor/src/scene/commands/navmesh.rs b/editor/src/scene/commands/navmesh.rs index 6db913cfd..6c3cd1119 100644 --- a/editor/src/scene/commands/navmesh.rs +++ b/editor/src/scene/commands/navmesh.rs @@ -5,8 +5,8 @@ use crate::interaction::navmesh::data_model::{ use crate::interaction::navmesh::selection::NavmeshSelection; use crate::scene::commands::SceneContext; use crate::scene::Selection; -use rg3d::core::algebra::Vector3; -use rg3d::core::pool::{Handle, Ticket}; +use fyrox::core::algebra::Vector3; +use fyrox::core::pool::{Handle, Ticket}; #[derive(Debug)] pub struct AddNavmeshEdgeCommand { diff --git a/editor/src/scene/commands/particle_system.rs b/editor/src/scene/commands/particle_system.rs index acaaafaa3..312cf1d00 100644 --- a/editor/src/scene/commands/particle_system.rs +++ b/editor/src/scene/commands/particle_system.rs @@ -1,5 +1,5 @@ use crate::{command::Command, define_node_command, get_set_swap, scene::commands::SceneContext}; -use rg3d::{ +use fyrox::{ core::{algebra::Vector3, pool::Handle}, resource::texture::Texture, scene::{ diff --git a/editor/src/scene/commands/rectangle.rs b/editor/src/scene/commands/rectangle.rs index 2d8e3f924..7eeff35f0 100644 --- a/editor/src/scene/commands/rectangle.rs +++ b/editor/src/scene/commands/rectangle.rs @@ -2,7 +2,7 @@ use crate::{ define_node_command, get_set_swap, scene::commands::{Command, SceneContext}, }; -use rg3d::{ +use fyrox::{ core::{color::Color, pool::Handle}, resource::texture::Texture, scene::{graph::Graph, node::Node}, diff --git a/editor/src/scene/commands/rigidbody.rs b/editor/src/scene/commands/rigidbody.rs index a91c7d1db..febcc3ef4 100644 --- a/editor/src/scene/commands/rigidbody.rs +++ b/editor/src/scene/commands/rigidbody.rs @@ -1,5 +1,5 @@ use crate::{command::Command, define_node_command, get_set_swap, scene::commands::SceneContext}; -use rg3d::{ +use fyrox::{ core::{algebra::Vector3, pool::Handle}, scene::{graph::Graph, node::Node, rigidbody::*}, }; diff --git a/editor/src/scene/commands/rigidbody2d.rs b/editor/src/scene/commands/rigidbody2d.rs index 47798a52f..6458beccb 100644 --- a/editor/src/scene/commands/rigidbody2d.rs +++ b/editor/src/scene/commands/rigidbody2d.rs @@ -1,5 +1,5 @@ use crate::{command::Command, define_node_command, get_set_swap, scene::commands::SceneContext}; -use rg3d::{ +use fyrox::{ core::{algebra::Vector2, pool::Handle}, scene::{graph::Graph, node::Node, rigidbody::RigidBodyType}, }; diff --git a/editor/src/scene/commands/sound.rs b/editor/src/scene/commands/sound.rs index fe41cad4d..ee0dd1cca 100644 --- a/editor/src/scene/commands/sound.rs +++ b/editor/src/scene/commands/sound.rs @@ -1,9 +1,9 @@ use crate::get_set_swap; use crate::{command::Command, scene::commands::SceneContext}; -use rg3d::core::algebra::Vector3; -use rg3d::sound::buffer::SoundBufferResource; -use rg3d::sound::context::SoundContext; -use rg3d::{ +use fyrox::core::algebra::Vector3; +use fyrox::sound::buffer::SoundBufferResource; +use fyrox::sound::context::SoundContext; +use fyrox::{ core::pool::{Handle, Ticket}, sound::source::SoundSource, }; diff --git a/editor/src/scene/commands/sprite.rs b/editor/src/scene/commands/sprite.rs index 7845e03f8..646a78d64 100644 --- a/editor/src/scene/commands/sprite.rs +++ b/editor/src/scene/commands/sprite.rs @@ -2,7 +2,7 @@ use crate::{ define_node_command, get_set_swap, scene::commands::{Command, SceneContext}, }; -use rg3d::{ +use fyrox::{ core::{color::Color, pool::Handle}, resource::texture::Texture, scene::{graph::Graph, node::Node}, diff --git a/editor/src/scene/commands/terrain.rs b/editor/src/scene/commands/terrain.rs index ec1ad43cf..c77d341a7 100644 --- a/editor/src/scene/commands/terrain.rs +++ b/editor/src/scene/commands/terrain.rs @@ -2,7 +2,7 @@ use crate::{ command::Command, create_terrain_layer_material, define_node_command, get_set_swap, scene::commands::SceneContext, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, scene::{graph::Graph, node::Node, terrain::Layer}, }; diff --git a/editor/src/scene/mod.rs b/editor/src/scene/mod.rs index 30614bf8a..956024073 100644 --- a/editor/src/scene/mod.rs +++ b/editor/src/scene/mod.rs @@ -6,9 +6,9 @@ use crate::{ world::{graph::selection::GraphSelection, sound::selection::SoundSelection}, GameEngine, }; -use rg3d::engine::Engine; -use rg3d::scene::base::BaseBuilder; -use rg3d::{ +use fyrox::engine::Engine; +use fyrox::scene::base::BaseBuilder; +use fyrox::{ core::{ pool::{Handle, Pool}, visitor::{Visit, Visitor}, @@ -129,7 +129,7 @@ impl EditorScene { pure_scene .navmeshes - .add(rg3d::utils::navmesh::Navmesh::new(&triangles, &vertices)); + .add(fyrox::utils::navmesh::Navmesh::new(&triangles, &vertices)); } let mut visitor = Visitor::new(); diff --git a/editor/src/scene_viewer.rs b/editor/src/scene_viewer.rs index 54a7dee72..156b9aeeb 100644 --- a/editor/src/scene_viewer.rs +++ b/editor/src/scene_viewer.rs @@ -2,7 +2,7 @@ use crate::{ gui::make_dropdown_list_option_with_height, load_image, DropdownListBuilder, GameEngine, InteractionModeKind, Message, SettingsSectionKind, }; -use rg3d::{ +use fyrox::{ core::{algebra::Vector2, color::Color, math::Rect, pool::Handle}, gui::{ border::BorderBuilder, diff --git a/editor/src/settings/debugging.rs b/editor/src/settings/debugging.rs index 914672633..bd3319ca5 100644 --- a/editor/src/settings/debugging.rs +++ b/editor/src/settings/debugging.rs @@ -1,5 +1,5 @@ use crate::settings::{make_bool_input_field, make_text_mark}; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{ check_box::CheckBoxMessage, diff --git a/editor/src/settings/graphics.rs b/editor/src/settings/graphics.rs index 40949b0c6..a24e51067 100644 --- a/editor/src/settings/graphics.rs +++ b/editor/src/settings/graphics.rs @@ -3,7 +3,7 @@ use crate::{ settings::{make_bool_input_field, make_text_mark}, GameEngine, }; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{ check_box::CheckBoxMessage, diff --git a/editor/src/settings/mod.rs b/editor/src/settings/mod.rs index fb12ede72..a9c87b7aa 100644 --- a/editor/src/settings/mod.rs +++ b/editor/src/settings/mod.rs @@ -8,7 +8,7 @@ use crate::{ }, GameEngine, Message, CONFIG_DIR, }; -use rg3d::{ +use fyrox::{ core::{pool::Handle, scope_profile}, gui::{ border::BorderBuilder, diff --git a/editor/src/settings/move_mode.rs b/editor/src/settings/move_mode.rs index 9c5024563..c1a944976 100644 --- a/editor/src/settings/move_mode.rs +++ b/editor/src/settings/move_mode.rs @@ -1,5 +1,5 @@ use crate::settings::{make_bool_input_field, make_f32_input_field, make_text_mark}; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{ check_box::CheckBoxMessage, diff --git a/editor/src/settings/rotate_mode.rs b/editor/src/settings/rotate_mode.rs index a18b0e419..73ed99508 100644 --- a/editor/src/settings/rotate_mode.rs +++ b/editor/src/settings/rotate_mode.rs @@ -1,5 +1,5 @@ use crate::settings::{make_bool_input_field, make_f32_input_field, make_text_mark}; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{ check_box::CheckBoxMessage, diff --git a/editor/src/utils/path_fixer.rs b/editor/src/utils/path_fixer.rs index 7497891f2..29f3d2956 100644 --- a/editor/src/utils/path_fixer.rs +++ b/editor/src/utils/path_fixer.rs @@ -2,7 +2,7 @@ //! moved a resource in a file system, but a scene has old path. use crate::{make_scene_file_filter, Message}; -use rg3d::{ +use fyrox::{ asset::ResourceData, core::{ color::Color, @@ -103,7 +103,7 @@ impl Eq for SceneResource {} fn find_file(name: &Path) -> Vec { let mut files = Vec::new(); - for dir in rg3d::walkdir::WalkDir::new(".").into_iter().flatten() { + for dir in fyrox::walkdir::WalkDir::new(".").into_iter().flatten() { let path = dir.path(); if let Some(file_name) = path.file_name() { if file_name == name { diff --git a/editor/src/world/graph/item.rs b/editor/src/world/graph/item.rs index d74efb251..8f4ea9de9 100644 --- a/editor/src/world/graph/item.rs +++ b/editor/src/world/graph/item.rs @@ -1,4 +1,4 @@ -use rg3d::{ +use fyrox::{ core::{algebra::Vector2, pool::Handle}, gui::{ brush::Brush, @@ -200,7 +200,7 @@ impl SceneItemBuilder { WidgetBuilder::new() .with_foreground( self.text_brush - .unwrap_or(Brush::Solid(rg3d::gui::COLOR_FOREGROUND)), + .unwrap_or(Brush::Solid(fyrox::gui::COLOR_FOREGROUND)), ) .with_margin(Thickness::uniform(1.0)) .on_column(1) diff --git a/editor/src/world/graph/menu.rs b/editor/src/world/graph/menu.rs index 69950cb41..df2099c84 100644 --- a/editor/src/world/graph/menu.rs +++ b/editor/src/world/graph/menu.rs @@ -3,7 +3,7 @@ use crate::{ scene::{commands::make_delete_selection_command, EditorScene, Selection}, GameEngine, Message, }; -use rg3d::{ +use fyrox::{ core::{algebra::Vector2, pool::Handle, scope_profile}, gui::{ menu::{MenuItemBuilder, MenuItemContent, MenuItemMessage}, diff --git a/editor/src/world/graph/selection.rs b/editor/src/world/graph/selection.rs index 60cbd9508..c0911ad5a 100644 --- a/editor/src/world/graph/selection.rs +++ b/editor/src/world/graph/selection.rs @@ -1,5 +1,5 @@ use crate::utils; -use rg3d::{ +use fyrox::{ asset::core::algebra::Vector3, core::{algebra::UnitQuaternion, math::Matrix4Ext, pool::Handle}, scene::{graph::Graph, node::Node}, diff --git a/editor/src/world/mod.rs b/editor/src/world/mod.rs index 87453d2a4..5953f05c8 100644 --- a/editor/src/world/mod.rs +++ b/editor/src/world/mod.rs @@ -16,8 +16,8 @@ use crate::{ }, GameEngine, Message, }; -use rg3d::core::pool::ErasedHandle; -use rg3d::{ +use fyrox::core::pool::ErasedHandle; +use fyrox::{ core::{ color::Color, pool::{Handle, Pool}, @@ -103,7 +103,7 @@ fn make_graph_node_item( .with_text_brush(if node.resource().is_some() { Brush::Solid(Color::opaque(160, 160, 200)) } else { - Brush::Solid(rg3d::gui::COLOR_FOREGROUND) + Brush::Solid(fyrox::gui::COLOR_FOREGROUND) }) .with_name(node.name().to_owned()) .with_entity_handle(handle) diff --git a/editor/src/world/search.rs b/editor/src/world/search.rs index f84c4618a..ba19dd4ba 100644 --- a/editor/src/world/search.rs +++ b/editor/src/world/search.rs @@ -1,5 +1,5 @@ use crate::Message; -use rg3d::{ +use fyrox::{ core::pool::Handle, gui::{ button::{ButtonBuilder, ButtonMessage}, diff --git a/editor/src/world/sound/selection.rs b/editor/src/world/sound/selection.rs index 210e661e4..dc25ff441 100644 --- a/editor/src/world/sound/selection.rs +++ b/editor/src/world/sound/selection.rs @@ -1,8 +1,8 @@ use crate::utils; -use rg3d::core::algebra::Vector3; -use rg3d::core::pool::Handle; -use rg3d::sound::context::SoundContext; -use rg3d::sound::source::SoundSource; +use fyrox::core::algebra::Vector3; +use fyrox::core::pool::Handle; +use fyrox::sound::context::SoundContext; +use fyrox::sound::source::SoundSource; #[derive(Debug, Clone)] pub struct SoundSelection { diff --git a/examples/2d.rs b/examples/2d.rs index e7e1a7a99..ad4ab19f9 100644 --- a/examples/2d.rs +++ b/examples/2d.rs @@ -4,8 +4,8 @@ //! //! This example shows simple 2D scene with light sources. -use rg3d::scene::camera::{OrthographicProjection, Projection}; -use rg3d::{ +use fyrox::scene::camera::{OrthographicProjection, Projection}; +use fyrox::{ core::{algebra::Vector3, pool::Handle}, engine::{framework::prelude::*, resource_manager::ResourceManager, Engine}, event::{ElementState, VirtualKeyCode, WindowEvent}, @@ -26,8 +26,8 @@ use rg3d::{ Scene, }, }; -use rg3d_core::algebra::UnitQuaternion; -use rg3d_core::color::Color; +use fyrox_core::algebra::UnitQuaternion; +use fyrox_core::color::Color; struct SceneLoader { scene: Scene, diff --git a/examples/2d_scene.rs b/examples/2d_scene.rs index 9e06ee384..426ac29db 100644 --- a/examples/2d_scene.rs +++ b/examples/2d_scene.rs @@ -4,7 +4,7 @@ //! //! This example shows simple 2D scene with light sources. -use rg3d::{ +use fyrox::{ core::{algebra::Vector3, color::Color, futures::executor::block_on, pool::Handle}, engine::{framework::prelude::*, resource_manager::ResourceManager, Engine}, event::{ElementState, VirtualKeyCode, WindowEvent}, diff --git a/examples/3rd_person.rs b/examples/3rd_person.rs index 32fb70c2b..4d585e205 100644 --- a/examples/3rd_person.rs +++ b/examples/3rd_person.rs @@ -26,7 +26,7 @@ pub mod shared; use crate::shared::{create_ui, fix_shadows_distance, Game, GameScene}; -use rg3d::{ +use fyrox::{ core::algebra::Vector2, event::{Event, VirtualKeyCode, WindowEvent}, event_loop::ControlFlow, @@ -166,7 +166,7 @@ fn main() { game.engine.render().unwrap(); } Event::LoopDestroyed => { - println!("{:?}", rg3d::core::profiler::print()); + println!("{:?}", fyrox::core::profiler::print()); } Event::WindowEvent { event, .. } => { match event { diff --git a/examples/async.rs b/examples/async.rs index 6549f98cc..269da6897 100644 --- a/examples/async.rs +++ b/examples/async.rs @@ -10,7 +10,7 @@ pub mod shared; use std::sync::{Arc, Mutex}; use crate::shared::create_camera; -use rg3d::{ +use fyrox::{ animation::Animation, core::{ algebra::{UnitQuaternion, Vector2, Vector3}, diff --git a/examples/button.rs b/examples/button.rs index 753121a16..7b003a3b6 100644 --- a/examples/button.rs +++ b/examples/button.rs @@ -1,4 +1,4 @@ -use rg3d::{ +use fyrox::{ core::{algebra::Vector2, pool::Handle, rand::Rng}, engine::{framework::prelude::*, Engine}, gui::{ diff --git a/examples/compressed_textures.rs b/examples/compressed_textures.rs index f0529d0e1..ee3132d47 100644 --- a/examples/compressed_textures.rs +++ b/examples/compressed_textures.rs @@ -3,7 +3,7 @@ //! Just shows two textures with compression. Engine compresses textures automatically, //! based on compression options. -use rg3d::{ +use fyrox::{ core::{algebra::Vector2, color::Color}, engine::{framework::prelude::*, Engine}, gui::{image::ImageBuilder, widget::WidgetBuilder}, diff --git a/examples/data/shaders/custom.shader b/examples/data/shaders/custom.shader index 25db2eff5..8abec8a0e 100644 --- a/examples/data/shaders/custom.shader +++ b/examples/data/shaders/custom.shader @@ -42,10 +42,10 @@ uniform float time; - // Define uniforms with reserved names. rg3d will automatically provide + // Define uniforms with reserved names. Fyrox will automatically provide // required data to these uniforms. - uniform mat4 rg3d_worldMatrix; - uniform mat4 rg3d_worldViewProjection; + uniform mat4 fyrox_worldMatrix; + uniform mat4 fyrox_worldViewProjection; out vec3 position; out vec3 normal; @@ -61,8 +61,8 @@ void main() { texCoord = vertexTexCoord; - normal = normalize(mat3(rg3d_worldMatrix) * vertexNormal); - gl_Position = rg3d_worldViewProjection * vec4(Wave(vertexPosition), 1.0); + normal = normalize(mat3(fyrox_worldMatrix) * vertexNormal); + gl_Position = fyrox_worldViewProjection * vec4(Wave(vertexPosition), 1.0); } "#, @@ -121,7 +121,7 @@ uniform float time; - uniform mat4 rg3d_worldViewProjection; + uniform mat4 fyrox_worldViewProjection; out vec2 texCoord; @@ -134,7 +134,7 @@ void main() { - gl_Position = rg3d_worldViewProjection * vec4(Wave(vertexPosition), 1.0); + gl_Position = fyrox_worldViewProjection * vec4(Wave(vertexPosition), 1.0); texCoord = vertexTexCoord; } "#, @@ -179,8 +179,8 @@ layout(location = 0) in vec3 vertexPosition; layout(location = 1) in vec2 vertexTexCoord; - uniform mat4 rg3d_worldMatrix; - uniform mat4 rg3d_worldViewProjection; + uniform mat4 fyrox_worldMatrix; + uniform mat4 fyrox_worldViewProjection; uniform float time; @@ -196,8 +196,8 @@ void main() { - gl_Position = rg3d_worldViewProjection * vec4(Wave(vertexPosition), 1.0); - worldPosition = (rg3d_worldMatrix * vec4(vertexPosition, 1.0)).xyz; + gl_Position = fyrox_worldViewProjection * vec4(Wave(vertexPosition), 1.0); + worldPosition = (fyrox_worldMatrix * vec4(vertexPosition, 1.0)).xyz; texCoord = vertexTexCoord; } "#, @@ -206,7 +206,7 @@ r#" uniform sampler2D diffuseTexture; - uniform vec3 rg3d_lightPosition; + uniform vec3 fyrox_lightPosition; in vec2 texCoord; in vec3 worldPosition; @@ -216,7 +216,7 @@ void main() { if (texture(diffuseTexture, texCoord).a < 0.2) discard; - depth = length(rg3d_lightPosition - worldPosition); + depth = length(fyrox_lightPosition - worldPosition); } "#, ) diff --git a/examples/framework.rs b/examples/framework.rs index 8ba946c26..0393a0f0e 100644 --- a/examples/framework.rs +++ b/examples/framework.rs @@ -1,5 +1,5 @@ -use rg3d::engine::Engine; -use rg3d::{ +use fyrox::engine::Engine; +use fyrox::{ core::color::{Color, Hsv}, engine::framework::prelude::*, event_loop::ControlFlow, diff --git a/examples/grid.rs b/examples/grid.rs index dc998cd68..b8326ac16 100644 --- a/examples/grid.rs +++ b/examples/grid.rs @@ -1,4 +1,4 @@ -use rg3d::{ +use fyrox::{ engine::{framework::prelude::*, Engine}, gui::{ button::ButtonBuilder, diff --git a/examples/inspector.rs b/examples/inspector.rs index fcf7245db..ae0a76a48 100644 --- a/examples/inspector.rs +++ b/examples/inspector.rs @@ -3,7 +3,7 @@ pub mod shared; use crate::shared::create_camera; -use rg3d::{ +use fyrox::{ animation::Animation, core::{ algebra::{UnitQuaternion, Vector2, Vector3}, @@ -111,7 +111,7 @@ async fn create_scene(resource_manager: ResourceManager) -> GameScene { fn main() { let event_loop = EventLoop::new(); - let window_builder = rg3d::window::WindowBuilder::new() + let window_builder = fyrox::window::WindowBuilder::new() .with_title("Example - User Interface") .with_resizable(true); @@ -125,7 +125,7 @@ fn main() { scene, model_handle, walk_animation, - } = rg3d::core::futures::executor::block_on(create_scene(engine.resource_manager.clone())); + } = fyrox::core::futures::executor::block_on(create_scene(engine.resource_manager.clone())); let inspector_context = InspectorContext::from_object( &scene.graph[model_handle], diff --git a/examples/instancing.rs b/examples/instancing.rs index 6e02e5567..1711d6695 100644 --- a/examples/instancing.rs +++ b/examples/instancing.rs @@ -8,7 +8,7 @@ pub mod shared; use crate::shared::create_camera; -use rg3d::{ +use fyrox::{ animation::Animation, core::{ algebra::{Matrix4, UnitQuaternion, Vector3}, @@ -71,7 +71,7 @@ impl SceneLoader { // create instance of it - much more efficient is to load it once and then make copies // of it. In case of models it is very efficient because single vertex and index buffer // can be used for all models instances, so memory footprint on GPU will be lower. - let (model_resource, walk_animation_resource) = rg3d::core::futures::join!( + let (model_resource, walk_animation_resource) = fyrox::core::futures::join!( resource_manager.request_model("examples/data/mutant/mutant.FBX"), resource_manager.request_model("examples/data/mutant/walk.fbx") ); @@ -114,7 +114,7 @@ impl SceneLoader { scene .animations .get_mut(walk_animation) - .set_speed(rg3d::rand::thread_rng().gen_range(0.8..1.2)); + .set_speed(fyrox::rand::thread_rng().gen_range(0.8..1.2)); animations.push(walk_animation); } @@ -192,7 +192,7 @@ impl GameState for Game { engine.renderer.set_quality_settings(&settings).unwrap(); // Create test scene. - let loader = rg3d::core::futures::executor::block_on(SceneLoader::load_with( + let loader = fyrox::core::futures::executor::block_on(SceneLoader::load_with( engine.resource_manager.clone(), )); diff --git a/examples/lightmap.rs b/examples/lightmap.rs index c021e0c58..ed5c76efa 100644 --- a/examples/lightmap.rs +++ b/examples/lightmap.rs @@ -8,7 +8,7 @@ pub mod shared; use crate::shared::create_camera; -use rg3d::{ +use fyrox::{ core::{ algebra::{UnitQuaternion, Vector2, Vector3}, color::Color, @@ -282,7 +282,7 @@ struct InputController { fn main() { let event_loop = EventLoop::new(); - let window_builder = rg3d::window::WindowBuilder::new() + let window_builder = fyrox::window::WindowBuilder::new() .with_title("Example 09 - Lightmap") .with_resizable(true); diff --git a/examples/lod.rs b/examples/lod.rs index 390913fb9..d88ba8dc4 100644 --- a/examples/lod.rs +++ b/examples/lod.rs @@ -8,8 +8,8 @@ pub mod shared; use crate::shared::create_camera; -use rg3d::scene::base::LodControlledObject; -use rg3d::{ +use fyrox::scene::base::LodControlledObject; +use fyrox::{ core::{ algebra::{UnitQuaternion, Vector3}, color::Color, @@ -132,7 +132,7 @@ struct InputController { fn main() { let event_loop = EventLoop::new(); - let window_builder = rg3d::window::WindowBuilder::new() + let window_builder = fyrox::window::WindowBuilder::new() .with_title("Example 08 - Level of detail") .with_resizable(true); @@ -146,7 +146,7 @@ fn main() { scene, model_handle, camera, - } = rg3d::core::futures::executor::block_on(create_scene(engine.resource_manager.clone())); + } = fyrox::core::futures::executor::block_on(create_scene(engine.resource_manager.clone())); // Add scene to engine - engine will take ownership over scene and will return // you a handle to scene which can be used later on to borrow it and do some diff --git a/examples/material.rs b/examples/material.rs index fa9449a23..36acadea1 100644 --- a/examples/material.rs +++ b/examples/material.rs @@ -7,7 +7,7 @@ pub mod shared; use crate::shared::create_camera; -use rg3d::{ +use fyrox::{ core::{ algebra::{Matrix4, Vector3}, color::Color, diff --git a/examples/navmesh.rs b/examples/navmesh.rs index eed6367e1..82a0d0c2b 100644 --- a/examples/navmesh.rs +++ b/examples/navmesh.rs @@ -7,7 +7,7 @@ pub mod shared; use crate::shared::create_camera; -use rg3d::{ +use fyrox::{ core::{ algebra::{Matrix4, Point3, UnitQuaternion, Vector2, Vector3}, arrayvec::ArrayVec, @@ -140,7 +140,7 @@ struct InputController { fn main() { let event_loop = EventLoop::new(); - let window_builder = rg3d::window::WindowBuilder::new() + let window_builder = fyrox::window::WindowBuilder::new() .with_title("Example 12 - Navigation Mesh") .with_resizable(true); @@ -155,7 +155,7 @@ fn main() { agent, cursor, camera, - } = rg3d::core::futures::executor::block_on(create_scene(engine.resource_manager.clone())); + } = fyrox::core::futures::executor::block_on(create_scene(engine.resource_manager.clone())); // Add scene to engine - engine will take ownership over scene and will return // you a handle to scene which can be used later on to borrow it and do some diff --git a/examples/save_load.rs b/examples/save_load.rs index b607a3005..e9acb4026 100644 --- a/examples/save_load.rs +++ b/examples/save_load.rs @@ -4,7 +4,7 @@ //! //! This example based on 3rd_person example, it uses lots of code from shared mod. //! -//! rg3d has powerful built-in serialization/deserialization which is used for various +//! Fyrox has powerful built-in serialization/deserialization which is used for various //! purposes, one of them is to create or load save files in your game. It very easy //! to use, all you need to do is to implement Visit trait on your game structures and //! then create new instance of visitor and call your_struct.visit(...) on it. Check code @@ -12,13 +12,13 @@ //! //! # Important //! -//! You should carefully read documentation of rg3d::core::Visitor to understand basic ideas +//! You should carefully read documentation of fyrox::core::Visitor to understand basic ideas //! of how it works, otherwise Visit trait implementation might be confusing. pub mod shared; use crate::shared::{create_ui, fix_shadows_distance, Game, GameScene, LocomotionMachine, Player}; -use rg3d::{ +use fyrox::{ core::{ algebra::Vector2, visitor::{Visit, VisitResult, Visitor}, @@ -56,7 +56,7 @@ impl Visit for LocomotionMachine { self.jump_animation.visit("JumpAnimation", visitor)?; self.walk_animation.visit("WalkAnimation", visitor)?; self.walk_state.visit("WalkState", visitor)?; - // Machine is an internal rg3d type, however it has implementation of Visit and + // Machine is an internal Fyrox type, however it has implementation of Visit and // can be serialized in one call. self.machine.visit("Machine", visitor)?; @@ -103,7 +103,7 @@ impl Visit for Game { fn visit(&mut self, name: &str, visitor: &mut Visitor) -> VisitResult { visitor.enter_region(name)?; - // As you can see entire state of the rg3d engine saved in a single line. + // As you can see entire state of the Fyrox engine saved in a single line. self.engine.visit("Engine", visitor)?; self.game_scene.visit("GameScene", visitor)?; @@ -249,7 +249,7 @@ fn main() { game.engine.render().unwrap(); } Event::LoopDestroyed => { - println!("{:?}", rg3d::core::profiler::print()); + println!("{:?}", fyrox::core::profiler::print()); } Event::WindowEvent { event, .. } => { match event { @@ -306,7 +306,7 @@ fn main() { VirtualKeyCode::F9 => { if Path::new(SAVE_FILE).exists() { // Loading a game is even simpler - just 2 lines. - let mut visitor = rg3d::core::futures::executor::block_on(Visitor::load_binary(SAVE_FILE)).unwrap(); + let mut visitor = fyrox::core::futures::executor::block_on(Visitor::load_binary(SAVE_FILE)).unwrap(); game.visit("Game", &mut visitor).unwrap(); } }, diff --git a/examples/scene.rs b/examples/scene.rs index 29262f9bd..c1abcc511 100644 --- a/examples/scene.rs +++ b/examples/scene.rs @@ -9,7 +9,7 @@ pub mod shared; use crate::shared::create_camera; -use rg3d::{ +use fyrox::{ core::{ algebra::{UnitQuaternion, Vector3}, color::Color, @@ -76,7 +76,7 @@ struct InputController { fn main() { let event_loop = EventLoop::new(); - let window_builder = rg3d::window::WindowBuilder::new() + let window_builder = fyrox::window::WindowBuilder::new() .with_title("Example - Scene") .with_resizable(true); @@ -87,7 +87,7 @@ fn main() { // Create test scene. let GameScene { scene, pivot } = - rg3d::core::futures::executor::block_on(create_scene(engine.resource_manager.clone())); + fyrox::core::futures::executor::block_on(create_scene(engine.resource_manager.clone())); // Add scene to engine - engine will take ownership over scene and will return // you a handle to scene which can be used later on to borrow it and do some diff --git a/examples/shared/mod.rs b/examples/shared/mod.rs index 8d55823ad..15f9ea71b 100644 --- a/examples/shared/mod.rs +++ b/examples/shared/mod.rs @@ -4,7 +4,7 @@ // some parts can be unused in some examples. #![allow(dead_code)] -use rg3d::{ +use fyrox::{ animation::{ machine::{Machine, Parameter, PoseNode, State, Transition}, Animation, AnimationSignal, @@ -54,7 +54,7 @@ pub async fn create_camera( graph: &mut Graph, ) -> Handle { // Load skybox textures in parallel. - let (front, back, left, right, top, bottom) = rg3d::core::futures::join!( + let (front, back, left, right, top, bottom) = fyrox::core::futures::join!( resource_manager .request_texture("examples/data/skyboxes/DarkStormy/DarkStormyFront2048.png"), resource_manager @@ -110,7 +110,7 @@ impl Game { pub fn new(title: &str) -> (Self, EventLoop<()>) { let event_loop = EventLoop::new(); - let window_builder = rg3d::window::WindowBuilder::new() + let window_builder = fyrox::window::WindowBuilder::new() .with_title(title) .with_resizable(true); @@ -702,7 +702,7 @@ impl Player { } } - pub fn handle_key_event(&mut self, key: &rg3d::event::KeyboardInput, _dt: f32) { + pub fn handle_key_event(&mut self, key: &fyrox::event::KeyboardInput, _dt: f32) { if let Some(key_code) = key.virtual_keycode { match key_code { VirtualKeyCode::W => { @@ -733,7 +733,7 @@ pub fn create_scene_async(resource_manager: ResourceManager) -> Arc Arc { - println!("{:?}", rg3d::core::profiler::print()); + println!("{:?}", fyrox::core::profiler::print()); } Event::WindowEvent { event, .. } => { match event { diff --git a/examples/terrain.rs b/examples/terrain.rs index 8cc752697..ce96b374c 100644 --- a/examples/terrain.rs +++ b/examples/terrain.rs @@ -3,7 +3,7 @@ pub mod shared; use crate::shared::create_camera; -use rg3d::{ +use fyrox::{ core::{ algebra::{UnitQuaternion, Vector2, Vector3}, color::Color, @@ -183,7 +183,7 @@ impl GameState for Game { Self: Sized, { // Create test scene. - let loader = rg3d::core::futures::executor::block_on(SceneLoader::load_with( + let loader = fyrox::core::futures::executor::block_on(SceneLoader::load_with( engine.resource_manager.clone(), )); diff --git a/examples/ui.rs b/examples/ui.rs index a51c84634..00aca602e 100644 --- a/examples/ui.rs +++ b/examples/ui.rs @@ -9,7 +9,7 @@ pub mod shared; use crate::shared::create_camera; -use rg3d::{ +use fyrox::{ animation::Animation, core::{ algebra::{UnitQuaternion, Vector2, Vector3}, @@ -329,7 +329,7 @@ async fn create_scene(resource_manager: ResourceManager) -> GameScene { fn main() { let event_loop = EventLoop::new(); - let window_builder = rg3d::window::WindowBuilder::new() + let window_builder = fyrox::window::WindowBuilder::new() .with_title("Example - User Interface") .with_resizable(true); @@ -343,7 +343,7 @@ fn main() { scene, model_handle, walk_animation, - } = rg3d::core::futures::executor::block_on(create_scene(engine.resource_manager.clone())); + } = fyrox::core::futures::executor::block_on(create_scene(engine.resource_manager.clone())); // Add scene to engine - engine will take ownership over scene and will return // you a handle to scene which can be used later on to borrow it and do some diff --git a/examples/wasm/Cargo.toml b/examples/wasm/Cargo.toml index deede45b6..d2af4fb55 100644 --- a/examples/wasm/Cargo.toml +++ b/examples/wasm/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" crate-type = ["cdylib", "rlib"] [dependencies] -rg3d = { path = "../../" } +fyrox = { path = "../../" } [dev-dependencies] wasm-bindgen-test = "0.3" \ No newline at end of file diff --git a/examples/wasm/README.md b/examples/wasm/README.md index 3b7ef4cdb..ee111babe 100644 --- a/examples/wasm/README.md +++ b/examples/wasm/README.md @@ -1,6 +1,6 @@ ## WebAssembly Example -Simple example showing how to use rg3d with WebAssembly. +Simple example showing how to use Fyrox with WebAssembly. ### Build instructions diff --git a/examples/wasm/src/lib.rs b/examples/wasm/src/lib.rs index d034bdd84..ac6bbb248 100644 --- a/examples/wasm/src/lib.rs +++ b/examples/wasm/src/lib.rs @@ -4,7 +4,7 @@ //! //! Warning - Work in progress! -use rg3d::{ +use fyrox::{ animation::Animation, core::{ algebra::{Matrix4, UnitQuaternion, Vector3}, @@ -128,7 +128,7 @@ pub async fn create_camera( graph: &mut Graph, ) -> Handle { // Load skybox textures in parallel. - let (front, back, left, right, top, bottom) = rg3d::core::futures::join!( + let (front, back, left, right, top, bottom) = fyrox::core::futures::join!( resource_manager.request_texture("data/textures/DarkStormyFront.jpg"), resource_manager.request_texture("data/textures/DarkStormyBack.jpg"), resource_manager.request_texture("data/textures/DarkStormyLeft.jpg"), @@ -205,7 +205,7 @@ async fn create_scene(resource_manager: ResourceManager, context: Arc, Dmitry Stepanov "] edition = "2021" @@ -23,5 +23,5 @@ darling = "0.13.1" fxhash = "0.2.1" [dev-dependencies] -rg3d-core = { path = "../rg3d-core" } +fyrox-core = { path = "../fyrox-core" } futures = "0.3.16" diff --git a/fyrox-core-derive/README.md b/fyrox-core-derive/README.md new file mode 100644 index 000000000..5b7611651 --- /dev/null +++ b/fyrox-core-derive/README.md @@ -0,0 +1,3 @@ +# fyrox-core-derive + +Provides the `#[derive(Visit)]` macro, which implements `fyrox::core::visitor::Visit`. diff --git a/rg3d-core-derive/src/inspect.rs b/fyrox-core-derive/src/inspect.rs similarity index 100% rename from rg3d-core-derive/src/inspect.rs rename to fyrox-core-derive/src/inspect.rs diff --git a/rg3d-core-derive/src/inspect/args.rs b/fyrox-core-derive/src/inspect/args.rs similarity index 100% rename from rg3d-core-derive/src/inspect/args.rs rename to fyrox-core-derive/src/inspect/args.rs diff --git a/rg3d-core-derive/src/inspect/utils.rs b/fyrox-core-derive/src/inspect/utils.rs similarity index 100% rename from rg3d-core-derive/src/inspect/utils.rs rename to fyrox-core-derive/src/inspect/utils.rs diff --git a/rg3d-core-derive/src/inspect/utils/prop_keys.rs b/fyrox-core-derive/src/inspect/utils/prop_keys.rs similarity index 100% rename from rg3d-core-derive/src/inspect/utils/prop_keys.rs rename to fyrox-core-derive/src/inspect/utils/prop_keys.rs diff --git a/rg3d-core-derive/src/lib.rs b/fyrox-core-derive/src/lib.rs similarity index 100% rename from rg3d-core-derive/src/lib.rs rename to fyrox-core-derive/src/lib.rs diff --git a/rg3d-core-derive/src/visit.rs b/fyrox-core-derive/src/visit.rs similarity index 100% rename from rg3d-core-derive/src/visit.rs rename to fyrox-core-derive/src/visit.rs diff --git a/rg3d-core-derive/src/visit/args.rs b/fyrox-core-derive/src/visit/args.rs similarity index 100% rename from rg3d-core-derive/src/visit/args.rs rename to fyrox-core-derive/src/visit/args.rs diff --git a/rg3d-core-derive/src/visit/utils.rs b/fyrox-core-derive/src/visit/utils.rs similarity index 100% rename from rg3d-core-derive/src/visit/utils.rs rename to fyrox-core-derive/src/visit/utils.rs diff --git a/rg3d-core-derive/tests/it/inspect.rs b/fyrox-core-derive/tests/it/inspect.rs similarity index 98% rename from rg3d-core-derive/tests/it/inspect.rs rename to fyrox-core-derive/tests/it/inspect.rs index dc95e95e1..4ff533068 100644 --- a/rg3d-core-derive/tests/it/inspect.rs +++ b/fyrox-core-derive/tests/it/inspect.rs @@ -1,8 +1,8 @@ -//! Test cases for `rg3d::gui::Inspect` +//! Test cases for `fyrox::gui::Inspect` use std::any::TypeId; -use rg3d_core::inspect::{Inspect, PropertyInfo}; +use fyrox_core::inspect::{Inspect, PropertyInfo}; #[test] fn inspect_default() { diff --git a/rg3d-core-derive/tests/it/main.rs b/fyrox-core-derive/tests/it/main.rs similarity index 100% rename from rg3d-core-derive/tests/it/main.rs rename to fyrox-core-derive/tests/it/main.rs diff --git a/rg3d-core-derive/tests/it/visit.rs b/fyrox-core-derive/tests/it/visit.rs similarity index 97% rename from rg3d-core-derive/tests/it/visit.rs rename to fyrox-core-derive/tests/it/visit.rs index 00026e15f..9cbad1c0f 100644 --- a/rg3d-core-derive/tests/it/visit.rs +++ b/fyrox-core-derive/tests/it/visit.rs @@ -6,7 +6,7 @@ mod compat; use std::{env, fs::File, io::Write, path::PathBuf}; use futures::executor::block_on; -use rg3d_core::visitor::prelude::*; +use fyrox_core::visitor::prelude::*; /// Saves given `data` and overwrites `data_default` with the saved data. /// diff --git a/rg3d-core-derive/tests/it/visit/basic.rs b/fyrox-core-derive/tests/it/visit/basic.rs similarity index 99% rename from rg3d-core-derive/tests/it/visit/basic.rs rename to fyrox-core-derive/tests/it/visit/basic.rs index 526c26de2..658bcdcb8 100644 --- a/rg3d-core-derive/tests/it/visit/basic.rs +++ b/fyrox-core-derive/tests/it/visit/basic.rs @@ -3,7 +3,7 @@ use std::{env, fs::File, io::Write, path::PathBuf}; use futures::executor::block_on; -use rg3d_core::visitor::prelude::*; +use fyrox_core::visitor::prelude::*; #[derive(Debug, Clone, Default, PartialEq, Visit)] struct NamedFields { diff --git a/rg3d-core-derive/tests/it/visit/compat.rs b/fyrox-core-derive/tests/it/visit/compat.rs similarity index 94% rename from rg3d-core-derive/tests/it/visit/compat.rs rename to fyrox-core-derive/tests/it/visit/compat.rs index 7b1247cb5..c36e01479 100644 --- a/rg3d-core-derive/tests/it/visit/compat.rs +++ b/fyrox-core-derive/tests/it/visit/compat.rs @@ -1,6 +1,6 @@ //! Fight the compatibility hell with attributes! .. someday :) -use rg3d_core::visitor::prelude::*; +use fyrox_core::visitor::prelude::*; // Comment it out and make sure it panics // #[derive(Debug, Clone, PartialEq, Visit)] diff --git a/rg3d-core/Cargo.toml b/fyrox-core/Cargo.toml similarity index 85% rename from rg3d-core/Cargo.toml rename to fyrox-core/Cargo.toml index 4fb50bebf..68e1d9710 100644 --- a/rg3d-core/Cargo.toml +++ b/fyrox-core/Cargo.toml @@ -1,22 +1,22 @@ [package] -name = "rg3d-core" +name = "fyrox-core" version = "0.19.0" authors = ["Dmitry Stepanov "] edition = "2021" license = "MIT" -description = "Shared core for the rg3d engine and its external crates." +description = "Shared core for the Fyrox engine and its external crates." keywords = ["game", "engine", "3d"] categories = ["game-development", "graphics", "gui", "rendering", "wasm"] include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] homepage = "https://rg3d.rs" -documentation = "https://docs.rs/rg3d-core" +documentation = "https://docs.rs/fyrox-core" repository = "https://github.com/mrDIMAS/rg3d" readme = "README.md" resolver = "2" rust-version = "1.56" [dependencies] -rg3d-core-derive = { path = "../rg3d-core-derive", version = "0.14.0" } +fyrox-core-derive = { path = "../fyrox-core-derive", version = "0.14.0" } base64 = "0.13.0" byteorder = "1.4.3" diff --git a/rg3d-core/LICENSE b/fyrox-core/LICENSE similarity index 100% rename from rg3d-core/LICENSE rename to fyrox-core/LICENSE diff --git a/fyrox-core/README.md b/fyrox-core/README.md new file mode 100644 index 000000000..e014cb805 --- /dev/null +++ b/fyrox-core/README.md @@ -0,0 +1,5 @@ +# fyrox-core + +Shared library for rg3d-engine containing linear algebra and some useful algorithms. + +**NOTE:** even though this crate has `fyrox` prefix in its name, it can be used separately without any issues. diff --git a/rg3d-core/src/color.rs b/fyrox-core/src/color.rs similarity index 100% rename from rg3d-core/src/color.rs rename to fyrox-core/src/color.rs diff --git a/rg3d-core/src/color_gradient.rs b/fyrox-core/src/color_gradient.rs similarity index 100% rename from rg3d-core/src/color_gradient.rs rename to fyrox-core/src/color_gradient.rs diff --git a/rg3d-core/src/curve.rs b/fyrox-core/src/curve.rs similarity index 100% rename from rg3d-core/src/curve.rs rename to fyrox-core/src/curve.rs diff --git a/rg3d-core/src/inspect.rs b/fyrox-core/src/inspect.rs similarity index 99% rename from rg3d-core/src/inspect.rs rename to fyrox-core/src/inspect.rs index 7df1a1a7d..071ce4e71 100644 --- a/rg3d-core/src/inspect.rs +++ b/fyrox-core/src/inspect.rs @@ -190,4 +190,4 @@ impl_self_inspect!(u16, u16::MIN as f64, u16::MAX as f64, 1.0, 0); impl_self_inspect!(i8, i8::MIN as f64, i8::MAX as f64, 1.0, 0); impl_self_inspect!(u8, u8::MIN as f64, u8::MAX as f64, 1.0, 0); -pub use rg3d_core_derive::Inspect; +pub use fyrox_core_derive::Inspect; diff --git a/rg3d-core/src/io.rs b/fyrox-core/src/io.rs similarity index 100% rename from rg3d-core/src/io.rs rename to fyrox-core/src/io.rs diff --git a/rg3d-core/src/lib.rs b/fyrox-core/src/lib.rs similarity index 98% rename from rg3d-core/src/lib.rs rename to fyrox-core/src/lib.rs index b26fe3590..982d45f71 100644 --- a/rg3d-core/src/lib.rs +++ b/fyrox-core/src/lib.rs @@ -1,4 +1,4 @@ -//! Core data structures and algorithms used throughout rg3d. +//! Core data structures and algorithms used throughout Fyrox. //! //! Some of them can be useful separately outside the engine. @@ -124,7 +124,7 @@ pub fn replace_slashes>(path: P) -> PathBuf { /// /// ```rust /// # use std::path::Path; -/// # use rg3d_core::append_extension; +/// # use fyrox_core::append_extension; /// let path = Path::new("foo.bar"); /// let new_path = append_extension(path, "baz"); /// assert_eq!(new_path, Path::new("foo.bar.baz")) diff --git a/rg3d-core/src/math/aabb.rs b/fyrox-core/src/math/aabb.rs similarity index 100% rename from rg3d-core/src/math/aabb.rs rename to fyrox-core/src/math/aabb.rs diff --git a/rg3d-core/src/math/frustum.rs b/fyrox-core/src/math/frustum.rs similarity index 100% rename from rg3d-core/src/math/frustum.rs rename to fyrox-core/src/math/frustum.rs diff --git a/rg3d-core/src/math/mod.rs b/fyrox-core/src/math/mod.rs similarity index 99% rename from rg3d-core/src/math/mod.rs rename to fyrox-core/src/math/mod.rs index 908147ddc..0f5cfda7b 100644 --- a/rg3d-core/src/math/mod.rs +++ b/fyrox-core/src/math/mod.rs @@ -78,8 +78,8 @@ where /// To build bounding rectangle you should correctly initialize initial rectangle: /// /// ``` - /// # use rg3d_core::algebra::Vector2; - /// # use rg3d_core::math::Rect; + /// # use fyrox_core::algebra::Vector2; + /// # use fyrox_core::math::Rect; /// /// let vertices = [Vector2::new(1.0, 2.0), Vector2::new(-3.0, 5.0)]; /// diff --git a/rg3d-core/src/math/plane.rs b/fyrox-core/src/math/plane.rs similarity index 100% rename from rg3d-core/src/math/plane.rs rename to fyrox-core/src/math/plane.rs diff --git a/rg3d-core/src/math/ray.rs b/fyrox-core/src/math/ray.rs similarity index 100% rename from rg3d-core/src/math/ray.rs rename to fyrox-core/src/math/ray.rs diff --git a/rg3d-core/src/math/triangulator.rs b/fyrox-core/src/math/triangulator.rs similarity index 100% rename from rg3d-core/src/math/triangulator.rs rename to fyrox-core/src/math/triangulator.rs diff --git a/rg3d-core/src/numeric_range.rs b/fyrox-core/src/numeric_range.rs similarity index 100% rename from rg3d-core/src/numeric_range.rs rename to fyrox-core/src/numeric_range.rs diff --git a/rg3d-core/src/octree.rs b/fyrox-core/src/octree.rs similarity index 100% rename from rg3d-core/src/octree.rs rename to fyrox-core/src/octree.rs diff --git a/rg3d-core/src/pool.rs b/fyrox-core/src/pool.rs similarity index 99% rename from rg3d-core/src/pool.rs rename to fyrox-core/src/pool.rs index e4d774149..34eced278 100644 --- a/rg3d-core/src/pool.rs +++ b/fyrox-core/src/pool.rs @@ -638,7 +638,7 @@ impl Pool { /// # Example /// /// ``` - /// use rg3d_core::pool::Pool; + /// use fyrox_core::pool::Pool; /// let mut pool = Pool::::new(); /// let a = pool.spawn(1); /// let a = pool.borrow_mut(a); @@ -711,7 +711,7 @@ impl Pool { /// # Example /// /// ``` - /// use rg3d_core::pool::Pool; + /// use fyrox_core::pool::Pool; /// let mut pool = Pool::::new(); /// let a = pool.spawn(1); /// let b = pool.spawn(2); @@ -741,7 +741,7 @@ impl Pool { /// # Example /// /// ``` - /// use rg3d_core::pool::Pool; + /// use fyrox_core::pool::Pool; /// let mut pool = Pool::::new(); /// let a = pool.spawn(1); /// let b = pool.spawn(2); @@ -782,7 +782,7 @@ impl Pool { /// # Example /// /// ``` - /// use rg3d_core::pool::Pool; + /// use fyrox_core::pool::Pool; /// let mut pool = Pool::::new(); /// let a = pool.spawn(1); /// let b = pool.spawn(2); @@ -1014,7 +1014,7 @@ impl Pool { /// # Example /// /// ``` - /// use rg3d_core::pool::Pool; + /// use fyrox_core::pool::Pool; /// let mut pool = Pool::::new(); /// pool.spawn(123); /// pool.spawn(321); @@ -1066,7 +1066,7 @@ impl Pool { /// # Example /// /// ``` - /// use rg3d_core::pool::Pool; + /// use fyrox_core::pool::Pool; /// let mut pool = Pool::::new(); /// let handle = pool.spawn(123); /// assert_eq!(pool.is_valid_handle(handle), true) @@ -1085,7 +1085,7 @@ impl Pool { /// # Example /// /// ``` - /// use rg3d_core::pool::Pool; + /// use fyrox_core::pool::Pool; /// let mut pool = Pool::::new(); /// pool.spawn(123); /// pool.spawn(321); @@ -1120,7 +1120,7 @@ impl Pool { /// # Example /// /// ``` - /// use rg3d_core::pool::Pool; + /// use fyrox_core::pool::Pool; /// let mut pool = Pool::::new(); /// pool.spawn(123); /// pool.spawn(321); diff --git a/rg3d-core/src/profiler.rs b/fyrox-core/src/profiler.rs similarity index 100% rename from rg3d-core/src/profiler.rs rename to fyrox-core/src/profiler.rs diff --git a/rg3d-core/src/quadtree.rs b/fyrox-core/src/quadtree.rs similarity index 100% rename from rg3d-core/src/quadtree.rs rename to fyrox-core/src/quadtree.rs diff --git a/rg3d-core/src/rectpack.rs b/fyrox-core/src/rectpack.rs similarity index 100% rename from rg3d-core/src/rectpack.rs rename to fyrox-core/src/rectpack.rs diff --git a/rg3d-core/src/sparse.rs b/fyrox-core/src/sparse.rs similarity index 100% rename from rg3d-core/src/sparse.rs rename to fyrox-core/src/sparse.rs diff --git a/rg3d-core/src/sstorage.rs b/fyrox-core/src/sstorage.rs similarity index 100% rename from rg3d-core/src/sstorage.rs rename to fyrox-core/src/sstorage.rs diff --git a/rg3d-core/src/visitor.rs b/fyrox-core/src/visitor.rs similarity index 99% rename from rg3d-core/src/visitor.rs rename to fyrox-core/src/visitor.rs index ea161f496..c58eaed11 100644 --- a/rg3d-core/src/visitor.rs +++ b/fyrox-core/src/visitor.rs @@ -8,7 +8,7 @@ //! types and some of basic structures of the crate. Main criteria of what could be the field and what //! not is the ability to be represented as set of bytes without any aliasing issues. -pub use rg3d_core_derive::Visit; +pub use fyrox_core_derive::Visit; pub mod prelude { //! Types to use `#[derive(Visit)]` diff --git a/rg3d-resource/Cargo.toml b/fyrox-resource/Cargo.toml similarity index 64% rename from rg3d-resource/Cargo.toml rename to fyrox-resource/Cargo.toml index 1c024c5c8..4a8bf1a31 100644 --- a/rg3d-resource/Cargo.toml +++ b/fyrox-resource/Cargo.toml @@ -1,18 +1,18 @@ [package] -name = "rg3d-resource" +name = "fyrox-resource" version = "0.3.0" authors = ["Dmitry Stepanov "] edition = "2021" license = "MIT" -description = "Asset management crate for the rg3d engine" +description = "Asset management crate for the Fyrox engine" keywords = ["asset", "resource"] categories = ["game-development"] include = ["/src/**/*", "/Cargo.toml", "/LICENSE"] homepage = "https://rg3d.rs" -documentation = "https://docs.rs/rg3d-resource" +documentation = "https://docs.rs/fyrox-resource" repository = "https://github.com/mrDIMAS/rg3d" resolver = "2" rust-version = "1.56" [dependencies] -rg3d-core = { path = "../rg3d-core", version = "0.19.0" } +fyrox-core = { path = "../fyrox-core", version = "0.19.0" } diff --git a/rg3d-resource/LICENSE.md b/fyrox-resource/LICENSE.md similarity index 100% rename from rg3d-resource/LICENSE.md rename to fyrox-resource/LICENSE.md diff --git a/rg3d-resource/src/lib.rs b/fyrox-resource/src/lib.rs similarity index 99% rename from rg3d-resource/src/lib.rs rename to fyrox-resource/src/lib.rs index 98539ba5c..731b44513 100644 --- a/rg3d-resource/src/lib.rs +++ b/fyrox-resource/src/lib.rs @@ -15,7 +15,7 @@ use std::{ task::{Context, Poll, Waker}, }; -pub use rg3d_core as core; +pub use fyrox_core as core; /// A trait for resource data. pub trait ResourceData: 'static + Default + Debug + Visit + Send { diff --git a/rg3d-sound/Cargo.toml b/fyrox-sound/Cargo.toml similarity index 79% rename from rg3d-sound/Cargo.toml rename to fyrox-sound/Cargo.toml index b7a04d3db..1e0970304 100644 --- a/rg3d-sound/Cargo.toml +++ b/fyrox-sound/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rg3d-sound" +name = "fyrox-sound" version = "0.26.0" authors = ["Dmitry Stepanov "] edition = "2021" @@ -9,15 +9,15 @@ keywords = ["sound", "game", "hrtf", "binaural", "reverb"] categories = ["game-development", "multimedia::audio"] include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md", "/examples/*"] homepage = "https://rg3d.rs" -documentation = "https://docs.rs/rg3d-sound" +documentation = "https://docs.rs/fyrox-sound" repository = "https://github.com/mrDIMAS/rg3d" readme = "README.md" resolver = "2" rust-version = "1.56" [dependencies] -rg3d-core = { path = "../rg3d-core", version = "0.19.0" } -rg3d-resource = { path = "../rg3d-resource", version = "0.3.0" } +fyrox-core = { path = "../fyrox-core", version = "0.19.0" } +fyrox-resource = { path = "../fyrox-resource", version = "0.3.0" } lewton = "0.10.2" hrtf = "0.7.0" hound = "3.4.0" @@ -33,4 +33,4 @@ coreaudio-sys = { version = "0.2.8" } core-foundation-sys = { version = "0.8.2" } [features] -enable_profiler = ["rg3d-core/enable_profiler"] +enable_profiler = ["fyrox-core/enable_profiler"] diff --git a/rg3d-sound/LICENSE b/fyrox-sound/LICENSE similarity index 100% rename from rg3d-sound/LICENSE rename to fyrox-sound/LICENSE diff --git a/rg3d-sound/README.md b/fyrox-sound/README.md similarity index 95% rename from rg3d-sound/README.md rename to fyrox-sound/README.md index f65e8b14f..baa87b652 100644 --- a/rg3d-sound/README.md +++ b/fyrox-sound/README.md @@ -1,8 +1,8 @@ -# rg3d-sound +# fyrox-sound Sound library for games and interactive applications written in Rust. -**NOTE:** even though this crate has `rg3d` prefix in its name, it can be used separately without any issues. +**NOTE:** even though this crate has `fyrox` prefix in its name, it can be used separately without any issues. ## Key features diff --git a/rg3d-sound/examples/data/IRC_1002_C.bin b/fyrox-sound/examples/data/IRC_1002_C.bin similarity index 100% rename from rg3d-sound/examples/data/IRC_1002_C.bin rename to fyrox-sound/examples/data/IRC_1002_C.bin diff --git a/rg3d-sound/examples/data/door_open.wav b/fyrox-sound/examples/data/door_open.wav similarity index 100% rename from rg3d-sound/examples/data/door_open.wav rename to fyrox-sound/examples/data/door_open.wav diff --git a/rg3d-sound/examples/data/drop.wav b/fyrox-sound/examples/data/drop.wav similarity index 100% rename from rg3d-sound/examples/data/drop.wav rename to fyrox-sound/examples/data/drop.wav diff --git a/rg3d-sound/examples/data/helicopter.wav b/fyrox-sound/examples/data/helicopter.wav similarity index 100% rename from rg3d-sound/examples/data/helicopter.wav rename to fyrox-sound/examples/data/helicopter.wav diff --git a/rg3d-sound/examples/data/sine_440hz.wav b/fyrox-sound/examples/data/sine_440hz.wav similarity index 100% rename from rg3d-sound/examples/data/sine_440hz.wav rename to fyrox-sound/examples/data/sine_440hz.wav diff --git a/rg3d-sound/examples/data/waterfall.ogg b/fyrox-sound/examples/data/waterfall.ogg similarity index 100% rename from rg3d-sound/examples/data/waterfall.ogg rename to fyrox-sound/examples/data/waterfall.ogg diff --git a/rg3d-sound/examples/hrtf.rs b/fyrox-sound/examples/hrtf.rs similarity index 98% rename from rg3d-sound/examples/hrtf.rs rename to fyrox-sound/examples/hrtf.rs index 5f56f78ed..03a80a187 100644 --- a/rg3d-sound/examples/hrtf.rs +++ b/fyrox-sound/examples/hrtf.rs @@ -1,5 +1,5 @@ -use rg3d_core::algebra::Point3; -use rg3d_sound::{ +use fyrox_core::algebra::Point3; +use fyrox_sound::{ algebra::{UnitQuaternion, Vector3}, buffer::{DataSource, SoundBufferResource}, context::{self, SoundContext}, diff --git a/rg3d-sound/examples/listener.rs b/fyrox-sound/examples/listener.rs similarity index 98% rename from rg3d-sound/examples/listener.rs rename to fyrox-sound/examples/listener.rs index d8ce1afb7..5fb0fba1b 100644 --- a/rg3d-sound/examples/listener.rs +++ b/fyrox-sound/examples/listener.rs @@ -1,5 +1,5 @@ -use rg3d_core::algebra::Point3; -use rg3d_sound::{ +use fyrox_core::algebra::Point3; +use fyrox_sound::{ algebra::{UnitQuaternion, Vector3}, buffer::{DataSource, SoundBufferResource}, context::SoundContext, diff --git a/rg3d-sound/examples/play_sound.rs b/fyrox-sound/examples/play_sound.rs similarity index 90% rename from rg3d-sound/examples/play_sound.rs rename to fyrox-sound/examples/play_sound.rs index 5f442af79..d3774683a 100644 --- a/rg3d-sound/examples/play_sound.rs +++ b/fyrox-sound/examples/play_sound.rs @@ -1,5 +1,5 @@ -use rg3d_sound::engine::SoundEngine; -use rg3d_sound::{ +use fyrox_sound::engine::SoundEngine; +use fyrox_sound::{ buffer::{DataSource, SoundBufferResource}, context::SoundContext, pool::Handle, @@ -19,7 +19,7 @@ fn main() { // Load sound buffer. let door_open_buffer = SoundBufferResource::new_generic( - rg3d_sound::futures::executor::block_on(DataSource::from_file( + fyrox_sound::futures::executor::block_on(DataSource::from_file( "examples/data/door_open.wav", )) .unwrap(), diff --git a/rg3d-sound/examples/play_spatial_sound.rs b/fyrox-sound/examples/play_spatial_sound.rs similarity index 97% rename from rg3d-sound/examples/play_spatial_sound.rs rename to fyrox-sound/examples/play_spatial_sound.rs index 3d74061c0..9df57d196 100644 --- a/rg3d-sound/examples/play_spatial_sound.rs +++ b/fyrox-sound/examples/play_spatial_sound.rs @@ -1,5 +1,5 @@ -use rg3d_core::futures::executor::block_on; -use rg3d_sound::{ +use fyrox_core::futures::executor::block_on; +use fyrox_sound::{ algebra::{Point3, UnitQuaternion, Vector3}, buffer::{DataSource, SoundBufferResource}, context::SoundContext, diff --git a/rg3d-sound/examples/raw_samples.rs b/fyrox-sound/examples/raw_samples.rs similarity index 96% rename from rg3d-sound/examples/raw_samples.rs rename to fyrox-sound/examples/raw_samples.rs index bb010b6cd..1164c0229 100644 --- a/rg3d-sound/examples/raw_samples.rs +++ b/fyrox-sound/examples/raw_samples.rs @@ -1,5 +1,5 @@ -use rg3d_sound::engine::SoundEngine; -use rg3d_sound::{ +use fyrox_sound::engine::SoundEngine; +use fyrox_sound::{ buffer::{DataSource, SoundBufferResource}, context::SoundContext, source::{generic::GenericSourceBuilder, Status}, diff --git a/rg3d-sound/examples/raw_streaming.rs b/fyrox-sound/examples/raw_streaming.rs similarity index 98% rename from rg3d-sound/examples/raw_streaming.rs rename to fyrox-sound/examples/raw_streaming.rs index 5c92a5721..356948378 100644 --- a/rg3d-sound/examples/raw_streaming.rs +++ b/fyrox-sound/examples/raw_streaming.rs @@ -1,4 +1,4 @@ -use rg3d_sound::{ +use fyrox_sound::{ buffer::{DataSource, RawStreamingDataSource, SoundBufferResource}, context::SoundContext, engine::SoundEngine, diff --git a/rg3d-sound/examples/reverb.rs b/fyrox-sound/examples/reverb.rs similarity index 97% rename from rg3d-sound/examples/reverb.rs rename to fyrox-sound/examples/reverb.rs index 70521d51a..5805c0e00 100644 --- a/rg3d-sound/examples/reverb.rs +++ b/fyrox-sound/examples/reverb.rs @@ -1,6 +1,6 @@ -use rg3d_sound::engine::SoundEngine; -use rg3d_sound::futures::executor::block_on; -use rg3d_sound::{ +use fyrox_sound::engine::SoundEngine; +use fyrox_sound::futures::executor::block_on; +use fyrox_sound::{ algebra::{Point3, UnitQuaternion, Vector3}, buffer::{DataSource, SoundBufferResource}, context::{self, SoundContext}, diff --git a/rg3d-sound/examples/streaming.rs b/fyrox-sound/examples/streaming.rs similarity index 92% rename from rg3d-sound/examples/streaming.rs rename to fyrox-sound/examples/streaming.rs index d81688bf4..2c19c1d0e 100644 --- a/rg3d-sound/examples/streaming.rs +++ b/fyrox-sound/examples/streaming.rs @@ -1,6 +1,6 @@ -use rg3d_sound::engine::SoundEngine; -use rg3d_sound::futures::executor::block_on; -use rg3d_sound::{ +use fyrox_sound::engine::SoundEngine; +use fyrox_sound::futures::executor::block_on; +use fyrox_sound::{ buffer::{DataSource, SoundBufferResource}, context::SoundContext, pool::Handle, diff --git a/rg3d-sound/examples/write_wav.rs b/fyrox-sound/examples/write_wav.rs similarity index 88% rename from rg3d-sound/examples/write_wav.rs rename to fyrox-sound/examples/write_wav.rs index 6eb183974..2cdff9d9d 100644 --- a/rg3d-sound/examples/write_wav.rs +++ b/fyrox-sound/examples/write_wav.rs @@ -1,5 +1,5 @@ -use rg3d_sound::engine::SoundEngine; -use rg3d_sound::{ +use fyrox_sound::engine::SoundEngine; +use fyrox_sound::{ buffer::{DataSource, SoundBufferResource}, context::SoundContext, pool::Handle, @@ -18,7 +18,7 @@ fn main() { // Load sound buffer. let door_open_buffer = SoundBufferResource::new_generic( - rg3d_sound::futures::executor::block_on(DataSource::from_file( + fyrox_sound::futures::executor::block_on(DataSource::from_file( "examples/data/door_open.wav", )) .unwrap(), @@ -39,7 +39,7 @@ fn main() { // Create output wav file. The sample rate is currently fixed. let wav_spec = hound::WavSpec { channels: 2, - sample_rate: rg3d_sound::context::SAMPLE_RATE, + sample_rate: fyrox_sound::context::SAMPLE_RATE, bits_per_sample: 32, sample_format: hound::SampleFormat::Float, }; @@ -51,7 +51,7 @@ fn main() { let mut samples_written = 0; // Wait until sound will play completely. - while samples_written < 3 * rg3d_sound::context::SAMPLE_RATE { + while samples_written < 3 * fyrox_sound::context::SAMPLE_RATE { engine.lock().unwrap().render(&mut buf); for &(l, r) in buf.iter() { wav_writer.write_sample(l).unwrap(); diff --git a/rg3d-sound/src/buffer/generic.rs b/fyrox-sound/src/buffer/generic.rs similarity index 98% rename from rg3d-sound/src/buffer/generic.rs rename to fyrox-sound/src/buffer/generic.rs index db89dbcb0..408da1ab3 100644 --- a/rg3d-sound/src/buffer/generic.rs +++ b/fyrox-sound/src/buffer/generic.rs @@ -12,7 +12,7 @@ //! //! ```no_run //! use std::sync::{Mutex, Arc}; -//! use rg3d_sound::buffer::{SoundBufferResource, DataSource}; +//! use fyrox_sound::buffer::{SoundBufferResource, DataSource}; //! //! async fn make_buffer() -> SoundBufferResource { //! let data_source = DataSource::from_file("sound.wav").await.unwrap(); @@ -23,7 +23,7 @@ #![allow(clippy::manual_range_contains)] use crate::{buffer::DataSource, decoder::Decoder}; -use rg3d_core::visitor::{Visit, VisitResult, Visitor}; +use fyrox_core::visitor::{Visit, VisitResult, Visitor}; use std::path::Path; use std::{path::PathBuf, time::Duration}; diff --git a/rg3d-sound/src/buffer/mod.rs b/fyrox-sound/src/buffer/mod.rs similarity index 97% rename from rg3d-sound/src/buffer/mod.rs rename to fyrox-sound/src/buffer/mod.rs index 67b4d1d85..45a3acf0c 100644 --- a/rg3d-sound/src/buffer/mod.rs +++ b/fyrox-sound/src/buffer/mod.rs @@ -10,8 +10,8 @@ use crate::buffer::{generic::GenericBuffer, streaming::StreamingBuffer}; use crate::error::SoundError; -use rg3d_core::{io::FileLoadError, visitor::prelude::*}; -use rg3d_resource::{define_new_resource, Resource, ResourceData, ResourceState}; +use fyrox_core::{io::FileLoadError, visitor::prelude::*}; +use fyrox_resource::{define_new_resource, Resource, ResourceData, ResourceState}; use std::fmt::Debug; use std::time::Duration; use std::{ @@ -113,7 +113,7 @@ impl DataSource { }), #[cfg(target_arch = "wasm32")] - data: Cursor::new(rg3d_core::io::load_file(path).await?), + data: Cursor::new(fyrox_core::io::load_file(path).await?), }) } diff --git a/rg3d-sound/src/buffer/streaming.rs b/fyrox-sound/src/buffer/streaming.rs similarity index 98% rename from rg3d-sound/src/buffer/streaming.rs rename to fyrox-sound/src/buffer/streaming.rs index aa4f1084f..84890000d 100644 --- a/rg3d-sound/src/buffer/streaming.rs +++ b/fyrox-sound/src/buffer/streaming.rs @@ -13,7 +13,7 @@ //! //! ```no_run //! use std::sync::{Mutex, Arc}; -//! use rg3d_sound::buffer::{SoundBufferResource, DataSource}; +//! use fyrox_sound::buffer::{SoundBufferResource, DataSource}; //! //! async fn make_streaming_buffer() -> SoundBufferResource { //! let data_source = DataSource::from_file("some_long_sound.ogg").await.unwrap(); @@ -32,7 +32,7 @@ use crate::{ decoder::Decoder, error::SoundError, }; -use rg3d_core::visitor::{Visit, VisitResult, Visitor}; +use fyrox_core::visitor::{Visit, VisitResult, Visitor}; use std::ops::{Deref, DerefMut}; use std::time::Duration; diff --git a/rg3d-sound/src/context.rs b/fyrox-sound/src/context.rs similarity index 97% rename from rg3d-sound/src/context.rs rename to fyrox-sound/src/context.rs index f74560967..81abfccdf 100644 --- a/rg3d-sound/src/context.rs +++ b/fyrox-sound/src/context.rs @@ -3,7 +3,7 @@ //! # Overview //! //! Context is a sort of "sound scene" - an isolated storage for a set of sound sources, effects, filters, etc. -//! rg3d-sound can manage multiple contexts at the same time. Main usage for multiple contexts is a typical +//! fyrox-sound can manage multiple contexts at the same time. Main usage for multiple contexts is a typical //! situation in games where you have multiple scenes: a scene for main menu, a scene for game level, a scene //! for inventory and so on. With this approach of multiple contexts it is very easy to manage such scenes: //! for example your main menu have a complex scene with some sounds and you decide to load a game level - @@ -17,8 +17,8 @@ use crate::{ renderer::{render_source_default, Renderer}, source::{SoundSource, Status}, }; -use rg3d_core::visitor::VisitError; -use rg3d_core::{ +use fyrox_core::visitor::VisitError; +use fyrox_core::{ pool::{Handle, Pool}, visitor::{Visit, VisitResult, Visitor}, }; @@ -250,7 +250,7 @@ impl State { } pub(crate) fn render(&mut self, master_gain: f32, buf: &mut [(f32, f32)]) { - let last_time = rg3d_core::instant::Instant::now(); + let last_time = fyrox_core::instant::Instant::now(); if !self.paused { self.sources.retain(|source| { @@ -294,7 +294,7 @@ impl State { } } - self.render_duration = rg3d_core::instant::Instant::now() - last_time; + self.render_duration = fyrox_core::instant::Instant::now() - last_time; } } @@ -333,7 +333,7 @@ impl SoundContext { /// This method internally locks a mutex, so if you'll try to do something like this: /// /// ```no_run - /// # use rg3d_sound::context::SoundContext; + /// # use fyrox_sound::context::SoundContext; /// # let ctx = SoundContext::new(); /// let state = ctx.state(); /// // Do something diff --git a/rg3d-sound/src/decoder/mod.rs b/fyrox-sound/src/decoder/mod.rs similarity index 100% rename from rg3d-sound/src/decoder/mod.rs rename to fyrox-sound/src/decoder/mod.rs diff --git a/rg3d-sound/src/decoder/vorbis.rs b/fyrox-sound/src/decoder/vorbis.rs similarity index 100% rename from rg3d-sound/src/decoder/vorbis.rs rename to fyrox-sound/src/decoder/vorbis.rs diff --git a/rg3d-sound/src/decoder/wav.rs b/fyrox-sound/src/decoder/wav.rs similarity index 100% rename from rg3d-sound/src/decoder/wav.rs rename to fyrox-sound/src/decoder/wav.rs diff --git a/rg3d-sound/src/device/alsa.rs b/fyrox-sound/src/device/alsa.rs similarity index 100% rename from rg3d-sound/src/device/alsa.rs rename to fyrox-sound/src/device/alsa.rs diff --git a/rg3d-sound/src/device/coreaudio.rs b/fyrox-sound/src/device/coreaudio.rs similarity index 100% rename from rg3d-sound/src/device/coreaudio.rs rename to fyrox-sound/src/device/coreaudio.rs diff --git a/rg3d-sound/src/device/dsound.rs b/fyrox-sound/src/device/dsound.rs similarity index 100% rename from rg3d-sound/src/device/dsound.rs rename to fyrox-sound/src/device/dsound.rs diff --git a/rg3d-sound/src/device/dummy.rs b/fyrox-sound/src/device/dummy.rs similarity index 100% rename from rg3d-sound/src/device/dummy.rs rename to fyrox-sound/src/device/dummy.rs diff --git a/rg3d-sound/src/device/mod.rs b/fyrox-sound/src/device/mod.rs similarity index 100% rename from rg3d-sound/src/device/mod.rs rename to fyrox-sound/src/device/mod.rs diff --git a/rg3d-sound/src/device/web.rs b/fyrox-sound/src/device/web.rs similarity index 98% rename from rg3d-sound/src/device/web.rs rename to fyrox-sound/src/device/web.rs index c6d601100..cb56cc8df 100644 --- a/rg3d-sound/src/device/web.rs +++ b/fyrox-sound/src/device/web.rs @@ -2,7 +2,7 @@ use crate::{ context::SAMPLE_RATE, device::{Device, MixContext, NativeSample}, }; -use rg3d_core::{ +use fyrox_core::{ parking_lot::{Mutex, RwLock}, wasm_bindgen::{prelude::*, JsCast}, web_sys::{AudioContext, AudioContextOptions}, @@ -117,7 +117,7 @@ impl Device for WebAudioDevice { } fn run(&mut self) { - let window = rg3d_core::web_sys::window().unwrap(); + let window = fyrox_core::web_sys::window().unwrap(); let mut offset_ms = 0; let time_step_ms = (self.buffer_duration_secs * 1_000.0) as i32; for on_ended_closure in self.onended.iter() { diff --git a/rg3d-sound/src/dsp/filters.rs b/fyrox-sound/src/dsp/filters.rs similarity index 99% rename from rg3d-sound/src/dsp/filters.rs rename to fyrox-sound/src/dsp/filters.rs index 35fa299c9..63d610069 100644 --- a/rg3d-sound/src/dsp/filters.rs +++ b/fyrox-sound/src/dsp/filters.rs @@ -7,7 +7,7 @@ //! description of each filter. There is no need to describe them all here. use crate::dsp::DelayLine; -use rg3d_core::visitor::{Visit, VisitResult, Visitor}; +use fyrox_core::visitor::{Visit, VisitResult, Visitor}; /// One-pole Filter. /// For details see - diff --git a/rg3d-sound/src/dsp/mod.rs b/fyrox-sound/src/dsp/mod.rs similarity index 97% rename from rg3d-sound/src/dsp/mod.rs rename to fyrox-sound/src/dsp/mod.rs index 8f10c86ed..1d6215134 100644 --- a/rg3d-sound/src/dsp/mod.rs +++ b/fyrox-sound/src/dsp/mod.rs @@ -8,7 +8,7 @@ //! //! `fc` - normalized frequency, i.e. `fc = 0.2` with `sample rate = 44100 Hz` will be `f = 8820 Hz` -use rg3d_core::visitor::{Visit, VisitResult, Visitor}; +use fyrox_core::visitor::{Visit, VisitResult, Visitor}; pub mod filters; diff --git a/rg3d-sound/src/effects/mod.rs b/fyrox-sound/src/effects/mod.rs similarity index 99% rename from rg3d-sound/src/effects/mod.rs rename to fyrox-sound/src/effects/mod.rs index 3f325f0bf..c9f3adb97 100644 --- a/rg3d-sound/src/effects/mod.rs +++ b/fyrox-sound/src/effects/mod.rs @@ -11,7 +11,7 @@ use crate::{ listener::Listener, source::{SoundSource, Status}, }; -use rg3d_core::{ +use fyrox_core::{ math, pool::{Handle, Pool}, visitor::{Visit, VisitResult, Visitor}, diff --git a/rg3d-sound/src/effects/reverb.rs b/fyrox-sound/src/effects/reverb.rs similarity index 98% rename from rg3d-sound/src/effects/reverb.rs rename to fyrox-sound/src/effects/reverb.rs index 9438354bc..3c418e541 100644 --- a/rg3d-sound/src/effects/reverb.rs +++ b/fyrox-sound/src/effects/reverb.rs @@ -9,9 +9,9 @@ //! //! ``` //! use std::time::Duration; -//! use rg3d_sound::context::SoundContext; -//! use rg3d_sound::effects::reverb::Reverb; -//! use rg3d_sound::effects::{Effect, BaseEffect}; +//! use fyrox_sound::context::SoundContext; +//! use fyrox_sound::effects::reverb::Reverb; +//! use fyrox_sound::effects::{Effect, BaseEffect}; //! //! fn set_reverberator(context: &mut SoundContext) { //! let mut reverb = Reverb::new(BaseEffect::default()); @@ -32,7 +32,7 @@ use crate::{ listener::Listener, source::SoundSource, }; -use rg3d_core::{ +use fyrox_core::{ pool::Pool, visitor::{Visit, VisitResult, Visitor}, }; diff --git a/rg3d-sound/src/engine.rs b/fyrox-sound/src/engine.rs similarity index 98% rename from rg3d-sound/src/engine.rs rename to fyrox-sound/src/engine.rs index d97465d2f..b71850f81 100644 --- a/rg3d-sound/src/engine.rs +++ b/fyrox-sound/src/engine.rs @@ -5,7 +5,7 @@ //! Sound engine manages contexts, feeds output device with data. use crate::{context::SoundContext, device}; -use rg3d_core::visitor::{Visit, VisitResult, Visitor}; +use fyrox_core::visitor::{Visit, VisitResult, Visitor}; use std::sync::{Arc, Mutex}; /// Internal state of sound engine. diff --git a/rg3d-sound/src/error.rs b/fyrox-sound/src/error.rs similarity index 100% rename from rg3d-sound/src/error.rs rename to fyrox-sound/src/error.rs diff --git a/rg3d-sound/src/lib.rs b/fyrox-sound/src/lib.rs similarity index 84% rename from rg3d-sound/src/lib.rs rename to fyrox-sound/src/lib.rs index c27c8f317..ddcdf3d29 100644 --- a/rg3d-sound/src/lib.rs +++ b/fyrox-sound/src/lib.rs @@ -10,14 +10,14 @@ //! //! ## Examples //! -//! Here is an example of how to play a sound using rg3d-sound: +//! Here is an example of how to play a sound using fyrox-sound: //! //! ```no_run //! use std::{ //! thread, //! time::Duration //! }; -//! use rg3d_sound::{ +//! use fyrox_sound::{ //! source::{ //! generic::GenericSourceBuilder, //! SoundSource, @@ -32,7 +32,7 @@ //! //! let context = SoundContext::new(); //! -//! let sound_buffer = SoundBufferResource::new_generic(rg3d_sound::futures::executor::block_on(DataSource::from_file("sound.wav")).unwrap()).unwrap(); +//! let sound_buffer = SoundBufferResource::new_generic(fyrox_sound::futures::executor::block_on(DataSource::from_file("sound.wav")).unwrap()).unwrap(); //! //! let source = GenericSourceBuilder::new() //! .with_buffer(sound_buffer) @@ -78,11 +78,11 @@ pub mod renderer; pub mod source; // Reexport some modules because there some types of them in public API. +pub use fyrox_core::algebra; +pub use fyrox_core::futures; +pub use fyrox_core::math; +pub use fyrox_core::pool; pub use hrtf; -pub use rg3d_core::algebra; -pub use rg3d_core::futures; -pub use rg3d_core::math; -pub use rg3d_core::pool; mod decoder; mod device; diff --git a/rg3d-sound/src/listener.rs b/fyrox-sound/src/listener.rs similarity index 91% rename from rg3d-sound/src/listener.rs rename to fyrox-sound/src/listener.rs index 1f1abd1ab..c8e6bf586 100644 --- a/rg3d-sound/src/listener.rs +++ b/fyrox-sound/src/listener.rs @@ -5,9 +5,9 @@ //! Engine has only one listener which can be positioned and oriented in space. Listener defined as coordinate //! system which is used to compute spatial properties of sound sources. -use rg3d_core::algebra::{Matrix3, Vector3}; -use rg3d_core::math::Matrix3Ext; -use rg3d_core::visitor::{Visit, VisitResult, Visitor}; +use fyrox_core::algebra::{Matrix3, Vector3}; +use fyrox_core::math::Matrix3Ext; +use fyrox_core::visitor::{Visit, VisitResult, Visitor}; /// See module docs. #[derive(Debug, Clone)] @@ -55,9 +55,9 @@ impl Listener { /// Basis must have mutually perpendicular axes. /// /// ``` - /// use rg3d_sound::listener::Listener; - /// use rg3d_sound::algebra::{Matrix3, UnitQuaternion, Vector3}; - /// use rg3d_sound::math::{Matrix4Ext}; + /// use fyrox_sound::listener::Listener; + /// use fyrox_sound::algebra::{Matrix3, UnitQuaternion, Vector3}; + /// use fyrox_sound::math::{Matrix4Ext}; /// /// fn orient_listener(listener: &mut Listener) { /// let basis = UnitQuaternion::from_axis_angle(&Vector3::y_axis(), 45.0f32.to_radians()).to_homogeneous().basis(); diff --git a/rg3d-sound/src/renderer/hrtf.rs b/fyrox-sound/src/renderer/hrtf.rs similarity index 96% rename from rg3d-sound/src/renderer/hrtf.rs rename to fyrox-sound/src/renderer/hrtf.rs index 02b31db34..ec75d3da9 100644 --- a/rg3d-sound/src/renderer/hrtf.rs +++ b/fyrox-sound/src/renderer/hrtf.rs @@ -19,9 +19,9 @@ //! To use HRTF you need to change default renderer to HRTF renderer like so: //! //! ```no_run -//! use rg3d_sound::context::{self, SoundContext}; -//! use rg3d_sound::renderer::hrtf::{HrtfRenderer}; -//! use rg3d_sound::renderer::Renderer; +//! use fyrox_sound::context::{self, SoundContext}; +//! use fyrox_sound::renderer::hrtf::{HrtfRenderer}; +//! use fyrox_sound::renderer::Renderer; //! use std::path::Path; //! use hrtf::HrirSphere; //! @@ -58,8 +58,8 @@ use crate::{ renderer::render_source_default, source::SoundSource, }; +use fyrox_core::visitor::{Visit, VisitResult, Visitor}; use hrtf::HrirSphere; -use rg3d_core::visitor::{Visit, VisitResult, Visitor}; use std::fmt::Debug; /// See module docs. diff --git a/rg3d-sound/src/renderer/mod.rs b/fyrox-sound/src/renderer/mod.rs similarity index 98% rename from rg3d-sound/src/renderer/mod.rs rename to fyrox-sound/src/renderer/mod.rs index 50e1f15a3..02c922af0 100644 --- a/rg3d-sound/src/renderer/mod.rs +++ b/fyrox-sound/src/renderer/mod.rs @@ -14,7 +14,7 @@ use crate::{ renderer::hrtf::HrtfRenderer, source::{generic::GenericSource, SoundSource}, }; -use rg3d_core::visitor::{Visit, VisitResult, Visitor}; +use fyrox_core::visitor::{Visit, VisitResult, Visitor}; pub mod hrtf; diff --git a/rg3d-sound/src/source/generic.rs b/fyrox-sound/src/source/generic.rs similarity index 98% rename from rg3d-sound/src/source/generic.rs rename to fyrox-sound/src/source/generic.rs index b40b41e4c..3a76433b6 100644 --- a/rg3d-sound/src/source/generic.rs +++ b/fyrox-sound/src/source/generic.rs @@ -11,11 +11,11 @@ //! //! ```no_run //! use std::sync::{Arc, Mutex}; -//! use rg3d_sound::buffer::SoundBufferResource; -//! use rg3d_sound::pool::Handle; -//! use rg3d_sound::source::{SoundSource, Status}; -//! use rg3d_sound::source::generic::GenericSourceBuilder; -//! use rg3d_sound::context::SoundContext; +//! use fyrox_sound::buffer::SoundBufferResource; +//! use fyrox_sound::pool::Handle; +//! use fyrox_sound::source::{SoundSource, Status}; +//! use fyrox_sound::source::generic::GenericSourceBuilder; +//! use fyrox_sound::context::SoundContext; //! //! fn make_source(context: &mut SoundContext, buffer: SoundBufferResource) -> Handle { //! let source = GenericSourceBuilder::new() @@ -35,11 +35,11 @@ use crate::{ error::SoundError, source::{SoundSource, Status}, }; -use rg3d_core::{ +use fyrox_core::{ inspect::{Inspect, PropertyInfo}, visitor::{Visit, VisitResult, Visitor}, }; -use rg3d_resource::ResourceState; +use fyrox_resource::ResourceState; use std::time::Duration; /// See module info. @@ -537,9 +537,9 @@ impl Visit for GenericSource { /// /// ```no_run /// use std::sync::{Arc, Mutex}; -/// use rg3d_sound::buffer::SoundBufferResource; -/// use rg3d_sound::source::generic::{GenericSource, GenericSourceBuilder}; -/// use rg3d_sound::source::{Status, SoundSource}; +/// use fyrox_sound::buffer::SoundBufferResource; +/// use fyrox_sound::source::generic::{GenericSource, GenericSourceBuilder}; +/// use fyrox_sound::source::{Status, SoundSource}; /// /// fn make_generic_source(buffer: SoundBufferResource) -> GenericSource { /// GenericSourceBuilder::new() diff --git a/rg3d-sound/src/source/mod.rs b/fyrox-sound/src/source/mod.rs similarity index 97% rename from rg3d-sound/src/source/mod.rs rename to fyrox-sound/src/source/mod.rs index dd0b1a590..83f08819d 100644 --- a/rg3d-sound/src/source/mod.rs +++ b/fyrox-sound/src/source/mod.rs @@ -7,8 +7,8 @@ //! spatial). See docs at those modules for more info. use crate::source::{generic::GenericSource, spatial::SpatialSource}; -use rg3d_core::inspect::{Inspect, PropertyInfo}; -use rg3d_core::visitor::{Visit, VisitError, VisitResult, Visitor}; +use fyrox_core::inspect::{Inspect, PropertyInfo}; +use fyrox_core::visitor::{Visit, VisitError, VisitResult, Visitor}; use std::ops::{Deref, DerefMut}; pub mod generic; diff --git a/rg3d-sound/src/source/spatial.rs b/fyrox-sound/src/source/spatial.rs similarity index 96% rename from rg3d-sound/src/source/spatial.rs rename to fyrox-sound/src/source/spatial.rs index 04a7c65b9..83c478f11 100644 --- a/rg3d-sound/src/source/spatial.rs +++ b/fyrox-sound/src/source/spatial.rs @@ -9,12 +9,12 @@ //! //! ```no_run //! use std::sync::{Arc, Mutex}; -//! use rg3d_sound::buffer::SoundBufferResource; -//! use rg3d_sound::pool::Handle; -//! use rg3d_sound::source::{SoundSource, Status}; -//! use rg3d_sound::source::generic::GenericSourceBuilder; -//! use rg3d_sound::context::SoundContext; -//! use rg3d_sound::source::spatial::SpatialSourceBuilder; +//! use fyrox_sound::buffer::SoundBufferResource; +//! use fyrox_sound::pool::Handle; +//! use fyrox_sound::source::{SoundSource, Status}; +//! use fyrox_sound::source::generic::GenericSourceBuilder; +//! use fyrox_sound::context::SoundContext; +//! use fyrox_sound::source::spatial::SpatialSourceBuilder; //! //! fn make_source(context: &mut SoundContext, buffer: SoundBufferResource) -> Handle { //! let source = SpatialSourceBuilder::new(GenericSourceBuilder::new() @@ -32,7 +32,7 @@ use crate::{ listener::Listener, source::{generic::GenericSource, SoundSource}, }; -use rg3d_core::{ +use fyrox_core::{ algebra::Vector3, inspect::{Inspect, PropertyInfo}, visitor::{Visit, VisitResult, Visitor}, diff --git a/rg3d-ui/Cargo.toml b/fyrox-ui/Cargo.toml similarity index 79% rename from rg3d-ui/Cargo.toml rename to fyrox-ui/Cargo.toml index 8e9746464..05eb84dae 100644 --- a/rg3d-ui/Cargo.toml +++ b/fyrox-ui/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rg3d-ui" +name = "fyrox-ui" version = "0.15.0" authors = ["Dmitry Stepanov "] edition = "2021" @@ -9,14 +9,14 @@ keywords = ["ui", "game", "gui"] categories = ["game-development", "gui"] include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"] homepage = "https://rg3d.rs" -documentation = "https://docs.rs/rg3d-ui" +documentation = "https://docs.rs/fyrox-ui" repository = "https://github.com/mrDIMAS/rg3d" readme = "README.md" resolver = "2" rust-version = "1.56" [dependencies] -rg3d-core = { path = "../rg3d-core", version = "0.19.0" } +fyrox-core = { path = "../fyrox-core", version = "0.19.0" } lazy_static = "1.4.0" copypasta = "0.7.1" fontdue = "0.6.2" @@ -26,7 +26,7 @@ strum = "0.23.0" strum_macros = "0.23.1" [features] -enable_profiler = ["rg3d-core/enable_profiler"] +enable_profiler = ["fyrox-core/enable_profiler"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies] sysinfo = "0.20.0" diff --git a/rg3d-ui/LICENSE b/fyrox-ui/LICENSE similarity index 100% rename from rg3d-ui/LICENSE rename to fyrox-ui/LICENSE diff --git a/rg3d-ui/README.md b/fyrox-ui/README.md similarity index 63% rename from rg3d-ui/README.md rename to fyrox-ui/README.md index 41af3e48e..f7e45d42b 100644 --- a/rg3d-ui/README.md +++ b/fyrox-ui/README.md @@ -1,8 +1,8 @@ -# rg3d-ui +# fyrox-ui Retained mode, general purpose, graphics API agnostic user interface library. Inspired by WPF. -**NOTE:** even though this crate has `rg3d` prefix in its name, it can be used separately without any issues. +**NOTE:** even though this crate has `fyrox` prefix in its name, it can be used separately without any issues. ## Features @@ -57,12 +57,12 @@ Retained mode, general purpose, graphics API agnostic user interface library. In ## Performance -- In general rg3d-ui is fast, however it can be slow if used incorrectly. Since this library uses a very complex layout system, it may work slow if there are lots of ui elements being moved (i.e. when scrolling). Hopefully it has built-in layout caching system, and it relies on layout invalidation, so it won't do layout calculations each frame - only if something significant changed (position, size, etc.). +- In general fyrox-ui is fast, however it can be slow if used incorrectly. Since this library uses a very complex layout system, it may work slow if there are lots of ui elements being moved (i.e. when scrolling). Hopefully it has built-in layout caching system, and it relies on layout invalidation, so it won't do layout calculations each frame - only if something significant changed (position, size, etc.). - Batching of render commands can be difficult, because this library extensively uses clipping, and each clipping geometry has to be drawn into the stencil buffer as separate draw call. Rendering still has to be optimized, it is inefficient for now. ## Styling -rg3d-ui uses a bit unusual way of styling - you have to replace entire sub-graphs of widget's visual trees. What does that mean? rg3d-ui uses graph to build visual trees of any complexity, each widget is a set of nodes in the graph. For example a button is a set of background and foreground widgets, background widget usually defines appearance and foreground shows a content. Content of a button can be any widget, in most common cases it is either a text or an image. So to change appearance of a button you have to define your own background widget at the building stage, by default rg3d-ui uses Decorator widget which just changes its foreground brush when it receives MouseEnter, MouseLeave, etc. message. This fact significantly complicates **minor** styling (like change a color), but it is super flexible approach and allows to build your own unique style. Most of widget builders provides a way to change its parts, some of them still may lack such functionality, but this should eventually be fixed. +fyrox-ui uses a bit unusual way of styling - you have to replace entire sub-graphs of widget's visual trees. What does that mean? fyrox-ui uses graph to build visual trees of any complexity, each widget is a set of nodes in the graph. For example a button is a set of background and foreground widgets, background widget usually defines appearance and foreground shows a content. Content of a button can be any widget, in most common cases it is either a text or an image. So to change appearance of a button you have to define your own background widget at the building stage, by default fyrox-ui uses Decorator widget which just changes its foreground brush when it receives MouseEnter, MouseLeave, etc. message. This fact significantly complicates **minor** styling (like change a color), but it is super flexible approach and allows to build your own unique style. Most of widget builders provides a way to change its parts, some of them still may lack such functionality, but this should eventually be fixed. ## Screenshots diff --git a/rg3d-ui/src/border.rs b/fyrox-ui/src/border.rs similarity index 100% rename from rg3d-ui/src/border.rs rename to fyrox-ui/src/border.rs diff --git a/rg3d-ui/src/brush.rs b/fyrox-ui/src/brush.rs similarity index 100% rename from rg3d-ui/src/brush.rs rename to fyrox-ui/src/brush.rs diff --git a/rg3d-ui/src/built_in_font.ttf b/fyrox-ui/src/built_in_font.ttf similarity index 100% rename from rg3d-ui/src/built_in_font.ttf rename to fyrox-ui/src/built_in_font.ttf diff --git a/rg3d-ui/src/button.rs b/fyrox-ui/src/button.rs similarity index 100% rename from rg3d-ui/src/button.rs rename to fyrox-ui/src/button.rs diff --git a/rg3d-ui/src/canvas.rs b/fyrox-ui/src/canvas.rs similarity index 100% rename from rg3d-ui/src/canvas.rs rename to fyrox-ui/src/canvas.rs diff --git a/rg3d-ui/src/check_box.rs b/fyrox-ui/src/check_box.rs similarity index 99% rename from rg3d-ui/src/check_box.rs rename to fyrox-ui/src/check_box.rs index 88c1c5fb9..6b294474b 100644 --- a/rg3d-ui/src/check_box.rs +++ b/fyrox-ui/src/check_box.rs @@ -10,7 +10,7 @@ use crate::{ BuildContext, Control, HorizontalAlignment, NodeHandleMapping, Thickness, UiNode, UserInterface, VerticalAlignment, BRUSH_BRIGHT, BRUSH_DARK, BRUSH_LIGHT, BRUSH_TEXT, }; -use rg3d_core::algebra::Vector2; +use fyrox_core::algebra::Vector2; use std::{ any::{Any, TypeId}, ops::{Deref, DerefMut}, diff --git a/rg3d-ui/src/color.rs b/fyrox-ui/src/color.rs similarity index 100% rename from rg3d-ui/src/color.rs rename to fyrox-ui/src/color.rs diff --git a/rg3d-ui/src/curve/key.rs b/fyrox-ui/src/curve/key.rs similarity index 100% rename from rg3d-ui/src/curve/key.rs rename to fyrox-ui/src/curve/key.rs diff --git a/rg3d-ui/src/curve/mod.rs b/fyrox-ui/src/curve/mod.rs similarity index 100% rename from rg3d-ui/src/curve/mod.rs rename to fyrox-ui/src/curve/mod.rs diff --git a/rg3d-ui/src/decorator.rs b/fyrox-ui/src/decorator.rs similarity index 100% rename from rg3d-ui/src/decorator.rs rename to fyrox-ui/src/decorator.rs diff --git a/rg3d-ui/src/dock.rs b/fyrox-ui/src/dock.rs similarity index 100% rename from rg3d-ui/src/dock.rs rename to fyrox-ui/src/dock.rs diff --git a/rg3d-ui/src/draw.rs b/fyrox-ui/src/draw.rs similarity index 100% rename from rg3d-ui/src/draw.rs rename to fyrox-ui/src/draw.rs diff --git a/rg3d-ui/src/dropdown_list.rs b/fyrox-ui/src/dropdown_list.rs similarity index 100% rename from rg3d-ui/src/dropdown_list.rs rename to fyrox-ui/src/dropdown_list.rs diff --git a/rg3d-ui/src/expander.rs b/fyrox-ui/src/expander.rs similarity index 100% rename from rg3d-ui/src/expander.rs rename to fyrox-ui/src/expander.rs diff --git a/rg3d-ui/src/file_browser.rs b/fyrox-ui/src/file_browser.rs similarity index 100% rename from rg3d-ui/src/file_browser.rs rename to fyrox-ui/src/file_browser.rs diff --git a/rg3d-ui/src/formatted_text.rs b/fyrox-ui/src/formatted_text.rs similarity index 100% rename from rg3d-ui/src/formatted_text.rs rename to fyrox-ui/src/formatted_text.rs diff --git a/rg3d-ui/src/grid.rs b/fyrox-ui/src/grid.rs similarity index 100% rename from rg3d-ui/src/grid.rs rename to fyrox-ui/src/grid.rs diff --git a/rg3d-ui/src/image.rs b/fyrox-ui/src/image.rs similarity index 100% rename from rg3d-ui/src/image.rs rename to fyrox-ui/src/image.rs diff --git a/rg3d-ui/src/inspector/editors/array.rs b/fyrox-ui/src/inspector/editors/array.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/array.rs rename to fyrox-ui/src/inspector/editors/array.rs diff --git a/rg3d-ui/src/inspector/editors/bool.rs b/fyrox-ui/src/inspector/editors/bool.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/bool.rs rename to fyrox-ui/src/inspector/editors/bool.rs diff --git a/rg3d-ui/src/inspector/editors/collection.rs b/fyrox-ui/src/inspector/editors/collection.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/collection.rs rename to fyrox-ui/src/inspector/editors/collection.rs diff --git a/rg3d-ui/src/inspector/editors/color.rs b/fyrox-ui/src/inspector/editors/color.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/color.rs rename to fyrox-ui/src/inspector/editors/color.rs diff --git a/rg3d-ui/src/inspector/editors/enumeration.rs b/fyrox-ui/src/inspector/editors/enumeration.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/enumeration.rs rename to fyrox-ui/src/inspector/editors/enumeration.rs diff --git a/rg3d-ui/src/inspector/editors/inspectable.rs b/fyrox-ui/src/inspector/editors/inspectable.rs similarity index 99% rename from rg3d-ui/src/inspector/editors/inspectable.rs rename to fyrox-ui/src/inspector/editors/inspectable.rs index e088533f2..5564af4ec 100644 --- a/rg3d-ui/src/inspector/editors/inspectable.rs +++ b/fyrox-ui/src/inspector/editors/inspectable.rs @@ -11,7 +11,7 @@ use crate::{ message::{MessageDirection, UiMessage}, widget::WidgetBuilder, }; -use rg3d_core::pool::Handle; +use fyrox_core::pool::Handle; use std::{ any::TypeId, fmt::{Debug, Formatter}, diff --git a/rg3d-ui/src/inspector/editors/mod.rs b/fyrox-ui/src/inspector/editors/mod.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/mod.rs rename to fyrox-ui/src/inspector/editors/mod.rs diff --git a/rg3d-ui/src/inspector/editors/numeric.rs b/fyrox-ui/src/inspector/editors/numeric.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/numeric.rs rename to fyrox-ui/src/inspector/editors/numeric.rs diff --git a/rg3d-ui/src/inspector/editors/quat.rs b/fyrox-ui/src/inspector/editors/quat.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/quat.rs rename to fyrox-ui/src/inspector/editors/quat.rs diff --git a/rg3d-ui/src/inspector/editors/range.rs b/fyrox-ui/src/inspector/editors/range.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/range.rs rename to fyrox-ui/src/inspector/editors/range.rs diff --git a/rg3d-ui/src/inspector/editors/rect.rs b/fyrox-ui/src/inspector/editors/rect.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/rect.rs rename to fyrox-ui/src/inspector/editors/rect.rs diff --git a/rg3d-ui/src/inspector/editors/string.rs b/fyrox-ui/src/inspector/editors/string.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/string.rs rename to fyrox-ui/src/inspector/editors/string.rs diff --git a/rg3d-ui/src/inspector/editors/vec.rs b/fyrox-ui/src/inspector/editors/vec.rs similarity index 100% rename from rg3d-ui/src/inspector/editors/vec.rs rename to fyrox-ui/src/inspector/editors/vec.rs diff --git a/rg3d-ui/src/inspector/mod.rs b/fyrox-ui/src/inspector/mod.rs similarity index 100% rename from rg3d-ui/src/inspector/mod.rs rename to fyrox-ui/src/inspector/mod.rs diff --git a/rg3d-ui/src/lib.rs b/fyrox-ui/src/lib.rs similarity index 99% rename from rg3d-ui/src/lib.rs rename to fyrox-ui/src/lib.rs index f9fc45b74..0f5bf9105 100644 --- a/rg3d-ui/src/lib.rs +++ b/fyrox-ui/src/lib.rs @@ -12,7 +12,7 @@ #[macro_use] extern crate lazy_static; -pub use rg3d_core as core; +pub use fyrox_core as core; pub mod border; pub mod brush; diff --git a/rg3d-ui/src/list_view.rs b/fyrox-ui/src/list_view.rs similarity index 100% rename from rg3d-ui/src/list_view.rs rename to fyrox-ui/src/list_view.rs diff --git a/rg3d-ui/src/menu.rs b/fyrox-ui/src/menu.rs similarity index 100% rename from rg3d-ui/src/menu.rs rename to fyrox-ui/src/menu.rs diff --git a/rg3d-ui/src/message.rs b/fyrox-ui/src/message.rs similarity index 100% rename from rg3d-ui/src/message.rs rename to fyrox-ui/src/message.rs diff --git a/rg3d-ui/src/messagebox.rs b/fyrox-ui/src/messagebox.rs similarity index 100% rename from rg3d-ui/src/messagebox.rs rename to fyrox-ui/src/messagebox.rs diff --git a/rg3d-ui/src/numeric.rs b/fyrox-ui/src/numeric.rs similarity index 100% rename from rg3d-ui/src/numeric.rs rename to fyrox-ui/src/numeric.rs diff --git a/rg3d-ui/src/popup.rs b/fyrox-ui/src/popup.rs similarity index 100% rename from rg3d-ui/src/popup.rs rename to fyrox-ui/src/popup.rs diff --git a/rg3d-ui/src/progress_bar.rs b/fyrox-ui/src/progress_bar.rs similarity index 100% rename from rg3d-ui/src/progress_bar.rs rename to fyrox-ui/src/progress_bar.rs diff --git a/rg3d-ui/src/range.rs b/fyrox-ui/src/range.rs similarity index 100% rename from rg3d-ui/src/range.rs rename to fyrox-ui/src/range.rs diff --git a/rg3d-ui/src/rect.rs b/fyrox-ui/src/rect.rs similarity index 100% rename from rg3d-ui/src/rect.rs rename to fyrox-ui/src/rect.rs diff --git a/rg3d-ui/src/scroll_bar.rs b/fyrox-ui/src/scroll_bar.rs similarity index 100% rename from rg3d-ui/src/scroll_bar.rs rename to fyrox-ui/src/scroll_bar.rs diff --git a/rg3d-ui/src/scroll_panel.rs b/fyrox-ui/src/scroll_panel.rs similarity index 100% rename from rg3d-ui/src/scroll_panel.rs rename to fyrox-ui/src/scroll_panel.rs diff --git a/rg3d-ui/src/scroll_viewer.rs b/fyrox-ui/src/scroll_viewer.rs similarity index 100% rename from rg3d-ui/src/scroll_viewer.rs rename to fyrox-ui/src/scroll_viewer.rs diff --git a/rg3d-ui/src/stack_panel.rs b/fyrox-ui/src/stack_panel.rs similarity index 100% rename from rg3d-ui/src/stack_panel.rs rename to fyrox-ui/src/stack_panel.rs diff --git a/rg3d-ui/src/tab_control.rs b/fyrox-ui/src/tab_control.rs similarity index 100% rename from rg3d-ui/src/tab_control.rs rename to fyrox-ui/src/tab_control.rs diff --git a/rg3d-ui/src/text.rs b/fyrox-ui/src/text.rs similarity index 100% rename from rg3d-ui/src/text.rs rename to fyrox-ui/src/text.rs diff --git a/rg3d-ui/src/text_box.rs b/fyrox-ui/src/text_box.rs similarity index 100% rename from rg3d-ui/src/text_box.rs rename to fyrox-ui/src/text_box.rs diff --git a/rg3d-ui/src/tree.rs b/fyrox-ui/src/tree.rs similarity index 100% rename from rg3d-ui/src/tree.rs rename to fyrox-ui/src/tree.rs diff --git a/rg3d-ui/src/ttf.rs b/fyrox-ui/src/ttf.rs similarity index 100% rename from rg3d-ui/src/ttf.rs rename to fyrox-ui/src/ttf.rs diff --git a/rg3d-ui/src/utils.rs b/fyrox-ui/src/utils.rs similarity index 98% rename from rg3d-ui/src/utils.rs rename to fyrox-ui/src/utils.rs index 062141907..28a24afd1 100644 --- a/rg3d-ui/src/utils.rs +++ b/fyrox-ui/src/utils.rs @@ -7,7 +7,7 @@ use crate::{ widget::WidgetBuilder, Brush, BuildContext, HorizontalAlignment, UiNode, VerticalAlignment, BRUSH_BRIGHT, }; -use rg3d_core::color::Color; +use fyrox_core::color::Color; pub enum ArrowDirection { Top, diff --git a/rg3d-ui/src/vec/mod.rs b/fyrox-ui/src/vec/mod.rs similarity index 100% rename from rg3d-ui/src/vec/mod.rs rename to fyrox-ui/src/vec/mod.rs diff --git a/rg3d-ui/src/vec/vec2.rs b/fyrox-ui/src/vec/vec2.rs similarity index 100% rename from rg3d-ui/src/vec/vec2.rs rename to fyrox-ui/src/vec/vec2.rs diff --git a/rg3d-ui/src/vec/vec3.rs b/fyrox-ui/src/vec/vec3.rs similarity index 100% rename from rg3d-ui/src/vec/vec3.rs rename to fyrox-ui/src/vec/vec3.rs diff --git a/rg3d-ui/src/vec/vec4.rs b/fyrox-ui/src/vec/vec4.rs similarity index 100% rename from rg3d-ui/src/vec/vec4.rs rename to fyrox-ui/src/vec/vec4.rs diff --git a/rg3d-ui/src/vector_image.rs b/fyrox-ui/src/vector_image.rs similarity index 100% rename from rg3d-ui/src/vector_image.rs rename to fyrox-ui/src/vector_image.rs diff --git a/rg3d-ui/src/widget.rs b/fyrox-ui/src/widget.rs similarity index 99% rename from rg3d-ui/src/widget.rs rename to fyrox-ui/src/widget.rs index 7c0ac0481..2ead1c24d 100644 --- a/rg3d-ui/src/widget.rs +++ b/fyrox-ui/src/widget.rs @@ -151,13 +151,13 @@ pub enum WidgetMessage { Name(String), /// A request to set width of a widget. In most cases there is no need to explicitly set width of a widget, - /// because rg3d-ui uses automatic layout engine which will correctly calculate desired width of a widget. + /// because fyrox-ui uses automatic layout engine which will correctly calculate desired width of a widget. /// /// Direction: **From/To UI** Width(f32), /// A request to set height of a widget. In most cases there is no need to explicitly set height of a widget, - /// because rg3d-ui uses automatic layout engine which will correctly calculate desired height of a widget. + /// because fyrox-ui uses automatic layout engine which will correctly calculate desired height of a widget. /// /// Direction: **From/To UI** Height(f32), diff --git a/rg3d-ui/src/window.rs b/fyrox-ui/src/window.rs similarity index 100% rename from rg3d-ui/src/window.rs rename to fyrox-ui/src/window.rs diff --git a/rg3d-ui/src/wrap_panel.rs b/fyrox-ui/src/wrap_panel.rs similarity index 100% rename from rg3d-ui/src/wrap_panel.rs rename to fyrox-ui/src/wrap_panel.rs diff --git a/rg3d-core-derive/README.md b/rg3d-core-derive/README.md deleted file mode 100644 index 4654b94da..000000000 --- a/rg3d-core-derive/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rg3d-core-derive - -Provides the `#[derive(Visit)]` macro, which implements `rg3d::core::visitor::Visit`. diff --git a/rg3d-core-derive/test_output/.gitkeep b/rg3d-core-derive/test_output/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/rg3d-core/README.md b/rg3d-core/README.md deleted file mode 100644 index 3d25444f0..000000000 --- a/rg3d-core/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# rg3d-core - -Shared library for rg3d-engine containing linear algebra and some useful algorithms. - -**NOTE:** even though this crate has `rg3d` prefix in its name, it can be used separately without any issues. diff --git a/src/animation/machine/mod.rs b/src/animation/machine/mod.rs index ab46cfb5c..895191ec9 100644 --- a/src/animation/machine/mod.rs +++ b/src/animation/machine/mod.rs @@ -45,7 +45,7 @@ //! Example: //! //! ```no_run -//! use rg3d::{ +//! use fyrox::{ //! animation::machine::{ //! Machine, State, Transition, PoseNode, blend_nodes::BlendPose, //! Parameter, PlayAnimation, PoseWeight, blend_nodes::BlendAnimations diff --git a/src/animation/mod.rs b/src/animation/mod.rs index e40c95415..426cc8a0d 100644 --- a/src/animation/mod.rs +++ b/src/animation/mod.rs @@ -587,10 +587,10 @@ impl Animation { /// this. /// /// ``` - /// use rg3d::scene::node::Node; - /// use rg3d::animation::Animation; - /// use rg3d::core::pool::Handle; - /// use rg3d::scene::graph::Graph; + /// use fyrox::scene::node::Node; + /// use fyrox::animation::Animation; + /// use fyrox::core::pool::Handle; + /// use fyrox::scene::graph::Graph; /// /// fn disable_legs(torso_bone: Handle, aim_animation: &mut Animation, graph: &Graph) { /// aim_animation.set_tracks_enabled_from(torso_bone, false, graph) diff --git a/src/engine/mod.rs b/src/engine/mod.rs index 50cf349fb..0c4ebfe88 100644 --- a/src/engine/mod.rs +++ b/src/engine/mod.rs @@ -68,9 +68,9 @@ impl Engine { /// # Examples /// /// ```no_run - /// use rg3d::engine::Engine; - /// use rg3d::window::WindowBuilder; - /// use rg3d::event_loop::EventLoop; + /// use fyrox::engine::Engine; + /// use fyrox::window::WindowBuilder; + /// use fyrox::event_loop::EventLoop; /// /// let evt = EventLoop::new(); /// let window_builder = WindowBuilder::new() diff --git a/src/engine/resource_manager.rs b/src/engine/resource_manager.rs index a35e8f42d..50f8e6bf0 100644 --- a/src/engine/resource_manager.rs +++ b/src/engine/resource_manager.rs @@ -598,7 +598,7 @@ impl ResourceManager { /// /// # Supported formats /// - /// To load images and decode them, rg3d uses image create which supports following image formats: png, tga, bmp, dds, + /// To load images and decode them, Fyrox uses image create which supports following image formats: png, tga, bmp, dds, /// jpg, gif, tiff, dxt. pub fn request_texture>(&self, path: P) -> Texture { let path_ref = path.as_ref(); diff --git a/src/lib.rs b/src/lib.rs index dfeaaa05c..4a644f14d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,13 +27,13 @@ pub use walkdir; pub use winit::*; #[doc(inline)] -pub use rg3d_core as core; +pub use fyrox_core as core; #[doc(inline)] -pub use rg3d_resource as asset; +pub use fyrox_resource as asset; #[doc(inline)] -pub use rg3d_sound as sound; +pub use fyrox_sound as sound; #[doc(inline)] -pub use rg3d_ui as gui; +pub use fyrox_ui as gui; diff --git a/src/material/mod.rs b/src/material/mod.rs index df4d47328..1007a8f43 100644 --- a/src/material/mod.rs +++ b/src/material/mod.rs @@ -281,7 +281,7 @@ impl Default for PropertyValue { /// method to create a material with standard shader: /// /// ```no_run -/// use rg3d::{ +/// use fyrox::{ /// material::shader::{Shader, SamplerFallback}, /// engine::resource_manager::ResourceManager, /// material::{Material, PropertyValue}, @@ -314,7 +314,7 @@ impl Default for PropertyValue { /// and then create the material and populate it with a set of property values. /// /// ```no_run -/// use rg3d::{ +/// use fyrox::{ /// engine::resource_manager::ResourceManager, /// material::{Material, PropertyValue}, /// core::{sstorage::ImmutableString, algebra::Vector3} @@ -380,7 +380,7 @@ impl Material { /// # Example /// /// ```no_run - /// use rg3d::{ + /// use fyrox::{ /// material::shader::{Shader, SamplerFallback}, /// engine::resource_manager::ResourceManager, /// material::{Material, PropertyValue}, @@ -421,7 +421,7 @@ impl Material { /// # Example /// /// ```no_run - /// use rg3d::{ + /// use fyrox::{ /// engine::resource_manager::ResourceManager, /// material::{Material, PropertyValue}, /// core::{sstorage::ImmutableString, algebra::Vector3} @@ -530,8 +530,8 @@ impl Material { /// # Examples /// /// ```no_run - /// # use rg3d::core::sstorage::ImmutableString; - /// use rg3d::material::Material; + /// # use fyrox::core::sstorage::ImmutableString; + /// use fyrox::material::Material; /// /// let mut material = Material::standard(); /// @@ -553,9 +553,9 @@ impl Material { /// # Example /// /// ```no_run - /// # use rg3d::material::{Material, PropertyValue}; - /// # use rg3d::core::color::Color; - /// # use rg3d::core::sstorage::ImmutableString; + /// # use fyrox::material::{Material, PropertyValue}; + /// # use fyrox::core::color::Color; + /// # use fyrox::core::sstorage::ImmutableString; /// /// let mut material = Material::standard(); /// diff --git a/src/material/shader.rs b/src/material/shader.rs index ba9c5dfbc..bea9e5fec 100644 --- a/src/material/shader.rs +++ b/src/material/shader.rs @@ -363,14 +363,14 @@ define_new_resource!( /// layout(location = 0) in vec3 vertexPosition; /// layout(location = 1) in vec2 vertexTexCoord; /// - /// uniform mat4 rg3d_worldViewProjection; + /// uniform mat4 fyrox_worldViewProjection; /// /// out vec2 texCoord; /// /// void main() /// { /// texCoord = vertexTexCoord; - /// gl_Position = rg3d_worldViewProjection * vertexPosition; + /// gl_Position = fyrox_worldViewProjection * vertexPosition; /// } /// "#; /// @@ -430,23 +430,23 @@ define_new_resource!( /// /// # Built-in variables /// - /// There are number of build-in variables that rg3d pass to each shader automatically: + /// There are number of build-in variables that Fyrox pass to each shader automatically: /// /// | Name | Type | Description /// |---------------------------|-----------------|-------------------------------------------- - /// | rg3d_worldMatrix | `Matrix4` | Local-to-world transformation. - /// | rg3d_worldViewProjection | `Matrix4` | Local-to-clip-space transform. - /// | rg3d_boneMatrices | `[Matrix4; 60]` | Array of bone matrices. - /// | rg3d_useSkeletalAnimation | `Vector3` | Whether skinned meshes is rendering or not. - /// | rg3d_cameraPosition | `Vector3` | Position of the camera. - /// | rg3d_usePOM | `bool` | Whether to use parallax mapping or not. - /// | rg3d_lightPosition | `Vector3` | Light position. + /// | fyrox_worldMatrix | `Matrix4` | Local-to-world transformation. + /// | fyrox_worldViewProjection | `Matrix4` | Local-to-clip-space transform. + /// | fyrox_boneMatrices | `[Matrix4; 60]` | Array of bone matrices. + /// | fyrox_useSkeletalAnimation | `Vector3` | Whether skinned meshes is rendering or not. + /// | fyrox_cameraPosition | `Vector3` | Position of the camera. + /// | fyrox_usePOM | `bool` | Whether to use parallax mapping or not. + /// | fyrox_lightPosition | `Vector3` | Light position. /// /// To use any of the variables, just define a uniform with appropriate name: /// /// ```glsl - /// uniform mat4 rg3d_worldMatrix; - /// uniform vec3 rg3d_cameraPosition; + /// uniform mat4 fyrox_worldMatrix; + /// uniform vec3 fyrox_cameraPosition; /// ``` /// /// This list will be extended in future releases. @@ -494,11 +494,11 @@ define_new_resource!( /// /// # Standard shader /// - /// By default rg3d uses standard material for rendering, it covers 95% of uses cases and it is very + /// By default Fyrox uses standard material for rendering, it covers 95% of uses cases and it is very /// flexible. To get standard shader instance, use [`Shader::standard`] /// /// ```no_run - /// # use rg3d::material::shader::Shader; + /// # use fyrox::material::shader::Shader; /// /// let standard_shader = Shader::standard(); /// ``` diff --git a/src/material/standard/standard.shader b/src/material/standard/standard.shader index 29c8c52f3..000be99b1 100644 --- a/src/material/standard/standard.shader +++ b/src/material/standard/standard.shader @@ -85,12 +85,12 @@ layout(location = 5) in vec4 boneIndices; layout(location = 6) in vec2 vertexSecondTexCoord; - // Define uniforms with reserved names. rg3d will automatically provide + // Define uniforms with reserved names. Fyrox will automatically provide // required data to these uniforms. - uniform mat4 rg3d_worldMatrix; - uniform mat4 rg3d_worldViewProjection; - uniform mat4 rg3d_boneMatrices[60]; - uniform bool rg3d_useSkeletalAnimation; + uniform mat4 fyrox_worldMatrix; + uniform mat4 fyrox_worldViewProjection; + uniform mat4 fyrox_boneMatrices[60]; + uniform bool fyrox_useSkeletalAnimation; out vec3 position; out vec3 normal; @@ -105,7 +105,7 @@ vec3 localNormal = vec3(0); vec3 localTangent = vec3(0); - if (rg3d_useSkeletalAnimation) + if (fyrox_useSkeletalAnimation) { vec4 vertex = vec4(vertexPosition, 1.0); @@ -114,10 +114,10 @@ int i2 = int(boneIndices.z); int i3 = int(boneIndices.w); - mat4 m0 = rg3d_boneMatrices[i0]; - mat4 m1 = rg3d_boneMatrices[i1]; - mat4 m2 = rg3d_boneMatrices[i2]; - mat4 m3 = rg3d_boneMatrices[i3]; + mat4 m0 = fyrox_boneMatrices[i0]; + mat4 m1 = fyrox_boneMatrices[i1]; + mat4 m2 = fyrox_boneMatrices[i2]; + mat4 m3 = fyrox_boneMatrices[i3]; localPosition += m0 * vertex * boneWeights.x; localPosition += m1 * vertex * boneWeights.y; @@ -141,15 +141,15 @@ localTangent = vertexTangent.xyz; } - mat3 nm = mat3(rg3d_worldMatrix); + mat3 nm = mat3(fyrox_worldMatrix); normal = normalize(nm * localNormal); tangent = normalize(nm * localTangent); binormal = normalize(vertexTangent.w * cross(tangent, normal)); texCoord = vertexTexCoord; - position = vec3(rg3d_worldMatrix * localPosition); + position = vec3(fyrox_worldMatrix * localPosition); secondTexCoord = vertexSecondTexCoord; - gl_Position = rg3d_worldViewProjection * localPosition; + gl_Position = fyrox_worldViewProjection * localPosition; } "#, fragment_shader: @@ -174,10 +174,10 @@ uniform vec3 emissionStrength; uniform vec4 diffuseColor; - // Define uniforms with reserved names. rg3d will automatically provide + // Define uniforms with reserved names. Fyrox will automatically provide // required data to these uniforms. - uniform vec3 rg3d_cameraPosition; - uniform bool rg3d_usePOM; + uniform vec3 fyrox_cameraPosition; + uniform bool fyrox_usePOM; in vec3 position; in vec3 normal; @@ -189,10 +189,10 @@ void main() { mat3 tangentSpace = mat3(tangent, binormal, normal); - vec3 toFragment = normalize(position - rg3d_cameraPosition); + vec3 toFragment = normalize(position - fyrox_cameraPosition); vec2 tc; - if (rg3d_usePOM) { + if (fyrox_usePOM) { vec3 toFragmentTangentSpace = normalize(transpose(tangentSpace) * toFragment); tc = S_ComputeParallaxTextureCoordinates(heightTexture, toFragmentTangentSpace, texCoord * texCoordScale, normal); } else { @@ -253,9 +253,9 @@ layout(location = 5) in vec4 boneWeights; layout(location = 6) in vec4 boneIndices; - uniform mat4 rg3d_worldViewProjection; - uniform bool rg3d_useSkeletalAnimation; - uniform mat4 rg3d_boneMatrices[60]; + uniform mat4 fyrox_worldViewProjection; + uniform bool fyrox_useSkeletalAnimation; + uniform mat4 fyrox_boneMatrices[60]; out vec3 position; out vec2 texCoord; @@ -263,7 +263,7 @@ void main() { vec4 localPosition = vec4(0); - if (rg3d_useSkeletalAnimation) + if (fyrox_useSkeletalAnimation) { vec4 vertex = vec4(vertexPosition, 1.0); @@ -272,16 +272,16 @@ int i2 = int(boneIndices.z); int i3 = int(boneIndices.w); - localPosition += rg3d_boneMatrices[i0] * vertex * boneWeights.x; - localPosition += rg3d_boneMatrices[i1] * vertex * boneWeights.y; - localPosition += rg3d_boneMatrices[i2] * vertex * boneWeights.z; - localPosition += rg3d_boneMatrices[i3] * vertex * boneWeights.w; + localPosition += fyrox_boneMatrices[i0] * vertex * boneWeights.x; + localPosition += fyrox_boneMatrices[i1] * vertex * boneWeights.y; + localPosition += fyrox_boneMatrices[i2] * vertex * boneWeights.z; + localPosition += fyrox_boneMatrices[i3] * vertex * boneWeights.w; } else { localPosition = vec4(vertexPosition, 1.0); } - gl_Position = rg3d_worldViewProjection * localPosition; + gl_Position = fyrox_worldViewProjection * localPosition; texCoord = vertexTexCoord; } "#, @@ -331,9 +331,9 @@ layout(location = 4) in vec4 boneWeights; layout(location = 5) in vec4 boneIndices; - uniform mat4 rg3d_worldViewProjection; - uniform bool rg3d_useSkeletalAnimation; - uniform mat4 rg3d_boneMatrices[60]; + uniform mat4 fyrox_worldViewProjection; + uniform bool fyrox_useSkeletalAnimation; + uniform mat4 fyrox_boneMatrices[60]; out vec2 texCoord; @@ -341,21 +341,21 @@ { vec4 localPosition = vec4(0); - if (rg3d_useSkeletalAnimation) + if (fyrox_useSkeletalAnimation) { vec4 vertex = vec4(vertexPosition, 1.0); - localPosition += rg3d_boneMatrices[int(boneIndices.x)] * vertex * boneWeights.x; - localPosition += rg3d_boneMatrices[int(boneIndices.y)] * vertex * boneWeights.y; - localPosition += rg3d_boneMatrices[int(boneIndices.z)] * vertex * boneWeights.z; - localPosition += rg3d_boneMatrices[int(boneIndices.w)] * vertex * boneWeights.w; + localPosition += fyrox_boneMatrices[int(boneIndices.x)] * vertex * boneWeights.x; + localPosition += fyrox_boneMatrices[int(boneIndices.y)] * vertex * boneWeights.y; + localPosition += fyrox_boneMatrices[int(boneIndices.z)] * vertex * boneWeights.z; + localPosition += fyrox_boneMatrices[int(boneIndices.w)] * vertex * boneWeights.w; } else { localPosition = vec4(vertexPosition, 1.0); } - gl_Position = rg3d_worldViewProjection * localPosition; + gl_Position = fyrox_worldViewProjection * localPosition; texCoord = vertexTexCoord; } "#, @@ -402,9 +402,9 @@ layout(location = 4) in vec4 boneWeights; layout(location = 5) in vec4 boneIndices; - uniform mat4 rg3d_worldViewProjection; - uniform bool rg3d_useSkeletalAnimation; - uniform mat4 rg3d_boneMatrices[60]; + uniform mat4 fyrox_worldViewProjection; + uniform bool fyrox_useSkeletalAnimation; + uniform mat4 fyrox_boneMatrices[60]; out vec2 texCoord; @@ -412,21 +412,21 @@ { vec4 localPosition = vec4(0); - if (rg3d_useSkeletalAnimation) + if (fyrox_useSkeletalAnimation) { vec4 vertex = vec4(vertexPosition, 1.0); - localPosition += rg3d_boneMatrices[int(boneIndices.x)] * vertex * boneWeights.x; - localPosition += rg3d_boneMatrices[int(boneIndices.y)] * vertex * boneWeights.y; - localPosition += rg3d_boneMatrices[int(boneIndices.z)] * vertex * boneWeights.z; - localPosition += rg3d_boneMatrices[int(boneIndices.w)] * vertex * boneWeights.w; + localPosition += fyrox_boneMatrices[int(boneIndices.x)] * vertex * boneWeights.x; + localPosition += fyrox_boneMatrices[int(boneIndices.y)] * vertex * boneWeights.y; + localPosition += fyrox_boneMatrices[int(boneIndices.z)] * vertex * boneWeights.z; + localPosition += fyrox_boneMatrices[int(boneIndices.w)] * vertex * boneWeights.w; } else { localPosition = vec4(vertexPosition, 1.0); } - gl_Position = rg3d_worldViewProjection * localPosition; + gl_Position = fyrox_worldViewProjection * localPosition; texCoord = vertexTexCoord; } "#, @@ -473,10 +473,10 @@ layout(location = 4) in vec4 boneWeights; layout(location = 5) in vec4 boneIndices; - uniform mat4 rg3d_worldMatrix; - uniform mat4 rg3d_worldViewProjection; - uniform bool rg3d_useSkeletalAnimation; - uniform mat4 rg3d_boneMatrices[60]; + uniform mat4 fyrox_worldMatrix; + uniform mat4 fyrox_worldViewProjection; + uniform bool fyrox_useSkeletalAnimation; + uniform mat4 fyrox_boneMatrices[60]; out vec2 texCoord; out vec3 worldPosition; @@ -485,22 +485,22 @@ { vec4 localPosition = vec4(0); - if (rg3d_useSkeletalAnimation) + if (fyrox_useSkeletalAnimation) { vec4 vertex = vec4(vertexPosition, 1.0); - localPosition += rg3d_boneMatrices[int(boneIndices.x)] * vertex * boneWeights.x; - localPosition += rg3d_boneMatrices[int(boneIndices.y)] * vertex * boneWeights.y; - localPosition += rg3d_boneMatrices[int(boneIndices.z)] * vertex * boneWeights.z; - localPosition += rg3d_boneMatrices[int(boneIndices.w)] * vertex * boneWeights.w; + localPosition += fyrox_boneMatrices[int(boneIndices.x)] * vertex * boneWeights.x; + localPosition += fyrox_boneMatrices[int(boneIndices.y)] * vertex * boneWeights.y; + localPosition += fyrox_boneMatrices[int(boneIndices.z)] * vertex * boneWeights.z; + localPosition += fyrox_boneMatrices[int(boneIndices.w)] * vertex * boneWeights.w; } else { localPosition = vec4(vertexPosition, 1.0); } - gl_Position = rg3d_worldViewProjection * localPosition; - worldPosition = (rg3d_worldMatrix * localPosition).xyz; + gl_Position = fyrox_worldViewProjection * localPosition; + worldPosition = (fyrox_worldMatrix * localPosition).xyz; texCoord = vertexTexCoord; } "#, @@ -509,7 +509,7 @@ r#" uniform sampler2D diffuseTexture; - uniform vec3 rg3d_lightPosition; + uniform vec3 fyrox_lightPosition; in vec2 texCoord; in vec3 worldPosition; @@ -519,7 +519,7 @@ void main() { if (texture(diffuseTexture, texCoord).a < 0.2) discard; - depth = length(rg3d_lightPosition - worldPosition); + depth = length(fyrox_lightPosition - worldPosition); } "#, ) diff --git a/src/material/standard/terrain.shader b/src/material/standard/terrain.shader index b4cfdb535..dee28857c 100644 --- a/src/material/standard/terrain.shader +++ b/src/material/standard/terrain.shader @@ -92,10 +92,10 @@ layout(location = 5) in vec4 boneIndices; layout(location = 6) in vec2 vertexSecondTexCoord; - // Define uniforms with reserved names. rg3d will automatically provide + // Define uniforms with reserved names. Fyrox will automatically provide // required data to these uniforms. - uniform mat4 rg3d_worldMatrix; - uniform mat4 rg3d_worldViewProjection; + uniform mat4 fyrox_worldMatrix; + uniform mat4 fyrox_worldViewProjection; out vec3 position; out vec3 normal; @@ -106,14 +106,14 @@ void main() { - mat3 nm = mat3(rg3d_worldMatrix); + mat3 nm = mat3(fyrox_worldMatrix); normal = normalize(nm * vertexNormal); tangent = normalize(nm * vertexTangent.xyz); binormal = normalize(vertexTangent.w * cross(tangent, normal)); texCoord = vertexTexCoord; - position = vec3(rg3d_worldMatrix * vec4(vertexPosition, 1.0)); + position = vec3(fyrox_worldMatrix * vec4(vertexPosition, 1.0)); secondTexCoord = vertexSecondTexCoord; - gl_Position = rg3d_worldViewProjection * vec4(vertexPosition, 1.0); + gl_Position = fyrox_worldViewProjection * vec4(vertexPosition, 1.0); } "#, fragment_shader: @@ -139,10 +139,10 @@ uniform sampler2D maskTexture; uniform vec4 diffuseColor; - // Define uniforms with reserved names. rg3d will automatically provide + // Define uniforms with reserved names. Fyrox will automatically provide // required data to these uniforms. - uniform vec3 rg3d_cameraPosition; - uniform bool rg3d_usePOM; + uniform vec3 fyrox_cameraPosition; + uniform bool fyrox_usePOM; in vec3 position; in vec3 normal; @@ -154,10 +154,10 @@ void main() { mat3 tangentSpace = mat3(tangent, binormal, normal); - vec3 toFragment = normalize(position - rg3d_cameraPosition); + vec3 toFragment = normalize(position - fyrox_cameraPosition); vec2 tc; - if (rg3d_usePOM) { + if (fyrox_usePOM) { vec3 toFragmentTangentSpace = normalize(transpose(tangentSpace) * toFragment); tc = S_ComputeParallaxTextureCoordinates(heightTexture, toFragmentTangentSpace, texCoord * texCoordScale, normal); } else { @@ -217,14 +217,14 @@ layout(location = 0) in vec3 vertexPosition; layout(location = 1) in vec2 vertexTexCoord; - uniform mat4 rg3d_worldViewProjection; + uniform mat4 fyrox_worldViewProjection; out vec3 position; out vec2 texCoord; void main() { - gl_Position = rg3d_worldViewProjection * vec4(vertexPosition, 1.0); + gl_Position = fyrox_worldViewProjection * vec4(vertexPosition, 1.0); texCoord = vertexTexCoord; } "#, @@ -272,13 +272,13 @@ layout(location = 0) in vec3 vertexPosition; layout(location = 1) in vec2 vertexTexCoord; - uniform mat4 rg3d_worldViewProjection; + uniform mat4 fyrox_worldViewProjection; out vec2 texCoord; void main() { - gl_Position = rg3d_worldViewProjection * vec4(vertexPosition, 1.0); + gl_Position = fyrox_worldViewProjection * vec4(vertexPosition, 1.0); texCoord = vertexTexCoord; } "#, @@ -323,13 +323,13 @@ layout(location = 0) in vec3 vertexPosition; layout(location = 1) in vec2 vertexTexCoord; - uniform mat4 rg3d_worldViewProjection; + uniform mat4 fyrox_worldViewProjection; out vec2 texCoord; void main() { - gl_Position = rg3d_worldViewProjection * vec4(vertexPosition, 1.0); + gl_Position = fyrox_worldViewProjection * vec4(vertexPosition, 1.0); texCoord = vertexTexCoord; } "#, @@ -374,16 +374,16 @@ layout(location = 0) in vec3 vertexPosition; layout(location = 1) in vec2 vertexTexCoord; - uniform mat4 rg3d_worldMatrix; - uniform mat4 rg3d_worldViewProjection; + uniform mat4 fyrox_worldMatrix; + uniform mat4 fyrox_worldViewProjection; out vec2 texCoord; out vec3 worldPosition; void main() { - gl_Position = rg3d_worldViewProjection * vec4(vertexPosition, 1.0); - worldPosition = (rg3d_worldMatrix * vec4(vertexPosition, 1.0)).xyz; + gl_Position = fyrox_worldViewProjection * vec4(vertexPosition, 1.0); + worldPosition = (fyrox_worldMatrix * vec4(vertexPosition, 1.0)).xyz; texCoord = vertexTexCoord; } "#, @@ -392,7 +392,7 @@ r#" uniform sampler2D diffuseTexture; - uniform vec3 rg3d_lightPosition; + uniform vec3 fyrox_lightPosition; in vec2 texCoord; in vec3 worldPosition; @@ -402,7 +402,7 @@ void main() { if (texture(diffuseTexture, texCoord).a < 0.2) discard; - depth = length(rg3d_lightPosition - worldPosition); + depth = length(fyrox_lightPosition - worldPosition); } "#, ) diff --git a/src/renderer/framework/gpu_program.rs b/src/renderer/framework/gpu_program.rs index 7fb92edf7..a67b5e381 100644 --- a/src/renderer/framework/gpu_program.rs +++ b/src/renderer/framework/gpu_program.rs @@ -399,19 +399,19 @@ fn fetch_built_in_uniform_locations( let mut locations = [INIT; BuiltInUniform::Count as usize]; locations[BuiltInUniform::WorldMatrix as usize] = - fetch_uniform_location(state, program, "rg3d_worldMatrix"); + fetch_uniform_location(state, program, "fyrox_worldMatrix"); locations[BuiltInUniform::WorldViewProjectionMatrix as usize] = - fetch_uniform_location(state, program, "rg3d_worldViewProjection"); + fetch_uniform_location(state, program, "fyrox_worldViewProjection"); locations[BuiltInUniform::BoneMatrices as usize] = - fetch_uniform_location(state, program, "rg3d_boneMatrices"); + fetch_uniform_location(state, program, "fyrox_boneMatrices"); locations[BuiltInUniform::UseSkeletalAnimation as usize] = - fetch_uniform_location(state, program, "rg3d_useSkeletalAnimation"); + fetch_uniform_location(state, program, "fyrox_useSkeletalAnimation"); locations[BuiltInUniform::CameraPosition as usize] = - fetch_uniform_location(state, program, "rg3d_cameraPosition"); + fetch_uniform_location(state, program, "fyrox_cameraPosition"); locations[BuiltInUniform::UsePOM as usize] = - fetch_uniform_location(state, program, "rg3d_usePOM"); + fetch_uniform_location(state, program, "fyrox_usePOM"); locations[BuiltInUniform::LightPosition as usize] = - fetch_uniform_location(state, program, "rg3d_lightPosition"); + fetch_uniform_location(state, program, "fyrox_lightPosition"); locations } diff --git a/src/renderer/light/mod.rs b/src/renderer/light/mod.rs index a6fb49d71..1c13be756 100644 --- a/src/renderer/light/mod.rs +++ b/src/renderer/light/mod.rs @@ -47,7 +47,7 @@ use crate::{ Scene, }, }; -use rg3d_core::algebra::Vector2; +use fyrox_core::algebra::Vector2; use std::{ cell::RefCell, fmt::{Display, Formatter}, diff --git a/src/renderer/renderer2d/cache.rs b/src/renderer/renderer2d/cache.rs index d61be1b6e..85b832af1 100644 --- a/src/renderer/renderer2d/cache.rs +++ b/src/renderer/renderer2d/cache.rs @@ -15,7 +15,7 @@ use crate::{ }, }; use fxhash::FxHashMap; -use rg3d_core::algebra::Vector3; +use fyrox_core::algebra::Vector3; #[repr(C)] pub struct Vertex { diff --git a/src/renderer/shadow/csm.rs b/src/renderer/shadow/csm.rs index 109872ef3..23b0fba0a 100644 --- a/src/renderer/shadow/csm.rs +++ b/src/renderer/shadow/csm.rs @@ -26,7 +26,7 @@ use crate::{ node::Node, }, }; -use rg3d_core::algebra::Vector2; +use fyrox_core::algebra::Vector2; use std::{cell::RefCell, rc::Rc}; pub struct Cascade { diff --git a/src/resource/texture.rs b/src/resource/texture.rs index 63ee7e849..54256494b 100644 --- a/src/resource/texture.rs +++ b/src/resource/texture.rs @@ -1,17 +1,17 @@ //! Texture is an image that used to fill faces to add details to them. //! //! In most cases textures are just 2D images, however there are some exclusions to that - -//! for example cube maps, that may be used for environment mapping. rg3d supports 1D, 2D, +//! for example cube maps, that may be used for environment mapping. Fyrox supports 1D, 2D, //! 3D and Cube textures. //! //! ## Supported formats //! -//! To load images and decode them, rg3d uses image and ddsfile crates. Here is the list of +//! To load images and decode them, Fyrox uses image and ddsfile crates. Here is the list of //! supported formats: png, tga, bmp, dds, jpg, gif, tiff, dds. //! //! ## Compressed textures //! -//! rg3d supports most commonly used formats of compressed textures: DXT1, DXT3, DXT5. +//! Fyrox supports most commonly used formats of compressed textures: DXT1, DXT3, DXT5. //! //! ## Render target //! @@ -823,7 +823,7 @@ fn ceil_div_4(x: u32) -> u32 { /// # Notes /// /// Try to avoid using compression for normal maps, normals maps usually has smooth -/// gradients, but compression algorithms used by rg3d cannot preserve good quality +/// gradients, but compression algorithms used by Fyrox cannot preserve good quality /// of such gradients. #[derive( Copy, diff --git a/src/scene/base.rs b/src/scene/base.rs index aad0e7294..cf9ea776c 100644 --- a/src/scene/base.rs +++ b/src/scene/base.rs @@ -258,10 +258,10 @@ pub struct Property { /// # Example /// /// ``` -/// use rg3d::scene::base::BaseBuilder; -/// use rg3d::scene::graph::Graph; -/// use rg3d::scene::node::Node; -/// use rg3d::core::pool::Handle; +/// use fyrox::scene::base::BaseBuilder; +/// use fyrox::scene::graph::Graph; +/// use fyrox::scene::node::Node; +/// use fyrox::core::pool::Handle; /// /// fn create_base_node(graph: &mut Graph) -> Handle { /// BaseBuilder::new() diff --git a/src/scene/camera.rs b/src/scene/camera.rs index 109294db1..e18bfccfe 100644 --- a/src/scene/camera.rs +++ b/src/scene/camera.rs @@ -5,7 +5,7 @@ //! //! # Multiple cameras //! -//! rg3d supports multiple cameras per scene, it means that you can create split +//! Fyrox supports multiple cameras per scene, it means that you can create split //! screen games, make picture-in-picture insertions in your main camera view and //! any other combinations you need. //! @@ -609,8 +609,8 @@ impl ColorGradingLut { /// Typical usage would be: /// /// ```no_run - /// use rg3d::scene::camera::ColorGradingLut; - /// use rg3d::engine::resource_manager::{ResourceManager}; + /// use fyrox::scene::camera::ColorGradingLut; + /// use fyrox::engine::resource_manager::{ResourceManager}; /// /// async fn create_lut(resource_manager: ResourceManager) -> ColorGradingLut { /// ColorGradingLut::new(resource_manager.request_texture( diff --git a/src/scene/debug.rs b/src/scene/debug.rs index ddcb9a476..6b30d8522 100644 --- a/src/scene/debug.rs +++ b/src/scene/debug.rs @@ -7,7 +7,7 @@ use crate::core::{ color::Color, math::{aabb::AxisAlignedBoundingBox, frustum::Frustum, Matrix4Ext}, }; -use rg3d_core::algebra::Vector2; +use fyrox_core::algebra::Vector2; use std::ops::Range; /// Colored line between two points. @@ -41,9 +41,9 @@ pub struct Line { /// So typical usage would be: /// /// ``` -/// # use rg3d::scene::debug::SceneDrawingContext; -/// # use rg3d::core::algebra::Matrix4; -/// # use rg3d::core::color::Color; +/// # use fyrox::scene::debug::SceneDrawingContext; +/// # use fyrox::core::algebra::Matrix4; +/// # use fyrox::core::color::Color; /// /// fn draw_debug_objects(ctx: &mut SceneDrawingContext) { /// // Clear at the beginning of the frame. diff --git a/src/scene/decal.rs b/src/scene/decal.rs index 97814ee31..bccb9ab40 100644 --- a/src/scene/decal.rs +++ b/src/scene/decal.rs @@ -54,7 +54,7 @@ use std::ops::{Deref, DerefMut}; /// # Example /// /// ``` -/// use rg3d::{ +/// use fyrox::{ /// engine::resource_manager::ResourceManager, /// core::pool::Handle, /// scene::{ diff --git a/src/scene/graph/mod.rs b/src/scene/graph/mod.rs index 2449e9f81..02b36e942 100644 --- a/src/scene/graph/mod.rs +++ b/src/scene/graph/mod.rs @@ -84,7 +84,7 @@ impl Default for Graph { /// command. Sub-graph allows you to do this without invalidating handles to nodes. #[derive(Debug)] pub struct SubGraph { - /// A root node and its [ticket](/rg3d-core/model/struct.Ticket.html). + /// A root node and its [ticket](/fyrox-core/model/struct.Ticket.html). pub root: (Ticket, Node), /// A set of descendant nodes with their tickets. @@ -1035,8 +1035,8 @@ impl Graph { /// available indices and try to convert them to handles. /// /// ``` - /// use rg3d::scene::node::Node; - /// use rg3d::scene::graph::Graph; + /// use fyrox::scene::node::Node; + /// use fyrox::scene::graph::Graph; /// let mut graph = Graph::new(); /// graph.add_node(Node::Base(Default::default())); /// graph.add_node(Node::Base(Default::default())); @@ -1056,8 +1056,8 @@ impl Graph { /// or point to a vacant pool entry. /// /// ``` - /// use rg3d::scene::node::Node; - /// use rg3d::scene::graph::Graph; + /// use fyrox::scene::node::Node; + /// use fyrox::scene::graph::Graph; /// let mut graph = Graph::new(); /// graph.add_node(Node::Base(Default::default())); /// graph.add_node(Node::Base(Default::default())); diff --git a/src/scene/light/mod.rs b/src/scene/light/mod.rs index 169e7de72..b4da11a96 100644 --- a/src/scene/light/mod.rs +++ b/src/scene/light/mod.rs @@ -1,7 +1,7 @@ //! Contains all structures and methods to create and manage lights. //! //! Light sources arte basic building blocks of many scenes in games, it improves -//! perception of scene and makes it look natural. rg3d engine supports three kinds +//! perception of scene and makes it look natural. Fyrox engine supports three kinds //! of light sources: //! //! 1) Directional - similar to sun in real life, its rays are parallel. diff --git a/src/scene/mesh/buffer.rs b/src/scene/mesh/buffer.rs index be6e69353..a85e6f561 100644 --- a/src/scene/mesh/buffer.rs +++ b/src/scene/mesh/buffer.rs @@ -500,7 +500,7 @@ impl VertexBuffer { /// Do **not** even try to do this: /// /// ```no_run - /// use rg3d::{ + /// use fyrox::{ /// scene::mesh::buffer::{VertexBuffer, VertexWriteTrait, VertexAttributeUsage}, /// core::algebra::Vector3 /// }; @@ -519,7 +519,7 @@ impl VertexBuffer { /// Instead do this: /// /// ```no_run - /// use rg3d::{ + /// use fyrox::{ /// scene::mesh::buffer::{VertexBuffer, VertexWriteTrait, VertexAttributeUsage}, /// core::algebra::Vector3 /// }; diff --git a/src/scene/particle_system/mod.rs b/src/scene/particle_system/mod.rs index f581ed678..103adbeae 100644 --- a/src/scene/particle_system/mod.rs +++ b/src/scene/particle_system/mod.rs @@ -25,20 +25,20 @@ //! Simple smoke effect can be create like so: //! //! ``` -//! use rg3d::scene::particle_system::{ +//! use fyrox::scene::particle_system::{ //! emitter::sphere::SphereEmitter, ParticleSystemBuilder, emitter::Emitter, //! emitter::base::BaseEmitterBuilder, emitter::sphere::SphereEmitterBuilder //! }; -//! use rg3d::engine::resource_manager::ResourceManager; -//! use rg3d::core::algebra::Vector3; -//! use rg3d::scene::graph::Graph; -//! use rg3d::scene::node::Node; -//! use rg3d::scene::transform::TransformBuilder; -//! use rg3d::core::color_gradient::{GradientPoint, ColorGradient}; -//! use rg3d::scene::base::BaseBuilder; -//! use rg3d::core::color::Color; +//! use fyrox::engine::resource_manager::ResourceManager; +//! use fyrox::core::algebra::Vector3; +//! use fyrox::scene::graph::Graph; +//! use fyrox::scene::node::Node; +//! use fyrox::scene::transform::TransformBuilder; +//! use fyrox::core::color_gradient::{GradientPoint, ColorGradient}; +//! use fyrox::scene::base::BaseBuilder; +//! use fyrox::core::color::Color; //! use std::path::Path; -//! use rg3d::resource::texture::TexturePixelKind; +//! use fyrox::resource::texture::TexturePixelKind; //! //! fn create_smoke(graph: &mut Graph, resource_manager: &mut ResourceManager, pos: Vector3) { //! ParticleSystemBuilder::new(BaseBuilder::new() diff --git a/src/scene/sprite.rs b/src/scene/sprite.rs index 4c5522a44..624794095 100644 --- a/src/scene/sprite.rs +++ b/src/scene/sprite.rs @@ -41,7 +41,7 @@ use std::ops::{Deref, DerefMut}; /// # Example /// /// ```rust -/// use rg3d::{ +/// use fyrox::{ /// scene::{ /// node::Node, /// sprite::SpriteBuilder, diff --git a/src/scene/transform.rs b/src/scene/transform.rs index 65f69adcf..1b1ffb031 100644 --- a/src/scene/transform.rs +++ b/src/scene/transform.rs @@ -6,7 +6,7 @@ //! //! # Complexity //! -//! rg3d uses a complex transform model inherited from the [FBX transform formulae](http://download.autodesk.com/us/fbx/20112/FBX_SDK_HELP/index.html?url=WS1a9193826455f5ff1f92379812724681e696651.htm,topicNumber=d0e7429): +//! Fyrox uses a complex transform model inherited from the [FBX transform formulae](http://download.autodesk.com/us/fbx/20112/FBX_SDK_HELP/index.html?url=WS1a9193826455f5ff1f92379812724681e696651.htm,topicNumber=d0e7429): //! //! `Transform = T * Roff * Rp * Rpre * R * Rpost * Rp⁻¹ * Soff * Sp * S * Sp⁻¹` //! @@ -24,7 +24,7 @@ //! `Sp⁻¹` - Inverse of the scaling pivot //! //! It is very flexible, however it can be slow to computate. To solve possible -//! performance issues, rg3d tries to precache every possible component. This means +//! performance issues, Fyrox tries to precache every possible component. This means //! that we use lazy evaluation: you can setup all the required properties, and the actual //! calculations will be delayed until you try to get the matrix from the transform. This makes //! calculations faster, but increases the required amount of memory. diff --git a/src/utils/astar.rs b/src/utils/astar.rs index 02aa6b1f1..fb740b8dc 100644 --- a/src/utils/astar.rs +++ b/src/utils/astar.rs @@ -9,7 +9,7 @@ use crate::core::algebra::Vector3; use crate::core::math::{self, PositionProvider}; use crate::core::visitor::Visit; -use rg3d_core::visitor::{VisitResult, Visitor}; +use fyrox_core::visitor::{VisitResult, Visitor}; #[derive(Copy, Clone, PartialEq, Eq, Debug)] enum PathVertexState { diff --git a/src/utils/log.rs b/src/utils/log.rs index 33286e7c1..7bdb74b4a 100644 --- a/src/utils/log.rs +++ b/src/utils/log.rs @@ -21,7 +21,7 @@ extern "C" { lazy_static! { static ref LOG: Mutex = Mutex::new(Log { #[cfg(not(target_arch = "wasm32"))] - file: std::fs::File::create("rg3d.log").unwrap(), + file: std::fs::File::create("fyrox.log").unwrap(), verbosity: MessageKind::Information }); } diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 0a7b1514c..fcb0f15e9 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -22,7 +22,7 @@ use crate::{ use std::hash::Hasher; use std::{any::Any, sync::Arc}; -/// Translated key code to rg3d-ui key code. +/// Translated key code to fyrox-ui key code. pub fn translate_key(key: VirtualKeyCode) -> KeyCode { match key { VirtualKeyCode::Key1 => KeyCode::Key1, @@ -191,7 +191,7 @@ pub fn translate_key(key: VirtualKeyCode) -> KeyCode { } } -/// Translates cursor icon from rg3d-ui library to glutin format. +/// Translates cursor icon from fyrox-ui library to glutin format. pub fn translate_cursor_icon(icon: crate::gui::message::CursorIcon) -> crate::window::CursorIcon { match icon { crate::gui::message::CursorIcon::Default => crate::window::CursorIcon::Default, @@ -232,7 +232,7 @@ pub fn translate_cursor_icon(icon: crate::gui::message::CursorIcon) -> crate::wi } } -/// Translates window mouse button into rg3d-ui mouse button. +/// Translates window mouse button into fyrox-ui mouse button. pub fn translate_button(button: crate::event::MouseButton) -> crate::gui::message::MouseButton { match button { crate::event::MouseButton::Left => crate::gui::message::MouseButton::Left, @@ -242,7 +242,7 @@ pub fn translate_button(button: crate::event::MouseButton) -> crate::gui::messag } } -/// Translates library button state into rg3d-ui button state. +/// Translates library button state into fyrox-ui button state. pub fn translate_state(state: ElementState) -> ButtonState { match state { ElementState::Pressed => ButtonState::Pressed, @@ -250,7 +250,7 @@ pub fn translate_state(state: ElementState) -> ButtonState { } } -/// Translates window event to rg3d-ui event. +/// Translates window event to fyrox-ui event. pub fn translate_event(event: &WindowEvent) -> Option { match event { WindowEvent::ReceivedCharacter(c) => Some(OsEvent::Character(*c)), @@ -280,7 +280,7 @@ pub fn translate_event(event: &WindowEvent) -> Option { } } -/// Translates keyboard modifiers to rg3d-ui keyboard modifiers. +/// Translates keyboard modifiers to fyrox-ui keyboard modifiers. pub fn translate_keyboard_modifiers(modifiers: ModifiersState) -> KeyboardModifiers { KeyboardModifiers { alt: modifiers.alt(), @@ -471,7 +471,7 @@ pub fn into_any_arc( } } -/// Converts engine's optional texture "pointer" to rg3d-ui's. +/// Converts engine's optional texture "pointer" to fyrox-ui's. pub fn into_gui_texture(this: Texture) -> draw::SharedTexture { draw::SharedTexture(this.0.into_inner()) } diff --git a/src/utils/navmesh.rs b/src/utils/navmesh.rs index 71a6bdea7..232489e56 100644 --- a/src/utils/navmesh.rs +++ b/src/utils/navmesh.rs @@ -143,8 +143,8 @@ impl Navmesh { /// /// Example: /// ``` - /// use rg3d::scene::Scene; - /// use rg3d::utils::navmesh::Navmesh; + /// use fyrox::scene::Scene; + /// use fyrox::utils::navmesh::Navmesh; /// /// fn make_navmesh(scene: &Scene, navmesh_name: &str) -> Navmesh { /// // Find mesh node in existing scene and create navigation mesh from it. @@ -248,9 +248,9 @@ impl Navmesh { /// Example: /// /// ``` - /// use rg3d::utils::navmesh::Navmesh; - /// use rg3d::core::algebra::Vector3; - /// use rg3d::utils::astar::{PathKind, PathError}; + /// use fyrox::utils::navmesh::Navmesh; + /// use fyrox::core::algebra::Vector3; + /// use fyrox::utils::astar::{PathKind, PathError}; /// /// fn find_path(navmesh: &mut Navmesh, begin: Vector3, end: Vector3, path: &mut Vec>) -> Result { /// if let Some(begin_index) = navmesh.query_closest(begin) {