Skip to content

Commit

Permalink
[gltiles] use cellSize.float scalar access
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorbin committed Oct 15, 2023
1 parent 98b7aa3 commit 2712bd1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gltiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ export default async function makeTileRenderer(gl) {
}) {
const layerParams = layerParamsBlock.makeBuffer();
const transform = layerParams.getVar('transform').asFloatArray();
const cellSize = layerParams.getVar('cellSize').asFloatArray();
const cellSize = layerParams.getVar('cellSize');
const stride = layerParams.getVar('stride');

stride.int = width;
cellSize[0] = givenCellSize;
cellSize.float = givenCellSize;

mat4.fromTranslation(transform, [givenCellSize * left, givenCellSize * top, 0]);
layerParams.send();
Expand All @@ -230,7 +230,7 @@ export default async function makeTileRenderer(gl) {

return {
get texture() { return texture },
get cellSize() { return cellSize[0] },
get cellSize() { return cellSize.float },
get left() { return left },
get top() { return top },
get width() { return width },
Expand Down

0 comments on commit 2712bd1

Please sign in to comment.