@seed
Set the random seed from inside the code, so the doodle renders the same every time.
Syntax
- @seed: <seed>
- seed
- Any value. It takes precedence over the seed attribute. Read the seed in use with the seed property.
A value with functions is evaluated once, before the rest of the code, and its random functions draw from the seed the doodle already has.
Examples
@grid: 6 / 60vmin _1px;
@seed: 1234567;
background: @p(#000, #e6437d, #ebbf4d);
scale: @r(.5, 1);
With @seed in the code, anyone who copies it gets the same image.
To find a seed you like, read it back with the seed property.
Inside a nested @doodle, random functions draw from the parent's seed,
so @seed: @p(1, 2) gives each copy one of two seeds:
@grid: 4 / 60vmin _4px;
background: @doodle(
@seed: @p(1, 2);
@grid: 4 / 100%;
background: @p(#000, #e6437d, #ebbf4d);
);