code: function ready() {
    for (var i = 0; i < preloadTiles.length; i++) {
      var state = layerAbove.textureStore().query(preloadTiles[i]);
      if (!state.hasTexture) {
        return false;
      }
    }
    return true;
  }
docs: Check whether all tiles have loaded.