Hi,
I am using billboards that have alignedAxis = Cesium.Cartesian3.ZERO (pointing to the top of the screen), and billboards that have alignedAxis = Cesium.Cartesian3.UNIT_Z (pointing North).
The ones with Cartesian3.ZERO work fine until I add the ones with Cartesian3.UNIT_Z. After that, the alignedAxis property seems to be Cartesian3.UNIT_Z for all billboards, and the Cartesian3.ZERO ones are upside-down.
Is that a bug or a misunderstanding from my side?
Thanks, Willem
Sandcastle (click ‘Add second billboard’ to see the effect):
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var pinBuilder = new Cesium.PinBuilder();
function addBillboard() {
Sandcastle.declare(addBillboard);
viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
billboard :{
image : pinBuilder.fromColor(Cesium.Color.ROYALBLUE, 48).toDataURL(),
verticalOrigin : Cesium.VerticalOrigin.BOTTOM,
rotation: 0.0,
alignedAxis: Cesium.Cartesian3.ZERO // should point to top of the screen
}
});
}
function addSecondBillboard() {
Sandcastle.declare(addSecondBillboard);
viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-93.0, 37.0),
billboard : {
image : pinBuilder.fromColor(Cesium.Color.RED, 48).toDataURL(),
verticalOrigin : Cesium.VerticalOrigin.BOTTOM,
rotation: 0.0,
alignedAxis: Cesium.Cartesian3.UNIT_Z // should point North
}
});
}
Sandcastle.addToolbarMenu([{
text : 'Add billboard',
onselect : function() {
addBillboard();
Sandcastle.highlight(addBillboard);
}
}, {
text : 'Add second billboard',
onselect : function() {
addSecondBillboard();
Sandcastle.highlight(addSecondBillboard);
}
}]);
Sandcastle.reset = function () {
//viewer.entities.removeAll();
};