Re-exports§
pub use self::biome::BiomeKind;
pub use self::block::Block;
pub use self::block::BlockKind;
pub use self::map::MapSizeLg;
pub use self::site::SiteKindMeta;
pub use self::sprite::SpriteCfg;
pub use self::sprite::SpriteKind;
pub use self::sprite::UnlockKind;
pub use self::structure::Structure;
pub use self::structure::StructuresGroup;
Modules§
Structs§
Constants§
- NEIGHBOR_
DELTA - TERRAIN_
CHUNK_ BLOCKS_ LG - Base two logarithm of the number of blocks along either horizontal axis of a chunk.
- TERRAIN_
GRID_ 🔒SEARCH_ DIST
Traits§
Functions§
- neighbors
- Iterate through all cells adjacent to a chunk.
- quadratic_
nearest_ point - Find the nearest point from a quadratic spline to this point (in terms of t, the “distance along the curve” by which our spline is parameterized). Note that if t < 0.0 or t >= 1.0, we probably shouldn’t be considered “on the curve”… hopefully this works out okay and gives us what we want (a river that extends outwards tangent to a quadratic curve, with width configured by distance along the line).
- river_
spline_ coeffs - uniform_
idx_ as_ vec2 - Computes the position Vec2 of a SimChunk from an index, where the index was generated by uniform_noise.
- vec2_
as_ uniform_ idx - Computes the index of a Vec2 of a SimChunk from a position, where the index is generated by uniform_noise. NOTE: Both components of idx should be in-bounds!