Dynamic materials with Entities

I wanteto make make every single property of a entity to be able to change/be edited at run-time without any delay.

Someone told me to use CallbackProperty, and it works fine for positions and other stuff.
But I’ve found a problem, it seems CallbackProperty cannot be combined with Entity materials, since they require MaterialProperty?

Why I can’t do this for example?

        ellipse : {
                rotation: new Cesium.CallbackProperty(function() { return me._rot;}, false),
                semiMinorAxis : new Cesium.CallbackProperty(function() { return me._rY;}, false),
                semiMajorAxis : new Cesium.CallbackProperty(function() { return me._rX;}, false),
                extrudedHeight : new Cesium.CallbackProperty(function() { return me.extrudedHeight;}, false),
                material : new Cesium.CallbackProperty(function() { return me.color;}, false),
            }

``

A color material is actually an instance of ColorMaterialProperty which itself has a color property that is a Property object. Just change your code to:

material : new Cesium.ColorMaterialProperty(new Cesium.CallbackProperty(function() { return me.color;}, false))

Ah, I understand, thanks for the fast answer!