Crate let_engine

source ·
Expand description

GitHub Workflow Status (with event) Crates.io Static Badge Website

A Game engine made in Rust.

Re-exports

  • pub use egui_winit_vulkano::egui;
  • pub use rapier2d;

Modules

  • Camera and vision related settings.
  • Holds model related data structures like Vertices and premade models as well as a circle maker macro.
  • Cardinal directions
  • All errors that can occur in this engine.
  • Events from the event loop.
  • Material related settings that determine the way the scene gets rendered.
  • Objects to be drawn to the screen.
  • Physics related structs.
  • usage:
  • Resources to be handled by the engine like textures, sounds and fonts.
  • General window stuff.

Macros

  • Loads a font to the engine using binary true type font data of the inserted &[u8] and returns an Option<Font>.
  • Initializes the let engine.
  • A macro that makes it easy to create circles.
  • Loads a new material.
  • Loads a model to the engine using the vertex and index data of the inserted Data and returns a Model.
  • Loads a shader from glsl bytes. Takes &[u8] and returns Shaders. Those shaders can be used when making materials.
  • Starts the engine, enables the window and starts drawing the scene. Takes a WindowBuilder for the initial window.
  • Loads a texture to the engine using one of the supported file formats and returns a Texture.
  • Loads a texture to the engine using raw image bytes and context and returns a Texture.

Structs

  • The struct that holds and executes all of the game data.
  • Holds the input information to be used in game.
  • A layer struct holding it’s own object hierarchy, camera and physics iteration.
  • A value which is initialized on the first access.
  • Object to be rendered on the screen and get the physics processed of.
  • The whole scene seen with all it’s layers.
  • Holds the timings of the engine like runtime and delta time.
  • Holds position size and rotation of an object.
  • A 2-dimensional vector.
  • A vertex containing it’s position (xy) and texture position (uv).

Functions

  • Creates a vertex with given x and y coordinates for position and given tx and ty coordinates for the UV texture mapping for those points.
  • Creates a 2-dimensional vector.
  • Creates a vertex with given x and y coordinates for both position and texture position.

Type Aliases

  • A mutual exclusion primitive useful for protecting shared data