Crate crayon [] [src]

What is This?

Crayon is an experimental purpose game engine, written with a minimalistic modular design philosophy. Its built from the ground up to focus on cache friendly data layouts in multicore environments with entity-component based architecture.

It is loosely inspired by some amazing blogs on bitsquid and molecular. Some goals include:

  • Extensible through external code modules;
  • Run on [x]macOS, [x]Windows, iOS, Android, WebAssembly from the same source;
  • Stateless, layered, multithread render system with OpenGL(ES) 2.0+ backends;
  • Entity component system with a data-driven designs;
  • Unified access to input devices across platforms;
  • Asynchronous data loading from various filesystem.

Please read the documents under modules for specific usages.

Quick Example

For the sake of brevity, you can also run a simple and quick example with commands:

git clone git@github.com:shawnscode/crayon.git && cd crayon/crayon-examples
cargo run imgui

Reexports

pub extern crate cgmath as math;

Modules

application

A unified application model across all target platforms.

ecs

The entity component system with a data-orinted designs.

graphics

A stateless, layered, multithread graphics system with OpenGL backends.

input

Provides unified access to input devices across platforms.

prelude
resource

The standardized interface to load data asynchronously from the Filesystem, and provides utilities for modules to implement their own local resource management.

scene
utils

Commonly used utilities like pools, variants and so on.

Macros

declare_component

Declare a struct as component, and specify the storage strategy. Internally, this macro will impl a internal trait Component to provide some useful methods and hints.

impl_handle
impl_vertex
impl_vertex_field
offset_of