deck.gl - translate for Tile3DLayer not working as expected - Stack Overflow

admin2025-04-18  3

I have this function defined for a Tile3DLayer instance.

const onTilesetLoad = (tileset: Tileset3D) => {
    const {cartographicCenter, zoom} = tileset;
    tileset.modelMatrix =  new Matrix4().translate([0, 0, 300]);
    setInitialViewState({
      ...INITIAL_VIEW_STATE,
      longitude: cartographicCenter[0],
      latitude: cartographicCenter[1],
      zoom
    });

    if (updateAttributions) {
      updateAttributions(tileset.credits && tileset.credits.attributions);
    }
  };

As can be seen, I am having a translation for Z when tile loads. I can see change in position of data, but instead of change in height, I instead see change across other axis. I want to change along height only.

Why is it so?

转载请注明原文地址:http://anycun.com/QandA/1744927640a89604.html