feat(TextureSize): Add parameter to define the textureSize
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});
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)
I agree, the name should be changed. subdivisionThreshold is more appropriate but there is sseSubdivisionThreshold already existing.