# How to a scale primitive?

**URL:** <https://community.cesium.com/t/how-to-a-scale-primitive/31728>\
**Category:** CesiumJS\
**Created:** [April 25, 2024, 11:17am UTC](https://community.cesium.com/t/how-to-a-scale-primitive/31728 "2024-04-25T11:17:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor\_Johnson](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/victor_johnson/32/22665_2.png) [@Victor\_Johnson](https://community.cesium.com/u/Victor_Johnson)\
**Post date:** [April 25, 2024, 11:17am UTC](https://community.cesium.com/t/how-to-a-scale-primitive/31728/1 "2024-04-25T11:17:26Z")

</div>

I found such an example of mashstabirvoaniya primitives in the topiq. Here is a link to Sandcatsle:[Cesium Sandcastle](https://sandcastle.cesium.com/#c=7VhpT+M4GP4rVvdDg5S6By3QDoN2YGGEtBwaOmhWqrRyErdYOHZkO4Xuiv++rxO7TXogmL2+DKUhtt/zeQ/bzIlCc0afqEIfkaBP6Ixqlqf4vpgLJo24GJ9JYQgTVE0aex8mot0uebCOqaB4xmVEsX6QTyBkSrimQDMHyVKxGRN1yWdEGXgjYj/oHQ6OesMhHgyHh4e9Xr9/GKLuQXdwNNzHB/v9/rA73D86CNFg0Okcdo5wpzscHvQPekfWhlIDE9oQEdO6js9UptSoxaVbDf6cCIRmbnZUJT3nnGVassTzlLQIKZIwNtphebfTwR0wtvJnLyz55hSoni+kSokZedZbqrwtZ5JL9SnLKFF2iO/Pv4zPv/1+cfPl6tPYingpJaUyofyKGMWel2LGwKKnIFpjSrS5lso8fM3G8oI90+RCkZQGJeSlCGKAO8rB6BFyXsVWe90rO7MO2CfPGXRwbxiiDh707fMInt29wkrQ8LKKg8e2HodbxVJm2Jx6UGdresAwH0EHH1kiU7NyN4BBHfgzEj/Qm8yA4j9AhFE5DZGLKOWAGv28aUOViglDFRDO17hjmWaKan0PatgGF+FcPt2y+JGJmVtZ4gMIVasl86BoTJIk8JCs0cYQTEXwlC/GskQvodowQQyTYuQqq/A8yZWb7FZVusK+smkEUXEB0DHh4FjXWldQOnwfhYwfZW6wUSR+DJacqwgbKXlEbJtIZJynVBg8o+acU/t6urhMgqYjaVqmdbkQV744ZSIBgPRKfujlloqmuYitL6Wdq/RZYhaWK3ulP5yaap2AbU5tOe7jy1/Or8eX499wzKWAVPlguWIptOQUczkLKtxedEFjPS6GuyRPlUzvLEGwvUMUzE6klxxWM9oJCvZKha+6kebcMMAvqJgUoprtuyXvcHe1aCBfoa9wYuiNb9gbDi1tOF1Yt4lynSZEQRe1tjlYAcNZsuaVpmbsFEPI66FYs6jm7BvcWuYLruNaGQHdy7YCgKS+iTRVcxJBcCuJ2ix8bO5hnUc6hvZIA5+uQTUpXZGBtus8jWATraQVtJcpCpi+JtdueslUdiiTK+EoXyrCVpWwq5WA2QHsQascXnaCibgjIolhvwC0oOOMy4I7zY0ByyeNIovRN9SbNEK0LMDAGVaF+XXdeCMKyyLafQIIkf0tydttnw4UugKypwrCUaxds9uSQaucrCbS283cla+tbSeT1rajSWvzbBKid+BU+l2E4O+ivRObsk29BxXXtd7txyp+Eewi/5pD/2yw7RHOfd8fu+/3z9Xn22oTzl//Q3WC1uLoVzzeXKPt9o8q/VGl3x9sf674ryvRfhph41ibBacn5eb7M0szuGShXPEA47ahaWaB0+0ojx+pwbHWfmP/yR+QK/u5xXemZC6SEVKziAR92O38F25Tntf+ZFD+xeWhnz1XpiOpEqpa9jaa6+riy5paJrLcVJXPi4sK4S3C2QxuBylLEk43NbaMzEaoV9PqlyIJjSitroLa47aH6Dhhc8SSj1v+TYBiTrSGlWnO+R3cxSaNk+M20NfYuCRWzw3YysnCkjx0T34tJzHGx20YbnI5l4G8tMmunBT142mL2RIRs8go8EAyzsAGQEHAqIO79p08w3u3A6/a0Gw5nxBDWhHcVWBmTngOFyZfa3b0NQMCmGsWCporM2oK4S5qrGBwHUaDV8QWArzlfwE)

I need to scale primitives this way, but have the size of the primitive depend on the height of the camera from positionCartographics.height. How can this be done?  
P.s. You also need the primitive to not follow the camera

---

<div class="post-metadata">

**Author:** ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)\
**Post date:** [April 26, 2024, 8:26pm UTC](https://community.cesium.com/t/how-to-a-scale-primitive/31728/2 "2024-04-26T20:26:45Z")

</div>

Hi @Victor_Johnson,

Does this need to be done with the Primitive API, or would it be possible to use the higher-level Entity API?

---

<div class="post-metadata">

**Author:** ![TixeT](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/tixet/32/20707_2.png) [@TixeT](https://community.cesium.com/u/TixeT)\
**Post date:** [April 27, 2024, 4:26am UTC](https://community.cesium.com/t/how-to-a-scale-primitive/31728/3 "2024-04-27T04:26:48Z")

</div>

I think he has the same problem as me. To display a large number of primitives, you need to scale on the shader side to avoid drawdown. I am also looking for such a solution.

---

<div class="post-metadata">

**Author:** ![Victor\_Johnson](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/victor_johnson/32/22665_2.png) [@Victor\_Johnson](https://community.cesium.com/u/Victor_Johnson)\
**Post date:** [April 27, 2024, 11:17am UTC](https://community.cesium.com/t/how-to-a-scale-primitive/31728/4 "2024-04-27T11:17:47Z")

</div>

I need to use the primitives specifically
