Crate pixel_game_lib

source ·
Expand description

Utility library for games.

Features

window

Creates a desktop window and a WASM based web “window” for drawing pixels. Runs a configurable game loop which splits a render and an update function.

font

Render a simple ASCII bitmap font.

Modules

  • Re-export vek types. A crate that provides facilities for testing the approximate equality of floating-point based types, using either relative difference, or units in the last place (ULPs) comparisons.
  • Re-export vek types. Low-order (quadratic and cubic) Bézier curves.
  • Render a simple ASCII bitmap font.
  • Re-export vek types. Common and trivial geometric primitives.
  • Re-export vek types. Matrix types.
  • Re-export vek types. Integer trait and functions.
  • Re-export vek types. Numeric traits for generic mathematics
  • Re-export vek types. Operations defined by this crate, such as MulAdd, Lerp, Clamp, and Wrap.
  • Re-export vek types. Quaternions are a convenient representation for rotations in 3D spaces.
  • Re-export vek types.
  • Re-export vek types. SIMD traits; they are useful when the features “repr_simd” and “platform_intrinsics” are enabled.
  • Re-export vek types. A convenient position + orientation + scale container, backed by two Vec3 and a Quaternion.
  • Re-export vek types. Convenience structures for representing a transition from one value to another.
  • Re-export vek types. Vector types.

Structs

  • Re-export vek types. Axis-aligned Bounding Box (3D), represented by min and max points.
  • Re-export vek types. Axis-aligned Bounding Rectangle (2D), represented by min and max points.
  • Re-export vek types. A 2D Bézier curve with two control points.
  • Re-export vek types. A 3D Bézier curve with two control points.
  • Re-export vek types. Disk (2D), represented by center and radius.
  • Re-export vek types. Ellipsis (2D), represented by center and radius in both axii.
  • Re-export vek types. Vector type suited for 2D extents (width and height).
  • Re-export vek types. Vector type suited for 3D extents (width, height and depth).
  • Re-export vek types. Data that represents distance offsets of frustum planes from an origin.
  • Re-export vek types. A pass-through functor that returns progress values directly as LERP factors.
  • Re-export vek types. 2D Line segment, represented by two points, start and end.
  • Re-export vek types. 3D Line segment, represented by two points, start and end.
  • Re-export vek types. 2x2 matrix.
  • Re-export vek types. 3x3 matrix.
  • Re-export vek types. 4x4 matrix.
  • Re-export winit types. A size represented in physical pixels.
  • Re-export vek types. Nobody can possibly use this ???
  • Re-export vek types. A function pointer container that can map a progress value to a LERP factor.
  • Re-export vek types. A 2D Bézier curve with one control point.
  • Re-export vek types. A 3D Bézier curve with one control point.
  • Re-export vek types. Quaternions are a convenient representation for rotations in 3D spaces.
  • Re-export vek types. 3D ray, represented by a starting point and a normalized direction vector.
  • Re-export vek types. 2D rectangle, represented by a bottom-left position, and 2D extents.
  • Re-export vek types. A Rect extended to 3D.
  • Re-export vek types. Vector type suited for RGB color data.
  • Re-export vek types. Vector type suited for RGBA color data.
  • Re-export vek types. Opaque type wrapping a hardware-preferred shuffle mask format for 4D vectors.
  • Re-export vek types. Sphere (3D), represented by center and radius.
  • Re-export vek types. A convenient position + orientation + scale container, backed by two Vec3 and a Quaternion.
  • Re-export vek types. A convenience structure for storing a progression from one value to another.
  • Re-export vek types. Vector type suited for 2D spatial coordinates.
  • Re-export vek types. Vector type suited for 3D spatial coordinates.
  • Re-export vek types. Vector type suited for homogeneous 3D spatial coordinates.
  • Window configuration.

Enums

  • Re-export winit types. Symbolic name for a keyboard key.
  • Re-export winit_input_helper key type. Stores a character or a backspace.

Traits

  • Re-export vek types. A scalar or vector that can be constrained to be between two values (inclusive).
  • Re-export vek types. A scalar or vector that can be constrained to be between 0 and 1 (inclusive).
  • Re-export vek types. A scalar or vector that can be constrained to be between -1 and 1 (inclusive).
  • Re-export vek types. Trait for types that are suitable for representing a color component value.
  • Re-export vek types. A value that can tell whether or not it is between two bounds (inclusive).
  • Re-export vek types. A value that can tell whether or not it is between 0 and 1 (inclusive).
  • Re-export vek types. A value that can be linearly interpolated.
  • Re-export vek types. Fused multiply-add. Computes (self * a) + b with only one rounding error, yielding a more accurate result than an unfused multiply-add.
  • Re-export vek types. A functor that maps a progress value to a LERP factor.
  • Re-export vek types. This trait should be implemented by scalar types, vectors of which are supported by SIMD intrinsics. For instance, i16 and f32 can implement this trait, as well as #[repr(transparent)] wrappers of these, but not hand-built numeric types.
  • Re-export vek types. Implemented by unsigned integer types that can represent the result of SIMD comparison elements: semantically, these are booleans, but in their representation, zero is false and any other value is true. Typically, SIMD comparison of two vectors will yield a vector of mask elements, on which you can call reduce_and() or reduce_or().
  • Re-export vek types. A value that can be Spherically Linearly interpolated.
  • Re-export vek types. A value that can wrap itself around given bounds.

Functions

  • mul_addDeprecated
    Re-export vek types. Returns (val * mul) + add.
  • Re-export vek types. Compares and returns the maximum of two values, using partial ordering.
  • Re-export vek types. Compares and returns the minimum of two values, using partial ordering.
  • Create a new window with an event loop and run the game.

Type Aliases

  • Re-export vek types. A convenience structure for storing a linear progression from one value to another.