Billboard rotation does not use `verticalOrigin` and `horizontalOrigin`
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
When an origin point on a billboard is set with `verticalOrigin` and `horizontalOrigin` and a rotation is applied, the rotation is always based on the billboard center, not the specified origin point. It makes intuitive sense that `verticalOrigin` and `horizontalOrigin` should control this, and rotation around any point but the center is currently not possible.
For example:
```
map.entities.add({
position : Cesium.Cartesian3.from Degrees(),
billboard : {
image : Cesium.writeTextToCanvas('ANCHOR POINT', {
font : '12pt Arial, sans-serif',
fillColor : Cesium.Color.AQUA
}),
rotation : Cesium.Math.toRadians(0),
alignedAxis : Cesium.Cartesian3.UNIT_Z,
verticalOrigin : Cesium.VerticalOrigin.CENTER,
horizontalOrigin : Cesium.HorizontalOrigin.LEFT
}
})
```
![screenshot][1]
[1]: https://i.stack.imgur.com/A69Lb.png
Contributor guide
Research direction
Start by reproducing the behavior with the billboard example in the issue, then locate the billboard rendering code that handles rotation, verticalOrigin, and horizontalOrigin. The work is done when rotation is based on the specified origin rather than always using the billboard center, including the left-origin example described here.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100