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
//! 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 //! //! ```no_run //! extern crate amethyst; //! //! use amethyst::{Application, Event, State, Trans, VirtualKeyCode, WindowEvent}; //! use amethyst::asset_manager::AssetManager; //! use amethyst::config::Element; //! use amethyst::ecs::World; //! use amethyst::gfx_device::DisplayConfig; //! use amethyst::renderer::Pipeline; //! //! struct GameState; //! //! impl State for GameState { //! fn on_start(&mut self, _: &mut World, _: &mut AssetManager, pipe: &mut Pipeline) { //! use amethyst::renderer::pass::Clear; //! use amethyst::renderer::Layer; //! let clear_layer = Layer::new("main", vec![ //! Clear::new([0.0, 0.0, 0.0, 1.0]), //! ]); //! pipe.layers.push(clear_layer); //! } //! //! fn handle_events(&mut self, //! events: &[WindowEvent], //! _: &mut World, //! _: &mut AssetManager, //! _: &mut Pipeline) -> Trans { //! for e in events { //! match e.payload { //! Event::KeyboardInput(_, _, Some(VirtualKeyCode::Escape)) => return Trans::Quit, //! Event::Closed => return Trans::Quit, //! _ => (), //! } //! } //! Trans::None //! } //! } //! //! fn main() { //! let path = format!("{}/examples/01_window/resources/config.yml", //! env!("CARGO_MANIFEST_DIR")); //! let cfg = DisplayConfig::from_file(path).expect("Could not find config!"); //! let mut game = Application::build(GameState, cfg).done(); //! game.run(); //! } //! ``` #![crate_name = "amethyst"] #![crate_type = "lib"] #![deny(missing_docs)] #![doc(html_logo_url = "https://tinyurl.com/jtmm43a")] #[macro_use] pub extern crate amethyst_config as config; pub extern crate amethyst_renderer as renderer; extern crate cgmath; extern crate dds; extern crate fnv; extern crate gfx; extern crate gfx_window_glutin; extern crate glutin; extern crate genmesh; extern crate imagefmt; extern crate num_cpus; extern crate specs; extern crate wavefront_obj; pub mod asset_manager; pub mod ecs; pub mod gfx_device; mod engine; pub use engine::*;