-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature/tile utils #5
base: mp_main
Are you sure you want to change the base?
Conversation
allows a way to get overall progress via traverse
Maybe? So far I have needed to duplicate the majority of this functionality in order to work with my custom extension? Is it too much to export the utility functions from the package as a way to keep internal/cached properties from being relied upon by external package users / exposed via types?
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.
Looks good!
Naming suggestions are little nits, but I think they would be a bit more clear.
|
||
// Convert 3d-tiles boundingVolume optional definitions into concrete THREE box/sphere/matrix description | ||
// - ex: used in 'tile.cached' | ||
export function convertTileBoundingVolume( boundingVolume: TileBase['boundingVolume'], transform: Matrix4 ): BoundingVolumeDescriptor; |
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.
Maybe this should be convertBoundingVolumeToBox3
to match the function below? Or maybe just boundingVolumeToBox3
to be shorter?
import type { TileBase } from '../base/TileBase'; | ||
|
||
// Convert optional 3d-tiles transform object into a THREE.Matrix4 | ||
export function convertTileTransform( transform: TileBase['transform'], parentMatrix: Matrix4 ): Matrix4; |
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.
Maybe tileTransformToMatrix4
is a bit clearer?
[util] - expose isTileDownloadFinished as utility function
[util] - separate / share-able 3d-tiles -> three conversion utils
It seemed slightly nicer to export a set of utility functions from the package as a way to keep the tile internal/cached properties from being relied upon by external package users / exposed via types?