What's the state of EllipseGeometryLibrary?

I am in the process of adding TypeScript types to one of our projects and I just came across the following line of code: Cesium.EllipseGeometryLibrary.computeEllipsePositions(...). I cannot find a type for EllipseGeometryLibrary and it’s also not defined in the docs. I can see the object at runtime however, and I also see history of it being discussed in the community such as here. So what’s the state of EllipseGeometryLibrary, is it deprecated? Should we be using an alternative? Is it just missing from the docs and the TypeScript types?

Welcome to the Cesium community!

I think it’s not publicly exposed because it’s only used internally in the engine. So if you’re just constructing ellipse geometry, you should use the exposed functions on the EllipseGeometry class instead.

What are you trying to do with the computeEllipsePositions funciton?

Not the original commenter, but I have the same question.

I want to draw an ellipse with a hole in the middle. I found this old answer:

How on earth do I draw a donut?

If I’m not able to access computeEllipsePositions(), Is there another way to draw a donut, or another way to get the positions of the ellipse?

It looks as if EllipseGeometryLibrary exists in @cesium/engine now. You can still import and use it based on your bundler setup.

import EllipseGeometry from "@cesium/engine/Source/Core/EllipseGeometryLibrary";

This works for me but TypeScript doesn’t like it because it says it doesn’t have a type definition for it. I can console.log it and look at it though and call functions on it.

I tried that, but ran into the same issue with the Typescript definitions.
EllipseGeometryLibrary isn’t defined in the existing @cesium/engine type definition file, so I tried making another type definition file for @cesium/engine in my project directory, but was unsuccessful.

I’m not sure if having two definition files for the same namespace (@cesium/engine) is not allowed, or if I’m not creating the local type definition file correctly.