How to make display size of an actor independent from zoom level with vtk.js ?

In a scene, I want the zoom action to effectively change the rendered size of most of the actors in the scene (typically those built from vtkCubeSource), except some of them (for example, built from a vtkSphereSource) for which I would like to render them with a fixed size (ie. zoom action would not have any effect on them). Is it possible ?

Thanks in advance for your help.

Yes, it’s possible. The general idea is to figure out how 1 screen-space pixel corresponds to a world-space height. Once you know that, you can set your actor’s height to be that size multiplied by your desired pixel height.

Check out the implementation of getPixelHeightAtCoord. The parameters are computed from here.