render_set_painterly
The painterly mode's settings; omitted values are kept. style: the default brush style's ref for handles without a defined styleRef ('' = built-in; an undefined ref draws the built-in until defined); ground: lit (painted surfaces shaded between their marks, default) or paper (only their marks show); paper: the background in this mode, linear RGB in [0, 1], null for the scene's; spacingPx: the marks' target screen spacing in CSS px [4, 64] (default 10); bands: 0 (smooth, default) or 2 to 16 light steps of marks and surfaces alike. Returns the painterly state, also get_render_quality's painterly: { style, ground, paper?, spacingPx, bands, handles, marks, waiting, styleOverflow, bytes }.
Usage
surface.execute('render_set_painterly', { style?, ground?, paper?, spacingPx?, bands? })Parameters
stylestringground"lit" | "paper"paperarray | nullspacingPxnumberbandsinteger
Returns
object with style, ground, paper, spacingPx, bands, handles, marks, waiting, styleOverflow, bytes, in the ok: true envelope.
{
"type": "object",
"properties": {
"style": {
"type": "string"
},
"ground": {
"type": "string",
"enum": [
"lit",
"paper"
]
},
"paper": {
"type": "array",
"minItems": 3,
"maxItems": 3,
"items": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"spacingPx": {
"type": "number"
},
"bands": {
"type": "integer",
"minimum": 0
},
"handles": {
"type": "integer",
"minimum": 0
},
"marks": {
"type": "integer",
"minimum": 0
},
"waiting": {
"type": "integer",
"minimum": 0
},
"styleOverflow": {
"type": "integer",
"minimum": 0
},
"bytes": {
"type": "integer",
"minimum": 0
}
},
"required": [
"style",
"ground",
"spacingPx",
"bands",
"handles",
"marks",
"waiting",
"styleOverflow",
"bytes"
]
}