iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.07k stars 290 forks source link

feat(TextureSize): Add parameter to define the textureSize #2297

Closed AnthonyGlt closed 3 weeks ago

AnthonyGlt commented 3 months ago

Related issue:

https://github.com/iTowns/itowns/issues/2292 https://github.com/iTowns/itowns/issues/2312 https://github.com/iTowns/itowns/issues/2309

Replace the const use for subdivision and texture conversion with a customizable parameter sizeTextureTile

Example: For MVT layer

 const mvtSource = new itowns.VectorTilesSource({
              style: 'https://data.geopf.fr/annexes/ressources/vectorTiles/styles/PLAN.IGN/standard.json',
              crs: 'EPSG:3857',

          });

  const mvtLayer = new itowns.ColorLayer('mvtLayer',{
      source: mvtSource,
      sizeTextureTile:512,
      addLabelLayer: true,

  });

For the globe:

const view = new itowns.GlobeView(viewerDiv, placement, {sizeTextureTile:512});

AnthonyGlt commented 2 months ago

We'll keep it in the layer because we have access to the globe layer from there and then we can affect the tile size for the subdivision. (TODO put a comment in the code)

AnthonyGlt commented 1 month ago

I agree, the name should be changed. subdivisionThreshold is more appropriate but there is sseSubdivisionThreshold already existing.