From 281d7b925cecb1c20bffaa17b6ba780ebc224f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Dahlstr=C3=B6m?= Date: Fri, 29 Nov 2024 21:26:42 +0200 Subject: [PATCH] Add README to core package --- README | 14 +++++--------- core/Cargo.toml | 2 +- core/README | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ core/src/lib.rs | 2 +- 4 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 core/README diff --git a/README b/README index 07bc7f2c..8d42adf2 100644 --- a/README +++ b/README @@ -56,7 +56,7 @@ 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: @@ -64,13 +64,11 @@ In progress: = 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 @@ -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 =================================== diff --git a/core/Cargo.toml b/core/Cargo.toml index a4c4cf6b..8c310d96 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -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 } diff --git a/core/README b/core/README new file mode 100644 index 00000000..2b694430 --- /dev/null +++ b/core/README @@ -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. diff --git a/core/src/lib.rs b/core/src/lib.rs index cac469fd..4f580117 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -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. //!