Crate pxl[][src]

pxl

A simple framework for making graphical programs in Rust. pxl is intended to avoid Rust's most challenging concepts, while still providing a compelling platform upon which to develop graphical games and programs.

Features

  • Pixel-based rendering
  • Sample-based audio synthesis
  • Custom vertex and fragment shaders
  • pxl-build, a compile-time resource loading crate
  • Action and text input

Structs

Image

An image made of pixels. Used by the pxl-build crate for image resources

Pixel

An RGBA pixel. Components should normally be between 0.0 and 1.0 inclusive.

Sample

A single stereo audio sample, representing 1/SAMPLES_PER_SECOND of an audio signal

Enums

Button

Enum representing input buttons

ButtonState

Enum representing the state of an input button

Event

Input events

Constants

SAMPLES_PER_SECOND

The number of audio samples in a second. Synthesizer implementations will need this to calculate the current time from the number of samples played so far.

Traits

Program

Trait representing a pxl::Program

Synthesizer

Trait for things that can generate sound

Functions

run

Run a pxl::Program. run takes care of instantiating your program, so your program is passed as a type parameter, not as a value.