#![crate_type = "lib"]
#![crate_name = "shura"]
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
mod component;
mod data;
mod graphics;
mod input;
mod math;
mod scene;
mod shura;
mod state;
pub use instant::Duration;
pub use rustc_hash::{FxHashMap, FxHashSet};
pub use shura_proc::*;
#[cfg(target_os = "android")]
pub use ::winit::platform::android::activity::AndroidApp;
pub(crate) use data::arena::*;
pub use crate::{
component::{
component_config::*, component_derive::*, component_handle::*, component_manager::*,
component_set::*, component_type::*, empty_component::*, group::*, position_component::*,
},
graphics::{
camera::*, color::*, frame_manager::*, gpu::*, instance_buffer::*, model::*,
render_encoder::*, render_target::*, renderer::*, screen_config::*, shader::*, sprite::*,
sprite_sheet::*, uniform::*, vertex::*,
},
input::input::{Input, InputEvent, InputTrigger, Key, Modifier, MouseButton, ScreenTouch},
math::{aabb::*, math::*},
scene::{context::Context, scene::*, scene_manager::*},
shura::*,
state::{state::*, state_manager::*},
};
pub mod wgpu {
pub use wgpu::*;
}
pub mod winit {
pub use winit::*;
}
#[cfg(feature = "audio")]
mod sound;
#[cfg(feature = "audio")]
pub mod audio {
pub use crate::sound::audio_manager::*;
pub use crate::sound::sound::*;
pub use rodio::Sink as AudioSink;
pub use rodio::*;
}
pub mod image {
pub use image::*;
}
pub mod bytmuck {
pub use bytemuck::*;
}
#[cfg(feature = "physics")]
mod world;
#[cfg(feature = "physics")]
pub mod physics {
pub(crate) use crate::world::world_changes::*;
pub use crate::world::{collider_component::*, rigid_body_component::*, world::*};
pub use rapier2d::geometry::*;
pub use rapier2d::parry;
pub use rapier2d::prelude::{
ActiveCollisionTypes, ActiveEvents, ActiveHooks, CoefficientCombineRule, Collider,
ColliderBroadPhaseData, ColliderBuilder, ColliderChanges, ColliderFlags, ColliderHandle,
ColliderMaterial, ColliderParent, ColliderSet, ColliderShape, ColliderType, FixedJoint,
FixedJointBuilder, GenericJoint, GenericJointBuilder, Group, ImpulseJoint,
ImpulseJointHandle, InteractionGroups, LockedAxes, MassProperties, MotorModel,
PrismaticJoint, QueryFilter, QueryFilterFlags, Ray, RayIntersection, RevoluteJoint,
RevoluteJointBuilder, RigidBody, RigidBodyActivation, RigidBodyBuilder, RigidBodyHandle,
RigidBodySet, RigidBodyType, Shape, ShapeType, SharedShape, SpacialVector, TypedShape, TOI,
};
pub mod rapier {
pub use rapier2d::*;
}
}
#[cfg(feature = "gui")]
pub mod gui {
pub(crate) use crate::graphics::gui::gui::*;
pub use egui::Context as GuiContext;
pub use egui::*;
}
#[cfg(feature = "text")]
pub mod text {
pub use crate::graphics::text::{font::*, text::*, text_pipeline::*};
pub use glyph_brush::{
BuiltInLineBreaker, FontId, GlyphCruncher, HorizontalAlign, Layout, LineBreak,
OwnedSection, OwnedText, Section, SectionGlyphIter, SectionText, Text, VerticalAlign,
};
}
#[cfg(feature = "gamepad")]
pub mod gamepad {
pub use crate::input::input::{GamepadButton, GamepadStick};
pub use gilrs::{
ev, ff, Axis, Button, ConnectedGamepadsIterator, Gamepad, GamepadId, Mapping, MappingError,
MappingSource, PowerInfo,
};
}
#[cfg(feature = "serde")]
pub use crate::scene::scene_serde::*;
#[cfg(feature = "animation")]
mod tween;
#[cfg(feature = "animation")]
pub mod animation {
pub use crate::tween::{ease::*, tween::*};
}
pub mod na {
pub use nalgebra::*;
}
pub mod mint {
pub use mint::*;
}
pub mod rand {
pub fn gen_range<
T: distributions::uniform::SampleUniform,
R: distributions::uniform::SampleRange<T>,
>(
range: R,
) -> T {
return thread_rng().gen_range(range);
}
pub fn gen_bool(p: f64) -> bool {
return thread_rng().gen_bool(p);
}
pub use rand::*;
}
#[cfg(feature = "log")]
mod logging;
#[cfg(feature = "log")]
pub mod log {
pub use crate::logging::logging::LoggerBuilder;
pub use log::{debug, error, info, trace, warn, Level, LevelFilter, SetLoggerError};
pub mod env_logger {
pub use env_logger::*;
}
}