Skip to content

Commit 6652273

Browse files
authoredJun 18, 2020
Merge pull request #4929 from plotly/no-cwise
bump gl-plot2d & gl-plot3d and drop ndarray-fill
2 parents 3d5f311 + 43b9389 commit 6652273

File tree

3 files changed

+26
-31
lines changed

3 files changed

+26
-31
lines changed
 

‎package-lock.json

+12-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181
"gl-line3d": "1.2.1",
8282
"gl-mat4": "^1.2.0",
8383
"gl-mesh3d": "^2.3.1",
84-
"gl-plot2d": "^1.4.4",
85-
"gl-plot3d": "^2.4.5",
84+
"gl-plot2d": "^1.4.5",
85+
"gl-plot3d": "^2.4.6",
8686
"gl-pointcloud2d": "^1.0.3",
8787
"gl-scatter3d": "^1.2.3",
8888
"gl-select-box": "^1.0.4",
@@ -100,7 +100,6 @@
100100
"mouse-event-offset": "^3.0.2",
101101
"mouse-wheel": "^1.2.0",
102102
"ndarray": "^1.0.19",
103-
"ndarray-fill": "^1.0.2",
104103
"ndarray-homography": "^1.0.0",
105104
"parse-svg-path": "^0.1.2",
106105
"point-cluster": "^3.1.8",

‎src/traces/surface/convert.js

+12-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ var createSurface = require('gl-surface3d');
1313

1414
var ndarray = require('ndarray');
1515
var homography = require('ndarray-homography');
16-
var fill = require('ndarray-fill');
1716

1817
var isArrayOrTypedArray = require('../../lib').isArrayOrTypedArray;
1918
var parseColorScale = require('../../lib/gl_format_color').parseColorScale;
@@ -511,9 +510,13 @@ proto.update = function(data) {
511510
ndarray(new Float32Array(xlen * ylen), [xlen, ylen]),
512511
ndarray(new Float32Array(xlen * ylen), [xlen, ylen])
513512
];
514-
fill(coords[0], function(row, col) { return rawCoords[0][row][col]; });
515-
fill(coords[1], function(row, col) { return rawCoords[1][row][col]; });
516-
fill(coords[2], function(row, col) { return rawCoords[2][row][col]; });
513+
for(i = 0; i < 3; i++) {
514+
for(j = 0; j < xlen; j++) {
515+
for(k = 0; k < ylen; k++) {
516+
coords[i].set(j, k, rawCoords[i][j][k]);
517+
}
518+
}
519+
}
517520
rawCoords = []; // free memory
518521

519522
var params = {
@@ -543,9 +546,11 @@ proto.update = function(data) {
543546
if(data.surfacecolor) {
544547
var intensity = ndarray(new Float32Array(xlen * ylen), [xlen, ylen]);
545548

546-
fill(intensity, function(row, col) {
547-
return data.surfacecolor[col][row];
548-
});
549+
for(j = 0; j < xlen; j++) {
550+
for(k = 0; k < ylen; k++) {
551+
intensity.set(j, k, data.surfacecolor[k][j]);
552+
}
553+
}
549554

550555
coords.push(intensity);
551556
} else {

0 commit comments

Comments
 (0)
Please sign in to comment.