hex_grid¶
type: "hex_grid"
A triangular grid over the frame, its lines coloured by the screen position.
Fields¶
Every screen effect also accepts
screen_layerand the shared definition fields (duration,easing,loop,persistent,fade_ticks,sound).
| Field | Type | Default | Meaning |
|---|---|---|---|
amount |
float | 1 (fades to 0) | Effect strength (0..1) |
cell_size |
float | 46 | Cell size in pixels |
width |
float | 0.035 | Line half-width, cell fractions |
speed |
float | 0.5 | How fast the colours drift |
core |
float | 0.68 | The highlight threshold: a pixel brighter than this goes white |
The grid is a triangular lattice: three line directions - two at 60 degrees to each other and
one vertical - drawn on a cell_size cell that is anchored at the screen centre, so the grid
grows from the middle of the frame and not from a corner. The lines are the bands where the
distance to the nearest lattice line is under width (a cell fraction, 0.035 by default).
The colour is the prism ramp picked by the screen position: prism7(x * 0.6 + y * 0.4 + time *
speed), so the same hue runs diagonally across the frame and drifts with the clock (0.5 per
second by default). The grid lines are drawn at 28 % of that colour over near-black, and the
highlights of the picture (a pixel brighter than core) go white.
The highlight threshold is absolute, not measured against the local neighbourhood: a local
mean would put a hard outline around every brightness step in the picture (the halo the
halftone and comic effects lost for the same reason).
Only the lower guards exist: cell_size cannot go under 1 px and width is floored at 0.0001
so the line falloff never degenerates. cell_size, width, speed and core have no upper
limit.
Example¶
Code¶
Its built-in datapack definition: