Hi all, I am trying to use typescript to load a glTF2 model and had a quick question:
I am getting an error of:
BJS - [00:41:04]: Unable to find a plugin to load .gltf files. Trying to use .babylon default plugin. To load from a specific filetype (eg. gltf) see: http://doc.babylonjs.com/how_to/load_from_any_file_type
When I try and use
SceneLoader.ImportMesh("", “asets/models/dqp/”, “dqp.gltf”, scene, function (scene) {
});
It did work fine using the compiled babylon.js but with NPM you need to manually include all the right modules and that error is telling me I must not be.
The modules I am loading right now are:
import { Engine } from “@babylonjs/core/Engines/engine”;
import { Scene } from "@babylonjs/core/scene";
import { Vector3, Color3, Color4 } from "@babylonjs/core/Maths/math";
import { FreeCamera } from "@babylonjs/core/Cameras/freeCamera";
import { HemisphericLight } from "@babylonjs/core/Lights/hemisphericLight";
import { Mesh } from "@babylonjs/core/Meshes/mesh";
import { StandardMaterial } from "@babylonjs/core/materials/standardMaterial"
import { SceneLoader } from "@babylonjs/core/Loading/sceneLoader"
import { GLTFLoader} from "@babylonjs/loaders/glTF/2.0/glTFLoader"
I went through the list of modules but am having trouble finding the right one.
What modules are required to load a standard GLTF2 model with maps, keys, and bones?
How do I go about finding what modules are required in the future to enable a feature? I hate to ask every time. Most you can kind of guess as the compiler does not recognize the class if it is not imported. However, for some features, such as GLTF, the compiler says all required classes are loaded, but it still fails to load as likely something is missing.