diff --git a/draftlogs/6999_fix.md b/draftlogs/6999_fix.md new file mode 100644 index 00000000000..14b3872e669 --- /dev/null +++ b/draftlogs/6999_fix.md @@ -0,0 +1,2 @@ + - Fix numerical precision of drawing surface trace [[6999](https://github.com/plotly/plotly.js/pull/6999)], + with thanks to @hborchardt for the contribution! \ No newline at end of file diff --git a/stackgl_modules/index.js b/stackgl_modules/index.js index 47b9dcabce6..38465a44b0f 100644 --- a/stackgl_modules/index.js +++ b/stackgl_modules/index.js @@ -24945,9 +24945,9 @@ module.exports.createTubeMesh = function(gl, params) { var createShader = __webpack_require__(9405) var glslify = __webpack_require__(3236) -var vertSrc = glslify(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform vec3 objectOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 localCoordinate = vec3(uv.zw, f.x);\n worldCoordinate = objectOffset + localCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * (view * worldPosition);\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n"]) +var vertSrc = glslify(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform vec3 objectOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 localCoordinate = vec3(uv.zw, f.x);\n worldCoordinate = objectOffset + localCoordinate;\n mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0);\n vec4 clipPosition = projection * (view * worldPosition);\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n"]) var fragSrc = glslify(["precision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color — in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]) -var contourVertSrc = glslify(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * (view * worldPosition);\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]) +var contourVertSrc = glslify(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0));\n vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0);\n\n vec4 clipPosition = projection * (view * worldPosition);\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]) var pickSrc = glslify(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]) exports.createShader = function (gl) { diff --git a/stackgl_modules/package-lock.json b/stackgl_modules/package-lock.json index 3726e053037..6c56474df62 100644 --- a/stackgl_modules/package-lock.json +++ b/stackgl_modules/package-lock.json @@ -25,7 +25,7 @@ "gl-spikes2d": "^1.0.2", "gl-spikes3d": "^1.0.11", "gl-streamtube3d": "^1.4.2", - "gl-surface3d": "^1.6.1", + "gl-surface3d": "^1.6.2", "glslify": "^7.1.1", "incremental-convex-hull": "plotly/incremental-convex-hull#v1.1.0", "is-mobile": "^4.0.0", @@ -3422,7 +3422,7 @@ "node_modules/extract-frustum-planes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/extract-frustum-planes/-/extract-frustum-planes-1.0.0.tgz", - "integrity": "sha1-l9VwP/BWTIw8aDjKxF+ee8UsnvU=" + "integrity": "sha512-GivvxEMgjSNnB3e1mIMBlB5ogPB6XyEjOQRGG0SfYVVLtu1ntLGHLT1ly8+mE819dKBHBwnm9+UBCScjiMgppA==" }, "node_modules/falafel": { "version": "2.2.4", @@ -3977,7 +3977,7 @@ "node_modules/gl-state": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gl-state/-/gl-state-1.0.0.tgz", - "integrity": "sha1-Ji+qdYNbC5xTLBLzitxCXR0wzRc=", + "integrity": "sha512-Od836PpgCuTC0W7uHYnEEPRdQPL1FakWlznz3hRvlO6tD5sdLfBKX9qNRGy1DjfMCDTudhyYWxiWjhql1B8N4Q==", "dependencies": { "uniq": "^1.0.0" } @@ -3997,9 +3997,9 @@ } }, "node_modules/gl-surface3d": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/gl-surface3d/-/gl-surface3d-1.6.1.tgz", - "integrity": "sha512-k8D81cOwA/nJeuTvrGv34ZsGRNzOffWRFA3tFvl7rxbsGN9BvFlBrgz7bukDSARRZP3iEYS+fNoEvY+eh+nzng==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/gl-surface3d/-/gl-surface3d-1.6.2.tgz", + "integrity": "sha512-Duksm4g2XwPVCHGlquEwilMloNTKOnPThVDWELXKRyY01XYmz3IxsyJjuZWaZVOg5ZPnPj0ETrw396GWEf7L5Q==", "dependencies": { "binary-search-bounds": "^2.0.4", "bit-twiddle": "^1.0.2", @@ -5801,7 +5801,7 @@ "node_modules/robust-dot-product": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/robust-dot-product/-/robust-dot-product-1.0.0.tgz", - "integrity": "sha1-yboBeL0sMEv9cl9Y6Inx2UYARVM=", + "integrity": "sha512-Nu/wah8B8RotyZLRPdlEL0ZDh3b7wSwUBLdbTHwS/yw0qqjMJ943PSCkd6EsF5R5QFDWF2x77DGsbmnv9/7/ew==", "dependencies": { "robust-sum": "^1.0.0", "two-product": "^1.0.0" @@ -6144,7 +6144,7 @@ "node_modules/split-polygon": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/split-polygon/-/split-polygon-1.0.0.tgz", - "integrity": "sha1-DqzIoTanaxKj2VJW6n2kXbDC0kc=", + "integrity": "sha512-nBFcgQUVEE8dcOjuKaRdlM53k8RxUYpRxZ//n0pHJQGhbVscrsti+gllJI3pK3y7fgFwGWgt7NFhAX5sz0UoWQ==", "dependencies": { "robust-dot-product": "^1.0.0", "robust-sum": "^1.0.0" @@ -9448,7 +9448,7 @@ "extract-frustum-planes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/extract-frustum-planes/-/extract-frustum-planes-1.0.0.tgz", - "integrity": "sha1-l9VwP/BWTIw8aDjKxF+ee8UsnvU=" + "integrity": "sha512-GivvxEMgjSNnB3e1mIMBlB5ogPB6XyEjOQRGG0SfYVVLtu1ntLGHLT1ly8+mE819dKBHBwnm9+UBCScjiMgppA==" }, "falafel": { "version": "2.2.4", @@ -9935,7 +9935,7 @@ "gl-state": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gl-state/-/gl-state-1.0.0.tgz", - "integrity": "sha1-Ji+qdYNbC5xTLBLzitxCXR0wzRc=", + "integrity": "sha512-Od836PpgCuTC0W7uHYnEEPRdQPL1FakWlznz3hRvlO6tD5sdLfBKX9qNRGy1DjfMCDTudhyYWxiWjhql1B8N4Q==", "requires": { "uniq": "^1.0.0" } @@ -9955,9 +9955,9 @@ } }, "gl-surface3d": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/gl-surface3d/-/gl-surface3d-1.6.1.tgz", - "integrity": "sha512-k8D81cOwA/nJeuTvrGv34ZsGRNzOffWRFA3tFvl7rxbsGN9BvFlBrgz7bukDSARRZP3iEYS+fNoEvY+eh+nzng==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/gl-surface3d/-/gl-surface3d-1.6.2.tgz", + "integrity": "sha512-Duksm4g2XwPVCHGlquEwilMloNTKOnPThVDWELXKRyY01XYmz3IxsyJjuZWaZVOg5ZPnPj0ETrw396GWEf7L5Q==", "requires": { "binary-search-bounds": "^2.0.4", "bit-twiddle": "^1.0.2", @@ -11489,7 +11489,7 @@ "robust-dot-product": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/robust-dot-product/-/robust-dot-product-1.0.0.tgz", - "integrity": "sha1-yboBeL0sMEv9cl9Y6Inx2UYARVM=", + "integrity": "sha512-Nu/wah8B8RotyZLRPdlEL0ZDh3b7wSwUBLdbTHwS/yw0qqjMJ943PSCkd6EsF5R5QFDWF2x77DGsbmnv9/7/ew==", "requires": { "robust-sum": "^1.0.0", "two-product": "^1.0.0" @@ -11784,7 +11784,7 @@ "split-polygon": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/split-polygon/-/split-polygon-1.0.0.tgz", - "integrity": "sha1-DqzIoTanaxKj2VJW6n2kXbDC0kc=", + "integrity": "sha512-nBFcgQUVEE8dcOjuKaRdlM53k8RxUYpRxZ//n0pHJQGhbVscrsti+gllJI3pK3y7fgFwGWgt7NFhAX5sz0UoWQ==", "requires": { "robust-dot-product": "^1.0.0", "robust-sum": "^1.0.0" diff --git a/stackgl_modules/package.json b/stackgl_modules/package.json index ba1c0de549c..4c89b577d64 100644 --- a/stackgl_modules/package.json +++ b/stackgl_modules/package.json @@ -28,7 +28,7 @@ "gl-spikes2d": "^1.0.2", "gl-spikes3d": "^1.0.11", "gl-streamtube3d": "^1.4.2", - "gl-surface3d": "^1.6.1", + "gl-surface3d": "^1.6.2", "glslify": "^7.1.1", "incremental-convex-hull": "plotly/incremental-convex-hull#v1.1.0", "is-mobile": "^4.0.0", diff --git a/test/image/baselines/gl3d_autocolorscale.png b/test/image/baselines/gl3d_autocolorscale.png index b1855eed9a2..be125a30d0a 100644 Binary files a/test/image/baselines/gl3d_autocolorscale.png and b/test/image/baselines/gl3d_autocolorscale.png differ diff --git a/test/image/baselines/gl3d_autorange-zero.png b/test/image/baselines/gl3d_autorange-zero.png index 775e97223ca..3546e27bb61 100644 Binary files a/test/image/baselines/gl3d_autorange-zero.png and b/test/image/baselines/gl3d_autorange-zero.png differ diff --git a/test/image/baselines/gl3d_chrisp-nan-1.png b/test/image/baselines/gl3d_chrisp-nan-1.png index c00167fedb5..c67a1029bae 100644 Binary files a/test/image/baselines/gl3d_chrisp-nan-1.png and b/test/image/baselines/gl3d_chrisp-nan-1.png differ diff --git a/test/image/baselines/gl3d_contour-lines.png b/test/image/baselines/gl3d_contour-lines.png index 818489e4282..6e95afcd7f6 100644 Binary files a/test/image/baselines/gl3d_contour-lines.png and b/test/image/baselines/gl3d_contour-lines.png differ diff --git a/test/image/baselines/gl3d_contour-lines2.png b/test/image/baselines/gl3d_contour-lines2.png index 08893f58db4..14dd5efd083 100644 Binary files a/test/image/baselines/gl3d_contour-lines2.png and b/test/image/baselines/gl3d_contour-lines2.png differ diff --git a/test/image/baselines/gl3d_cufflinks.png b/test/image/baselines/gl3d_cufflinks.png index 4cac094791f..fa3f7e1e0cf 100644 Binary files a/test/image/baselines/gl3d_cufflinks.png and b/test/image/baselines/gl3d_cufflinks.png differ diff --git a/test/image/baselines/gl3d_ibm-plot.png b/test/image/baselines/gl3d_ibm-plot.png index 86d9c604ac6..1b5a7094851 100644 Binary files a/test/image/baselines/gl3d_ibm-plot.png and b/test/image/baselines/gl3d_ibm-plot.png differ diff --git a/test/image/baselines/gl3d_parametric_surface_data_precision.png b/test/image/baselines/gl3d_parametric_surface_data_precision.png index 1e22f5f2f26..3a6dce138be 100644 Binary files a/test/image/baselines/gl3d_parametric_surface_data_precision.png and b/test/image/baselines/gl3d_parametric_surface_data_precision.png differ diff --git a/test/image/baselines/gl3d_perspective_tick_distances.png b/test/image/baselines/gl3d_perspective_tick_distances.png index ab3b04f2894..698f2b59855 100644 Binary files a/test/image/baselines/gl3d_perspective_tick_distances.png and b/test/image/baselines/gl3d_perspective_tick_distances.png differ diff --git a/test/image/baselines/gl3d_ribbons.png b/test/image/baselines/gl3d_ribbons.png index 5d7cbe57682..d15d82e288c 100644 Binary files a/test/image/baselines/gl3d_ribbons.png and b/test/image/baselines/gl3d_ribbons.png differ diff --git a/test/image/baselines/gl3d_surface-circular-colorscale.png b/test/image/baselines/gl3d_surface-circular-colorscale.png index 1d6f49a47ae..b0d457e5c7b 100644 Binary files a/test/image/baselines/gl3d_surface-circular-colorscale.png and b/test/image/baselines/gl3d_surface-circular-colorscale.png differ diff --git a/test/image/baselines/gl3d_surface-circular-opacityscale.png b/test/image/baselines/gl3d_surface-circular-opacityscale.png index 1d3b5fa2786..84398c8ea8d 100644 Binary files a/test/image/baselines/gl3d_surface-circular-opacityscale.png and b/test/image/baselines/gl3d_surface-circular-opacityscale.png differ diff --git a/test/image/baselines/gl3d_surface-lighting.png b/test/image/baselines/gl3d_surface-lighting.png index 51e28c25d67..f0f9cf435eb 100644 Binary files a/test/image/baselines/gl3d_surface-lighting.png and b/test/image/baselines/gl3d_surface-lighting.png differ diff --git a/test/image/baselines/gl3d_surface_connectgaps.png b/test/image/baselines/gl3d_surface_connectgaps.png index c5482491c07..d290be13200 100644 Binary files a/test/image/baselines/gl3d_surface_connectgaps.png and b/test/image/baselines/gl3d_surface_connectgaps.png differ diff --git a/test/image/baselines/gl3d_surface_contour_precision.png b/test/image/baselines/gl3d_surface_contour_precision.png index d7aaea23dc5..d06c87edbf1 100644 Binary files a/test/image/baselines/gl3d_surface_contour_precision.png and b/test/image/baselines/gl3d_surface_contour_precision.png differ diff --git a/test/image/baselines/gl3d_surface_contour_start-end-size.png b/test/image/baselines/gl3d_surface_contour_start-end-size.png index 2aaf6a94ae6..b8e92a724ca 100644 Binary files a/test/image/baselines/gl3d_surface_contour_start-end-size.png and b/test/image/baselines/gl3d_surface_contour_start-end-size.png differ diff --git a/test/image/baselines/gl3d_surface_opacityscale_contour.png b/test/image/baselines/gl3d_surface_opacityscale_contour.png index b42099e10c7..36f7dfe67b9 100644 Binary files a/test/image/baselines/gl3d_surface_opacityscale_contour.png and b/test/image/baselines/gl3d_surface_opacityscale_contour.png differ diff --git a/test/image/baselines/gl3d_surface_transparent-with-contours.png b/test/image/baselines/gl3d_surface_transparent-with-contours.png index 6857fa2c6de..5a26572cc4b 100644 Binary files a/test/image/baselines/gl3d_surface_transparent-with-contours.png and b/test/image/baselines/gl3d_surface_transparent-with-contours.png differ diff --git a/test/image/baselines/gl3d_world-cals.png b/test/image/baselines/gl3d_world-cals.png index 83b064130b4..23c3ddfb28f 100644 Binary files a/test/image/baselines/gl3d_world-cals.png and b/test/image/baselines/gl3d_world-cals.png differ diff --git a/test/image/baselines/gl3d_xy-defined-ticks.png b/test/image/baselines/gl3d_xy-defined-ticks.png index 04058d4f609..435151aa701 100644 Binary files a/test/image/baselines/gl3d_xy-defined-ticks.png and b/test/image/baselines/gl3d_xy-defined-ticks.png differ diff --git a/test/image/baselines/trace_metatext.png b/test/image/baselines/trace_metatext.png index 5e45856435a..43a81416e40 100644 Binary files a/test/image/baselines/trace_metatext.png and b/test/image/baselines/trace_metatext.png differ diff --git a/test/image/baselines/zz-gl3d_surface_small_timerange.png b/test/image/baselines/zz-gl3d_surface_small_timerange.png new file mode 100644 index 00000000000..c19db15554c Binary files /dev/null and b/test/image/baselines/zz-gl3d_surface_small_timerange.png differ diff --git a/test/image/mocks/zz-gl3d_surface_small_timerange.json b/test/image/mocks/zz-gl3d_surface_small_timerange.json new file mode 100644 index 00000000000..6b8c472338b --- /dev/null +++ b/test/image/mocks/zz-gl3d_surface_small_timerange.json @@ -0,0 +1,43 @@ +{ + "data": [ + { + "type": "surface", + "x": [0.1, 0.2], + "y": [ + "2024-02-03T10:00:00", + "2024-02-03T11:00:00" + ], + "z": [ + [1001, 1002], + [1002, 1001] + ] + } + ], + "layout": { + "title": {"text": "Surface plot with time axis with small timerange"}, + "width": 600, + "height": 400, + "scene": { + "yaxis": { + "type": "date" + }, + "aspectratio": { + "x": 1, + "y": 2, + "z": 0.5 + }, + "camera": { + "center": { + "x": 0.11, + "y": 0.19, + "z": -0.3 + }, + "eye": { + "x": 1.44, + "y": 1.53, + "z": 1.02 + } + } + } + } +}