diff --git a/package-lock.json b/package-lock.json index 4bb153a5d5c..f006fa5f2a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4601,9 +4601,9 @@ } }, "gl-mesh3d": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/gl-mesh3d/-/gl-mesh3d-2.1.1.tgz", - "integrity": "sha512-UuDnuSE/xX8y9/B6EtDsBKllEmKDVmuiD9lsFoQdUq4FPSvwFOo9rKH3fsjK2pfxsTigguF6GhFjHqq+sJKQWg==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/gl-mesh3d/-/gl-mesh3d-2.1.3.tgz", + "integrity": "sha512-c1zMvkVoKrVPSn/YA0JTDE/I289xqAjkH52HZBLvEGmKAg0Ezwi/Llg1M7NPIb4d5nwekCBMXGZmemsZaedI5g==", "requires": { "barycentric": "^1.0.1", "colormap": "^2.3.1", diff --git a/package.json b/package.json index 2c3cf2e6388..0dac48e1a5e 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "gl-heatmap2d": "^1.0.5", "gl-line3d": "^1.1.11", "gl-mat4": "^1.2.0", - "gl-mesh3d": "^2.1.1", + "gl-mesh3d": "^2.1.3", "gl-plot2d": "^1.4.2", "gl-plot3d": "^2.3.0", "gl-pointcloud2d": "^1.0.2", diff --git a/test/image/baselines/gl3d_mesh3d-missing-colors.png b/test/image/baselines/gl3d_mesh3d-missing-colors.png new file mode 100644 index 00000000000..b237c2b7627 Binary files /dev/null and b/test/image/baselines/gl3d_mesh3d-missing-colors.png differ diff --git a/test/image/mocks/gl3d_mesh3d-missing-colors.json b/test/image/mocks/gl3d_mesh3d-missing-colors.json new file mode 100644 index 00000000000..2959518338c --- /dev/null +++ b/test/image/mocks/gl3d_mesh3d-missing-colors.json @@ -0,0 +1,56 @@ +{ + "data": [{ + "x": [0, 1, 0, 1, 0, 1, 0, 1], + "y": [0, 0, 1, 1, 0, 0, 1, 1], + "z": [0, 0, 0, 0, 1, 1, 1, 1], + "i": [0, 3, 4, 7, 0, 6, 1, 7, 0, 5, 2, 7], + "j": [1, 2, 5, 6, 2, 4, 3, 5, 4, 1, 6, 3], + "k": [3, 0, 7, 4, 6, 0, 7, 1, 5, 0, 7, 2], + "flatshading": true, + "lightposition": { "x": 1000, "y": 1000, "z": 0 }, + "opacity": 1, + "vertexcolor": ["#F00", "#FF0", "#0F0", "#0FF", "#00F", "#F0F"], + "type": "mesh3d", + "name": "mesh3d", + "scene": "scene1" + }, { + "x": [0, 1, 0, 1, 0, 1, 0, 1], + "y": [0, 0, 1, 1, 0, 0, 1, 1], + "z": [0, 0, 0, 0, 1, 1, 1, 1], + "i": [0, 3, 4, 7, 0, 6, 1, 7, 0, 5, 2, 7], + "j": [1, 2, 5, 6, 2, 4, 3, 5, 4, 1, 6, 3], + "k": [3, 0, 7, 4, 6, 0, 7, 1, 5, 0, 7, 2], + "flatshading": true, + "lightposition": { "x": 1000, "y": 1000, "z": 0 }, + "opacity": 1, + "facecolor": ["#F00", "#FF0", "#0F0", "#0FF", "#00F", "#F0F"], + "type": "mesh3d", + "name": "mesh3d", + "scene": "scene2" + }], + "layout": { + "paper_bgcolor": "#ddd", + "margin": { + "t": 0, + "b": 0, + "l": 0, + "r": 0 + }, + "width": 250, + "height": 500, + "scene1": { + "domain": { + "x": [0, 1], + "y": [0, 0.5] + }, + "camera": { "eye": { "x": 1.5, "y": 3, "z": 1 } } + }, + "scene2": { + "domain": { + "x": [0, 1], + "y": [0.5, 1] + }, + "camera": { "eye": { "x": 1.5, "y": 3, "z": 1 } } + } + } +}