diff --git a/src/traces/scatter3d/convert.js b/src/traces/scatter3d/convert.js index 2e1b4aec6a2..01588df0ed6 100644 --- a/src/traces/scatter3d/convert.js +++ b/src/traces/scatter3d/convert.js @@ -407,7 +407,10 @@ proto.update = function(data) { var delaunayOptions = constructDelaunay( options.position, options.delaunayColor, - options.delaunayAxis); + options.delaunayAxis + ); + delaunayOptions.opacity = data.opacity; + if(this.delaunayMesh) { this.delaunayMesh.update(delaunayOptions); } else { diff --git a/test/image/baselines/gl3d_cube.png b/test/image/baselines/gl3d_cube.png new file mode 100644 index 00000000000..8991b54ed9a Binary files /dev/null and b/test/image/baselines/gl3d_cube.png differ diff --git a/test/image/mocks/gl3d_cube.json b/test/image/mocks/gl3d_cube.json new file mode 100644 index 00000000000..3543b2443af --- /dev/null +++ b/test/image/mocks/gl3d_cube.json @@ -0,0 +1,231 @@ +{ + "data": [ + { + "type": "scatter3d", + "mode": "lines", + "x": [ + 0, + 1, + 1, + 0, + 0 + ], + "y": [ + 0, + 0, + 1, + 1, + 0 + ], + "z": [ + 0, + 0, + 0, + 0, + 0 + ], + "surfaceaxis": 2, + "name": "face 1", + "line": { + "width": 5 + }, + "uid": "6a4a7a", + "opacity": 0.3 + }, + { + "type": "scatter3d", + "mode": "lines", + "x": [ + 0, + 1, + 1, + 0, + 0 + ], + "y": [ + 0, + 0, + 1, + 1, + 0 + ], + "z": [ + 1, + 1, + 1, + 1, + 1 + ], + "surfaceaxis": 2, + "name": "face 2", + "line": { + "width": 5 + }, + "uid": "4b1345", + "opacity": 0.3 + }, + { + "type": "scatter3d", + "mode": "lines", + "x": [ + 0, + 1, + 1, + 0, + 0 + ], + "y": [ + 0, + 0, + 0, + 0, + 0 + ], + "z": [ + 0, + 0, + 1, + 1, + 0 + ], + "surfaceaxis": 1, + "name": "face 3", + "line": { + "width": 5 + }, + "uid": "1fb492", + "opacity": 0.3 + }, + { + "type": "scatter3d", + "mode": "lines", + "x": [ + 0, + 1, + 1, + 0, + 0 + ], + "y": [ + 1, + 1, + 1, + 1, + 1 + ], + "z": [ + 0, + 0, + 1, + 1, + 0 + ], + "surfaceaxis": 1, + "name": "face 4", + "line": { + "width": 5 + }, + "uid": "c96af2", + "opacity": 0.3 + }, + { + "type": "scatter3d", + "mode": "lines", + "x": [ + 0, + 0, + 0, + 0, + 0 + ], + "y": [ + 0, + 0, + 1, + 1, + 0 + ], + "z": [ + 0, + 1, + 1, + 0, + 0 + ], + "surfaceaxis": 0, + "name": "face 5", + "line": { + "width": 5 + }, + "uid": "9501a8", + "opacity": 0.3 + }, + { + "type": "scatter3d", + "mode": "lines", + "x": [ + 1, + 1, + 1, + 1 + ], + "y": [ + 0, + 0, + 1, + 1, + 0 + ], + "z": [ + 0, + 1, + 1, + 0, + 0 + ], + "surfaceaxis": 0, + "name": "face 6", + "line": { + "width": 5 + }, + "uid": "44e541", + "opacity": 0.3 + } + ], + "layout": { + "scene": { + "xaxis": { + "showgrid": false, + "showline": false, + "zeroline": false, + "showticklabels": false, + "title": "", + "type": "linear" + }, + "yaxis": { + "showgrid": false, + "showline": false, + "zeroline": false, + "showticklabels": false, + "title": "", + "type": "linear" + }, + "zaxis": { + "showgrid": false, + "showline": false, + "zeroline": false, + "showticklabels": false, + "title": "", + "type": "linear" + }, + "aspectratio": { + "x": 1, + "y": 1, + "z": 1 + } + }, + "height": 450, + "width": 1731.82, + "autosize": true + } +}