How to make a CombinedCamera?

I need to switch between Perspective and Orthographic frequently. The removed CombinedCamera seems nice. I copied the old code to TypeScript version, and change inPerspectiveMode to isPerspectiveCamera to make Raycaster and OrbitControls accept it.

After I replace my PerpectiveCamera to the CombinedCamera, I get the error “Unable to preventDefault inside passive event listener due to target being treated as passive.” from OrbitControls on mouse wheel.
To get rid of the errors, I repelace event.preventDefault(); to

if (event.cancelable) {
if (!event.defaultPrevented) {

The OrbitControls can work but dat.gui can’t be clicked on pull-down menus anymore. And the slider of Chrome moves when I rotate the scene by OrbitControls. The Raycaster can’t get proper result anymore.

The code of CombinedCamera is here.
Look forward to any kind of help.:persevere:

What are you passing as the second argument to the controls? Try:

const controls = new OrbitControls( camera, renderer.domElement );

I did pass renderer.domElement.:thinking: