Importing ArcRotateCamera from CDN Package

In the past, we could import ArcRotateCamera from babylon.js script. But now if I use the following line:

import { ArcRotateCamera } from “https://cdn.babylonjs.com/babylon.js

I will get this error:

The requested module ‘https://cdn.babylonjs.com/babylon.js’ does not provide an export named ‘ArcRotateCamera’

How can I import ArcRotateCamera without using NPM package?

Our CDN only hosts the UMD version, which populates the global namespace. instead of importing, use BABYLON.ArcRotateCamera. If you want to properly import you will need to use the es6 packages - but we are (still?) not serving them. unpkg does, if it helps - https://www.unpkg.com/@babylonjs/core@6.14.0/Cameras/arcRotateCamera.js

1 Like

Thanks