Schemas / Geometry / paint
rig.paint.gradient
v1.0.0 · stable maturity: stable 5 fields 2 required
Fields
| Field | Type | Meaning | |
|---|---|---|---|
kind |
enumlinear · radial | required | linear, radial |
stops |
array<object> | required | Sorted t in 0-1 |
start |
vec2 | optional | Optional. Start / center; absent = (0, 0) in object space |
end |
vec2 | optional | Optional. End / radius hint; absent = (1, 0) in object space |
spread |
enumpad · repeat · mirror | optional | Optional. pad / repeat / mirror; absent = pad |
Shared gradient paint (optional library entity).
A gradient transform is rig.spatial.transform on this entity. Do not add a matrix field.
JSON Schema
Resolves at https://rig.works/schemas/rig.paint.gradient.schema.json —
raw file.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://rig.works/schemas/rig.paint.gradient.schema.json",
"title": "rig.paint.gradient",
"type": "object",
"additionalProperties": false,
"properties": {
"kind": {
"type": "string",
"enum": [
"linear",
"radial"
]
},
"stops": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"t",
"rgba"
],
"properties": {
"t": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"rgba": {
"$ref": "./_defs.schema.json#/$defs/rgba"
}
}
}
},
"start": {
"$ref": "./_defs.schema.json#/$defs/vec2"
},
"end": {
"$ref": "./_defs.schema.json#/$defs/vec2"
},
"spread": {
"type": "string",
"enum": [
"pad",
"repeat",
"mirror"
]
}
},
"required": [
"kind",
"stops"
],
"x-rig-maturity": "stable"
}