Taos API Reference
    Preparing search index...

    Function demToQuantizedMeshTile

    • Repackages a decoded DEM height grid as a synthetic QuantizedMeshTile: a regular res × res vertex grid over the tile's geographic rectangle, so buildTerrainContent bakes it exactly like a real quantized-mesh tile (world-space transform, skirts, height sampler, imagery UVs). res is the output mesh resolution (vertices per side); the source grid is bilinear-downsampled to it.

      Latitudes are taken from the slippy-map formula (a Mercator tile's rows are even in Mercator-Y, not latitude), then expressed as the v fraction the linear bake reconstructs — so the grid lands at the correct latitudes despite the bake's linear lat interpolation.

      Parameters

      • heights: Float32Array
      • srcSize: number
      • z: number
      • x: number
      • y: number
      • res: number

      Returns QuantizedMeshTile