Skip to content

Mesh3d lighting fix #3415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jan 16, 2019
Merged
12 changes: 3 additions & 9 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"gl-heatmap2d": "^1.0.5",
"gl-line3d": "^1.1.8",
"gl-mat4": "^1.2.0",
"gl-mesh3d": "^2.0.4",
"gl-mesh3d": "^2.0.5",
"gl-plot2d": "^1.4.1",
"gl-plot3d": "^1.6.2",
"gl-pointcloud2d": "^1.0.2",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl3d_reversescale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl3d_snowden.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl3d_snowden_altered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl3d_tetrahedra.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl3d_world-cals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions test/image/mocks/gl3d_mesh3d_surface_lighting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"data": [
{
"x": [0, 0, 0, 1, 1, 1, 2, 2, 2],
"y": [100, 101, 102, 100, 101, 102, 100, 101, 102],
"z": [1.5, 1.5, 1.5, 1.5, 2.5, 3.5, 1.5, 3.5, 5.5],
"type": "mesh3d",
"color": "grey",
"lighting": { "ambient": 0.5, "diffuse": 0.5, "specular": 0.5, "roughness": 0.5, "fresnel": 0.5 },
"lightposition": { "x": 0, "y": 2000, "z": 1000 }
},
{
"x": [0, 0, 0, 1, 1, 1, 2, 2, 2],
"y": [100, 99, 98, 100, 99, 98, 100, 99, 98],
"z": [1.5, 1.5, 1.5, 1.5, 2.5, 3.5, 1.5, 3.5, 5.5],
"type": "mesh3d",
"color": "grey",
"lighting": { "ambient": 0.5, "diffuse": 0.5, "specular": 0.5, "roughness": 0.5, "fresnel": 0.5 },
"lightposition": { "x": 0, "y": 2000, "z": 1000 }
},
{
"x": [0, 0, 0, -1, -1, -1, -2, -2, -2],
"y": [100, 99, 98, 100, 99, 98, 100, 99, 98],
"z": [1.5, 1.5, 1.5, 1.5, 2.5, 3.5, 1.5, 3.5, 5.5],
"type": "mesh3d",
"color": "grey",
"lighting": { "ambient": 0.5, "diffuse": 0.5, "specular": 0.5, "roughness": 0.5, "fresnel": 0.5 },
"lightposition": { "x": 0, "y": 2000, "z": 1000 }
},
{
"x": [0, 0, 0, -1, -1, -1, -2, -2, -2],
"y": [100, 101, 102, 100, 101, 102, 100, 101, 102],
"z": [1.5, 1.5, 1.5, 1.5, 2.5, 3.5, 1.5, 3.5, 5.5],
"type": "mesh3d",
"color": "grey",
"lighting": { "ambient": 0.5, "diffuse": 0.5, "specular": 0.5, "roughness": 0.5, "fresnel": 0.5 },
"lightposition": { "x": 0, "y": 2000, "z": 1000 }
},
{
"x": [-2, -1, 0, 1, 2],
"y": [98, 99, 100, 101, 102],
"z": [
[4, 2, 0, 2, 4],
[2, 1, 0, 1, 2],
[0, 0, 0, 0, 0],
[2, 1, 0, 1, 2],
[4, 2, 0, 2, 4]
],
"type": "surface",
"colorscale": [[0, "grey"], [1, "grey"]],
"showscale": false,
"lighting": { "ambient": 0.5, "diffuse": 0.5, "specular": 0.5, "roughness": 0.5, "fresnel": 0.5 },
"lightposition": { "x": 0, "y": 2000, "z": 1000 }
}
],
"layout": {
"height": 800,
"width": 800,
"title": {
"text": "Mesh3d and surface lighting"
},
"scene": {
"xaxis": {
},
"yaxis": {
},
"zaxis": {
},
"camera": {
"eye": {
"x": 2.0,
"y": -1.5,
"z": 0.5
}
}
}
}
}