Probably the best way to get started with this:
A new tutorial has been added recently, that shows the “Clipping Polygons” that have recently been introduced in CesiumJS. The tutorial was announced in New CesiumJS Tutorial: Hide Regions of 3D Tiles or Terrain with Clipping Polygons – Cesium , and can be found here:
Regarding this thread and the (outdated) sandcastles:
The sandcastle links that have been posted here have the form
https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=5VkNb9u4Gf...
It is possible to “revive” some of these, by taking the #c=...
part, and attaching it to the proper URL for Sandcastles nowadays. So you can take the #c=...
part and create a new sandcastle URL like this:
https://sandcastle.cesium.com/index.html#c=5VkNb9u4Gf...
But… note that these links are pretty old, and there might have been changes in CesiumJS that cause these Sandcastles to no longer work as expected. (For example, the last sandcastle that was posted above is updated here, but it does not seem to do anything useful…)
In addition to the tutorial that was linked above, here are a few Sandcastles that (still work and) might be useful:
- The Sandcastle in Clipping only a portion of 3d Tileset - #2 by Marco13 shows how to “cut out” a part of a tileset using clipping planes
- The Sandcastle in How to load only 3dtiles inside the polygon? - #7 by Marco13 does the opposite: It only shows parts of a tileset that are contained in a polygon, using clipping planes