Typescript casting for any camera type

What would be the best way to set a parameter type to allow any BJS camera type?

For example.

interface IEngineCacheView{
    uid : string
    camera : FreeCamera | UniversalCamera | ArcRotateCamera ...(others)
}

I don’t want to use “any”, what would be the best option here?

Maybe Camera, as it is the root class.

If you want to get the best out polymorphism for all cameras, use TargetCamera. All cameras extend TargetCamera

2 Likes

That is changed from the last time I check for ArcRotateCamera, probably 2017.