iTowns / itowns

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

fix(TiledGeometryLayer): handle hideSkirt at creation #2359

Closed AnthonyGlt closed 1 week ago

AnthonyGlt commented 3 weeks ago

Description

Fix concerning https://github.com/iTowns/itowns/issues/2357

The line https://github.com/iTowns/itowns/blob/982b908a4420ee0308e95a9fe54c7018149a1554/src/Layer/Layer.js#L114

was triggering the hideSkirt setter before the complete initialization of the TiledGeometryLayer which resulted in a failure.

To correct it, we are now verifying the level0Nodes validity and reassigning hideSkirt value afterwards.

I've also added a unit test.