1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
//! Amethyst is a free and open source game engine written in idiomatic //! [Rust][rs] for building video games and interactive multimedia applications. //! The source code is available for download on [GitHub][gh]. See the //! [online book][bk] for a complete guide to using Amethyst. //! //! [rs]: https://www.rust-lang.org/ //! [gh]: https://github.com/amethyst/amethyst //! [bk]: https://www.amethyst.rs/book/ //! //! This project is a work in progress and is very incomplete. Pardon the dust! //! //! # Example //! //! ```rust //! extern crate amethyst; //! //! use amethyst::prelude::*; //! //! struct GameState; //! //! impl State for GameState { //! fn on_start(&mut self, _: &mut Engine) { //! println!("Starting game!"); //! } //! //! fn handle_event(&mut self, _: &mut Engine, event: Event) -> Trans { //! match event { //! Event::WindowEvent { event, .. } => match event { //! WindowEvent::KeyboardInput { //! input: KeyboardInput { virtual_keycode: Some(VirtualKeyCode::Escape), .. }, .. //! } | //! WindowEvent::Closed => Trans::Quit, //! _ => Trans::None, //! }, //! _ => Trans::None, //! } //! } //! //! fn update(&mut self, _: &mut Engine) -> Trans { //! println!("Computing some more whoop-ass..."); //! Trans::Quit //! } //! } //! //! fn main() { //! let mut game = Application::new(GameState).expect("Fatal error"); //! game.run(); //! } //! ``` #![deny(missing_docs)] #![doc(html_logo_url = "https://tinyurl.com/jtmm43a")] #[macro_use] #[cfg(feature = "profiler")] pub extern crate thread_profiler; pub extern crate amethyst_config as config; pub extern crate amethyst_renderer as renderer; pub extern crate amethyst_input as input; extern crate amethyst_assets; extern crate cgmath; extern crate crossbeam; extern crate dds; #[macro_use] extern crate derivative; extern crate fnv; extern crate futures; extern crate gfx; extern crate genmesh; extern crate imagefmt; extern crate num_cpus; extern crate rayon; extern crate rodio; extern crate serde; //#[macro_use] //extern crate serde_derive; // Only used in sub crates now extern crate smallvec; extern crate shred; extern crate specs; extern crate wavefront_obj; extern crate winit; pub use self::app::{Application, ApplicationBuilder}; pub use self::engine::Engine; pub use self::error::{Error, Result}; pub use self::state::{State, StateMachine, Trans}; pub mod assets; pub mod audio; pub mod ecs; pub mod event; pub mod prelude; pub mod timing; mod app; mod engine; mod state; mod error;