Cesium Types Missing

Hey there! I went to use Cesium.Framebuffer, Cesium.Renderbuffer, and Cesium.DrawCommand in my typescript Cesium app, and discovered that they are not present in the type declarations. (at least in my version 1.140).

I can see the relevant Objects being exported from @cesium/engine, so I’m wondering what’s going on, or if there’s a workaround.

Thanks!

Hi BakedPotatoLord:

Thank you for reaching out on the CesiumJS support forum. Love the username :slight_smile:

Those classes (Framebuffer, Renderbuffer, DrawCommand) are part of Cesium’s lower-level rendering engine. While they’re exported from @cesium/engine, they’re not part of the official typed public API, so they don’t show up in the TypeScript declarations.

This is why you can see them at runtime, but TypeScript doesn’t recognize them.

Here’s a few workarounds:

If you want to try them anyway, you can bypass typing:

const fb = new (Cesium as any).Framebuffer(…);

or

const Framebuffer = (Cesium as any).Framebuffer;

The classes exist at runtime - TypeScript is only complaining about missing types, so casting to any avoids that.

Please note that these are internal APIs which can be subject to change. If your goal is to customize rendering, it’s usually safer to use higher-level APIs like Primitive, Appearance, or CustomShader. These are:

  • Part of the public API → covered by typings and docs
  • More stable → less likely to break across releases
  • Designed for common use cases like:
    • Custom materials/shaders → CustomShader
    • Geometry + rendering setup → Primitive + Appearance

In contrast, things like DrawCommand are much lower-level and require you to manage more of the rendering pipeline yourself.

Hope this helps

Regards,

Travis Crowell

Thanks for the heads up. I did some digging on my own, and chose to give the backend classes any types.

I was exploring using customShader and primitive, but I need to do a 2-pass program where I draw to a framebuffer, and then load as a texture and display it on a fullscreen quad. I don’t think this level of customization is possible with the public methods.

Thanks again,

BPL