?點entity文章來源:http://www.zghlxwxcb.cn/news/detail-641995.html
function f2(){
var x=1;var flog=true;//閃爍
//var x=0;var flog=false;//漸顯
viewer.entities.add({
name:"圓點point閃爍",
position:Cesium.Cartesian3.fromDegrees(116.20+0.03,39.53+0.03,0),
point : {
show : true, // default
color :new Cesium.CallbackProperty(function () {
if(flog){
x=x-0.05;
if(x<=0){
flog=false;
}
}else{
x=x+0.05;
if(x>=1){
flog=true;
}
}
return Cesium.Color.RED.withAlpha(x);
},false),
pixelSize : 10, // default: 1
outlineWidth :0
}
});
}
面entity?文章來源地址http://www.zghlxwxcb.cn/news/detail-641995.html
function f1() {
var x = 1;
var flog = true;
viewer.entities.add({
name: "圓形區(qū)域閃爍",
position: Cesium.Cartesian3.fromDegrees(116.20, 39.53, 0),
ellipse: {
semiMinorAxis: 2000.0,
semiMajorAxis: 2000.0,
height: 0,
material: new Cesium.ColorMaterialProperty(new Cesium.CallbackProperty(function () {
if (flog) {
x = x - 0.05;
if (x <= 0) {
flog = false;
}
} else {
x = x + 0.05;
if (x >= 1) {
flog = true;
}
}
console.log(x)
return Cesium.Color.RED.withAlpha(x);
}, false))
}
});
}
到了這里,關于Cesium entity 漸隱漸顯、閃爍的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!