PatternCode
Experimental
Interfaces
| Interface | Description |
|---|---|
| ResolvedPattern | Per-item pattern buffers (4 floats per item each), as uploaded to PATTERN_ATTRIBUTES. |
Variables
| Variable | Description |
|---|---|
| PATTERN_ATTRIBUTES | Pattern attributes (per instance, or per vertex for fills), 4 floats each. |
Functions
| Function | Description |
|---|---|
| contrastOf | Plotly's Color.contrast: white over dark colors, #444 over light ones (translucent colors are composited over background first: white in Plotly). |
| patternShader | source (a rect, arc or fill shader) with the pattern code in at its hooks. |
| resolvePattern | Resolve fill for count items (see PatternFill). |
| writeInstancePattern | Upload fill resolved for the count instances of an instanced rect or arc mesh (its iFill attribute gives the capacity) and switch it to the pattern shaders. |