Crate let_engine

source ·

Re-exports

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
  • 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.

Macros

  • Loads a font to the engine using binary true type font data of the inserted &[u8] and returns a 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 window::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.
  • Describes a write operation for a descriptor. Used with materials to interact with custom shaders inside them.

Structs

  • Color is a struct that represents a color.
  • 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.
  • 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.

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

Attribute Macros

  • Implements GameObject on a struct and automaically adds the fields transform, appearance, id and layer to update from and to. Also adds 2 functions. Update and Sync. Update updates the object from the layer system and sync syncs the object to the layer. Those functions panic when the object isn’t initialized to the layer yet.