Module let_engine::prelude

source ·
Expand description

usage:

use let_engine::prelude::*;
  • imports everything this engine has to offer.

Re-exports

Modules

  • Holds model related data structures like Vertices and premade models as well as a circle maker macro.
  • UI scaling is important, so read the docs for this module if you don’t want to be confused.
  • Wrapping of Rapiers joints to be used with Let Engine and Glam.
  • Default labels given by the engine.
  • Material related settings that determine the way the scene gets rendered.
  • Physics related structs.
  • Texture related options.

Macros

  • Loads a font to the engine using binary true type font data of the inserted &[u8] and returns a Font.
  • 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.
  • 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

  • Holds everything about the appearance of objects like textures, vetex/index data, color and material.
  • Settings that determine your camera vision.
  • Vertex and index data for the appearance and shape of objects. Has 3 simple presets.
  • A fixed joint, locks all relative motion between two bodies.
  • Create fixed joints using the builder pattern.
  • A font to be used with the default label system.
  • A generic joint.
  • Create generic joints using the builder pattern.
  • An icon used for the window titlebar, taskbar, etc.
  • The unique identifier of a joint added to the joint set. The unique identifier of a collider added to a collider set.
  • Parameters for a time-step of the physics engine.
  • A bit mask identifying multiple degrees of freedom of a joint.
  • A Label object made to display text.
  • Info to create default label objects with.
  • A layer struct holding it’s own object hierarchy, camera and physics iteration.
  • Flags affecting the behavior of the constraints solver for a given contact manifold.
  • A position represented in logical pixels.
  • A size represented in logical pixels.
  • A material holding the way an object should be drawn.
  • Vertex and fragment shaders of a material as well as the topology and line width, if the topology is set to LineList or LineStrip.
  • Builder for MaterialSettings.
  • The model of an object made of vertices and indices.
  • Represents the current state of the keyboard modifiers
  • Node structure for the layer.
  • Default object without any additional fields.
  • A position represented in physical pixels.
  • A size represented in physical pixels.
  • A prismatic joint, locks all relative motion between two bodies except for translation along the joint’s principal axis.
  • Create prismatic joints using the builder pattern.
  • All the resources kept in the game engine like textures, fonts, sounds and models.
  • A revolute joint, locks all relative motion except for rotation along the joint’s principal axis.
  • Create revolute joints using the builder pattern.
  • The rb_activation status of a body.
  • A builder for rigid-bodies.
  • A rope joint, limits the maximum distance between two bodies
  • Create rope joints using the builder pattern.
  • The sampler of the texture that determines how the shader should handle textures.
  • Builder for Sampler.
  • The whole scene seen with all it’s layers.
  • Holds compiled shaders in form of ShaderModules to use in a material.
  • A texture to be used with materials.
  • The main texture settings.
  • Holds position size and rotation of an object.
  • Parameters controlling the VHACD convex decomposition.
  • A 2-dimensional vector.
  • A struct representing the window.
  • A builder describing the initial state of the window.

Enums

  • Handling of pixels outside the position range of the texture.
  • The color to use for the border of an image.
  • The 4 Camera scaling modes determine how far you can see when the window changes scale. For 2D games those are a problem because there will always be someone with a monitor or window with a weird aspect ratio that can see much more than others when it’s not on stretch mode. Those are the options in this game engine:
  • Rules used to combine two coefficients.
  • The behavior of cursor grabbing.
  • Describes the appearance of the mouse cursor.
  • Describes the input state of a key.
  • Filtering mode
  • Formats for the texture from raw data.
  • An enumeration of supported image formats. Not all formats support both encoding and decoding.
  • Error type for MaterialSettingsBuilder
  • Describes a button of a mouse controller.
  • A position that’s either physical or logical.
  • The status of a body, governing the way it is affected by external forces.
  • Error type for SamplerBuilder
  • A size that’s either physical or logical.
  • The way in which an object gets drawn using it’s vertices and indices.
  • Platform-specific
  • Symbolic name for a keyboard key.
  • A window level groups windows with respect to their z-position.

Constants

Traits

  • The trait that automatically gets implemented to each object you give the object attribute.

Functions

  • Not done.
  • 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.
  • Checks that the scale factor is a normal positive f64.
  • 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.