diff --git a/package-lock.json b/package-lock.json index 3cf876be93e..005d3b0659e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4786,9 +4786,9 @@ } }, "gl-axes3d": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/gl-axes3d/-/gl-axes3d-1.5.0.tgz", - "integrity": "sha512-3fj//B3Gzet9urefAc/TDqZO5MvOzHDep8OsC3j7mWDGL94E6n9dn/Kelh1/OsviTTZoZtgleujNUYNYY4T6bg==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/gl-axes3d/-/gl-axes3d-1.5.1.tgz", + "integrity": "sha512-AOx3jfzN+Z2YTFZ+7OTYaRWoFgSJhYA35BHZI8Q1VnYkB1ZQpco837x3zDSioA/qjkTG1lSUs2WpsfBoBW9NFg==", "requires": { "bit-twiddle": "^1.0.2", "dup": "^1.0.0", @@ -4816,9 +4816,9 @@ } }, "gl-cone3d": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/gl-cone3d/-/gl-cone3d-1.2.2.tgz", - "integrity": "sha512-6wdxG/YGZZYlD5QcqhCocFOzxVrZSro7L4fj60XhHZ4LuXaQrjlQJmMja2fayOzDPXKLZYOQydC9jKLEZczHLQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/gl-cone3d/-/gl-cone3d-1.2.3.tgz", + "integrity": "sha512-c8Gx2L37bVvlqaMoJOMOFlNS2swtC2mDovtPugoz3BF2oWwg2FS6tsCktpGViYxyH1SUI9CV8FlTixhipUV2HA==", "requires": { "gl-shader": "^4.2.1", "gl-vec3": "^1.1.3", @@ -4856,9 +4856,9 @@ } }, "gl-error3d": { - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/gl-error3d/-/gl-error3d-1.0.13.tgz", - "integrity": "sha512-KxZ7NhsYOLZTXpYpoHfebGZJPCxl5ZumlqX1NvJ+1hRxE0pt7gT6ZBMZvWCgUSt+XDtMtD6IolG6ADtRvgYCcg==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/gl-error3d/-/gl-error3d-1.0.14.tgz", + "integrity": "sha512-eXhUBLI25vHIm+cqk/cNvBPbXgZnSMSqyl1CMo8SHjcDwhLxZR07Ut9OQbYU4sYE5tFIEOUun8yPDJDoeeZCvw==", "requires": { "gl-buffer": "^2.1.2", "gl-shader": "^4.2.1", @@ -4955,9 +4955,9 @@ } }, "gl-mesh3d": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/gl-mesh3d/-/gl-mesh3d-2.0.7.tgz", - "integrity": "sha512-sP4qv1c3nBRfCJmW499DldibUjm7DNVOJMiyTS33Q39dcBGPdI9u1yzpzIRi6eQ216DZasaKZrLPF6W7nEABkQ==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/gl-mesh3d/-/gl-mesh3d-2.0.8.tgz", + "integrity": "sha512-bm7tgN15FAxxrbDf1B0Wj090cObRpGotNbiveJZHol3+++VDRfazYEB6CHjYGkqN+TqxlHaV2UEp5u1RNXRLNw==", "requires": { "barycentric": "^1.0.1", "colormap": "^2.1.0", @@ -4998,13 +4998,13 @@ } }, "gl-plot3d": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/gl-plot3d/-/gl-plot3d-2.0.0.tgz", - "integrity": "sha512-NnVHC+ElPdJnQ7ccxOIZoldMV7g2HpbNB2klZ1Rxz9IOVo2VUozOd4ci33JHjCvYvQjrNz8MpXUvLkJJPznqMQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/gl-plot3d/-/gl-plot3d-2.1.1.tgz", + "integrity": "sha512-a4wmasRlBxLmC9v1JihkLSjnKU2Di3X5fanxyx6B/NW8uOdeFrdheQ+q7HI+zwvYgjrS5kGAn2i9mADsPH1xJg==", "requires": { "3d-view": "^2.0.0", "a-big-triangle": "^1.0.3", - "gl-axes3d": "^1.5.0", + "gl-axes3d": "^1.5.1", "gl-fbo": "^2.0.5", "gl-mat4": "^1.2.0", "gl-select-static": "^2.0.4", @@ -5042,9 +5042,9 @@ } }, "gl-scatter3d": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/gl-scatter3d/-/gl-scatter3d-1.1.6.tgz", - "integrity": "sha512-KwdBJMyc9d7snHAfIlJAPPFa70zNWjrxuZV6NyMCEM9WlzFCoIScMtbuPdpQZJccaFjmM+aBfyiyWBbGWYsBjw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gl-scatter3d/-/gl-scatter3d-1.2.0.tgz", + "integrity": "sha512-loNTvp227RdoBV5NS/gSOgFxkFUdbGh0ywRpwRdH2KdxSiNevOsUaV80NN7a2sQPpEgBEJCylj+N74Gt/ZxL7g==", "requires": { "gl-buffer": "^2.0.6", "gl-mat4": "^1.0.0", @@ -5113,9 +5113,9 @@ } }, "gl-streamtube3d": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/gl-streamtube3d/-/gl-streamtube3d-1.1.2.tgz", - "integrity": "sha512-+26m5VyF5tyjLetDD9FGGb1yWU5gdZqHpCwwLH/Gmm0YMWn/Y8B/a/44qn5OeqeMyG1aox7C/fhZlRXhfxX4Vw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/gl-streamtube3d/-/gl-streamtube3d-1.1.3.tgz", + "integrity": "sha512-X0b+y7Hdwtp0GYHSbNFfJpizaX5RQ0ZtNvTKcgojnBLntXsiJcyRBT4+neTwEP5HRbordX35nX2AiLHk6SMfnw==", "requires": { "gl-vec3": "^1.0.0", "glsl-inverse": "^1.0.0", @@ -5124,9 +5124,9 @@ } }, "gl-surface3d": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/gl-surface3d/-/gl-surface3d-1.4.1.tgz", - "integrity": "sha512-pJss1rw6SoCRhvvNd0x49GSDK7YusQq1JqCtUb4TPPJCCkY3TmsDdMAve7JL41ZqoVmzFdOGEBZ1wERSZWadFg==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/gl-surface3d/-/gl-surface3d-1.4.2.tgz", + "integrity": "sha512-y+yYrkKk6stUApUuKyPyZydcXrjGT3O18WuULLSJsTeBD0+quCMyVAIS+YiyBvEwao1NKDk45CgxMxCY3DHZaA==", "requires": { "binary-search-bounds": "^2.0.4", "bit-twiddle": "^1.0.2", diff --git a/package.json b/package.json index 002beabe10c..7fed47c26cc 100644 --- a/package.json +++ b/package.json @@ -72,21 +72,21 @@ "es6-promise": "^3.0.2", "fast-isnumeric": "^1.1.2", "font-atlas-sdf": "^1.3.3", - "gl-cone3d": "^1.2.2", + "gl-cone3d": "^1.2.3", "gl-contour2d": "^1.1.5", - "gl-error3d": "^1.0.13", + "gl-error3d": "^1.0.14", "gl-heatmap2d": "^1.0.5", "gl-line3d": "^1.1.10", "gl-mat4": "^1.2.0", - "gl-mesh3d": "^2.0.7", + "gl-mesh3d": "^2.0.8", "gl-plot2d": "^1.4.2", - "gl-plot3d": "^2.0.0", + "gl-plot3d": "^2.1.1", "gl-pointcloud2d": "^1.0.2", - "gl-scatter3d": "^1.1.6", + "gl-scatter3d": "^1.2.0", "gl-select-box": "^1.0.3", "gl-spikes2d": "^1.0.2", - "gl-streamtube3d": "^1.1.2", - "gl-surface3d": "^1.4.1", + "gl-streamtube3d": "^1.1.3", + "gl-surface3d": "^1.4.2", "gl-text": "^1.1.6", "glslify": "^7.0.0", "has-hover": "^1.0.1", diff --git a/src/plot_api/subroutines.js b/src/plot_api/subroutines.js index bc44a6a47d6..b71404050ef 100644 --- a/src/plot_api/subroutines.js +++ b/src/plot_api/subroutines.js @@ -601,9 +601,7 @@ exports.doCamera = function(gd) { var scene = sceneLayout._scene; var cameraData = sceneLayout.camera; - var isOrtho = !!(cameraData && cameraData.projection && cameraData.projection.type === 'orthographic'); - - scene.setCamera(cameraData, isOrtho); + scene.setCamera(cameraData); } }; diff --git a/src/plots/gl3d/scene.js b/src/plots/gl3d/scene.js index 5813d35f21e..d7cc4bff620 100644 --- a/src/plots/gl3d/scene.js +++ b/src/plots/gl3d/scene.js @@ -192,7 +192,7 @@ function render(scene) { scene.drawAnnotations(scene); } -function tryCreatePlot(scene, camera, canvas, gl) { +function tryCreatePlot(scene, camera, pixelRatio, canvas, gl) { var glplotOptions = { canvas: canvas, @@ -204,7 +204,8 @@ function tryCreatePlot(scene, camera, canvas, gl) { snapToData: true, autoScale: true, autoBounds: false, - camera: camera + camera: camera, + pixelRatio: pixelRatio }; // for static plots, we reuse the WebGL context @@ -237,9 +238,9 @@ function tryCreatePlot(scene, camera, canvas, gl) { return true; } -function initializeGLPlot(scene, camera, canvas, gl) { +function initializeGLPlot(scene, camera, pixelRatio, canvas, gl) { - var success = tryCreatePlot(scene, camera, canvas, gl); + var success = tryCreatePlot(scene, camera, pixelRatio, canvas, gl); /* * createPlot will throw when webgl is not enabled in the client. * Lets return an instance of the module with all functions noop'd. @@ -340,7 +341,7 @@ function Scene(options, fullLayout) { this.spikeOptions = createSpikeOptions(fullLayout[this.id]); this.container = sceneContainer; this.staticMode = !!options.staticPlot; - this.pixelRatio = options.plotGlPixelRatio || 2; + this.pixelRatio = this.pixelRatio || options.plotGlPixelRatio || 2; // Coordinate rescaling this.dataScale = [1, 1, 1]; @@ -351,7 +352,8 @@ function Scene(options, fullLayout) { this.drawAnnotations = Registry.getComponentMethod('annotations3d', 'draw'); var camera = fullLayout.scene.camera; - initializeGLPlot(this, camera); + + initializeGLPlot(this, camera, this.pixelRatio); } var proto = Scene.prototype; @@ -377,6 +379,7 @@ proto.recoverContext = function() { var gl = this.glplot.gl; var canvas = this.glplot.canvas; var camera = this.glplot.camera; + var pixelRatio = this.glplot.pixelRatio; this.glplot.dispose(); function tryRecover() { @@ -384,7 +387,7 @@ proto.recoverContext = function() { requestAnimationFrame(tryRecover); return; } - if(!initializeGLPlot(scene, camera, canvas, gl)) { + if(!initializeGLPlot(scene, camera, pixelRatio, canvas, gl)) { Lib.error('Catastrophic and unrecoverable WebGL error. Context lost.'); return; } @@ -780,6 +783,8 @@ proto.setCamera = function setCamera(cameraData) { if(newOrtho !== oldOrtho) { this.glplot.redraw(); + var pixelRatio = this.glplot.pixelRatio; + var RGBA = this.glplot.clearColor; this.glplot.gl.clearColor( RGBA[0], RGBA[1], RGBA[2], RGBA[3] @@ -791,7 +796,7 @@ proto.setCamera = function setCamera(cameraData) { this.glplot.dispose(); - initializeGLPlot(this, cameraData); + initializeGLPlot(this, cameraData, pixelRatio); this.glplot.camera._ortho = newOrtho; } }; diff --git a/src/traces/scatter3d/convert.js b/src/traces/scatter3d/convert.js index ebea2eb3598..a8bb483ffac 100644 --- a/src/traces/scatter3d/convert.js +++ b/src/traces/scatter3d/convert.js @@ -343,7 +343,7 @@ proto.update = function(data) { this.dataPoints = options.position; lineOptions = { - gl: gl, + gl: this.scene.glplot.gl, position: options.position, color: options.lineColor, lineWidth: options.lineWidth || 1, @@ -371,7 +371,7 @@ proto.update = function(data) { if(data.marker && data.marker.opacity) scatterOpacity *= data.marker.opacity; scatterOptions = { - gl: gl, + gl: this.scene.glplot.gl, position: options.position, color: options.scatterColor, size: options.scatterSize, @@ -400,7 +400,7 @@ proto.update = function(data) { } textOptions = { - gl: gl, + gl: this.scene.glplot.gl, position: options.position, glyph: options.text, color: options.textColor, @@ -431,7 +431,7 @@ proto.update = function(data) { } errorOptions = { - gl: gl, + gl: this.scene.glplot.gl, position: options.position, color: options.errorColor, error: options.errorBounds, diff --git a/test/image/baselines/gl3d_annotations.png b/test/image/baselines/gl3d_annotations.png index b2a2ab5bab2..26f5a135c71 100644 Binary files a/test/image/baselines/gl3d_annotations.png and b/test/image/baselines/gl3d_annotations.png differ diff --git a/test/image/baselines/gl3d_annotations_orthographic.png b/test/image/baselines/gl3d_annotations_orthographic.png index 631f1401fdd..c86854f7089 100644 Binary files a/test/image/baselines/gl3d_annotations_orthographic.png and b/test/image/baselines/gl3d_annotations_orthographic.png differ diff --git a/test/image/baselines/gl3d_autocolorscale.png b/test/image/baselines/gl3d_autocolorscale.png index 54c28165987..fd03bb6720e 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 c7ee927e779..539046d60b8 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_bunny-hull.png b/test/image/baselines/gl3d_bunny-hull.png index 1d7b9aa3e04..46c5ff94067 100644 Binary files a/test/image/baselines/gl3d_bunny-hull.png and b/test/image/baselines/gl3d_bunny-hull.png differ diff --git a/test/image/baselines/gl3d_bunny.png b/test/image/baselines/gl3d_bunny.png index 191ec2724c6..3913dfbc47d 100644 Binary files a/test/image/baselines/gl3d_bunny.png and b/test/image/baselines/gl3d_bunny.png differ diff --git a/test/image/baselines/gl3d_chrisp-nan-1.png b/test/image/baselines/gl3d_chrisp-nan-1.png index c15a805e8e6..f13187ad79d 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 c57477c1990..46ce67b283a 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 5b08c87586c..7ffc4d440ce 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_convex-hull.png b/test/image/baselines/gl3d_convex-hull.png index 191ec2724c6..3913dfbc47d 100644 Binary files a/test/image/baselines/gl3d_convex-hull.png and b/test/image/baselines/gl3d_convex-hull.png differ diff --git a/test/image/baselines/gl3d_cube.png b/test/image/baselines/gl3d_cube.png index ac98389aad1..40eaa6b5ad0 100644 Binary files a/test/image/baselines/gl3d_cube.png and b/test/image/baselines/gl3d_cube.png differ diff --git a/test/image/baselines/gl3d_cufflinks.png b/test/image/baselines/gl3d_cufflinks.png index ff65c51d464..0be84707c55 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_error_bars_log.png b/test/image/baselines/gl3d_error_bars_log.png index b9546ffe66f..66a0c65e490 100644 Binary files a/test/image/baselines/gl3d_error_bars_log.png and b/test/image/baselines/gl3d_error_bars_log.png differ diff --git a/test/image/baselines/gl3d_error_bars_log_2.png b/test/image/baselines/gl3d_error_bars_log_2.png index f03ee79bd6f..3bd29d2ad03 100644 Binary files a/test/image/baselines/gl3d_error_bars_log_2.png and b/test/image/baselines/gl3d_error_bars_log_2.png differ diff --git a/test/image/baselines/gl3d_errorbars_sqrt.png b/test/image/baselines/gl3d_errorbars_sqrt.png index e29095f5a41..f79f29b6d5e 100644 Binary files a/test/image/baselines/gl3d_errorbars_sqrt.png and b/test/image/baselines/gl3d_errorbars_sqrt.png differ diff --git a/test/image/baselines/gl3d_errorbars_xy.png b/test/image/baselines/gl3d_errorbars_xy.png index 7b8272676f0..d9647e558cb 100644 Binary files a/test/image/baselines/gl3d_errorbars_xy.png and b/test/image/baselines/gl3d_errorbars_xy.png differ diff --git a/test/image/baselines/gl3d_errorbars_zx.png b/test/image/baselines/gl3d_errorbars_zx.png index cc6fa892e3d..a051de2b6ad 100644 Binary files a/test/image/baselines/gl3d_errorbars_zx.png and b/test/image/baselines/gl3d_errorbars_zx.png differ diff --git a/test/image/baselines/gl3d_errorbars_zy.png b/test/image/baselines/gl3d_errorbars_zy.png index 8c663cdbe77..e986d6f5234 100644 Binary files a/test/image/baselines/gl3d_errorbars_zy.png and b/test/image/baselines/gl3d_errorbars_zy.png differ diff --git a/test/image/baselines/gl3d_ibm-plot.png b/test/image/baselines/gl3d_ibm-plot.png index 796d36a6ec6..0dd93a17257 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_isosurface_1single-surface_middle-range.png b/test/image/baselines/gl3d_isosurface_1single-surface_middle-range.png index 6a694fea38e..1b1d0b5127a 100644 Binary files a/test/image/baselines/gl3d_isosurface_1single-surface_middle-range.png and b/test/image/baselines/gl3d_isosurface_1single-surface_middle-range.png differ diff --git a/test/image/baselines/gl3d_isosurface_5more-surfaces_between-ranges.png b/test/image/baselines/gl3d_isosurface_5more-surfaces_between-ranges.png index a97818aa546..150b50be4b0 100644 Binary files a/test/image/baselines/gl3d_isosurface_5more-surfaces_between-ranges.png and b/test/image/baselines/gl3d_isosurface_5more-surfaces_between-ranges.png differ diff --git a/test/image/baselines/gl3d_isosurface_9more-surfaces_between-ranges_orthographic.png b/test/image/baselines/gl3d_isosurface_9more-surfaces_between-ranges_orthographic.png index 4ccd9c89f0e..01e6c5a2238 100644 Binary files a/test/image/baselines/gl3d_isosurface_9more-surfaces_between-ranges_orthographic.png and b/test/image/baselines/gl3d_isosurface_9more-surfaces_between-ranges_orthographic.png differ diff --git a/test/image/baselines/gl3d_isosurface_math.png b/test/image/baselines/gl3d_isosurface_math.png index ad94ba75c8a..a34d1e2fbde 100644 Binary files a/test/image/baselines/gl3d_isosurface_math.png and b/test/image/baselines/gl3d_isosurface_math.png differ diff --git a/test/image/baselines/gl3d_isosurface_multiple-traces.png b/test/image/baselines/gl3d_isosurface_multiple-traces.png index 631a578012c..422b8ba406e 100644 Binary files a/test/image/baselines/gl3d_isosurface_multiple-traces.png and b/test/image/baselines/gl3d_isosurface_multiple-traces.png differ diff --git a/test/image/baselines/gl3d_isosurface_thin_caps_different_dims.png b/test/image/baselines/gl3d_isosurface_thin_caps_different_dims.png index 3ba59e1e4d3..86489a42a5b 100644 Binary files a/test/image/baselines/gl3d_isosurface_thin_caps_different_dims.png and b/test/image/baselines/gl3d_isosurface_thin_caps_different_dims.png differ diff --git a/test/image/baselines/gl3d_isosurface_uneven-scales_ranges_iso-null.png b/test/image/baselines/gl3d_isosurface_uneven-scales_ranges_iso-null.png index 2651df833ca..d9009404646 100644 Binary files a/test/image/baselines/gl3d_isosurface_uneven-scales_ranges_iso-null.png and b/test/image/baselines/gl3d_isosurface_uneven-scales_ranges_iso-null.png differ diff --git a/test/image/baselines/gl3d_isosurface_xycaps_volume_slices.png b/test/image/baselines/gl3d_isosurface_xycaps_volume_slices.png index 75d4a435260..78dbbca4eff 100644 Binary files a/test/image/baselines/gl3d_isosurface_xycaps_volume_slices.png and b/test/image/baselines/gl3d_isosurface_xycaps_volume_slices.png differ diff --git a/test/image/baselines/gl3d_log-axis.png b/test/image/baselines/gl3d_log-axis.png index 523e052081c..873c58886e9 100644 Binary files a/test/image/baselines/gl3d_log-axis.png and b/test/image/baselines/gl3d_log-axis.png differ diff --git a/test/image/baselines/gl3d_marker-arrays.png b/test/image/baselines/gl3d_marker-arrays.png index a4e0f448152..5b903b88912 100644 Binary files a/test/image/baselines/gl3d_marker-arrays.png and b/test/image/baselines/gl3d_marker-arrays.png differ diff --git a/test/image/baselines/gl3d_marker-color.png b/test/image/baselines/gl3d_marker-color.png index 3e2d9a996f5..f0b7ca3766b 100644 Binary files a/test/image/baselines/gl3d_marker-color.png and b/test/image/baselines/gl3d_marker-color.png differ diff --git a/test/image/baselines/gl3d_marker_symbols.png b/test/image/baselines/gl3d_marker_symbols.png index e80deb94182..3a859d14563 100644 Binary files a/test/image/baselines/gl3d_marker_symbols.png and b/test/image/baselines/gl3d_marker_symbols.png differ diff --git a/test/image/baselines/gl3d_mesh3d_surface3d_scatter3d_line3d_error3d_log_reversed_ranges.png b/test/image/baselines/gl3d_mesh3d_surface3d_scatter3d_line3d_error3d_log_reversed_ranges.png index f01bfc6c73d..75273d96ef4 100644 Binary files a/test/image/baselines/gl3d_mesh3d_surface3d_scatter3d_line3d_error3d_log_reversed_ranges.png and b/test/image/baselines/gl3d_mesh3d_surface3d_scatter3d_line3d_error3d_log_reversed_ranges.png differ diff --git a/test/image/baselines/gl3d_mesh3d_surface3d_scatter3d_orthographic.png b/test/image/baselines/gl3d_mesh3d_surface3d_scatter3d_orthographic.png index c75461399e6..caa8b4da580 100644 Binary files a/test/image/baselines/gl3d_mesh3d_surface3d_scatter3d_orthographic.png and b/test/image/baselines/gl3d_mesh3d_surface3d_scatter3d_orthographic.png differ diff --git a/test/image/baselines/gl3d_mirror-ticks.png b/test/image/baselines/gl3d_mirror-ticks.png index c11372c038d..9aa2612a0a0 100644 Binary files a/test/image/baselines/gl3d_mirror-ticks.png and b/test/image/baselines/gl3d_mirror-ticks.png differ diff --git a/test/image/baselines/gl3d_nan-holes.png b/test/image/baselines/gl3d_nan-holes.png index 5e051cb846c..7ec2de527ed 100644 Binary files a/test/image/baselines/gl3d_nan-holes.png and b/test/image/baselines/gl3d_nan-holes.png differ diff --git a/test/image/baselines/gl3d_opacity-scaling-spikes.png b/test/image/baselines/gl3d_opacity-scaling-spikes.png index e9267cd1ded..f530c13aa85 100644 Binary files a/test/image/baselines/gl3d_opacity-scaling-spikes.png and b/test/image/baselines/gl3d_opacity-scaling-spikes.png differ diff --git a/test/image/baselines/gl3d_opacity-surface.png b/test/image/baselines/gl3d_opacity-surface.png index c3a6a6a6d7f..c5f10f521ac 100644 Binary files a/test/image/baselines/gl3d_opacity-surface.png and b/test/image/baselines/gl3d_opacity-surface.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 59b5d34d8db..d4f2b43a3a1 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 53cb757ffe9..4a6f1eaa40a 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_projection-traces.png b/test/image/baselines/gl3d_projection-traces.png index 06b75910aa9..b0b28b67ae1 100644 Binary files a/test/image/baselines/gl3d_projection-traces.png and b/test/image/baselines/gl3d_projection-traces.png differ diff --git a/test/image/baselines/gl3d_scatter-color-array.png b/test/image/baselines/gl3d_scatter-color-array.png index f7b857b812c..d871692cf82 100644 Binary files a/test/image/baselines/gl3d_scatter-color-array.png and b/test/image/baselines/gl3d_scatter-color-array.png differ diff --git a/test/image/baselines/gl3d_scatter-color-line-gradient.png b/test/image/baselines/gl3d_scatter-color-line-gradient.png index bb3ae79f598..ace7e97c06e 100644 Binary files a/test/image/baselines/gl3d_scatter-color-line-gradient.png and b/test/image/baselines/gl3d_scatter-color-line-gradient.png differ diff --git a/test/image/baselines/gl3d_scatter-color-mono-and-palette.png b/test/image/baselines/gl3d_scatter-color-mono-and-palette.png index dba67d4390e..23336a2f2e5 100644 Binary files a/test/image/baselines/gl3d_scatter-color-mono-and-palette.png and b/test/image/baselines/gl3d_scatter-color-mono-and-palette.png differ diff --git a/test/image/baselines/gl3d_scatter3d-colorscale.png b/test/image/baselines/gl3d_scatter3d-colorscale.png index c899208c9be..ab50286aabf 100644 Binary files a/test/image/baselines/gl3d_scatter3d-colorscale.png and b/test/image/baselines/gl3d_scatter3d-colorscale.png differ diff --git a/test/image/baselines/gl3d_scatter3d_errorbars_inherit_color.png b/test/image/baselines/gl3d_scatter3d_errorbars_inherit_color.png index a9c7927ca86..bac8b49b961 100644 Binary files a/test/image/baselines/gl3d_scatter3d_errorbars_inherit_color.png and b/test/image/baselines/gl3d_scatter3d_errorbars_inherit_color.png differ diff --git a/test/image/baselines/gl3d_scatter3d_line3d_error3d_enable-alpha-with-rgba-color.png b/test/image/baselines/gl3d_scatter3d_line3d_error3d_enable-alpha-with-rgba-color.png index 9d108595e6a..e77b8c13e02 100644 Binary files a/test/image/baselines/gl3d_scatter3d_line3d_error3d_enable-alpha-with-rgba-color.png and b/test/image/baselines/gl3d_scatter3d_line3d_error3d_enable-alpha-with-rgba-color.png differ diff --git a/test/image/baselines/gl3d_scatter3d_line3d_error3d_transparent-with-zero-alpha.png b/test/image/baselines/gl3d_scatter3d_line3d_error3d_transparent-with-zero-alpha.png index a224543595a..367d5e552b8 100644 Binary files a/test/image/baselines/gl3d_scatter3d_line3d_error3d_transparent-with-zero-alpha.png and b/test/image/baselines/gl3d_scatter3d_line3d_error3d_transparent-with-zero-alpha.png differ diff --git a/test/image/baselines/gl3d_streamtube-first.png b/test/image/baselines/gl3d_streamtube-first.png index e93248d617f..df4de62b34e 100644 Binary files a/test/image/baselines/gl3d_streamtube-first.png and b/test/image/baselines/gl3d_streamtube-first.png differ diff --git a/test/image/baselines/gl3d_streamtube-thin.png b/test/image/baselines/gl3d_streamtube-thin.png index 12a384841e9..cb5ef96de9c 100644 Binary files a/test/image/baselines/gl3d_streamtube-thin.png and b/test/image/baselines/gl3d_streamtube-thin.png differ diff --git a/test/image/baselines/gl3d_streamtube-wind.png b/test/image/baselines/gl3d_streamtube-wind.png index ed802b002b1..46cf76b929b 100644 Binary files a/test/image/baselines/gl3d_streamtube-wind.png and b/test/image/baselines/gl3d_streamtube-wind.png differ diff --git a/test/image/baselines/gl3d_surface-circular-colorscale.png b/test/image/baselines/gl3d_surface-circular-colorscale.png index 6680d2ea64c..1b830cf4d29 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-lighting.png b/test/image/baselines/gl3d_surface-lighting.png index debc99f875d..bcab31c6b3d 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_contour_precision.png b/test/image/baselines/gl3d_surface_contour_precision.png index 16d07fb49b4..3c50c02415d 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_intensity.png b/test/image/baselines/gl3d_surface_intensity.png index 43975bc64ac..32af7059eb8 100644 Binary files a/test/image/baselines/gl3d_surface_intensity.png and b/test/image/baselines/gl3d_surface_intensity.png differ diff --git a/test/image/baselines/gl3d_wire-surface.png b/test/image/baselines/gl3d_wire-surface.png index f086c3f3455..9e8180180bc 100644 Binary files a/test/image/baselines/gl3d_wire-surface.png and b/test/image/baselines/gl3d_wire-surface.png differ diff --git a/test/image/baselines/gl3d_xy-defined-ticks.png b/test/image/baselines/gl3d_xy-defined-ticks.png index 939ca54fdef..2cac4de436a 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/gl3d_z-range.png b/test/image/baselines/gl3d_z-range.png index 494d67469cf..7dc9bf6aa28 100644 Binary files a/test/image/baselines/gl3d_z-range.png and b/test/image/baselines/gl3d_z-range.png differ diff --git a/test/image/baselines/grid_subplot_types.png b/test/image/baselines/grid_subplot_types.png index bcf32c5a049..0a48da70909 100644 Binary files a/test/image/baselines/grid_subplot_types.png and b/test/image/baselines/grid_subplot_types.png differ diff --git a/test/jasmine/tests/gl3d_plot_interact_test.js b/test/jasmine/tests/gl3d_plot_interact_test.js index a9b143415c6..dbed484ca3c 100644 --- a/test/jasmine/tests/gl3d_plot_interact_test.js +++ b/test/jasmine/tests/gl3d_plot_interact_test.js @@ -122,11 +122,11 @@ describe('Test gl3d plots', function() { .then(_hover) .then(delay(20)) .then(function() { - assertHoverText('x: 140.72', 'y: −96.97', 'z: −96.97'); - assertEventData(140.72, -96.97, -96.97, 0, 2, { - 'marker.symbol': 'cross', - 'marker.size': 30, - 'marker.color': 'orange', + assertHoverText('x: 134.03', 'y: −163.59', 'z: −163.59'); + assertEventData(134.03, -163.59, -163.59, 0, 3, { + 'marker.symbol': undefined, + 'marker.size': 40, + 'marker.color': 'black', 'marker.line.color': undefined }); assertHoverLabelStyle(d3.selectAll('g.hovertext'), { @@ -143,7 +143,7 @@ describe('Test gl3d plots', function() { }) .then(_hover) .then(function() { - assertHoverText('x: Jan 1, 2017', 'y: −96.97', 'z: −96.97'); + assertHoverText('x: Feb 1, 2017', 'y: −163.59', 'z: −163.59'); return Plotly.restyle(gd, { x: [[new Date(2017, 2, 1), new Date(2017, 2, 2), new Date(2017, 2, 3), new Date(2017, 2, 4)]] @@ -151,7 +151,7 @@ describe('Test gl3d plots', function() { }) .then(_hover) .then(function() { - assertHoverText('x: Mar 3, 2017', 'y: −96.97', 'z: −96.97'); + assertHoverText('x: Mar 4, 2017', 'y: −163.59', 'z: −163.59'); return Plotly.update(gd, { y: [['a', 'b', 'c', 'd']], @@ -162,25 +162,25 @@ describe('Test gl3d plots', function() { }) .then(_hover) .then(function() { - assertHoverText('x: Mar 3, 2017', 'y: c', 'z: 100k'); + assertHoverText('x: Mar 4, 2017', 'y: d', 'z: 10B'); return Plotly.relayout(gd, 'scene.xaxis.calendar', 'chinese'); }) .then(_hover) .then(function() { - assertHoverText('x: 二 6, 2017', 'y: c', 'z: 100k'); + assertHoverText('x: 二 7, 2017', 'y: d', 'z: 10B'); return Plotly.restyle(gd, 'text', [['A', 'B', 'C', 'D']]); }) .then(_hover) .then(function() { - assertHoverText('x: 二 6, 2017', 'y: c', 'z: 100k', 'C'); + assertHoverText('x: 二 7, 2017', 'y: d', 'z: 10B', 'D'); return Plotly.restyle(gd, 'hovertext', [['Apple', 'Banana', 'Clementine', 'Dragon fruit']]); }) .then(_hover) .then(function() { - assertHoverText('x: 二 6, 2017', 'y: c', 'z: 100k', 'Clementine'); + assertHoverText('x: 二 7, 2017', 'y: d', 'z: 10B', 'Dragon fruit'); return Plotly.restyle(gd, { 'hoverlabel.bgcolor': [['red', 'blue', 'green', 'yellow']], @@ -190,11 +190,11 @@ describe('Test gl3d plots', function() { .then(_hover) .then(function() { assertHoverLabelStyle(d3.selectAll('g.hovertext'), { - bgcolor: 'rgb(0, 128, 0)', - bordercolor: 'rgb(255, 255, 255)', + bgcolor: 'rgb(255, 255, 0)', + bordercolor: 'rgb(68, 68, 68)', fontSize: 20, fontFamily: 'Arial', - fontColor: 'rgb(255, 255, 255)' + fontColor: 'rgb(68, 68, 68)' }, 'restyled'); return Plotly.relayout(gd, { @@ -206,7 +206,7 @@ describe('Test gl3d plots', function() { .then(_hover) .then(function() { assertHoverLabelStyle(d3.selectAll('g.hovertext'), { - bgcolor: 'rgb(0, 128, 0)', + bgcolor: 'rgb(255, 255, 0)', bordercolor: 'rgb(255, 255, 0)', fontSize: 20, fontFamily: 'Roboto', @@ -220,18 +220,18 @@ describe('Test gl3d plots', function() { var label = d3.selectAll('g.hovertext'); expect(label.size()).toEqual(1); - expect(label.select('text').text()).toEqual('c'); + expect(label.select('text').text()).toEqual('x: 二 7, 2017y: dz: 10BDragon fruit'); return Plotly.restyle(gd, 'hoverinfo', [[null, null, 'dont+know', null]]); }) .then(_hover) .then(function() { - assertHoverText('x: 二 6, 2017', 'y: c', 'z: 100k', 'Clementine'); + assertHoverText('x: 二 7, 2017', 'y: d', 'z: 10B', 'Dragon fruit'); return Plotly.restyle(gd, 'hoverinfo', 'text'); }) .then(function() { - assertHoverText(null, null, null, 'Clementine'); + assertHoverText(null, null, null, 'Dragon fruit'); return Plotly.restyle(gd, 'hovertext', 'HEY'); }) @@ -241,12 +241,12 @@ describe('Test gl3d plots', function() { return Plotly.restyle(gd, 'hoverinfo', 'z'); }) .then(function() { - assertHoverText(null, null, '100k'); + assertHoverText(null, null, '10B'); return Plotly.restyle(gd, 'hovertemplate', 'THIS Y -- %{y}'); }) .then(function() { - assertHoverText(null, null, null, 'THIS Y -- c'); + assertHoverText(null, null, null, 'THIS Y -- d'); }) .catch(failTest) .then(done); @@ -365,7 +365,10 @@ describe('Test gl3d plots', function() { // N.B. gl3d click events are 'mouseover' events // with button 1 pressed function _click() { - mouseEvent('mouseover', 605, 271, {buttons: 1}); + var x = 605; + var y = 271; + mouseEvent('mousemove', x, y); + mouseEvent('mouseover', x, y, {buttons: 1}); return delay(20)(); } @@ -379,7 +382,7 @@ describe('Test gl3d plots', function() { .then(_click) .then(delay(20)) .then(function() { - assertEventData(140.72, -96.97, -96.97, 0, 2); + assertEventData(134.03, -163.59, -163.59, 0, 3); }) .then(done); }); @@ -414,19 +417,19 @@ describe('Test gl3d plots', function() { .then(delay(20)) .then(_hover) .then(function() { - assertHoverText('x: 3', 'y: 4', 'z: 5', 'ts: 3\nhz: 4\nftt:5'); + assertHoverText('x: 4', 'y: 5', 'z: 3.5', 'ts: 4\nhz: 5\nftt:3.5'); }) .then(function() { return Plotly.restyle(gd, 'hoverinfo', 'x+y'); }) .then(function() { - assertHoverText('(3, 4)'); + assertHoverText('(4, 5)'); }) .then(function() { return Plotly.restyle(gd, 'hoverinfo', 'text'); }) .then(function() { - assertHoverText('ts: 3\nhz: 4\nftt:5'); + assertHoverText('ts: 4\nhz: 5\nftt:3.5'); }) .then(function() { return Plotly.restyle(gd, 'text', 'yo!'); @@ -440,13 +443,13 @@ describe('Test gl3d plots', function() { ]); }) .then(function() { - assertHoverText(null, null, null, 'ts: 3\nhz: 4\nftt:5 !!'); + assertHoverText(null, null, null, 'ts: 4\nhz: 5\nftt:3.5 !!'); }) .then(function() { return Plotly.restyle(gd, 'hovertemplate', '%{x}-%{y}-%{z}'); }) .then(function() { - assertHoverText(null, null, null, '3-4-5'); + assertHoverText(null, null, null, '4-5-3.5'); }) .catch(failTest) .then(done); diff --git a/test/jasmine/tests/isosurface_test.js b/test/jasmine/tests/isosurface_test.js index b55b235fc12..d935436574b 100644 --- a/test/jasmine/tests/isosurface_test.js +++ b/test/jasmine/tests/isosurface_test.js @@ -367,10 +367,10 @@ describe('Test isosurface', function() { .then(function() { assertHoverLabelContent({ nums: [ - 'x: 0.3', + 'x: 0.4', 'y: 0.001', - 'z: −16', - 'value: −0.27' + 'z: −8', + 'value: −1.28' ].join('\n') }); }) @@ -379,10 +379,10 @@ describe('Test isosurface', function() { .then(function() { assertHoverLabelContent({ nums: [ - 'x: 0.2', + 'x: 0.3', 'y: 100μ', - 'z: −16', - 'value: −1.12' + 'z: −8', + 'value: −1.19' ].join('\n') }); }) @@ -393,8 +393,8 @@ describe('Test isosurface', function() { nums: [ 'x: 0.4', 'y: 100μ', - 'z: −4', - 'value: −1.3' + 'z: −2', + 'value: −1.29' ].join('\n') }); }) @@ -410,9 +410,9 @@ describe('Test isosurface', function() { nums: [ 'x: 0.4', 'y: 100μ', - 'z: −4', - 'value: −1.3', - '!! -1.3 !!' + 'z: −2', + 'value: −1.29', + '!! -1.29 !!' ].join('\n') }); }) @@ -423,7 +423,7 @@ describe('Test isosurface', function() { .then(_hover4) .then(function() { assertHoverLabelContent({ - nums: '−1.3\n(0.4,100μ,−4)', + nums: '−1.29\n(0.4,100μ,−2)', name: '!!' }); })