3d tiles renderer js migration bootstrap #2295
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Starts the migration towards using 3dtilesRendererJS for 3D tiles. I created the
3d-tiles-migration
branch in which we can merge our work related to this migration. This is a first implementation with some TODOs left in the codeAlready implemented:
C3DTilesLayer
Some TODOs left in the code (don't hesite to give your opinion), commits are still messy and still some stuff to do to be iso with the
C3DTilesLayer
implementation (see below).Motivation and Context
#2225
Notes on the implementation
ThreeDTilesLayer
, WDYT?TilesRenderer
is conceptually not at the same level than an itownsLayer
, I decided to instance oneTilesRenderer
perThreeDTilesLayer
. Also I kept theC3DTilesIonSource
andC3DTilesGoogleSource
forC3DTilesLayer
to keep working but also to keep itowns Source / Layer instanciation logic in the API (even if these sources are not really useful anymore now that we use3dtilesRendererJS
because all the logic related to querying cesium ion an google sources are handled by3dtilesRendererJS
).GLTFLoader
andLegacyGLTFLoader
that loads gltf regardless of their version (1.0 or 2.0) and that shares the same interface than threeGLTFLoader
to allow loading gltf 1.0 files with 3dtilesrendererjs (namediGLTFLoader
for "itownsGltfLoader"). This class is exported so users that need to load gltf 1.0 or 2.0 files in their applications can benefit from it.LegacyGLTFLoader
enableDracoLoader
andenableKTX2Loader
that sets the draco and ktx2 path in itowns internal instance ofiGLTFLoader
.Don't hesitate to give your opinion on these choices :)
First tests
I started running some tests, it seems that:
3dtiles_25d.html
example seems slowerI will take some time today to do some more performance tests and try to assess where these drawbacks may come from.
Remaining TODO
Still a lot to do, see this list :)