-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(TileBuilder): migrate to TypeScript #2440
refactor(TileBuilder): migrate to TypeScript #2440
Conversation
c131f60
to
9d9b3c8
Compare
164fabe
to
d8855a9
Compare
It'd be great if I could please get a go-ahead on the general structure of this refactor so I can start working on the next one—which will inevitably be based off of this one, while the specific details of the PR get reviewed :) |
d8855a9
to
5dad0cb
Compare
5dad0cb
to
55a01e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all these changes, it's already better and easier to understand with typings. I think we should take this opportunity to improve the architecture and the doc of this part of the code a little bit more, that's what stands out from my comments. Let me know what you think :)
7e84c08
to
865316d
Compare
c1c0dce
to
c4f597b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the commenting and refactoring efforts 🙏
ca84bba
to
f5cafb7
Compare
Improve performance by using statically-sized ArrayBuffers. Reorganize code to get rid of some of the params/builder mess. Cleanup computeBuffers function. Squashed commit history (oldest to youngest): - fix: UV_1 generation - refacto(wip): cleanup and optimize computeBuffers - refacto(wip): improve index generation - wip: correct offset, off-by-one still at large - fix: change calls to allow camera debug - fix: found the error, off by a power of 2 actually - fix(uv): correct indices passed to UV buffering - fix(index): only generate buffer when needed - wip: enable cache - fix(computeBuffers): group tile and skirt together - fix(wip): squash rogue private field access - refacto: convert TileGeometry to TypeScript - style(builders): make method visibility explicit - refactor(exports): remove default exports - feat(TileGeometry): add OBB type - refactor: rename BuilderEllipsoidTile, fix imports - fix(tileGeometry): update tests to use public api - fix(TileBuilder): remove dead code comments
feat(tile): add doc comments, rm unused tileCenter
f5cafb7
to
4fc027e
Compare
Description
Create types for the tile builder section of iTowns.
Improve performance of tile creation.
Improve code readability of tile creation.
Depends on #2447.Merged.Summary of changes
BuilderEllipsoidTile
being changed toGlobalTileBuilder
to match the naming of thePlanarTileBuilder
(especially considering its position inside aGlobe
folder). Hesitated between "Globe" and "Global" so feel free to criticize the choice, it's already a breaking change so we might as well pick the best one.computeBuffers.js
intocomputeBuffers.ts
, changing algorithm to take advantage of simple math to avoid using slow JS constructs in favor ofArrayBuffer
s and moving some checks out of loops.Motivation and Context
This fits into the larger motion towards converting iTowns to TypeScript.
Code had to be changed and moved around to allow static type checking.
Some of the functions around buffer generation were cryptic and had low readability, which required additional changes.
Tested on Ubuntu 22.04.5 LTS x86_64 using Firefox 126.0.1 (64-bit)