Skip to content

DynamicGoose/magma-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magma-API

Magma-API contains all the engine functionality for Magma3D. It is based on Magma-ECS.

You will be able to use this in combination with the upcoming graphical editor for Magma3D, but it can be used standalone without any sacrifices.

Features

  • magma_app: Core functionality
    • Expands magma-ecs
    • Creating apps with a built-in update loop
    • Add custom modules to apps to expand functionality
    • A powerfull event system which let's you define custom events
  • magma_window: Backend-agnostic windowing system
    • The WindowModule adds respective events and components to the app
    • Handle window events
    • Add Window components to entities to easily create windows
  • magma_input: Backend-agnostic input system
    • Mouse & keyboard input support
    • Gamepad & controller support
    • VR input support
  • magma_winit: Winit integration for magma_window and magma_input
    • backend for magma_window
    • backend for magma_input
  • magma_render: Rendering system
    • FeuFeu rendering library based on wgpu
    • Vertex/Voxel hybrid renderer
  • magma_asset: Asset loading
    • load glTF models
    • images
    • audio files
  • magma_math: Usefull math utilities
    • reexports glam
    • other useful math
  • magma_ui: UI management
  • magma_physics: Powerful physics engine
  • magma_audio: Physically based audio
  • magma_scene: Loading and saving state

Usage

Add the crate to your Cargo.toml:

[dependencies]
magma_api = "0.2.0-alpha"

Entity-Component-System (Magma-ECS)

Entity: An entity is just an index into the component storage.
Component: A component holds some type of data. Entities can have components assigned to them.
System: A system is a piece of code (usually a function), that reads and modifies the data.

Another way to think about this would be Identifier-Data-Logic.

Example

use magma_api::App;
use magma_api::DefaultModules;

fn main() {
    let mut app = App::new();

    // add default functionality like windowing and rendering
    app.add_module(DefaultModules);
    // run the app
    app.run();
}

Cargo Features

currently no features

Disclaimer

This is still in developement and not production ready.

Packages

No packages published