Thanks for the fast replies!
Well, the whole project is too big but the main parts are not that much:
The imports:
import {
Engine,
FreeCamera,
Scene,
Light,
Mesh,
Color3,
Color4,
Vector3,
HemisphericLight,
StandardMaterial,
DynamicTexture,
Space,
MeshBuilder,
PointsCloudSystem,
ArcRotateCamera,
Camera,
AbstractMesh,
Axis,
SceneLoader,
PointerEventTypes
} from "@babylonjs/core";
import { IWheelEvent } from "@babylonjs/core/Events/deviceInputEvents";
and then I create the scene:
public createScene(canvas: ElementRef<HTMLCanvasElement>): void {
// The first step is to get the reference of the canvas element from our HTML document
this.canvas = canvas.nativeElement;
this.canvas.style.height = "50%";
this.canvas.style.width = "100%";
// Then, load the Babylon 3D engine:
this.engine = new Engine(this.canvas, true);
// create a basic BJS Scene object
this.scene = new Scene(this.engine);
this.scene.useRightHandedSystem = true;
this.scene.clearColor = new Color4(0, 0, 0, 0);
this.addZoomControl(this.scene);
this.setFreeCamera();
this.setTopDownCamera();
this.checkInputs();
// create a basic light, aiming 0,1,0 - meaning, to the sky
this.light = new HemisphericLight("light1", new Vector3(0, 1, 0), this.scene);
//this.loadModel();
SceneLoader.ImportMesh("", "assets/models/", "model.gltf", this.scene, );
// Debugging Editor
Inspector.Show(this.scene, {});
//this.showWorldAxis(8);
}