How to get Camera as THREE.PerspectiveCamera?

Trying to use this method but I need to specify the camera as THREE.PerspectiveCamera as the normal Needle Camera class doesn’t have this method?
https://threejs.org/docs/#api/en/cameras/PerspectiveCamera.setViewOffset

Original Post on Discord

by user 103054507105067008

Struggling to get the perspectivecamera, I saw the Needle Cam class has .cam as one but it is always undefined

by user 103054507105067008

Ah, Camera needs to be serialized

by user 103054507105067008

Yes or you can use this.context.mainCamera instead of mainCameraComponent