shadowengine2d 2.0.0

A comprehensive 2D game engine built in Rust with ECS, rendering, audio, assets, animations, and scene management
Documentation
/*
 * MIT License
 * 
 * Copyright (c) 2025 ShadowEngine2D
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

pub mod engine;
pub mod renderer;
pub mod window;
pub mod input;
pub mod math;
pub mod entity;
pub mod time;

pub mod app;
pub mod resources;
pub mod systems;
pub mod entity_builder;
pub mod ui;
pub mod audio;
pub mod assets;
pub mod scene;
pub mod animation;
pub mod Output;

pub mod text;
pub mod physics;
pub mod tilemap;
pub mod profiler;
pub mod saveload;
pub mod particles;

pub mod prelude {
    pub use crate::{
        app::{App, AppBuilder, TimeResource, InputResource},
        engine::{Engine, Game, run_game},
        window::{Window, WindowConfig},
        renderer::Renderer,
        entity::{EntityId, EntityManager, Transform, Sprite, Velocity},
        entity_builder::{EntityBuilder, EntityManagerExt},
        math::{Position, Size, Color, Rect, Vec2},
        resources::Resources,
        systems::{System, SystemSet, PhysicsSystem, ClearScreenSystem},
        ui::{UiContext, Widget, ButtonStyle, Layout},
        time::Time,
        input::Input,
        Output::{Output, output_print, output_enabled},
        text::{TextComponent, TextRenderer, FontConfig},
        physics::{RigidBody, Collider, PhysicsWorld, CollisionEvent, CollisionShape},
        tilemap::{Tilemap, TileLayer, TileDefinition, TileId},
        profiler::{PerformanceProfiler, PerformanceMetrics, ProfileSection},
        saveload::{SaveManager, GameSave, PlayerData, Saveable},
        particles::{Particle, ParticleEmitter},
        EngineResult,
        system_set,
    };
}

pub use engine::Engine;
pub use window::Window;
pub use renderer::Renderer;
pub use math::*;
pub use app::{App, AppBuilder};

pub type EngineResult<T> = Result<T, Box<dyn std::error::Error>>;