Skip to main content

Crate wde

Crate wde 

Source
Expand description

WaterDropEngine - A modular game engine.

§Overview

WaterDropEngine is a modular game engine built on top of Bevy’s ECS. It provides a collection of plugins and tools. The engine is composed of several modules, organized from low-level to high-level, each behind a feature of the same name (see Features):

  • Terrain:
    • wde_terrain: A plugin for loading, rendering and colliding chunked heightmap terrains.
    • wde_terrain_editor: A plugin for painting terrains in-game.
  • Render:
    • wde_pbr: A plugin for physically based rendering (PBR) materials and lighting.
    • wde_pbr_outline: A plugin for drawing outlines around PBR meshes.
    • wde_camera: A plugin for managing cameras and viewports.
    • wde_camera_controller: A plugin for controlling cameras with various input methods.
    • wde_gltf: A plugin for loading and rendering glTF 3D models.
    • wde_animation: A plugin for animating rigid parts of models (e.g. walk cycles).
    • wde_gizmos: A plugin for rendering debug gizmos and visualizations.
    • wde_ui: A plugin for laying out and drawing game UI with taffy.
  • Core (always included, except the editor):
    • wde_renderer: A plugin for rendering 3D graphics using the wgpu graphics API.
    • wde_scene: A plugin for managing scenes, entities, and components.
    • wde_editor: A plugin for creating in-game editors and tools.
  • Wrappers:
    • wde_wgpu: A wrapper around the wgpu graphics API for rendering. It is superseeded by wde_renderer.
    • wde_physics: A wrapper around the rapier physics engine for 3D physics simulation.
    • wde_logger: A wrapper around the tracing library for logging and diagnostics.
    • wde_egui: A wrapper around the egui library for creating user interfaces. It is superseeded by wde_editor.

§Getting Started

To get started with WaterDropEngine, add the wde crate to your Cargo.toml:

[dependencies]
wde = "0.1"

Then, in your main Rust file, you can use the default plugins to set up a basic application:

app.add_plugins(WdeDefaultPlugins);

To modify and configure individual plugins, use:

app.add_plugins(WdeDefaultPlugins.set(LogPlugin {
    level: LogLevel::DEBUG,
    ..Default::default()
}));

§Features

Each module is enabled by a Cargo feature, which also enables the modules it depends on. Three presets are provided:

  • minimal (default): PBR rendering, cameras with their controllers, and glTF models.
  • full: every runtime module (minimal, atmosphere, pbr-outline, gizmos, ui, physics, terrain).
  • everything: full, plus the development tools (editor, terrain-editor).

Without default features, only the renderer, the logger and the scenes are included:

[dependencies]
wde = { version = "0.1", default-features = false, features = ["pbr", "ui"] }

Re-exports§

pub use wde_logger;
pub use wde_renderer;
pub use wde_scene;
pub use wde_animation;
pub use wde_camera;
pub use wde_camera_controller;
pub use wde_editor;
pub use wde_gizmos;
pub use wde_gltf;
pub use wde_pbr;
pub use wde_pbr_outline;
pub use wde_physics;
pub use wde_terrain;
pub use wde_terrain_editor;
pub use wde_ui;

Structs§

CustomBevyPlugins
Custom Bevy plugins for WaterDropEngine default plugins.
CustomWdePlugins
Custom WaterDropEngine plugins. Set it in WdeDefaultPlugins to configure the window and logs:
WdeDefaultPlugins
Default plugins for WaterDropEngine.