A cell function that places art by hashing the tile's own coordinate.
Cauldron2D.Parallax.Scatter.cells(seed: 7, density: 0.08, arts: [:pine, {:boulder, 1}])The function answers for any coordinate, keeps no state, and gives the same answer every time it is asked and on every node, so a scattered layer never has to be sent anywhere.
Summary
Functions
Build the cell function.
The same hash the cell function draws from, for a caller placing its own things.
Types
Functions
Build the cell function.
Options
:arts— what to place, as[art | {art, weight}], required and not empty. A bare art counts as weight 1:seed— this layer's own seed. Default0:density— the fraction of tiles holding art,0.0..1.0. Default0.05:rows— a range of tile rows art may stand in. Default every row
@spec draw_at(integer(), integer(), integer()) :: non_neg_integer()
The same hash the cell function draws from, for a caller placing its own things.