Hello everyone!
I am trying to load GLB files to a scene. It works perfectly for some files, but some other files it returns this Unsupported texture format or type: format 5, type 2.
error:
RuntimeError: Unable to load from https://ipfs.io/ipfs/QmeciRLhTmE7bw5r5h76kqrftuQasXMgnFikx4KmrdGNEm: Unsupported texture format or type: format 5, type 2.
BaseError@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:115780:45
RuntimeError@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:115807:30
errorHandler@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:161368:109
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:161412:25
tryCallOne@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:28931:16
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:29032:27
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:30196:26
_callTimer@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:30096:17
_callReactNativeMicrotasksPass@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:30131:17
callReactNativeMicrotasks@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:30339:44
__callReactNativeMicrotasks@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:3025:46
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:2803:45
__guard@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:3008:15
flushedQueue@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.babylonreactnativesample&modulesOnly=false&runModule=true:2802:21
flushedQueue@[native code]
The GLB file in this error is downloaded from FREE 1975 Porsche 911 (930) Turbo - Download Free 3D model by Karol Miklas (@karolmiklas) [8568d9d] - Sketchfab with GLB format and Texture size: 1k. Then uploaded to IPFS.
Code:
useEffect(() => {
if (engine) {
const url =
'https://ipfs.io/ipfs/QmeciRLhTmE7bw5r5h76kqrftuQasXMgnFikx4KmrdGNEm';
SceneLoader.LoadAsync(url, undefined, engine, undefined, ".glb").then(loadScene => {
setScene(loadScene);
loadScene.createDefaultCameraOrLight(true, undefined, true);
(loadScene.activeCamera as ArcRotateCamera).alpha += Math.PI;
(loadScene.activeCamera as ArcRotateCamera).radius = 10;
setCamera(loadScene.activeCamera!);
});
}
}, [engine]);