Make home position for Camera more powerful
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
Currently result of `Camera.flyHome` can only be a orthographic view defined by `DEFAULT_VIEW_RECTANGLE` and `DEFAULT_VIEW_FACTOR`. But sometimes you wish another view or it is a bit complicated with just these two parameters.
Some Usecase:
- If you have a demo with indoor views the floor is maybe not the most interesting thing, but the walls, so you want to adjust orientation of default position. Currently once way to implement this is to hide default home button of Cesium and implement and own and don't use `flyHome`.
- A user can upload own tilesets and you want to define an automatic default view for this. Currently you can say `Rectangle.pack(tileset._root._boundingVolume.rectangle, Camera.DEFAULT_VIEW_RECTANGLE, 0)`. This works fine as long the tileset is at ellipsoid - but in case it isn't you are sometimes below the tileset with it. A API would be here fine too, so not everyone must implement a workaround for it by oneself.
Contributor guide
Research direction
Start by reading Camera.flyHome and the DEFAULT_VIEW_RECTANGLE and DEFAULT_VIEW_FACTOR definitions. Review how Rectangle.pack is used with tileset._root._boundingVolume.rectangle, especially for tilesets not located at the ellipsoid. Done means the home-position API supports a custom view or orientation without requiring users to replace the default home button.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100