the BABYLON namespace is needed only if you use the UMD version of the engine (i.e. import ... from "babylonjs"); If you use es6, you need to import the class directly, and then not use the BABYLON namespace. It would be easier to tell you what is wrong if you shared a project or a reproduction