cesium动态改变primitive,entity模型颜色

对于primitive
var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction(function(movement) {
  var pick = viewer.scene.pick(movement.position);
  console.log(pick)
  pick.primitive.appearance.material.uniforms.color=Cesium.Color.BLUE
  

},Cesium.ScreenSpaceEventType.LEFT_CLICK);
对于entity
pick.id.point.color=new Cesium.Color(1.0, 0.0, 0.0, 1);

或者官网中的entity.model.color

entity.model.color = getColor(newValue, viewModel.alpha);

你可能感兴趣的:(cesium)