Can anything be assigned a CallbackProperty

I think I am not reading the API documentation correctly or very well. What about the Entity’s “description” member variable tells me that it can be assigned a Cesium.CallbackProperty?

I have an Entity.description in some legacy code that is assigned a CallbackProperty. The callback isn’t getting called and I am trying to figure out why.

Thank you!

I can’t really help you if you don’t provide your code.

In the Cesium Sandcastle, I tried the following code, and when I click on the red box, the InfoBox opens and you see that the number gets updated. However, the number only gets updated when the InfoBox is open. So the CallbackProperty is only called when the description is accessed.

const viewer = new Cesium.Viewer("cesiumContainer", { infoBox: true });
const entities = viewer.entities;
let n = 0;

const height = 300000.0;
  position: Cesium.Cartesian3.fromDegrees(-106.0, 45.0, height),
  box: {
    dimensions: new Cesium.Cartesian3(90000.0, 90000.0, 90000.0),
    material: Cesium.Color.RED,
  description: new Cesium.CallbackProperty(
      () => {
        return "number: " + n;


This is really just an API question. How does the API indicate that a field can be assigned a Cesium.callbackProperty?

In the end, I think it’s just the nature of technical documents. This

A Property whose value is lazily evaluated by a callback function.

Is in the CallBackProperty API doc. It suggests that a Callback is a “Property”.
Then this:

Entity - Cesium Documentation

says that “description” can be assigned a “Property”.

To me, something like a Callback should stand out more than a lowly Property.

It’s not a Callback, but a CallbackProperty. It’s a Property defined by a callback. It’s inheritance.