I have three *.glb.
I first convert them to blob files via
const blob = new Blob( [ response ] );
then I try to load them via
( blob as Blob ).arrayBuffer().then(
( buf ) => {
loader.parse( buf , '', ( gltf ) => {
...
I get
Error: THREE.GLTFLoader: JSON content not found.
at new GLTFBinaryExtension (vendor.js:144728:13)
at GLTFLoader.parse (vendor.js:143976:52)
at main.js:1543:20
at ZoneDelegate.invoke (polyfills.js:381:26)
at Object.onInvoke (vendor.js:55934:33)
at ZoneDelegate.invoke (polyfills.js:380:52)
at Zone.run (polyfills.js:143:43)
at polyfills.js:1285:36
at ZoneDelegate.invokeTask (polyfills.js:415:31)
at Object.onInvokeTask (vendor.js:55921:33)
and for another one
RangeError: Offset is outside the bounds of the DataView
at DataView.getUint32 ()
at new GLTFBinaryExtension (vendor.js:144710:37)
at GLTFLoader.parse (vendor.js:143976:52)
at main.js:1543:20
at ZoneDelegate.invoke (polyfills.js:381:26)
at Object.onInvoke (vendor.js:55934:33)
at ZoneDelegate.invoke (polyfills.js:380:52)
at Zone.run (polyfills.js:143:43)
at polyfills.js:1285:36
at ZoneDelegate.invokeTask (polyfills.js:415:31)
any ideas why there’s a problem?
by the way it works fine when using loader.load but I want to avoid loading from my server and instead used the cached blob store in indexedDb.
Also here is the start og my glb as blob
glTF����JSON{“asset”:{“generator”:“Khronos glTF Blender I/O v1.5.17”,“version”:“2.0”},“scene”:0,“scenes”:[{“name”:“Scene”,“nodes”:[6,225]}],“nodes”:
Thanks in advance