Skip to content

Commit

Permalink
Add README to core package
Browse files Browse the repository at this point in the history
  • Loading branch information
jdahlstrom committed Nov 29, 2024
1 parent bdb4dfa commit 281d7b9
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 11 deletions.
14 changes: 5 additions & 9 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,19 @@ Done:
* Reading and writing Wavefront .obj files
* Cubic Bezier curves and splines
* Simple random number generation and distributions
* Frontend for wasm and minifb
* Wasm and minifb frontends

In progress:

= Sprite and text primitives
= Simple bitmap font support
= Spherical, cube, etc UV mapping
= Procedural noise generation

= Frontends for sdl2, softbuffer, ncurses
= Different camera types

Planned:

- Material support
- Different camera types
- Basic scene graph
- Hierarchical transforms
- Cube mapping and skyboxes
Expand Down Expand Up @@ -99,15 +97,13 @@ dependencies. However, because `no_std` lacks most floating-point functions,
the package is not fully functional unless either the `std`, `libm`, or `mm`
feature is enabled. Activating `std` additionally enables APIs that do I/O.

The `front` package can be used to write simple games and demos. It contains
simple window abstractions, one using the `minifb` crate and the other running
in the browser via WebAssembly.
The `front` package depends on `minifb` or `wasm-bindgen` and `web-sys`,
depending on enabled features.

The `geom` package has no external dependencies. It only requires `alloc`;
activating the optional feature `std` enables APIs doing I/O.

The `demos` package contains sample applications using `front` to exhibit
various features of retrofire.
The `demos` package depends on `front`.

================================== License ===================================

Expand Down
2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ libm = ["fp", "dep:libm"]
mm = ["fp", "dep:micromath"]

[dependencies]
libm = { version = "0.2", optional = true }
libm = { version = "0.2", optional = true }
micromath = { version = "2.1", optional = true }
49 changes: 49 additions & 0 deletions core/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
_______
____ /´ ____/\
__ ______ _____ / /\_ _ ______ _____ ____/ /_/___/\ __ _____ ______
==/ ´ ____/ __ \ ____/ ´ ____/ __ ` __ ___, /==/ ´ ___/ __ \
==/ /´=/ ______/ /==/ /´=/ /==/ /=/ /=/ /==/ /´=/ ______/\
==/ /==/ /____/ /__/ /==/ /__/ /=/ /=/ /__/ /==/ /______\/
==/___/ ==\_______/\______/__/ ==\________,´_/ /==\______/__/ ==\________/\
==\___\/ ==\______\/\_____\__\/ ==\______/_____,´ /==\_____\___\/==\_______\/
\_____\,´

Core functionality of the `retrofire` project.

Includes a math library with strongly typed vectors, matrices, colors, and
angles; basic geometry primitives; a software 3D renderer with customizable
shaders; with more to come.


============================== Crate features ================================

* std:
Makes available items requiring I/O, timekeeping, or any floating-point
functions not included in `core`. In particular this means trigonometric
and transcendental functions. If this feature is disabled, the crate only
depends on `alloc`.

* libm:
Provides software implementations of floating-point functions via the
`libm` crate (https://crates.io/crates/libm).

* `mm`
Provides fast approximate implementations of floating-point functions
via the `micromath` crate (https://crates.io/crates/micromath).

All features are disabled by default.


================================== License ===================================

Copyright 2020-2024 Johannes Dahlström. retrofire is licensed under either of:

* Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)

* MIT license (http://opensource.org/licenses/MIT)

at your option.

Unless you explicitly state otherwise, any contribution intentionally submit-
ted for inclusion in the work by you, as defined in the Apache-2.0 license,
shall be dual licensed as above, without any additional terms or conditions.
2 changes: 1 addition & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
//! Provides software implementations of floating-point functions via the
//! [libm](https://crates.io/crates/libm) crate.
//!
//! * `micromath`:
//! * `mm`:
//! Provides fast approximate implementations of floating-point functions
//! via the [micromath](https://crates.io/crates/micromath) crate.
//!
Expand Down

0 comments on commit 281d7b9

Please sign in to comment.