Skip to content

Commit

Permalink
Merge pull request #36 from jonmmease/jonmmease/initial_gradients
Browse files Browse the repository at this point in the history
Add support for gradients
  • Loading branch information
jonmmease authored Jan 27, 2024
2 parents 2413707 + 9709b72 commit 145bb8f
Show file tree
Hide file tree
Showing 104 changed files with 62,192 additions and 991 deletions.
18 changes: 14 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions examples/scatter-panning/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions examples/wgpu-winit/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sg2d-vega-test-data/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ edition = "2021"

[dependencies]
serde_json = {workspace = true}
vl-convert-rs = "1.2.1"
vl-convert-rs = "1.2.3"
pollster = "0.3"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
157 changes: 157 additions & 0 deletions sg2d-vega-test-data/vega-scenegraphs/gradients/arc_gradient.sg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{
"width": 210,
"height": 210,
"origin": [
5,
5
],
"scenegraph": {
"clip": false,
"interactive": true,
"items": [
{
"items": [
{
"clip": false,
"interactive": true,
"items": [
{
"x": 100,
"y": 100,
"outerRadius": 80,
"innerRadius": 20,
"startAngle": 5,
"endAngle": 7,
"fill": {
"x1": 0,
"y1": 1,
"x2": 1,
"y2": 1,
"gradient": "linear",
"stops": [
{
"offset": 0,
"color": "yellow"
},
{
"offset": 0.4,
"color": "yellow"
},
{
"offset": 0.6,
"color": "darkgreen"
},
{
"offset": 1,
"color": "darkgreen"
}
]
},
"fillOpacity": 0.6,
"stroke": {
"x1": 0,
"y1": 0,
"x2": 1,
"y2": 1,
"gradient": "linear",
"stops": [
{
"offset": 0,
"color": "orange"
},
{
"offset": 0.4,
"color": "orange"
},
{
"offset": 0.6,
"color": "purple"
},
{
"offset": 1,
"color": "purple"
}
]
},
"strokeWidth": 4
},
{
"x": 100,
"y": 100,
"outerRadius": 80,
"innerRadius": 20,
"startAngle": 8,
"endAngle": 9,
"fill": {
"x1": 0,
"y1": 0,
"x2": 1,
"y2": 1,
"gradient": "linear",
"stops": [
{
"offset": 0,
"color": "orange"
},
{
"offset": 0.4,
"color": "orange"
},
{
"offset": 0.6,
"color": "purple"
},
{
"offset": 1,
"color": "purple"
}
]
},
"fillOpacity": 0.6,
"stroke": {
"x1": 0,
"y1": 1,
"x2": 1,
"y2": 1,
"gradient": "linear",
"stops": [
{
"offset": 0,
"color": "yellow"
},
{
"offset": 0.4,
"color": "yellow"
},
{
"offset": 0.6,
"color": "darkgreen"
},
{
"offset": 1,
"color": "darkgreen"
}
]
},
"strokeWidth": 4
}
],
"marktype": "arc",
"name": "marks",
"role": "mark",
"zindex": 0
}
],
"fill": "transparent",
"x": 0,
"y": 0,
"width": 200,
"height": 200
}
],
"marktype": "group",
"name": "root",
"role": "frame",
"zindex": 0
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 145bb8f

Please sign in to comment.