I'm trying to import specific objects from @babylonjs/core (https://doc.babylonjs.com/setup/frameworkPackages/es6Support#available-packages), e.g. Engine, Scene, but would like them to only be accessible via a BABYLON namespace,
So something like
namespace BABYLON {
export import { Engine } from '@babylonjs/core';
export import { Scene } from '@babylonjs/core';
export import { ArcRotateCamera } from '@babylonjs/core';
export import { HemisphericLight } from '@babylonjs/core';
};
// Engine, Scene, etc, should only be accessible via the BABYLON namespace
// These should work
const engine = new BABYLON.Engine(...);
const scene = new BABYLON.Scene(...);
// This should not
const engine2 = new Engine(...); // Error: Engine is not defined, or something.
Is this possible? Can't seem to get it.