Scaling of the primitive depending on the camera height

I need to do scaling of a primitive depending on the height of the camera. Below is the code in Sandcastle. Why doesn’t it work?

Link Sandcastle:Cesium Sandcastle