Skip to content

Commit

Permalink
fix(picking): NaN value when getting the tile under the picking position
Browse files Browse the repository at this point in the history
  • Loading branch information
zarov committed Aug 29, 2019
1 parent b684d7b commit 971e7ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/Picking.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function screenCoordsToNodeId(view, tileLayer, viewCoords, radius = 0) {

traversePickingCircle(radius, (x, y) => {
const idx = (y * 2 * radius + x) * 4;
const data = buffer.slice(idx, idx + 4);
const data = buffer.slice(idx, (idx + 4) || undefined);
depthRGBA.fromArray(data).divideScalar(255.0);
const unpack = unpack1K(depthRGBA, 256 ** 3);

Expand Down

0 comments on commit 971e7ff

Please sign in to comment.