reformat0r / nae

Cross-platform multimedia layer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nae

Cross platform multimedia layer made with Rust

About

Nae is a portable multimedia layer designed to make your own multimedia apps on top of it with a mid-level and easy to use API. If you're looking to create a multi-platform application or game in a easy way this is your framework.

Goals

The main goal of Nae is to be the foundation for cross-platform multimedia applications, game engines or games while keeping the user code simple and free as much as possible of "platform" dependent code. This means, that you can write your code once, and export to multiple targets without changes.

  • The Web is treated as a first class citizen, you can export to Webassembly your apps easily with Nae. We use (web_sys and wasm_bindgen).
  • Support the major platforms at this moment. (Web, MacOS, Windows, Linux, Android, iOS)
  • The structure of the lib makes relative easy to add new platforms just replacing the backend dependency. (Maybe will be useful for consoles eventually)
  • Provide a basic set of features and also some extras as optional dependency

Demo

//TODO add a youtube video introducing some examples, or interactive ones.

Examples

use nae::prelude::*;

#[nae::main]
fn main() {
    nae::init().draw(draw).build().unwrap();
}

fn draw(app: &mut App, _: &mut ()) {
    let draw = app.draw();
    draw.begin(Color::new(0.1, 0.2, 0.3, 1.0));
    draw.triangle(400.0, 100.0, 100.0, 500.0, 700.0, 500.0);
    draw.end();
}

Triangle

More examples

Getting started

Instructions to init and build a project

What means Nae?

Nae stands for: Not An Engine. This points that Nae is not a raw low-level lib nor a high-level game/app engine, is more like a mid-layer that can be used as a foundation for this purpose.

Current state

  • Targets
    • Web Browsers
    • iOS
    • Android
    • MacOS
    • Linux
    • Windows
  • 2D renderer
    • Primitives
    • Polylines
    • Sprites
    • Patterns
    • Masking
    • Custom Shader
    • Text
    • 9Slice
    • BlendModes
    • RenderTargets
  • Drivers
    • WebGL
    • WebGL 2
    • Metal
    • Dx11
    • Dx12
    • Vulkan
    • OpenGL
    • OpenGL ES
  • API
    • Window
    • Keyboard
    • Mouse
    • Touch
    • Gamepad
    • Audio
  • Extras
    • PostProcess
    • Animations
    • Screen Scaler
    • Transform
    • Particles
    • Tweens
    • Atlas
    • SVGs
    • BitmapText
    • UI System (Maybe Iced?)

License

...

Contribution

...

About

Cross-platform multimedia layer


Languages

Language:Rust 98.0%Language:GLSL 1.1%Language:Shell 0.5%Language:HTML 0.5%