diff --git a/gltiles.js b/gltiles.js index a132658f..0f5e05cf 100644 --- a/gltiles.js +++ b/gltiles.js @@ -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(); @@ -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 },