You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在cesium1.62 , EllipsoidGraphics.maximumCone 使用 new Cesium.CallbackProperty不起作用?
例:
var viewer = new Cesium.Viewer('cesiumContainer');
var i = 50;
var entity = viewer.entities.add({
name : 'Dome with inner radius',
position: Cesium.Cartesian3.fromDegrees(-114.0, 40.0),
ellipsoid : {
radii : new Cesium.Cartesian3(1000, 1000, 1000),
maximumCone :new Cesium.CallbackProperty(setAngle, false),
material : Cesium.Color.RED.withAlpha(0.3),
outline : true
}
});
function setAngle() {
//只走一次
if(i>0){
i-=10;
}
return Cesium.Math.toRadians(i);
}
viewer.zoomTo(viewer.entities);
请问怎么解决这个问题
The text was updated successfully, but these errors were encountered:
OmarShehata
changed the title
cesium 1.62 中 EllipsoidGraphics.maximumCone 使用 new Cesium.CallbackProperty不起作用
EllipsoidGraphics.maximumCone cannot be dynamic
Oct 10, 2019
Thanks @HuZhuangQiang . I can reproduce this. Here's a Sandcastle where the ellipsoid will pulsate by changing its radii, but the cone angle won't change from the initial value set (so if you change the Math.sin to Math.cos in the setAngle callback it'll have a different initial value).
I think the maximumCone property just needs to be wired up here to detect updates to it and make sure the new value is used?
在cesium1.62 , EllipsoidGraphics.maximumCone 使用 new Cesium.CallbackProperty不起作用?
例:
var viewer = new Cesium.Viewer('cesiumContainer');
var i = 50;
var entity = viewer.entities.add({
name : 'Dome with inner radius',
position: Cesium.Cartesian3.fromDegrees(-114.0, 40.0),
ellipsoid : {
radii : new Cesium.Cartesian3(1000, 1000, 1000),
maximumCone :new Cesium.CallbackProperty(setAngle, false),
material : Cesium.Color.RED.withAlpha(0.3),
outline : true
}
});
function setAngle() {
//只走一次
if(i>0){
i-=10;
}
return Cesium.Math.toRadians(i);
}
viewer.zoomTo(viewer.entities);
请问怎么解决这个问题
The text was updated successfully, but these errors were encountered: