Taos API Reference
    Preparing search index...

    Class TileWaterMask

    Land/water lookup for one tile, from the quantized-mesh watermask extension. A whole-tile flag (size === 1) answers the same for the entire rectangle; a 256×256 grid (size === 256) is sampled at the query's u/v fraction. Rows run south→north, columns west→east (matching the tile's u/v), and a byte ≥ 128 counts as water (the coastline ramp straddles 128). Retained on TerrainContent so TerrainTileset.waterAt can answer per point.

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    rect: Rectangle

    Accessors

    • get bytes(): number

      Approximate retained byte footprint, for the cache budget.

      Returns number

    • get allWater(): boolean

      True when this tile is entirely water (the whole-tile flag, set). Lets the mesh builder emit a single quad instead of probing the grid per cell.

      Returns boolean

    • get allLand(): boolean

      True when this tile is entirely land (no water anywhere) — skip building any water geometry for it.

      Returns boolean

    Methods

    • True when (lon, lat) in radians falls within this tile's rectangle.

      Parameters

      • lonRad: number
      • latRad: number

      Returns boolean

    • Water at a u/v fraction in [0,1] (u west→east, v south→north).

      Parameters

      • uFrac: number
      • vFrac: number

      Returns boolean

    • Water at (lon, lat) in radians, or null when the point is outside the tile.

      Parameters

      • lonRad: number
      • latRad: number

      Returns boolean | null