kpreid / all-is-cubes

Yet another block/voxel game; in this one the blocks are made out of blocks. Runs in browsers on WebGL+WebAssembly.
https://kpreid.dreamwidth.org/tag/all+is+cubes
Apache License 2.0
147 stars 8 forks source link

Split out new crate `all-is-cubes-base`. #491

Closed kpreid closed 2 months ago

kpreid commented 2 months ago

It contains the majority of code from the math and util modules of all-is-cubes.

This new crate will enable us to use raycast in the build script of all-is-cubes to generate fully pre-calculated light propagation data (#490). It may also assist in further splitting of all-is-cubes into separately compilable parts, if I find such divisions worth making.

I chose the name “base” to be sufficiently abstract that it will not become unsuitable for its purpose (being the crate that all others eventually depend on) regardless of exactly what it evolves to contain. I also considered “all-is-cubes-core”, but I feel that only the crate containing Block and Space deserves that name if I were to use it.

Also, because it's now possible and convenient, the macros notnan, rgb_const, and rgba_const have been moved to all_is_cubes::math. (This is only possible because macro re-exports can be exported from specific modules, even though macro_rules declarations can only be exported from the crate root.)