Primitive ordering regression
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
In Cesium 1.29, the using `raiseToTop` makes the polyline render on top of the billboard and label. However, in Cesium 1.30 this is no longer the case.
Reported by @erezy
https://groups.google.com/forum/#!topic/cesium-dev/ywyFR5GSi_c
```js
var viewer = new Cesium.Viewer('cesiumContainer',{
sceneMode: Cesium.SceneMode.SCENE2D
});
var polylines = new Cesium.PolylineCollection();
polylines.add({
positions : Cesium.Cartesian3.fromDegreesArray([
-75.10, 39.57,
-77.02, 38.53,
-80.50, 35.14,
-80.12, 25.46]),
width : 2,
material : new Cesium.Material({
fabric : {
type : 'Color',
uniforms : {
color : new Cesium.Color(1.0, 1.0, 0.0, 1.0)
}
}
})
});
var billboards = new Cesium.BillboardCollection();
billboards.add({
position : Cesium.Cartesian3.fromDegrees(-77.02, 38.53),
image : '../images/Cesium_Logo_overlay.png'
});
var labels = new Cesium.LabelCollection();
labels.add({
position : Cesium.Cartesian3.fromDegrees(-80.50, 35.14),
text : 'A label',
fillColor: Cesium.Color.BLUE
});
var primitives = viewer.scene.primitives;
primitives.add(labels);
primitives.add(billboards); // Add collection
primitives.add(polylines);
primitives.raiseToTop(polylines);
```
Contributor guide
Research direction
Start with the supplied SCENE2D reproduction and inspect viewer.scene.primitives, the PolylineCollection, BillboardCollection, and LabelCollection interactions around raiseToTop. Compare the ordering behavior between Cesium 1.29 and 1.30, then verify that raising the polyline restores its rendering precedence over the billboard and label.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100