Terrain Effect¶
See Water, smoke, cloth, and procedural worlds for presets, controls, units, and resize behavior.
Perspective voxel-space flyover of a seeded, periodic height field.
- class bruhanimate.bruheffect.terrain_effect.TerrainEffect(buffer: Buffer, background: str, settings: TerrainSettings | None = None)[source]¶
Bases:
BaseEffectCoherent hills projected into a moving perspective view.
A bounded seeded noise tile supplies four octaves. Travel wraps through that tile; resize preserves the tile and camera position and repaints at once.
- __init__(buffer: Buffer, background: str, settings: TerrainSettings | None = None) None[source]¶
Base class for all effects.
- Parameters:
buffer (Buffer) – Effect buffer to push updates to.
background (str) – character or string to use for the background.
seed – Non-negative integer for independent Python and NumPy random streams. None uses fresh entropy. Global RNG state is untouched.
- resize(size: tuple[int, int]) None[source]¶
Change the drawing viewport, retaining the original simulation raster.
Shrinking clips from the bottom/right; growing reveals the original raster again. Cells beyond it remain transparent to the owner. Random streams, resource handles and simulation coordinates are unchanged. Subclasses can override this typed hook to adapt simulation arrays and repaint the private raster at the current tick, then call super().resize. Built-in adapters use this contract; draw must still never advance time.