Expand description

Ivy-base

The base of the ivy framework. This crate provides some of the most used types and traits which many of the other crates depend on. Check crate::components for more information.

App

The App is the heart of any Ivy program. It defines the broad behaviour by layers. Each layer is a set of logic which can be exectuted with minimal shared data from other layers. A common pattern is to have the graphics as one layer, and the game logic as another. This ensures that the code is kept simple such that the game does not need to be concerned with rendering the world, and the rendering does not need to be concerned with the game logic.

The layered design allows for easily customizable games as behaviors can be added conditionally, for example a network layer or similar.

Gizmo

The crate also exports a gizmos system crate::gizmos which allows the creation of temporary “objects” that can be renderered into the world to provide debuggable feedback.

Note: The crate is not responsible for rendering the gizmos, but rather provides an agnostic backend for gizmo management. Most commonly, [ivy-graphics::gizmos] is used for rendering the gizmos, but is not required. Gizmos could just as well be rendered in text or an Ncurses like interface.

Re-exports

pub use components::*;
pub use extensions::*;
pub use gizmos::*;

Modules

This module provides extension to various types including, but not limited to, hecs.

Macros

Returns the length of a tuple

Structs

Measures high precision time

Color/tint of an object

Manages event broadcasting for different types of events. Sending an event will send a clone of the event to all subscribed listeners.

Represents a width and height.

Abstracts a layer executing other layers at a fixed timestep.

Abstracts the stack of layered execution logic

Times the execution time of a scope and executes the provided function with the results

Enums

Constants

45 degrees in radians

90 degrees in radians

180 degrees in radians

Traits

Describes a type which can send events. Implemented for mpsc::channel and crossbeam channel.

Allows shorter function names to convert duration into intergral types

Trait that allows easier construction of durations

A layer represents an ordered abstraction of execution logic. Layers are ordered and run in order.

Functions