Can't toggle camera projection for Viewer

I am using React with TypeScript to load a Speckle stream, I want to toggle the camera projection to orthographic but the method doesn’t seem to exist

Hi @imanwarsame

If you are using 2.16 or below that function exists and looks to be working correctly. Here’s it running in a sandbox : busy-fast-cmt594 - CodeSandbox

If you are using API 2.0, which is version 2.17.0-alpha then you need to use the toggleCameras function from the CameraController extension, which you first need to attach. Here is a complete example


1 Like

Hi @alex,
I’m using API 2.0 and the below worked like a charm, thank you!

const cameraController = viewer.createExtension(CameraController);