<meta charset="utf-8" & gt;
<body>
Import {MTLLoader} from "./JMS/loaders/MTLLoader js ";
Import {OBJLoader2} from "./JMS/loaders/OBJLoader2 js ";
Import from {MtlObjBridge} "./JMS/loaders/obj2/bridge/MtlObjBridge js ";
(function () {
Let objLoader2=new objLoader2 ();
Let the request=null;
Let callbackOnLoad=function (object3d) {
Let the axis=new THREE. Vector3 (1, 0, 0).//vector axis
Object3d. RotateOnAxis (axis, Math. PI/2);
The console. The log (' Loading complete: test ');
The console. The log (" cache ", THREE. Cache. Files).
The console. The log (" contentRef, "objLoader2. Parser. ContentRef);
Request=null;
};
Let mtlLoader=new mtlLoader ();
Let onl oadMtl=function (mtlParseResult) {
ObjLoader2. SetModelName (" modelName ");
ObjLoader2. SetLogging (true, true);
ObjLoader2. AddMaterials (MtlObjBridge addMaterialsFromMtlLoader (mtlParseResult), true);
Request=objLoader2. Load (' test_model/test2. Obj, callbackOnLoad, null, null, null);
MtlLoader=null;
};
MtlLoader. Load (' test_model/test2. MTL, onl oadMtl);
}) ();
</script>