Globe Clipping Plane #562
Answered
by
zouyaoji
KorecGroup-AliJafri
asked this question in
Q&A
-
Hi, what's the best way to implement a clipping plane on a globe? When I try to define a clipping plane via GeoJson and use the polygon defined, the vue-cesium implementation gives me an error of |
Beta Was this translation helpful? Give feedback.
Answered by
zouyaoji
May 27, 2024
Replies: 1 comment 2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to bind: clippingPlanes="clippingPlanes", you need to first define a const clippingPlanes = ref(null); and then initialize clippingPlanes in the @ready event of vc-viewer. If you need to use Cesium to initialize, you must write it like this. Unless you put the introduction of Cesium.js into index.html.
You can also write this in the ready event of the vc-primitive-tileset component:
tileset._clippingPlanes = new Cesium.ClippingPlaneCollection({
planes: [new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, 0.0, -1.0), 0.0)],
edgeWidth: 1.0
})