Hi body. I getting the follow error.
I use Babylon.js v6.25.0 - WebGL2 and my BJS project run ok in all other parts, but when i try to load / import an external ojbect like glb or gltf I get up the next error.
The url of the assets in ok. I searched on “google” but no solution go up. I can help me any one?
I use import “@babylonjs/loaders/glTF”;
thanks in advanced
BJS - [15:03:22]: Unable to load from https://s3.eu-south-1.amazonaws.com/ai-assets-storage/system/resources/objects/01H668K63F9TSMDJ3TXR1MVNRB/scene.gltf: _this3._babylonScene._forceBlockMaterialDirtyMechanism is not a function
/** */
static create3DObj = (url = “”, scene, canvas) => {
scene.enablePhysics();
//--- loader ---
//scene.getEngine().displayLoadingUI();
//CoreVrPlayer.myLoader();
const camera = new ArcRotateCamera(
"",
Tools.ToRadians(90),
Tools.ToRadians(90),
2000,
new Vector3(0, 0, 0),
scene
);
camera.useNaturalPinchZoom = true;
camera.wheelPrecision = 0.1;
camera.pinchDeltaPercentage = 0.003;
camera.pinchPrecision = 0.1;
camera.panningSensibility = 0.01;
camera.useNaturalPinchZoom = false;
camera.zoomToMouseLocation = false;
let cameraTarget = new Vector3(0, 0, 0);
camera.setTarget(cameraTarget);
const pointers = camera.inputs.attached.pointers;
pointers.multiTouchPanning = false;
pointers.multiTouchPanAndZoom = false;
scene.activeCamera.attachControl(canvas, true);
scene.useRightHandedSystem = true;
const lightObj = {
type: "hemispheric",
name: "light001",
x: 0,
y: 0,
z: 0,
intensity: 1,
scene: scene,
};
CoreVrPlayer.makeLight(lightObj);
let fileName = url.split("/")[url.split("/").length - 1];
let urlPath = url.replace(fileName, "");
SceneLoader.Append(urlPath, fileName, scene, function (scene) {
scene.createDefaultCameraOrLight(true, true, true);
scene.activeCamera.alpha += Math.PI;
});
/*
const loader = SceneLoader.Append(
"https://raw.githubusercontent.com/BabylonJS/MeshesLibrary/master/",
"PBR_Spheres.glb",
scene,
(newMeshes) => {
camera.target = newMeshes[0];
})
*/
/*
let assetsManager = new AssetsManager(scene);
let meshTask = assetsManager.addMeshTask(
"test",
"",
"https://raw.githubusercontent.com/BabylonJS/MeshesLibrary/master/",
"PBR_Spheres.glb"
);
meshTask.onSuccess = function (task) {
task.loadedMeshes[0].position = Vector3.Zero();
};
assetsManager.load()
*/
/*
SceneLoader.ImportMesh(
"",
"https://raw.githubusercontent.com/BabylonJS/MeshesLibrary/master/",
"PBR_Spheres.glb",
scene,
function (meshes) {
scene.createDefaultCameraOrLight(true, true, true);
scene.createDefaultEnvironment();
});
*/
/*SceneLoader.ImportMesh(
"",
urlPath,
fileName,
scene,
function (meshes) {
scene.createDefaultCameraOrLight(true, true, true);
scene.createDefaultEnvironment();
scene.activeCamera.alpha = Math.PI / 2;
//setTimeout(() => {
// scene.getEngine().hideLoadingUI();
//}, 4500);
}
);*/
}; //create3DObj