dirt_feature 
One mark a cause leaves on a body's surface: how thick it lies at each point of one limb, from 0, nothing, to 1. Only a contact point or a wet coat's underside passes DIRT_CONTACT, so the darkest role lands there and nowhere else.
A feature also knows how far it can reach, so a mask weighs it only on the pixels round it. A few are drawn on pixels each view picks for them instead (bind()).
Vars | |
| along_per_pixel | h along its limb that one pixel spans, from dirt_metric(). |
|---|---|
| break_seed | A covering feature's seed for the noise that breaks it near a profile's outline. |
| covering | Whether it covers, as the top level does: it fades at the outline and breaks near a profile's (dirt_rasterise_level()) and is drawn whatever the runs' spacing keeps. |
| degrees_per_pixel | Degrees round its limb that one pixel spans, from dirt_metric(). |
| drawn_pixels | alist(pixel index = thickness) on the view it's drawn on, where it lies at all, set by bind() as it's first asked for (pixels_on()). |
| from_level | The only level it's drawn from, for a run carried on past its bulb, or null. |
| limb | The DIRT_LIMB_* define it lies on, or null for one drawn on pixels a view picks across limbs. |
| profile_hidden | Whether it's left out facing east or west: in profile only a back's edge shows, and mess on it read as a strap. |
| profile_only | Whether it's drawn facing east or west only: in profile the arm hides the back, so a back's coat shows down the leg. |
| reach_degrees | How many degrees either side of reach_theta it can reach. |
| reach_high | The highest h it can reach. |
| reach_low | The lowest h it can reach. |
| reach_theta | The theta in the middle of where it can reach. |
| role | The DIRT_ROLE_* define it always draws in, or null to draw in the role its thickness picks. |
| run_group | The run or drop it belongs to, which a view may leave out (dirt_runs_apart()): a number, DIRT_RUN_GROUP_EARLY, or null for one always drawn. |
Procs | |
| New | Starts a feature on a limb. |
| bind | Works out the pixels the feature draws on in one view, into drawn_pixels: by default its thickness() on each pixel of its limb it can reach. A few pick their pixels instead. |
| pixels_on | Returns how thick the feature lies on each pixel of the view it's drawn on, where it lies at all: alist(pixel index = thickness), worked out the first time (bind()). A feature is drawn on one view only. You should NEVER modify it. |
| thickness | Returns how thick the feature lies at a point of the surface, from 0, nothing, to 1. |
Var Details
along_per_pixel 
h along its limb that one pixel spans, from dirt_metric().
break_seed 
A covering feature's seed for the noise that breaks it near a profile's outline.
covering 
Whether it covers, as the top level does: it fades at the outline and breaks near a profile's (dirt_rasterise_level()) and is drawn whatever the runs' spacing keeps.
degrees_per_pixel 
Degrees round its limb that one pixel spans, from dirt_metric().
drawn_pixels 
alist(pixel index = thickness) on the view it's drawn on, where it lies at all, set by bind() as it's first asked for (pixels_on()).
from_level 
The only level it's drawn from, for a run carried on past its bulb, or null.
limb 
The DIRT_LIMB_* define it lies on, or null for one drawn on pixels a view picks across limbs.
profile_hidden 
Whether it's left out facing east or west: in profile only a back's edge shows, and mess on it read as a strap.
profile_only 
Whether it's drawn facing east or west only: in profile the arm hides the back, so a back's coat shows down the leg.
reach_degrees 
How many degrees either side of reach_theta it can reach.
reach_high 
The highest h it can reach.
reach_low 
The lowest h it can reach.
reach_theta 
The theta in the middle of where it can reach.
role 
The DIRT_ROLE_* define it always draws in, or null to draw in the role its thickness picks.
run_group 
The run or drop it belongs to, which a view may leave out (dirt_runs_apart()): a number, DIRT_RUN_GROUP_EARLY, or null for one always drawn.
Proc Details
New
Starts a feature on a limb.
Arguments:
- limb: The DIRT_LIMB_* define it lies on, or null for one drawn on pixels a view picks across limbs.
bind
Works out the pixels the feature draws on in one view, into drawn_pixels: by default its thickness() on each pixel of its limb it can reach. A few pick their pixels instead.
Arguments:
- surface: The view's surface.
- surface_rows: Its pixels by limb and row, from dirt_surface_rows().
pixels_on
Returns how thick the feature lies on each pixel of the view it's drawn on, where it lies at all: alist(pixel index = thickness), worked out the first time (bind()). A feature is drawn on one view only. You should NEVER modify it.
Arguments:
- surface: The view's surface.
- surface_rows: Its pixels by limb and row, from dirt_surface_rows().
thickness
Returns how thick the feature lies at a point of the surface, from 0, nothing, to 1.
Arguments:
- theta: Degrees round the limb, from -180 up to 180.
- along: h along the limb.